
:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #17211d;
  --muted: #62736b;
  --line: #d9e1dc;
  --accent: #157f5f;
  --accent-dark: #0e6047;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 2;
}
.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  font-size: 18px;
}
nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 6px;
}
nav a:hover { background: #edf2ef; color: var(--ink); }
main {
  width: calc(100% - 48px);
  margin: 28px auto 56px;
}
h1, h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.2;
}
h1 { font-size: 30px; }
h2 { font-size: 18px; margin-bottom: 14px; }
.muted { color: var(--muted); margin: 6px 0 0; }
.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.template-row-actions {
  align-items: center;
  gap: 6px;
}
.template-row-actions .inline-form {
  align-items: center;
}
.template-duplicate-inline-form {
  gap: 6px;
}
.template-duplicate-select {
  width: clamp(138px, 16vw, 220px);
  min-height: 30px;
  margin: 0;
  padding: 5px 28px 5px 8px;
  font-size: 12px;
  line-height: 1.2;
}
.template-row-actions .compact-button {
  min-height: 30px;
  margin-top: 0;
  padding: 5px 8px;
  gap: 7px;
  font-size: 12px;
  line-height: 1.2;
}
.template-row-actions .compact-button.has-icon::before {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
  background-size: 17px 17px;
}
.template-delete-note {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  line-height: 1.3;
  white-space: nowrap;
}
.templates-table th:last-child,
.templates-table td:last-child {
  min-width: 460px;
}
.campaign-settings {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 20px;
}
.campaign-wizard {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.wizard-step {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
  min-height: 86px;
}
.wizard-step strong {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf2ef;
  margin-bottom: 7px;
}
.wizard-step span,
.wizard-step small {
  display: block;
}
.wizard-step small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.wizard-step.done {
  border-color: #9dd6c1;
  background: #f1fbf6;
}
.wizard-step.done strong {
  background: var(--accent);
  color: #fff;
}
.campaign-cockpit {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
}
.campaign-product-url-blocker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  border: 2px solid #c0392b;
  border-left-width: 8px;
  border-radius: 10px;
  background: #fff1ef;
  color: #612018;
  padding: 18px 20px;
  box-shadow: 0 8px 22px rgba(192, 57, 43, 0.12);
  min-width: 0;
  overflow-wrap: anywhere;
}
.campaign-product-url-blocker > div {
  min-width: 0;
}
.campaign-product-url-blocker h2 {
  margin: 3px 0 7px;
  color: #7d251b;
}
.campaign-product-url-blocker p {
  margin: 6px 0;
}
.campaign-product-url-blocker ul {
  margin: 8px 0;
  padding-left: 22px;
}
.campaign-product-url-blocker .button {
  flex: 0 0 auto;
  margin-top: 0;
}
.campaign-product-url-kicker {
  color: #a52d21;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.campaign-action-blocked {
  max-width: 270px;
  margin: 7px 0 0;
  color: #a52d21;
  font-size: 12px;
  font-weight: 800;
}
.cockpit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.cockpit-state {
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f4fbf7;
  padding: 12px 14px;
}
.cockpit-state.warn {
  border-left-color: #c47a00;
  background: #fff8eb;
}
.cockpit-state.bad {
  border-left-color: #c0392b;
  background: #fff3f1;
}
.cockpit-state span,
.cockpit-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}
.cockpit-state strong {
  display: block;
  font-size: 20px;
  margin-top: 2px;
}
.cockpit-state p {
  margin: 4px 0 0;
  color: var(--muted);
}
.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}
.cockpit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
}
.cockpit-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  margin-top: 3px;
}
.campaign-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.campaign-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.campaign-check-item.ok {
  border-color: #adddca;
  background: #f4fbf7;
}
.campaign-check-item.warn {
  border-color: #ecd19c;
  background: #fffaf0;
}
.campaign-check-item.bad {
  border-color: #efb4aa;
  background: #fff6f4;
}
.check-symbol {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #20392f;
  color: #fff;
  font-weight: 850;
  line-height: 1;
}
.campaign-check-item.warn .check-symbol {
  background: #b87500;
}
.campaign-check-item.bad .check-symbol {
  background: #c0392b;
}
.campaign-check-item strong,
.campaign-check-item p {
  margin: 0;
}
.campaign-check-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}
.campaign-control-actions {
  margin-top: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}
.recommendation-exclusion-impact {
  margin-top: 16px;
}
.recommendation-exclusion-impact h2 {
  margin: 0 0 4px;
}
.recommendation-exclusion-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0 18px;
  margin: 14px 0;
}
.recommendation-exclusion-summary div {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.recommendation-exclusion-summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.recommendation-exclusion-summary dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}
.danger-zone {
  border-left: 4px solid #c0392b;
  padding-left: 14px;
}
.quick-test-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.quick-test-buttons form {
  margin: 0;
  max-width: 100%;
}
.inline-form {
  display: inline-flex;
  margin: 0;
}
.quick-test-button {
  min-height: 36px;
  margin-top: 0;
  padding: 8px 10px;
  background: #22362f;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.real-test-section {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 20px;
}
.html-test-section {
  border-bottom: 1px solid var(--line);
  margin: 8px 0 20px;
  padding-bottom: 20px;
}
.real-test-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.real-test-header h2 {
  margin-bottom: 6px;
}
.real-test-ab-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.real-test-ab-summary strong {
  color: var(--ink);
}
.real-test-ab-summary > div,
.real-test-variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.real-test-variant-badge {
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #cfe5db;
  border-radius: 999px;
  background: #f2faf6;
  color: #0f6b50;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.compact-button {
  min-height: 36px;
  margin-top: 0;
  padding: 8px 10px;
  white-space: nowrap;
}
.template-save-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 10px 0 14px;
}
.template-save-row-bottom {
  justify-content: flex-start;
  margin-top: 18px;
}
.template-duplicate-panel {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}
.template-duplicate-panel h2 {
  margin-bottom: 8px;
}
.template-duplicate-form {
  max-width: 540px;
  margin: 0;
}
.template-duplicate-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.template-duplicate-controls select {
  flex: 1 1 240px;
}
.template-duplicate-controls button {
  margin-top: 0;
}
.template-block-list {
  display: grid;
  gap: 14px;
  margin: 12px 0;
}
.template-block-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  margin: 12px 0;
  padding: 18px;
  text-align: center;
}
.template-block,
.template-block-nav-item {
  --block-accent: #0f8b6d;
  --block-bg: #f6fbf9;
  --block-header-bg: #eaf7f2;
}
.template-block {
  border: 1px solid var(--border);
  border-left: 6px solid var(--block-accent);
  border-radius: 8px;
  background: var(--block-bg);
  padding: 14px;
}
.template-block.template-block-tone-1,
.template-block-nav-item.template-block-tone-1 {
  --block-accent: #2f6fbb;
  --block-bg: #f5f8fd;
  --block-header-bg: #eaf1fb;
}
.template-block.template-block-tone-2,
.template-block-nav-item.template-block-tone-2 {
  --block-accent: #a35c00;
  --block-bg: #fff8ef;
  --block-header-bg: #fff0dc;
}
.template-block.template-block-tone-3,
.template-block-nav-item.template-block-tone-3 {
  --block-accent: #8a4bb3;
  --block-bg: #faf6fd;
  --block-header-bg: #f2e9fa;
}
.template-block.template-block-tone-4,
.template-block-nav-item.template-block-tone-4 {
  --block-accent: #b6425f;
  --block-bg: #fff6f8;
  --block-header-bg: #fdeaf0;
}
.template-block.template-block-tone-5,
.template-block-nav-item.template-block-tone-5 {
  --block-accent: #5f6f2f;
  --block-bg: #f9fbf3;
  --block-header-bg: #eef5df;
}
.template-block.template-block-inactive,
.template-block-nav-item.template-block-inactive {
  --block-accent: #8a9690;
  --block-bg: #f2f4f3;
  --block-header-bg: #e7ece9;
  color: #5f6b65;
}
.template-block.template-block-inactive input,
.template-block.template-block-inactive textarea {
  background: #f8f9f8;
  color: #69756f;
}
.template-block-insert {
  display: flex;
  justify-content: flex-start;
  margin: -5px 0 -3px;
  padding-left: 8px;
}
.insert-template-block {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  min-height: 0;
  padding: 2px 0;
  text-decoration: none;
}
.insert-template-block:hover {
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
}
.insert-template-block:focus-visible {
  outline: 2px solid rgba(21, 127, 95, 0.28);
  outline-offset: 3px;
}
.template-block.dragging {
  opacity: 0.55;
}
.template-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--block-header-bg);
}
.template-block-header strong {
  color: var(--block-accent);
  margin-left: auto;
  margin-right: auto;
}
.template-block-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  white-space: nowrap;
}
.template-block-active-toggle input {
  margin: 0;
  width: auto;
}
.template-delete-modal[hidden] {
  display: none;
}
.template-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 20, 0.45);
}
.template-delete-dialog {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(17, 24, 20, 0.28);
  padding: 22px;
}
.template-delete-dialog h2 {
  margin-bottom: 8px;
}
.template-delete-dialog p {
  color: var(--muted);
  margin: 0 0 18px;
}
.template-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.drag-handle {
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: #22362f;
  cursor: grab;
}
.drag-handle:active {
  cursor: grabbing;
}
.test-recipient-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  margin: 14px 0 12px;
}
.test-recipient-grid label {
  margin-top: 0;
}
.real-test-table {
  min-width: 640px;
}
.real-test-action-cell {
  width: 150px;
  vertical-align: top;
}
.real-test-email {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.real-test-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.secondary-button {
  margin-top: 0;
  background: #22362f;
  white-space: nowrap;
}
.secondary-button:hover {
  background: var(--accent-dark);
}
.import-actions {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.feed-import-status {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid #cfe5db;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f4fbf8;
}
.feed-import-status.has-errors {
  border-color: #f0d8a8;
  border-left-color: #b7791f;
  background: #fffaf0;
}
.feed-import-status.feed-import-queued {
  border-color: #d8e6ef;
  border-left-color: #3f7fa4;
  background: #f2f8fb;
}
.feed-import-status.feed-import-running {
  border-color: #cfe5db;
  border-left-color: #0f8b6d;
  background: #f4fbf8;
}
.feed-import-state-banner {
  display: grid;
  gap: 3px;
  margin: -4px -6px 12px;
  padding: 14px 16px;
  border-radius: 7px;
  color: #fff;
  background: #315f7b;
}
.feed-import-state-banner strong {
  font-size: 19px;
  line-height: 1.2;
}
.feed-import-state-banner span {
  font-size: 13px;
  font-weight: 750;
  opacity: .94;
}
.feed-import-state-banner.is-success { background: #08775c; }
.feed-import-state-banner.is-running { background: #176f9c; }
.feed-import-state-banner.is-warning { background: #a36308; }
.feed-import-state-banner.is-error { background: #ad3535; }
.feed-import-state-banner.is-queued { background: #526f82; }
.feed-import-tasks {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(32, 57, 47, .14);
  border-radius: 7px;
  background: rgba(255, 255, 255, .72);
}
.feed-import-tasks summary { cursor: pointer; font-weight: 900; }
.feed-import-tasks ul { display: grid; gap: 5px; list-style: none; padding: 0; }
.feed-import-tasks li { display: flex; justify-content: space-between; gap: 12px; }
.task-status { font-weight: 850; color: var(--muted); }
.task-status.is-running { color: #176f9c; }
.task-status.is-completed { color: #08775c; }
.task-status.is-failed { color: #ad3535; }
.feed-import-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.feed-import-status-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.feed-import-status ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.feed-import-status li {
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.feed-import-progress {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(32, 57, 47, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
}
.feed-import-progress p {
  margin: 4px 0 0;
}
.feed-import-progress-bar {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9e3;
}
.feed-import-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.feed-import-errors {
  color: #6b4100;
}
.feed-import-diagnostics {
  margin-top: 10px;
  border-top: 1px solid rgba(32, 57, 47, 0.12);
  padding-top: 8px;
}
.feed-import-diagnostics summary {
  cursor: pointer;
  font-weight: 850;
}
.feed-import-source-diagnostics {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(32, 57, 47, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}
.feed-import-source-diagnostics dl {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: 4px 10px;
  margin: 8px 0;
}
.feed-import-source-diagnostics dt {
  color: var(--muted);
  font-weight: 850;
}
.feed-import-source-diagnostics dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.feed-import-source-diagnostics pre {
  max-height: 420px;
  overflow: auto;
  margin-top: 8px;
}
.feed-import-submit-form,
.feed-import-full-form,
.feed-import-reset-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.feed-import-submit-form button,
.feed-import-full-form button,
.feed-import-reset-form button {
  margin-top: 0;
}
.shop-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 18px;
}
.shop-filter label {
  margin: 0;
}
.shop-filter select {
  min-width: 220px;
}
.shop-filter button {
  margin-top: 0;
}
.table-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
}
.button.disabled {
  background: #d8e1dc;
  color: #74847d;
  cursor: default;
}
.detail-table th {
  width: 180px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  vertical-align: top;
}
.detail-table td {
  overflow-wrap: anywhere;
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin: 18px 0 28px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 80px;
}
.stat.compact { min-height: 64px; }
.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}
.order-diagnostics {
  margin: 8px 0 22px;
  padding-top: 4px;
}
.order-diagnostics .stats {
  margin-bottom: 10px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}
.campaign-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.panel, .narrow-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  min-width: 0;
}
.narrow-panel {
  margin: 32px 0 48px;
}
.template-editor-panel textarea[name="block_html[]"] {
  min-height: 280px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
td a { color: var(--accent-dark); font-weight: 700; }
label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.check-row input {
  width: auto;
}
input, textarea, select {
  width: 100%;
  border: 1px solid #bdc9c3;
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  background: #fff;
}
.readonly-email {
  border-color: #d5dfda;
  background: #f4f8f6;
  color: var(--ink);
  cursor: default;
  font-weight: 800;
}
textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.html-code-input {
  min-height: 280px;
  white-space: pre;
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 14px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary {
  background: #22362f;
}
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.danger-button {
  background: #c0392b;
}
.danger-button:hover {
  background: #922b21;
}
.danger-icon-button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  margin-top: 0;
  border-radius: 999px;
  background: #c0392b;
  font-size: 20px;
  line-height: 1;
}
.danger-icon-button:hover {
  background: #922b21;
}
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  background: #edf2ef;
  color: #284139;
  font-size: 12px;
  font-weight: 800;
}
.notice {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: min(520px, calc(100% - 32px));
  border: 1px solid #b9e5d4;
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: #e9f5f0;
  box-shadow: 0 20px 50px rgba(17, 24, 20, 0.22);
  color: #12352c;
  font-weight: 800;
  line-height: 1.35;
  padding: 18px 20px;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
  animation: notice-popup 2.1s ease forwards;
}
.notice-warning {
  border-color: #f0d8a8;
  border-left-color: #b7791f;
  background: #fff7e6;
  color: #5d3a00;
}
@keyframes notice-popup {
  0% {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.98);
  }
  8%, 72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -54%) scale(0.98);
  }
}
.preview-panel iframe {
  width: 100%;
  min-height: 640px;
  border: 1px solid var(--line);
  background: #fff;
}
.order-items-panel {
  margin-top: 18px;
}
td details summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
}
td details pre {
  max-width: 520px;
  max-height: 260px;
}
pre {
  white-space: pre-wrap;
  overflow: auto;
  background: #101815;
  color: #dce9e3;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
}
code {
  background: #edf2ef;
  padding: 2px 5px;
  border-radius: 4px;
}
@media (max-width: 860px) {
  header, .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  header { padding: 14px 18px; }
  nav { flex-wrap: wrap; }
  .shop-filter { align-items: stretch; flex-direction: column; }
  main { width: calc(100% - 20px); margin-top: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-wizard { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .real-test-header { flex-direction: column; }
  .test-recipient-grid { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
}

/* Quiet SaaS UX refresh */
:root {
  --bg: #f5f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --ink: #14201b;
  --muted: #64746d;
  --line: #e0e7e3;
  --line-strong: #cbd8d2;
  --accent: #147a5c;
  --accent-dark: #0f5f49;
  --accent-soft: #eaf6f1;
  --danger: #ba3a2f;
  --danger-dark: #8f2b23;
  --shadow: 0 18px 50px rgba(20, 32, 27, 0.07);
  --radius: 8px;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 248px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 22px 16px;
}
.app-content {
  min-width: 0;
  padding-left: 248px;
}
.mobile-topbar {
  display: none;
}
.shop-context-bar {
  --shop-color: #147a5c;
  --shop-bg: #eef8f3;
  --shop-line: #bfe2d4;
  --shop-ink: #0f5f49;
  --shop-ring: rgba(20, 122, 92, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--shop-line);
  background: linear-gradient(90deg, var(--shop-bg) 0%, #ffffff 82%);
  box-shadow: 0 10px 26px rgba(20, 32, 27, 0.06);
  padding: 12px 32px;
}
.shop-theme-iveronika {
  --shop-color: #4f63d7;
  --shop-bg: #f1f3fd;
  --shop-line: #ccd3f4;
  --shop-ink: #374597;
  --shop-ring: rgba(79, 99, 215, 0.17);
}
.shop-theme-galantra {
  --shop-color: #147a5c;
  --shop-bg: #eef8f3;
  --shop-line: #bfe2d4;
  --shop-ink: #0f5f49;
  --shop-ring: rgba(20, 122, 92, 0.16);
}
.shop-theme-default {
  --shop-color: #315f95;
  --shop-bg: #eef5ff;
  --shop-line: #bdd4f1;
  --shop-ink: #24446d;
  --shop-ring: rgba(49, 95, 149, 0.16);
}
.shop-context-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.shop-context-main strong {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--shop-ink);
  font-size: 20px;
  font-weight: 880;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.shop-context-kicker {
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--shop-ink);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  padding: 5px 9px;
  text-transform: uppercase;
}
.shop-context-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--shop-color);
  box-shadow: 0 0 0 4px var(--shop-ring);
}
.shop-context-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.shop-context-switcher label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  margin: 0;
}
.shop-context-switcher select {
  min-width: 180px;
  border-color: var(--shop-line);
  background: #fff;
  color: var(--ink);
  font-weight: 760;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}
.sidebar-nav {
  display: grid;
  width: 100%;
  align-items: stretch;
  gap: 18px;
  justify-content: stretch;
  justify-items: stretch;
}
.nav-group {
  display: grid;
  width: 100%;
  gap: 5px;
}
.nav-group-title {
  color: #83918b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  padding: 0 10px;
  text-transform: uppercase;
}
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  border-radius: var(--radius);
  color: #40504a;
  font-weight: 720;
  text-decoration: none;
  padding: 8px 10px;
}
.sidebar-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  opacity: 0.72;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.sidebar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-link:hover {
  background: var(--surface-soft);
  color: var(--ink);
}
.sidebar-link:hover .sidebar-icon {
  opacity: 0.92;
}
.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-link.active .sidebar-icon {
  opacity: 1;
  transform: translateX(1px);
}
.sidebar-user {
  display: grid;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.sidebar-user form {
  margin: 0;
}
.sidebar-user button {
  width: 100%;
  justify-content: center;
}
main {
  width: 100%;
  margin: 0;
  padding: 32px;
}
.toolbar {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 22px 24px;
}
.toolbar h1 {
  font-size: 28px;
  font-weight: 820;
}
.toolbar .actions {
  align-items: center;
  justify-content: flex-end;
}
.panel,
.narrow-panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(20, 32, 27, 0.045);
}
.card {
  padding: 18px;
}
.narrow-panel {
  margin: 0 0 48px;
}
.template-editor-panel {
  padding: 24px;
}
.campaign-workspace .panel {
  padding: 24px;
}
.campaign-settings {
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 24px;
}
.campaign-settings h2,
.real-test-section h2,
.html-test-section h2,
.panel h2 {
  font-size: 17px;
  font-weight: 820;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.grid,
.stats-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}
.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.compact-toolbar {
  align-items: center;
  padding: 18px 20px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
  box-shadow: 0 8px 24px rgba(20, 32, 27, 0.04);
  min-height: 76px;
  padding: 13px 15px;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.stat strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}
.campaign-progress-panel {
  display: grid;
  gap: 14px;
}
.progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.progress-heading h2 {
  margin-bottom: 3px;
}
.progress-heading strong {
  color: var(--accent-dark);
  font-size: 30px;
  line-height: 1;
}
.progress-summary {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e6eee9;
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #11845f 0%, #33a879 100%);
  transition: width 220ms ease;
}
.progress-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}
.progress-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 10px 12px;
}
.progress-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}
.progress-grid strong {
  color: var(--ink);
  font-size: 19px;
}
.subject-pilot-settings {
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 24px;
}
.subject-pilot-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.subject-pilot-heading h2 {
  margin-bottom: 4px;
}
.subject-pilot-details {
  margin-top: 14px;
}
.subject-pilot-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f9f8;
  color: var(--ink);
  cursor: pointer;
  font-weight: 780;
  padding: 0 13px;
}
.subject-pilot-details > summary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.subject-pilot-details-body {
  margin-top: 14px;
  border-left: 3px solid #cad9e8;
  padding-left: 14px;
}
.subject-pilot-details-body > .status {
  display: inline-flex;
  margin-top: 6px;
}
.subject-pilot-variants,
.subject-pilot-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.subject-pilot-variant {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #cad9e8;
  border-left: 4px solid #4573a7;
  border-radius: 7px;
  background: #f4f8fc;
  padding: 11px 13px;
}
.subject-pilot-variant:nth-child(2) {
  border-color: #d8c9e5;
  border-left-color: #8562a0;
  background: #faf6fc;
}
.subject-pilot-variant span,
.subject-pilot-total span,
.subject-pilot-result-head span,
.subject-pilot-metrics span,
.subject-pilot-evaluation span,
.subject-pilot-countdown span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}
.subject-pilot-variant strong {
  overflow-wrap: anywhere;
}
.subject-pilot-form {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(190px, 0.55fr) minmax(150px, 0.35fr);
  gap: 12px 16px;
  align-items: end;
  margin-top: 14px;
}
.subject-pilot-form .check-row {
  align-self: center;
  margin: 0;
}
.subject-pilot-form p,
.subject-pilot-form button {
  grid-column: 1 / -1;
}
.subject-pilot-form button {
  justify-self: start;
}
.subject-pilot-total {
  display: grid;
  gap: 2px;
  min-height: 42px;
  align-content: center;
  border-left: 3px solid #4573a7;
  padding-left: 12px;
}
.subject-pilot-total strong {
  font-size: 22px;
}
.subject-pilot-settings .notice,
.subject-pilot-report .notice {
  border: 1px solid #d8e1e8;
  border-radius: 7px;
  background: #f6f9fb;
  box-shadow: none;
  margin: 12px 0;
  padding: 12px 14px;
}
.subject-pilot-settings .notice.warning {
  border-color: #ead9a7;
  background: #fffaf0;
}
.subject-pilot-report .notice.success {
  border-color: #b9ddcf;
  background: #eff9f4;
}
.subject-pilot-settings .notice ul {
  margin: 7px 0 0;
  padding-left: 20px;
}
.subject-pilot-report {
  display: grid;
  gap: 14px;
  border-top: 5px solid #4573a7;
}
.subject-pilot-report .eyebrow {
  color: #4573a7;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.subject-pilot-result {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cad9e8;
  border-radius: 8px;
  background: #fff;
}
.subject-pilot-result.variant-b {
  border-color: #d8c9e5;
}
.subject-pilot-result-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 78px;
  background: #f1f6fb;
  padding: 13px;
}
.subject-pilot-result.variant-b .subject-pilot-result-head {
  background: #f8f3fb;
}
.subject-pilot-result-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.subject-pilot-result-head strong {
  overflow-wrap: anywhere;
}
.subject-pilot-key {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 2px solid #4573a7;
  border-radius: 50%;
  background: #fff;
  color: #315b89 !important;
  font-size: 18px !important;
}
.variant-b .subject-pilot-key {
  border-color: #8562a0;
  color: #67417f !important;
}
.pilot-recommendation,
.pilot-selected {
  border: 1px solid #b8dfd0;
  border-radius: 999px;
  background: #eaf7f1;
  color: #126348 !important;
  padding: 4px 7px;
  white-space: nowrap;
}
.pilot-selected {
  border-color: #c8cfe9;
  background: #f0f2fb;
  color: #3e4e92 !important;
}
.subject-pilot-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}
.subject-pilot-metrics div {
  display: grid;
  gap: 3px;
  min-width: 0;
  background: #fff;
  padding: 10px 12px;
}
.subject-pilot-metrics strong {
  font-size: 18px;
}
.subject-pilot-open-rate strong {
  color: #315b89;
  font-size: 22px;
}
.variant-b .subject-pilot-open-rate strong {
  color: #67417f;
}
.subject-pilot-evaluation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #cbdad3;
  border-radius: 8px;
  background: #cbdad3;
}
.subject-pilot-evaluation div {
  display: grid;
  gap: 3px;
  background: #f3faf7;
  padding: 12px 14px;
}
.subject-pilot-evaluation strong {
  overflow-wrap: anywhere;
}
.subject-pilot-countdown {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  border: 1px solid #ead9a7;
  border-radius: 8px;
  background: #fffaf0;
  padding: 12px 14px;
}
.subject-pilot-countdown strong {
  color: #765400;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.subject-pilot-countdown small {
  grid-column: 1 / -1;
  color: #6a5a31;
}
.subject-pilot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.subject-pilot-actions.continuation {
  border: 1px solid #b9ddcf;
  border-radius: 8px;
  background: #eff9f4;
  padding: 14px;
}
.subject-pilot-actions p {
  margin: 3px 0 0;
}
.selected-choice {
  border-color: #4f63a6;
  background: #eef1fb;
  color: #34437d;
}
.campaign-wizard {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.wizard-step {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 32, 27, 0.04);
  min-height: 88px;
  padding: 13px 14px;
}
.wizard-step strong {
  background: var(--surface-soft);
  color: var(--muted);
}
.wizard-step.done {
  border-color: #b8dfd0;
  background: #f4fbf8;
}
.wizard-step.done strong {
  background: var(--accent);
  color: #fff;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  min-width: 720px;
}
th,
td {
  padding: 11px 13px;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: #52625b;
  font-size: 11px;
  letter-spacing: 0;
}
tbody tr:hover {
  background: #fbfdfb;
}
.detail-table th {
  background: transparent;
  position: static;
}
input,
textarea,
select {
  border-color: var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 122, 92, 0.12);
  outline: none;
}
label {
  color: #26352f;
  font-size: 13px;
  font-weight: 780;
}
button,
.button,
.button-primary {
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: 0 8px 16px rgba(20, 122, 92, 0.13);
  font-weight: 820;
}
button:hover,
.button:hover,
.button-primary:hover {
  background: var(--accent-dark);
}
.button.secondary,
.secondary-button,
.button-secondary,
.quick-test-button {
  background: #263832;
  box-shadow: none;
}
.button.secondary:hover,
.secondary-button:hover,
.button-secondary:hover,
.quick-test-button:hover {
  background: #17251f;
}
.danger-button,
.danger-icon-button {
  background: var(--danger);
  box-shadow: none;
}
.danger-button:hover,
.danger-icon-button:hover {
  background: var(--danger-dark);
}
.compact-button {
  min-height: 34px;
  padding: 7px 10px;
}
.has-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}
.has-icon::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 0;
  background-color: transparent;
  background-image: var(--button-icon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  filter: brightness(0) invert(1) contrast(1.35);
  opacity: 1;
}
.compact-button.has-icon::before,
.quick-test-button.has-icon::before {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 0;
  background-color: transparent;
  background-size: 22px 22px;
}
.insert-template-block.has-icon::before {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  border-radius: 0;
  background-color: transparent;
  background-size: 14px 14px;
  filter: none;
  opacity: 0.95;
}
.danger-icon-button.has-icon {
  gap: 0;
}
.danger-icon-button.has-icon::before,
.drag-handle.has-icon::before {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  border-radius: 0;
  background-color: transparent;
  background-size: 20px 20px;
  margin: 0;
}
.icon-add { --button-icon: url("/static/icons/nav-campaign-new.png"); }
.icon-save { --button-icon: url("/static/icons/nav-templates.png"); }
.icon-send-test { --button-icon: url("/static/icons/nav-delivery-tests.png"); }
.icon-send-live { --button-icon: url("/static/icons/nav-campaigns.png"); }
.icon-stop { --button-icon: url("/static/icons/nav-audit.png"); }
.icon-import { --button-icon: url("/static/icons/nav-contacts.png"); }
.icon-database { --button-icon: url("/static/icons/nav-products.png"); }
.icon-audit { --button-icon: url("/static/icons/nav-audit.png"); }
.icon-edit { --button-icon: url("/static/icons/nav-templates.png"); }
.icon-delete { --button-icon: url("/static/icons/nav-audit.png"); }
.icon-remove { --button-icon: url("/static/icons/nav-audit.png"); }
.icon-cancel { --button-icon: url("/static/icons/nav-audit.png"); }
.icon-back { --button-icon: url("/static/icons/nav-dashboard.png"); }
.icon-next { --button-icon: url("/static/icons/nav-dashboard.png"); }
.icon-open { --button-icon: url("/static/icons/nav-dashboard.png"); }
.icon-report { --button-icon: url("/static/icons/nav-campaigns.png"); }
.icon-debug { --button-icon: url("/static/icons/nav-audit.png"); }
.icon-feed { --button-icon: url("/static/icons/nav-products.png"); }
.icon-check-mailbox { --button-icon: url("/static/icons/nav-delivery-tests.png"); }
.icon-shuffle { --button-icon: url("/static/icons/nav-customers.png"); }
.icon-block { --button-icon: url("/static/icons/nav-templates.png"); }
.icon-drag { --button-icon: url("/static/icons/nav-templates.png"); }
.status,
.status-badge {
  border: 1px solid #d8e7df;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 850;
}
.placement-inbox {
  border-color: #b9ddcf;
  background: #edf8f3;
  color: #0e6047;
}
.placement-bulk {
  border-color: #ead99b;
  background: #fff8dc;
  color: #785d00;
}
.placement-spam,
.placement-not_found {
  border-color: #efc6c0;
  background: #fff0ee;
  color: #9b2f22;
}
.placement-other {
  border-color: #d7dde0;
  background: #f4f6f6;
  color: #4d5b56;
}
.shop-filter {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
  padding: 14px;
}
.settings-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px 16px;
}
.stack-form {
  display: grid;
  gap: 14px;
}
.stack-form label {
  display: grid;
  gap: 6px;
  font-weight: 760;
}
.stack-form small {
  color: var(--muted);
  font-weight: 600;
}
.variable-text-samples {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}
.variable-text-samples li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.split {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
}
.contacts-workspace {
  display: grid;
  gap: 16px;
  align-items: start;
}
.contacts-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 14px 16px;
}
.contacts-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.contacts-panel {
  min-width: 0;
  padding: 16px;
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.panel-heading h2 {
  margin: 0;
}
.panel-heading p {
  margin: 2px 0 0;
}
.compact-form {
  margin: 0;
}
.contacts-actions textarea {
  min-height: 76px;
}
.contact-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.contact-search input,
.contact-search button,
.contact-search .button {
  margin-top: 0;
}
.listing-filter-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
}
.listing-filters {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(190px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 0;
}
.listing-filters label {
  margin: 0;
}
.listing-filters label > span {
  display: block;
  margin-bottom: 5px;
  font-weight: 800;
}
.listing-filters input,
.listing-filters select,
.listing-filters button,
.listing-filters .button {
  margin-top: 0;
}
.recommendation-lab-form {
  margin-bottom: 18px;
}
.recommendation-lab-form-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.recommendation-lab-form-grid label {
  margin: 0;
}
.recommendation-lab-form-grid button {
  margin-top: 0;
}
.recommendation-lab-test-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.recommendation-lab-test-form button {
  margin-top: 0;
}
.recommendation-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.recommendation-lab-results {
  margin-top: 16px;
}
.recommendation-lab-profile {
  margin-top: 18px;
}
.recommendation-lab-purchases {
  margin-top: 16px;
}
.laboratory-purchases-table {
  overflow-x: visible;
}
.laboratory-purchases-table > table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.laboratory-purchases-table > table > thead th:nth-child(1) { width: 20%; }
.laboratory-purchases-table > table > thead th:nth-child(2) { width: 13%; }
.laboratory-purchases-table > table > thead th:nth-child(3) { width: 12%; }
.laboratory-purchases-table > table > thead th:nth-child(4) { width: 11%; }
.laboratory-purchases-table > table > thead th:nth-child(5) { width: 10%; }
.laboratory-purchases-table > table > thead th:nth-child(6) { width: 10%; }
.laboratory-purchases-table > table > thead th:nth-child(7) { width: 24%; }
.laboratory-purchase-row > td {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.recommendation-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.recommendation-card {
  --recommendation-accent: #16866f;
  --recommendation-tint: #effaf6;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--recommendation-accent) 32%, var(--line));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(20, 32, 27, 0.055);
}
.recommendation-card-accent-2 {
  --recommendation-accent: #386cb0;
  --recommendation-tint: #f1f5fb;
}
.recommendation-card-accent-3 {
  --recommendation-accent: #a46a10;
  --recommendation-tint: #fff8e9;
}
.recommendation-card-accent-4 {
  --recommendation-accent: #7b5b91;
  --recommendation-tint: #f7f2fa;
}
.recommendation-card-topline {
  height: 5px;
  background: var(--recommendation-accent);
}
.recommendation-card-header {
  display: grid;
  grid-template-columns: 42px auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 86px;
  padding: 12px;
  background: var(--recommendation-tint);
}
.recommendation-card-header:not(:has(img)) {
  grid-template-columns: 42px minmax(0, 1fr);
}
.recommendation-card-rank {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--recommendation-accent);
  border-radius: 50%;
  background: var(--surface);
  color: var(--recommendation-accent);
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}
.recommendation-card-header img {
  width: 62px;
  height: 74px;
  border: 1px solid rgba(20, 32, 27, 0.1);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}
.recommendation-card-title {
  min-width: 0;
}
.recommendation-card-title h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.recommendation-card-score {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  color: var(--recommendation-accent);
}
.recommendation-card-score span {
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}
.recommendation-card-score strong {
  font-size: 19px;
}
.recommendation-card-reasons {
  margin: 0;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}
.recommendation-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 5px 12px;
  border-bottom: 1px solid var(--line);
}
.recommendation-card-fact {
  min-width: 0;
  padding: 6px 8px 6px 0;
}
.recommendation-card-fact:last-child {
  grid-column: 1 / -1;
}
.recommendation-card-fact dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
}
.recommendation-card-fact dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.recommendation-card-breakdown {
  padding: 10px 12px 12px;
}
.recommendation-card-breakdown h4 {
  margin: 0 0 5px;
  color: var(--recommendation-accent);
  font-size: 12px;
}
.recommendation-score-part {
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.recommendation-score-part-heading,
.recommendation-score-total {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
}
.recommendation-score-part-heading strong,
.recommendation-score-total strong {
  color: var(--recommendation-accent);
  white-space: nowrap;
}
.recommendation-score-part p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.recommendation-score-total {
  padding-top: 8px;
  border-top: 2px solid var(--recommendation-accent);
  font-weight: 850;
}
.recommendation-lab-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 4px;
}
@media (max-width: 1250px) {
  .recommendation-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.recommendation-lab-table {
  overflow-x: visible;
}
.recommendation-lab-table > table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.recommendation-lab-table > table > thead th:nth-child(1) { width: 15%; }
.recommendation-lab-table > table > thead th:nth-child(2) { width: 7%; }
.recommendation-lab-table > table > thead th:nth-child(3) { width: 24%; }
.recommendation-lab-table > table > thead th:nth-child(4) { width: 8%; }
.recommendation-lab-table > table > thead th:nth-child(5) { width: 8%; }
.recommendation-lab-table > table > thead th:nth-child(6) { width: 9%; }
.recommendation-lab-table > table > thead th:nth-child(7) { width: 10%; }
.recommendation-lab-table > table > thead th:nth-child(8) { width: 19%; }
.recommendation-product-row > td {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.recommendation-score-row > td {
  background: #fbfdfc;
  padding: 0 16px 18px;
}
.score-breakdown {
  margin-top: 8px;
}
.score-breakdown summary {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfdcd5;
  border-radius: 6px;
  background: #f6faf8;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  padding: 7px 9px;
}
.score-breakdown[open] summary {
  margin-bottom: 8px;
}
.score-breakdown-table {
  overflow: visible;
}
.score-breakdown-table table {
  width: 100%;
  min-width: 0;
}
.score-breakdown-table th,
.score-breakdown-table td {
  padding: 7px 8px;
}
.score-breakdown-total td {
  font-weight: 820;
}
.score-breakdown-expanded {
  margin-top: 0;
}
.score-breakdown-expanded h3 {
  margin: 0 0 8px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .recommendation-card-grid {
    grid-template-columns: 1fr;
  }
  .laboratory-purchases-table > table,
  .laboratory-purchases-table > table > tbody,
  .recommendation-lab-table > table,
  .recommendation-lab-table > table > tbody {
    display: block;
    width: 100%;
  }
  .laboratory-purchases-table > table > thead,
  .recommendation-lab-table > table > thead {
    display: none;
  }
  .laboratory-purchase-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    border-top: 1px solid var(--line);
    padding: 16px 4px;
  }
  .laboratory-purchase-row > td {
    display: block;
    border: 0;
    padding: 0;
  }
  .laboratory-purchase-row > td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
  }
  .laboratory-purchase-row > td:nth-child(1),
  .laboratory-purchase-row > td:nth-child(7) {
    grid-column: 1 / -1;
  }
  .laboratory-purchase-empty,
  .laboratory-purchase-empty > td {
    display: block;
    width: 100%;
  }
  .recommendation-product-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    border-top: 1px solid var(--line);
    padding: 16px 4px 12px;
  }
  .recommendation-product-row > td {
    display: block;
    border: 0;
    padding: 0;
  }
  .recommendation-product-row > td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    text-transform: uppercase;
  }
  .recommendation-product-row > td:nth-child(1),
  .recommendation-product-row > td:nth-child(3),
  .recommendation-product-row > td:nth-child(8) {
    grid-column: 1 / -1;
  }
  .recommendation-score-row {
    display: block;
  }
  .recommendation-score-row > td {
    display: block;
    border: 0;
    padding: 0 4px 18px;
  }
  .score-breakdown-table th,
  .score-breakdown-table td {
    padding: 7px 6px;
  }
}
.unsubscribe-reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.reason-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 8px 10px;
}
.reason-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.reason-stat strong {
  color: var(--ink);
  font-size: 18px;
}
.compact-muted {
  margin: 0;
}
.sent-recommendation-history {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 18px;
  overflow: hidden;
}
.sent-recommendation-heading,
.sent-recommendation-campaign > header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}
.sent-recommendation-heading h2,
.sent-recommendation-campaign h3,
.sent-recommendation-campaign p {
  margin-top: 0;
}
.sent-recommendation-heading .muted {
  margin-bottom: 0;
}
.sent-recommendation-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 84%, var(--bg));
  color: var(--muted);
  padding: 22px;
  text-align: center;
}
.sent-recommendation-campaign {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  overflow: hidden;
}
.sent-recommendation-campaign > header {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, var(--accent-soft));
}
.sent-recommendation-campaign h3 {
  margin-bottom: 4px;
  font-size: 18px;
}
.sent-recommendation-campaign header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}
.sent-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 12px;
  padding: 14px;
}
.sent-recommendation-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.sent-recommendation-image {
  position: relative;
  min-height: 150px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 75%, var(--bg));
}
.sent-recommendation-image-link {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 150px;
  align-items: center;
  justify-content: center;
}
.sent-recommendation-image img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #fff;
}
.sent-recommendation-image-placeholder {
  max-width: 78px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}
.sent-recommendation-content {
  min-width: 0;
  overflow: hidden;
  padding: 13px;
}
.sent-recommendation-title-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px 9px;
  align-items: start;
}
.sent-recommendation-title-row h4 {
  min-width: 0;
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sent-recommendation-title-row h4 a,
.sent-recommendation-title-row h4 span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.sent-recommendation-position {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}
.sent-recommendation-score {
  grid-column: 2;
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 780;
}
.sent-recommendation-reasons {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.sent-recommendation-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.sent-recommendation-details span {
  display: flex;
  flex-direction: column;
  min-width: 62px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
  padding: 5px 7px;
}
.sent-recommendation-details small,
.sent-recommendation-price small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sent-recommendation-details strong {
  margin-top: 2px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.sent-recommendation-price {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}
.sent-recommendation-price strong {
  color: var(--accent-dark);
  font-size: 16px;
}
.sent-recommendation-key {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.contact-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  margin-bottom: 18px;
}
.contact-detail-grid .panel,
.contact-detail-grid + .panel {
  padding: 18px;
}
.eligibility-box {
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f4fbf7;
  margin-bottom: 16px;
  padding: 12px 14px;
}
.eligibility-box.warn {
  border-left-color: #c47a00;
  background: #fff8eb;
}
.eligibility-box strong {
  display: block;
  font-size: 16px;
}
.eligibility-box p {
  color: var(--muted);
  margin: 4px 0 0;
}
.contacts-table table {
  min-width: 680px;
}
.contacts-table th,
.contacts-table td {
  padding: 8px 10px;
}
.table-subtext {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.campaign-action {
  margin: 0;
}
.campaign-action form {
  margin: 0;
}
.campaign-action button,
.actions .button,
.actions button {
  margin-top: 0;
}
.action-note {
  max-width: 260px;
  font-size: 12px;
  margin-top: 7px;
}
.real-test-section,
.html-test-section {
  border-bottom-color: var(--line);
}
.real-test-header {
  align-items: center;
}
.real-test-action-cell {
  width: 170px;
}
.test-recipient-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.template-save-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}
.template-save-row-bottom {
  justify-content: flex-start;
}
.template-block {
  border-color: var(--line);
  border-left-width: 4px;
  box-shadow: 0 8px 24px rgba(20, 32, 27, 0.04);
}
.template-block-header {
  background: color-mix(in srgb, var(--block-header-bg) 72%, white);
}
.template-block-header strong {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.insert-template-block {
  color: var(--accent-dark);
}
.template-editor-panel {
  max-width: 1500px;
}
.subject-ab-settings {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  margin: 18px 0 24px;
  padding: 14px 16px 16px;
}
.subject-ab-settings legend {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  padding: 0 8px;
}
.subject-ab-settings .split {
  margin-top: 12px;
}
.recommendation-card-style-settings {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin: 14px 0 20px;
  padding: 14px 16px 16px;
}
.recommendation-card-style-settings legend {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  padding: 0 8px;
}
.recommendation-card-style-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}
.recommendation-card-style-option {
  align-items: center;
  background: var(--surface-soft);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) 116px;
  margin: 0;
  padding: 12px;
}
.recommendation-card-style-option:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 7%, white);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 13%, transparent);
}
.recommendation-card-style-option input[type="radio"] {
  accent-color: var(--accent);
  height: 18px;
  margin: 0;
  width: 18px;
}
.recommendation-card-style-copy strong,
.recommendation-card-style-copy small {
  display: block;
}
.recommendation-card-style-copy strong {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}
.recommendation-card-style-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.recommendation-card-style-preview {
  background: #fff;
  border: 1px solid #d7e0dc;
  border-radius: 6px;
  box-sizing: border-box;
  color: #17231f;
  display: block;
  min-height: 112px;
  padding: 7px;
  text-align: center;
}
.recommendation-card-style-preview i {
  background: linear-gradient(135deg, #e6eeea, #c8d6d0);
  border-radius: 3px;
  display: block;
  height: 38px;
  margin: 0 auto 4px;
  width: 58px;
}
.recommendation-card-style-preview b,
.recommendation-card-style-preview em,
.recommendation-card-style-preview small {
  display: block;
  font-style: normal;
  line-height: 1.2;
}
.recommendation-card-style-preview b {
  color: #15927f;
  font-size: 9px;
}
.recommendation-card-style-preview em {
  color: #16803d;
  font-size: 10px;
  font-weight: 900;
  margin-top: 3px;
}
.recommendation-card-style-preview small {
  color: #56675f;
  font-size: 8px;
  margin-top: 2px;
}
.recommendation-card-style-preview mark {
  background: #ed5a56;
  border-radius: 4px;
  color: #fff;
  display: block;
  font-size: 7px;
  font-weight: 900;
  margin: 0 0 3px;
  padding: 2px 4px;
  text-align: left;
  width: fit-content;
}
.recommendation-card-style-preview.is-enhanced i {
  height: 27px;
}
.recommendation-card-style-preview.is-enhanced span {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 4px;
}
.recommendation-card-style-preview.is-enhanced u {
  background: #d40055;
  color: #fff36a;
  font-size: 8px;
  font-weight: 900;
  padding: 3px 1px;
  text-decoration: none;
}
.recommendation-card-style-preview.is-enhanced u + u {
  background: #263c35;
  color: #fff;
}
.fixed-recommendation-settings {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin: 14px 0 20px;
  padding: 14px 16px 16px;
}
.fixed-recommendation-settings legend {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  padding: 0 8px;
}
.fixed-product-slot {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 64px minmax(0, 1fr) auto;
  margin-top: 10px;
  padding: 10px;
}
.fixed-product-position {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.fixed-product-thumb {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  height: 62px;
  justify-content: center;
  overflow: hidden;
  width: 62px;
}
.fixed-product-thumb img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}
.fixed-product-placeholder {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  padding: 4px;
  text-align: center;
}
.fixed-product-control {
  min-width: 0;
  position: relative;
}
.fixed-product-control label {
  margin-top: 0;
}
.fixed-product-control input[type="search"] {
  margin-bottom: 0;
}
.fixed-product-selected {
  margin: 5px 0 0;
}
.fixed-product-results {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(20, 32, 27, 0.14);
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: calc(100% - 20px);
  z-index: 30;
}
.fixed-product-result,
.fixed-product-result-empty {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}
.fixed-product-result:hover,
.fixed-product-result:focus {
  background: var(--surface-soft);
  color: var(--accent-dark);
}
.fixed-product-result-empty {
  color: var(--muted);
  font-weight: 600;
}
.fixed-product-warning {
  background: #fff7db;
  border: 1px solid #e5c35d;
  border-radius: 7px;
  color: #5d4a13;
  font-size: 12px;
  line-height: 1.45;
  margin: 12px 0 0;
  padding: 9px 11px;
}
.template-builder-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  margin: 12px 0 22px;
}
.template-editor-fallback-notice {
  grid-column: 1 / -1;
  border: 1px solid #e5c35d;
  border-radius: 8px;
  background: #fff7db;
  color: #5d4a13;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  padding: 10px 12px;
}
.template-block-navigator {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}
.template-block-nav-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.template-block-nav-head strong {
  color: var(--ink);
  font-size: 13px;
}
.template-block-nav-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.template-block-nav-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.template-block-nav-item {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  cursor: grab;
}
.template-block-nav-jump {
  appearance: none;
  align-items: center;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--block-accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--block-bg) 82%, white);
  box-shadow: none;
  color: inherit;
  cursor: inherit;
  margin: 0;
  padding: 7px 8px;
  text-align: left;
}
.template-block-nav-jump:hover,
.template-block-nav-item.is-current .template-block-nav-jump {
  border-color: color-mix(in srgb, var(--block-accent) 48%, var(--line));
  background: color-mix(in srgb, var(--block-header-bg) 82%, white);
  color: inherit;
}
.template-block-nav-item.is-current .template-block-nav-jump {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--block-accent) 16%, transparent);
}
.template-block-nav-number,
.template-block-sequence {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.template-block-nav-number {
  width: 30px;
  height: 30px;
  background: var(--block-accent);
}
.template-block-sequence {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background: var(--block-accent);
}
.template-block-nav-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.template-block-nav-text strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-block-nav-text small {
  color: var(--block-accent);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.template-block-move {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  margin: 0;
  padding: 0;
}
.template-block-move:hover {
  border-color: #b6ddcf;
  background: #edf8f3;
  color: var(--accent-dark);
}
.template-block-move:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.template-block-nav-item.is-dragging {
  cursor: grabbing;
  opacity: 0.55;
}
.template-block-nav-item.drop-before .template-block-nav-jump {
  box-shadow: inset 0 3px 0 var(--block-accent);
}
.template-block-nav-item.drop-after .template-block-nav-jump {
  box-shadow: inset 0 -3px 0 var(--block-accent);
}
.template-block-workspace {
  min-width: 0;
}
.template-block-list {
  gap: 12px;
  margin: 0;
}
.template-block {
  padding: 12px;
  scroll-margin-top: 18px;
}
.template-block-selected {
  box-shadow: 0 0 0 3px rgba(20, 122, 92, 0.11), 0 8px 24px rgba(20, 32, 27, 0.04);
}
.template-block-header {
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 8px;
}
.template-block-header strong {
  margin: 0;
  min-width: 82px;
}
.template-block-header-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.template-block label {
  margin-top: 8px;
}
.template-editor-panel .template-block textarea[name="block_html[]"] {
  min-height: 170px;
  max-height: 46vh;
  font-size: 12px;
  line-height: 1.5;
}
.template-block-nav-footer {
  display: grid;
  gap: 8px;
}
.template-block-add-button,
.template-block-save-button {
  justify-content: center;
  width: 100%;
}
.auth-panel {
  width: min(460px, calc(100vw - 32px));
  margin: 10vh auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}
.auth-brand {
  margin-bottom: 12px;
}
.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.auth-form button {
  margin-top: 8px;
}
.user-inline-form {
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.user-inline-form input[type="password"],
.user-inline-form input[name="display_name"] {
  max-width: 220px;
}
.compact-check {
  margin: 0;
}
.notice {
  box-shadow: 0 24px 70px rgba(20, 32, 27, 0.18);
}
.public-shell main {
  padding: 32px;
}
.unsubscribe-page {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: center;
}
.unsubscribe-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  width: min(1240px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(20, 32, 27, 0.11);
}
.unsubscribe-brand-panel,
.unsubscribe-form-panel {
  padding: clamp(28px, 4vw, 56px);
}
.unsubscribe-brand-panel {
  display: grid;
  align-content: start;
  gap: clamp(24px, 4vw, 42px);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
}
.unsubscribe-brand-name {
  color: var(--accent-dark);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}
.unsubscribe-brand-copy {
  max-width: 390px;
}
.unsubscribe-brand-copy h1 {
  color: #0d4f3d;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}
.unsubscribe-brand-copy p {
  color: #42524b;
  font-size: 18px;
  line-height: 1.55;
  margin: 18px 0 0;
}
.unsubscribe-illustration {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  min-height: 260px;
}
.unsubscribe-envelope {
  position: relative;
  width: min(260px, 72%);
  aspect-ratio: 1.42;
  border: 1px solid rgba(189, 128, 118, 0.16);
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(145deg, #ffe4df 0%, #f8bfb4 100%);
  box-shadow: 0 20px 44px rgba(72, 47, 42, 0.14);
}
.unsubscribe-envelope::before,
.unsubscribe-envelope::after {
  position: absolute;
  inset: auto 0 0;
  height: 72%;
  border-radius: 0 0 14px 14px;
  content: "";
}
.unsubscribe-envelope::before {
  background: linear-gradient(145deg, transparent 49%, rgba(255, 255, 255, 0.42) 50%);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.unsubscribe-envelope::after {
  background: linear-gradient(215deg, transparent 49%, rgba(237, 152, 139, 0.32) 50%);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.unsubscribe-envelope-flap {
  position: absolute;
  inset: -42% 13% auto;
  height: 72%;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd9d2 0%, #f4afa4 100%);
  transform: rotate(45deg);
}
.unsubscribe-envelope-card {
  position: absolute;
  inset: -16% 14% 18%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 210, 205, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(20, 32, 27, 0.08);
}
.unsubscribe-envelope-card span {
  width: 52px;
  height: 52px;
  border-radius: 18px 18px 22px 22px;
  background: #0f5f49;
  clip-path: polygon(50% 88%, 12% 50%, 12% 25%, 30% 10%, 50% 26%, 70% 10%, 88% 25%, 88% 50%);
}
.unsubscribe-thread {
  position: absolute;
  right: 12%;
  bottom: 18%;
  width: 74px;
  height: 38px;
  border-top: 10px solid #f3c0b8;
  border-radius: 50%;
  transform: rotate(-10deg);
}
.unsubscribe-form-panel {
  display: grid;
  align-content: start;
  border-left: 1px solid var(--line);
  background: #fbfcfb;
}
.unsubscribe-state-icon {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #c6ecd9;
  color: var(--accent-dark);
  font-weight: 900;
}
.unsubscribe-state h2 {
  color: #0d4f3d;
  font-size: 22px;
  margin: 0;
}
.unsubscribe-alert {
  border: 1px solid #f0d8a8;
  border-left: 5px solid #b7791f;
  border-radius: 8px;
  background: #fff7e6;
  color: #5d3a00;
  font-weight: 800;
  margin-top: 18px;
  padding: 13px 14px;
}
.unsubscribe-form {
  display: grid;
  gap: 10px;
  margin-top: 0;
}
.unsubscribe-alert + .unsubscribe-form {
  margin-top: 18px;
}
.unsubscribe-form label,
.unsubscribe-reasons legend,
.unsubscribe-field-label {
  color: var(--ink);
  font-weight: 850;
  margin: 0;
}
.unsubscribe-email-text {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}
.unsubscribe-field-note {
  color: var(--muted);
  font-size: 13px;
  margin: -2px 0 8px;
}
.unsubscribe-reasons {
  display: grid;
  gap: 8px;
  border: 0;
  margin: 8px 0 2px;
  padding: 0;
}
.unsubscribe-reasons legend {
  margin-bottom: 4px;
}
.unsubscribe-reasons legend span {
  color: var(--muted);
  font-weight: 600;
}
.unsubscribe-reason-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #33463e;
  cursor: pointer;
  padding: 8px 10px;
}
.unsubscribe-reason-row:hover,
.unsubscribe-reason-row:focus-within {
  border-color: #cbe8dc;
  background: #f3faf7;
}
.unsubscribe-reason-row input {
  width: auto;
  accent-color: var(--accent);
}
.unsubscribe-form textarea {
  min-height: 88px;
  border-radius: 8px;
  font-family: inherit;
  line-height: 1.5;
}
.unsubscribe-submit {
  width: 100%;
  min-height: 54px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(20, 122, 92, 0.18);
  font-size: 17px;
  margin-top: 6px;
}
.unsubscribe-submit:hover {
  background: var(--accent-dark);
}
.unsubscribe-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  border: 1px solid #d7ebe2;
  border-radius: 12px;
  background: #fff;
  padding: clamp(24px, 4vw, 34px);
}
.unsubscribe-state-icon {
  width: 52px;
  height: 52px;
  font-size: 24px;
}
.unsubscribe-state p {
  color: #42524b;
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}
.unsubscribe-state strong {
  color: var(--ink);
}
.unsubscribe-state-warning {
  border-color: #f0d8a8;
  background: #fffaf0;
}
.unsubscribe-state-warning .unsubscribe-state-icon {
  background: #ffe2a8;
  color: #7a4a00;
}
@media (max-width: 980px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }
  .sidebar > .brand {
    display: none;
  }
  .mobile-topbar {
    display: flex;
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 12px 18px;
  }
  .sidebar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    min-width: max-content;
    width: max-content;
  }
  .nav-group {
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
  }
  .nav-group-title {
    display: none;
  }
  .sidebar-link {
    width: auto;
    white-space: nowrap;
  }
  .sidebar-link.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }
  .sidebar-user {
    align-self: center;
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-top: 0;
    min-width: max-content;
    border-top: 0;
    padding-top: 0;
  }
  .sidebar-user button {
    width: auto;
  }
  .app-content {
    padding-left: 0;
  }
  .shop-context-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px 18px;
  }
  .shop-context-main {
    justify-content: space-between;
  }
  .shop-context-main strong {
    font-size: 18px;
  }
  .shop-context-switcher {
    width: 100%;
  }
  .shop-context-switcher select {
    flex: 1 1 auto;
    min-width: 0;
  }
  main {
    padding: 18px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }
  .toolbar .actions {
    justify-content: flex-start;
  }
  .cockpit-heading {
    flex-direction: column;
  }
  .cockpit-heading .button {
    align-self: flex-start;
  }
  .campaign-wizard,
  .settings-grid,
  .form-grid,
  .split,
  .contacts-workspace,
  .contacts-actions,
  .contacts-columns,
  .contact-detail-grid,
  .campaign-checklist,
  .subject-pilot-form,
  .recommendation-lab-form-grid,
  .two-cols,
  .test-recipient-grid,
  .recommendation-card-style-grid,
  .template-builder-layout {
    grid-template-columns: 1fr;
  }
  .template-block-navigator {
    position: static;
    max-height: none;
  }
  .template-block-nav-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .progress-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .subject-pilot-form p,
  .subject-pilot-form button {
    grid-column: auto;
  }
}
@media (max-width: 640px) {
  main {
    padding: 12px;
  }
  .campaign-product-url-blocker {
    flex-direction: column;
    padding: 15px;
    width: 100%;
  }
  .campaign-product-url-blocker > div,
  .campaign-product-url-blocker .button {
    width: 100%;
  }
  .sent-recommendation-heading,
  .sent-recommendation-campaign > header {
    flex-direction: column;
  }
  .sent-recommendation-grid {
    display: block;
    padding: 10px;
  }
  .sent-recommendation-card {
    display: block;
  }
  .sent-recommendation-card + .sent-recommendation-card {
    margin-top: 10px;
  }
  .sent-recommendation-image,
  .sent-recommendation-image-link {
    min-height: 120px;
  }
  .sent-recommendation-image {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sent-recommendation-image img {
    height: 170px;
  }
  .toolbar,
  .panel,
  .narrow-panel {
    padding: 16px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .progress-heading {
    flex-direction: column;
  }
  .progress-summary {
    align-items: flex-start;
  }
  .progress-actions {
    justify-content: flex-start;
  }
  .progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .subject-pilot-heading,
  .subject-pilot-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .subject-pilot-variants,
  .subject-pilot-results,
  .subject-pilot-evaluation {
    grid-template-columns: 1fr;
  }
  .subject-pilot-result-head {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .pilot-recommendation,
  .pilot-selected {
    grid-column: 2;
    justify-self: start;
  }
  .subject-pilot-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .subject-pilot-countdown {
    grid-template-columns: 1fr;
  }
  .subject-pilot-countdown small {
    grid-column: auto;
  }
  .contact-search {
    grid-template-columns: 1fr;
  }
  .listing-filters {
    grid-template-columns: 1fr;
  }
  .template-save-row {
    justify-content: flex-start;
  }
  .fixed-product-slot {
    align-items: start;
    grid-template-columns: 34px 54px minmax(0, 1fr);
  }
  .recommendation-card-style-option {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .recommendation-card-style-preview {
    grid-column: 2;
    width: 116px;
  }
  .fixed-product-thumb {
    height: 52px;
    width: 52px;
  }
  .fixed-product-clear {
    grid-column: 3;
    justify-self: start;
  }
  .template-block-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .template-block-header-actions {
    width: 100%;
  }
  .template-block-header-actions .remove-template-block {
    margin-left: auto;
  }
  .template-editor-panel .template-block textarea[name="block_html[]"] {
    min-height: 150px;
  }
  .real-test-header {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 860px) {
  .public-shell main {
    padding: 12px;
  }
  .unsubscribe-page {
    min-height: auto;
  }
  .unsubscribe-card {
    grid-template-columns: 1fr;
    border-radius: 12px;
  }
  .unsubscribe-brand-panel,
  .unsubscribe-form-panel {
    padding: 22px;
  }
  .unsubscribe-brand-panel {
    gap: 20px;
  }
  .unsubscribe-brand-copy h1 {
    font-size: 30px;
  }
  .unsubscribe-brand-copy p {
    font-size: 16px;
    margin-top: 12px;
  }
  .unsubscribe-illustration {
    display: none;
  }
  .unsubscribe-envelope {
    width: min(210px, 70%);
  }
  .unsubscribe-form-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .unsubscribe-state h2 {
    font-size: 20px;
  }
  .unsubscribe-reason-row {
    min-height: 48px;
  }
}
