:root {
  color-scheme: light;
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-soft: #f1f2f4;
  --text: #202223;
  --muted: #6d7175;
  --line: #dfe3e8;
  --brand: #246b5a;
  --brand-dark: #17483c;
  --accent: #b7791f;
  --danger: #a83232;
  --ok: #1f7a4d;
  --shadow: 0 1px 2px rgba(32, 34, 35, 0.08), 0 8px 24px rgba(32, 34, 35, 0.06);
}

.environment-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.environment-banner--sandbox {
  background: #fff4da;
  border-color: #dba537;
  color: #674208;
}

.environment-banner--live {
  background: #e7f3ed;
  border-color: #9bc8ad;
  color: #17483c;
}

.environment-banner > span {
  flex: 1 1 220px;
  font-size: 13px;
}

.environment-banner nav {
  display: flex;
  gap: 6px;
}

.environment-banner nav a {
  padding: 6px 12px;
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
}

.environment-banner nav a[aria-current="page"] {
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px #0002;
}

.sandbox-order {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.sandbox-order form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

a {
  color: var(--brand);
}

.shell {
  min-height: 100vh;
  padding: 22px 28px 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  margin-bottom: 22px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav h1 {
  margin: 0 18px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover {
  background: var(--surface-soft);
}

.nav form {
  margin-left: auto;
}

.content {
  max-width: 1180px;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.topline h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

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

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card h3,
.panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.metric {
  margin-bottom: 4px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

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

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid #c9cccf;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 0 8px 0 0;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.filters input,
.filters select {
  width: 190px;
  margin: 0;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--brand-dark);
}

button:disabled,
button:disabled:hover {
  border-color: #c9cccf;
  background: #eef0f2;
  color: var(--muted);
  cursor: not-allowed;
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--brand);
}

.button.secondary:hover,
button.secondary:hover {
  background: #eef6f3;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  background: #dff2e8;
  color: var(--ok);
}

.status.warn {
  background: #fff0da;
  color: var(--accent);
}

.status.error {
  background: #fbe4e4;
  color: var(--danger);
}

.setup-actions {
  margin: 16px 0 20px;
}

.settings-form {
  margin: 18px 0;
}

.settings-form h4 {
  margin: 20px 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--muted);
}

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

.settings-grid small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
}

.field-with-help {
  position: relative;
}

.field-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-help {
  position: relative;
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8c9c2;
  border-radius: 999px;
  background: #eef6f3;
  color: var(--brand);
  cursor: help;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  outline: none;
}

.field-help::after {
  content: attr(aria-label);
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 10px);
  width: min(320px, 78vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202223;
  box-shadow: 0 12px 28px rgba(32, 34, 35, 0.22);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: pre-line;
}

.field-help::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  border: 6px solid transparent;
  border-top-color: #202223;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.14s ease;
}

.field-help:hover::after,
.field-help:focus::after,
.field-help:hover::before,
.field-help:focus::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.field-help:hover::before,
.field-help:focus::before {
  transform: translateX(-50%);
}

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

.child-shop-connect {
  margin: 18px 0;
}

.child-shop-form {
  max-width: 520px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.log-stream {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 6px;
}

.log-stream.is-loading::after {
  content: "Lädt ältere Einträge...";
  display: block;
  padding: 12px;
  color: var(--muted);
}

.log-entry {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.log-entry-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.log-entry p {
  margin: 8px 0 0;
}

.log-entry details {
  margin-top: 8px;
}

.log-empty,
.log-hint {
  padding: 10px 0 0;
}

.stars,
.rh-stars {
  color: #d19619;
  letter-spacing: 1px;
  white-space: nowrap;
}

pre {
  max-width: 100%;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
}

.review-list,
.rh-reviews {
  display: grid;
  gap: 12px;
}

.review-detail-layout {
  display: grid;
  gap: 16px;
}

.review-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.review-summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.review-summary h3 {
  margin-top: 0;
}

.review-product-image {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.customer-kpis {
  display: grid;
  align-content: start;
  gap: 14px;
}

.customer-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.customer-kpi-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.metric.small {
  display: block;
  font-size: 22px;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  word-break: break-word;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.media-grid a {
  display: grid;
  place-items: center;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.media-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 820px) {
  .review-top-grid,
  .customer-kpi-grid {
    grid-template-columns: 1fr;
  }

  .customer-kpi-head,
  .review-summary {
    display: grid;
  }
}

.review-card,
.rh-review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.rh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.rh-count {
  color: var(--muted);
}

.rh-review-card p {
  margin: 8px 0 0;
}

.rh-reply {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--brand);
  background: #eef6f3;
}

.login {
  max-width: 420px;
  margin: 10vh auto;
}

.task-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(32, 34, 35, 0.45);
}

.task-overlay.is-visible {
  display: grid;
}

.task-box {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(32, 34, 35, 0.24);
  text-align: center;
}

.task-box h2 {
  margin: 12px 0 6px;
  font-size: 20px;
}

.task-message,
.task-time {
  margin: 0;
  color: var(--muted);
}

.task-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border: 4px solid var(--surface-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: task-spin 0.8s linear infinite;
}

.task-progress {
  height: 10px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.task-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.35s ease;
}

.task-percent {
  margin-bottom: 6px;
  font-weight: 700;
}

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

.widget-editor {
  display: grid;
  gap: 16px;
}

.widget-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.widget-sample {
  min-height: 40px;
  align-items: center;
  margin: 0;
}

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

.widget-card {
  display: grid;
  gap: 8px;
  min-height: 168px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.widget-card:hover,
.widget-card.is-active {
  border-color: var(--brand);
  background: #eef6f3;
}

.widget-card-art {
  display: block;
  height: 78px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(36, 107, 90, 0.12), rgba(183, 121, 31, 0.22)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.55) 18px 36px);
}

.widget-card small {
  color: var(--muted);
  line-height: 1.35;
}

.widget-editor-grid {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) minmax(380px, 500px);
  gap: 18px;
  align-items: start;
}

.widget-fields,
.widget-preview-panel {
  min-width: 0;
}

.widget-preview-panel {
  position: sticky;
  top: 14px;
}

.widget-preview-frame {
  min-height: 420px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f8;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.preview-actions button.is-active {
  border-color: var(--brand);
  background: #eef6f3;
  color: var(--brand);
}

.widget-preview-frame.is-mobile-preview {
  width: min(100%, 410px);
  min-height: 620px;
  margin-inline: auto;
  padding: 14px;
  border-color: #b8c9c2;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(32, 34, 35, 0.12);
}

.widget-preview-frame.is-loading {
  opacity: 0.64;
}

.widget-preview-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.widget-preview-dialog[hidden] {
  display: none;
}

.has-widget-preview-dialog {
  overflow: hidden;
}

.widget-preview-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 34, 35, 0.58);
}

.widget-preview-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 96vw);
  max-height: min(860px, 92vh);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.widget-preview-dialog__body {
  min-height: 560px;
  overflow: auto;
  margin: 0;
}

.widget-field-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.widget-field-nav a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.widget-field-sections {
  display: grid;
  gap: 14px;
}

.widget-fields .settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

#widget-branding .settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.widget-field-sections fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.widget-field-sections legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 800;
}

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

.color-field {
  display: grid;
  gap: 6px;
}

.color-control-row {
  display: grid;
  grid-template-columns: 44px minmax(128px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.color-picker {
  width: 44px;
  height: 38px;
  margin: 0;
  padding: 3px;
  border-radius: 6px;
  cursor: pointer;
}

.color-hex {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  text-transform: lowercase;
}

.color-copy {
  min-height: 38px;
  padding-inline: 10px;
  white-space: nowrap;
}

.widget-advanced summary {
  cursor: pointer;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
}

.chip.warn {
  border-color: #f3c969;
  background: #fff8e1;
}

.chip.selected {
  background: #eef6f2;
  border-color: #91c7b1;
}

.chip input {
  margin: 0;
}

.group-editor {
  display: grid;
  gap: 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.variant-option {
  display: grid;
  grid-template-columns: auto 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.variant-option img,
.variant-image-empty {
  width: 56px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.variant-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.collection-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.collection-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.collection-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.manual-collection {
  margin-top: 12px;
}

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

.request-campaign {
  margin-top: 16px;
}

.request-page-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.request-page-tabs a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.request-page-tabs a:hover,
.request-page-tabs a:focus {
  border-color: var(--brand);
  color: var(--brand);
}

.anchor-alias {
  display: block;
  height: 1px;
  margin-top: -1px;
}

.opt-out-summary {
  margin: 12px 0 16px;
}

.request-preview-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 16px;
}

.request-preview-item {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.request-recipient-preview {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.request-widget-config {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.request-widget-config fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.request-widget-config legend {
  padding: 0 6px;
  font-weight: 700;
}

.request-widget-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-widget-tabs a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  text-decoration: none;
}

.request-preview-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.public-request-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.request-public {
  display: grid;
  gap: 16px;
}

.request-widget {
  --request-accent: #006400;
  --request-positive: #3ed660;
  --request-warning: #ee9441;
  --request-danger: #8b0000;
  --request-text: #000000;
  --request-surface: #ffffff;
  --request-soft: #f8faf7;
  color: var(--request-text);
  padding-bottom: 88px;
}

.request-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.request-widget-head p {
  margin-bottom: 0;
}

.request-time,
.request-trust,
.request-incentive {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--request-accent) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--request-accent) 8%, #fff);
  color: var(--request-text);
}

.request-time {
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.request-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.request-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--request-accent);
}

.request-errors {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--request-danger) 32%, #fff);
  border-radius: 8px;
  background: color-mix(in srgb, var(--request-danger) 8%, #fff);
  color: var(--request-danger);
}

.request-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

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

.request-public h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.request-public-item {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--request-accent) 8%, var(--line));
  border-radius: 8px;
  background: var(--request-surface);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.request-widget.is-compact .request-public-item {
  padding: 10px;
}

.request-step-index {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #5f665f;
  font-size: 12px;
  font-weight: 700;
}

.request-widget--step .request-step {
  display: none;
}

.request-widget--step .request-step.is-active {
  display: grid;
}

.request-skip,
.request-consent {
  margin-top: 10px;
}

.request-active-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.request-skip-summary {
  grid-column: 1 / -1;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--request-accent) 24%, #fff);
  border-radius: 8px;
  background: color-mix(in srgb, var(--request-accent) 7%, #fff);
}

.request-skip-summary p {
  margin: 2px 0 0;
}

.request-public-item.is-draft-skipped {
  border-color: color-mix(in srgb, var(--request-accent) 30%, var(--line));
  background: var(--request-soft);
  box-shadow: none;
}

.request-public-item.is-draft-skipped .request-active-fields {
  display: none;
}

.request-public-item.is-draft-skipped .request-skip-summary {
  display: flex;
}

.request-rating-field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.request-rating-label {
  font-weight: 700;
}

.request-star-rating {
  --request-rating-color: #b8b8b8;
  display: flex;
  width: min(100%, 330px);
  justify-content: space-between;
  gap: 2px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--request-soft);
}

.request-star-rating.rating-tone-1 {
  --request-rating-color: var(--request-danger);
}

.request-star-rating.rating-tone-2 {
  --request-rating-color: #d56a22;
}

.request-star-rating.rating-tone-3 {
  --request-rating-color: var(--request-warning);
}

.request-star-rating.rating-tone-4 {
  --request-rating-color: #73ad36;
}

.request-star-rating.rating-tone-5 {
  --request-rating-color: var(--request-accent);
}

.request-star {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c7c7c7;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: color 0.12s ease, transform 0.12s ease;
  touch-action: manipulation;
}

.request-star.is-active {
  color: var(--request-rating-color);
}

.request-star:hover,
.request-star:focus-visible {
  transform: translateY(-1px) scale(1.08);
  outline: none;
}

.request-autosave-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.request-autosave-status[data-state="saving"] {
  color: #6d7175;
}

.request-autosave-status[data-state="saved"] {
  color: var(--request-accent);
}

.request-autosave-status[data-state="error"] {
  color: var(--request-danger);
}

.request-public-item.is-highlighted {
  border-color: var(--request-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--request-accent) 20%, transparent);
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  z-index: 20;
  bottom: 0;
  margin: 16px -12px -88px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.request-actions button {
  min-height: 48px;
  background: var(--request-accent);
  color: #ffffff;
  font-weight: 800;
}

.request-actions button.secondary,
.request-skip-summary button.secondary {
  min-height: 44px;
  border-color: var(--request-accent);
  background: #ffffff;
  color: var(--request-accent);
}

.request-thanks {
  text-align: center;
}

.request-reward-note {
  max-width: 520px;
  margin: 18px auto;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--request-accent) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--request-positive) 10%, #fff);
  color: var(--request-text);
  text-align: left;
}

.request-reward-note p {
  margin: 4px 0 0;
}

.request-public-item h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.request-public-image {
  width: 76px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--request-soft);
}

.request-public-image.is-empty {
  display: block;
}

@media (min-width: 760px) {
  .request-public-item {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .request-public-image {
    width: 96px;
  }

  .request-active-fields {
    grid-column: 2;
  }

  .request-skip-summary {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .shell {
    padding: 14px;
  }

  .nav {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .nav h1,
  .nav form {
    width: 100%;
    margin: 0;
  }

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

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

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

  .widget-toolbar,
  .widget-card-grid,
  .widget-editor-grid {
    grid-template-columns: 1fr;
  }

  .widget-preview-panel {
    position: static;
  }
}

@media (max-width: 1240px) {
  .widget-editor-grid {
    grid-template-columns: 1fr;
  }

  .widget-preview-panel {
    position: static;
  }

  .widget-preview-frame {
    min-height: 360px;
  }
}

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

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

  .request-widget-head {
    display: grid;
  }

  .request-time {
    white-space: normal;
  }

  .request-star {
    width: 48px;
    height: 48px;
    font-size: 34px;
  }

  .widget-check-grid {
    grid-template-columns: 1fr;
  }

  .color-control-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .color-copy {
    grid-column: 1 / -1;
  }

  .filters input,
  .filters select {
    width: 100%;
  }

  .topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
.review-reply-panel .language-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.review-reply-panel .language-tabs .button {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  min-width: 116px;
}

.review-reply-panel .language-tabs .button small {
  color: var(--muted, #6d7175);
  font-size: 11px;
}

.review-reply-panel .language-tabs .button.is-active {
  border-color: #246b5a;
  box-shadow: inset 0 0 0 1px #246b5a;
}

.review-reply-context {
  background: #f6f6f7;
  border-left: 3px solid #246b5a;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.review-reply-context p {
  margin: 8px 0;
}

.reply-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.reply-actions details {
  min-width: min(100%, 420px);
}

@media (max-width: 640px) {
  .review-reply-panel .language-tabs .button {
    flex: 1 1 calc(50% - 8px);
  }
}
