:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8faff;
  --line: #dce5f0;
  --line-strong: #b8c7da;
  --text: #0f1f3d;
  --muted: #61728a;
  --brand: #1687f2;
  --brand-strong: #0b65c8;
  --brand-deep: #081b3a;
  --brand-soft: #eaf4ff;
  --brand-violet: #7357f6;
  --brand-violet-soft: #f1edff;
  --nav: #ffffff;
  --nav-2: #f6f9fe;
  --success: #14866d;
  --danger: #c93131;
  --warning: #a66a00;
  --warning-soft: #fff5df;
  --warning-line: #efd7a4;
  --warning-text: #654200;
  --danger-soft: #fff4f4;
  --danger-line: #efb9b9;
  --success-soft: #e3f8f3;
  --neutral-soft: #eef3fa;
  --neutral-text: #526375;
  --field-border: #c5d0dc;
  --control-border: #c6d1dc;
  --focus-brand: rgba(22, 135, 242, 0.18);
  --shadow-md: 0 12px 24px rgba(15, 31, 61, 0.08);
  --code-bg: #172c3b;
  --code-line: #182835;
  --code-text: #dbe7f1;
  --shadow-sm: 0 1px 2px rgba(15, 31, 61, 0.08), 0 10px 28px rgba(15, 31, 61, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
}

.toast-root {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 31, 61, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.toast strong,
.toast p {
  margin: 0;
}

.toast p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.toast button {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-warning {
  border-left-color: var(--warning);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background: var(--nav);
  color: var(--text);
  border-right: 1px solid var(--line);
  padding: 16px 14px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  box-shadow: 10px 0 30px rgba(15, 31, 61, 0.04);
}

.brand {
  display: grid;
  gap: 7px;
  align-items: start;
  padding: 2px 7px 9px;
}

.brand-logo {
  display: block;
  width: min(226px, 100%);
  height: auto;
  object-fit: contain;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.sidebar-portal {
  border: 1px solid var(--line);
  background: var(--nav-2);
  border-radius: 8px;
  padding: 11px;
}

.portal-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.meta-label {
  margin: 0 0 7px;
  font-size: 11px;
  color: #657894;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.portal-main {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.portal-sub {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.side-nav {
  display: grid;
  gap: 4px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.nav-group {
  margin: 13px 8px 5px;
  color: #7c8ca3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-link {
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #263a58;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.side-link span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-link:hover {
  border-color: #cfe1ff;
  background: #f0f7ff;
  color: var(--brand-deep);
}

.side-link.active {
  background: linear-gradient(90deg, var(--brand-soft) 0%, var(--brand-violet-soft) 100%);
  color: var(--brand-deep);
  border-color: #c6dcff;
  box-shadow: inset 3px 0 0 var(--brand);
}

.nav-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef3fa;
  color: #6d7d93;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.side-link.active .nav-count {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(20, 134, 109, 0.18);
}

.setup-progress {
  display: grid;
  gap: 8px;
}

.setup-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-weight: 700;
}

.setup-progress-head strong {
  font-size: 12px;
  color: var(--brand-strong);
}

.setup-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.setup-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  transition: width 0.2s ease;
}

.workspace {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.workspace-topbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

#pageTitle {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

#pageSubtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  width: auto;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-muted);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
}

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

.chip {
  border-radius: 999px;
  border: 1px solid #c8d4e1;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  white-space: nowrap;
}

.chip-muted {
  background: #f1f4f7;
  color: var(--muted);
}

.pages {
  min-width: 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

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

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

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

.compact {
  gap: 8px;
}

.align-start {
  align-items: start;
}

.card,
.hero-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
}

.hero-panel h3 {
  margin: 0;
  font-size: 22px;
  max-width: 760px;
}

.hero-copy {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 780px;
  line-height: 1.5;
}

.hero-actions,
.toolbar-actions,
.form-actions,
.actions-inline,
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions {
  justify-content: flex-end;
}

.card h3 {
  margin: 0;
  font-size: 17px;
}

.card-head,
.page-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.page-toolbar {
  align-items: center;
}

.helper {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

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

.multiline {
  white-space: pre-wrap;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
}

.editor-card {
  display: none;
}

.page .editor-card {
  display: block;
}

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

.form-grid,
.provider-fields {
  display: grid;
  gap: 10px;
  align-items: start;
}

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

.provider-fields .checkbox-row {
  min-height: 38px;
  align-self: end;
}

.account-editor-card {
  width: 100%;
  max-width: none;
}

#accountCreateMount,
#accountEditMount {
  width: 100%;
}

.account-form {
  gap: 12px;
}

.account-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.account-form-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.account-form-aside {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 10px;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.form-section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.form-section-head h4,
.provider-panel-head h5 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.form-section-head p,
.provider-panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.section-step {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 850;
}

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

.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

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

.provider-option {
  min-height: 92px;
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--text);
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 11px;
  text-align: left;
  white-space: normal;
}

.provider-option strong,
.provider-option span {
  display: block;
}

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

.provider-option span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}

.provider-option:hover {
  border-color: #cfe1ff;
  background: #f0f7ff;
  color: var(--brand-deep);
}

.provider-option.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-violet-soft));
  color: var(--brand-deep);
  box-shadow: inset 3px 0 0 var(--brand);
}

.provider-option:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.provider-panel,
.optional-provider-panel,
.setup-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.provider-panel {
  display: grid;
  gap: 12px;
}

.provider-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.optional-provider-panel {
  display: grid;
  gap: 10px;
  background: var(--surface);
}

.imap-toggle-row {
  align-items: flex-start;
  margin: 0;
}

.imap-toggle-row span {
  display: grid;
  gap: 2px;
}

.imap-toggle-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.imap-fields[hidden] {
  display: none;
}

.setup-note {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.setup-note strong {
  display: block;
  margin-bottom: 7px;
}

.setup-note ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

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

.sticky-form-actions.account-form-actions {
  justify-content: flex-end;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
  border-radius: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--field-border);
  padding: 9px 10px;
  background: var(--surface);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(22, 135, 242, 0.18);
  border-color: var(--brand);
}

.native-select-enhanced {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 36px 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  font-weight: 650;
  white-space: normal;
  position: relative;
}

.custom-select-trigger:hover {
  border-color: #9cafc0;
  background: var(--surface);
}

.custom-select-trigger:focus {
  outline: 2px solid rgba(22, 135, 242, 0.18);
  border-color: var(--brand);
}

.custom-select.invalid .custom-select-trigger {
  border-color: var(--danger);
  outline: 2px solid rgba(201, 49, 49, 0.14);
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select.is-empty .custom-select-value {
  color: #6f8190;
}

.custom-select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #5c7080;
  border-bottom: 2px solid #5c7080;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.custom-select.open .custom-select-chevron {
  transform: translateY(-35%) rotate(225deg);
}

.custom-select.disabled .custom-select-trigger {
  background: #eef3f6;
  color: #7b8c98;
  cursor: not-allowed;
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 75;
  display: none;
  border: 1px solid #b8c6d3;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 31, 61, 0.18);
  overflow: hidden;
}

.custom-select.open .custom-select-menu {
  display: block;
}

.custom-select-search-wrap {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.custom-select-search {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 6px;
}

.custom-select-options {
  max-height: 240px;
  overflow: auto;
  padding: 5px;
}

.custom-select-option {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 7px 9px;
  display: flex;
  justify-content: flex-start;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  white-space: normal;
}

.custom-select-option:hover,
.custom-select-option:focus {
  border-color: var(--line);
  background: var(--surface-muted);
  outline: none;
}

.custom-select-option.selected {
  border-color: rgba(22, 135, 242, 0.18);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.custom-select-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

button {
  width: auto;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--surface);
  padding: 9px 12px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

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

button.secondary {
  border-color: var(--control-border);
  background: var(--surface);
  color: var(--text);
}

button.secondary:hover {
  border-color: #9cafc0;
  background: var(--surface-muted);
}

button.danger {
  border-color: #f0c4c4;
  background: #fff5f5;
  color: var(--danger);
}

button.danger:hover {
  border-color: var(--danger);
  background: #ffe8e8;
}

.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12px;
}

.text-btn:hover {
  background: transparent;
  color: var(--brand-deep);
  text-decoration: underline;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

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

.data-table th {
  color: #536577;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
}

.data-table td > strong {
  display: block;
  font-size: 13px;
}

.data-table td > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.row-actions button {
  padding: 6px 9px;
  font-size: 12px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}

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

.empty-state p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.empty-state.informative {
  border-style: solid;
  background: linear-gradient(135deg, var(--surface-muted), var(--brand-soft));
}

.loading-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.loading-state span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #b7c8d2;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

.loading-state p {
  margin: 0;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--neutral-soft);
  color: var(--neutral-text);
  font-size: 12px;
  font-weight: 750;
  text-transform: capitalize;
}

.badge-active,
.badge-static,
.badge-smtp {
  background: var(--success-soft);
  color: #007b67;
}

.badge-draft,
.badge-dynamic,
.badge-sendgrid {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.badge-paused,
.badge-mailgun {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-archived {
  background: var(--neutral-soft);
  color: var(--neutral-text);
}

.stats-grid {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.setup-card {
  margin-bottom: 12px;
}

.setup-list,
.activity-list {
  display: grid;
  gap: 8px;
}

.setup-item,
.activity-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px;
}

.setup-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  opacity: 0.74;
}

.setup-item > span {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.setup-item.done > span {
  border-color: var(--success);
  background: var(--success);
  color: var(--surface);
}

.setup-item.done {
  opacity: 0.86;
}

.setup-item.next {
  opacity: 1;
  border-color: #c6dcff;
  background: linear-gradient(90deg, var(--brand-soft), var(--surface));
  box-shadow: inset 3px 0 0 var(--brand);
}

.setup-item.next > span {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--surface);
}

.setup-item strong,
.setup-item p,
.activity-item strong,
.activity-item span {
  display: block;
  margin: 0;
}

.setup-item p,
.activity-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  margin: 5px 0;
  display: block;
  font-size: 26px;
}

.form-block,
.advanced-box,
.sequence-canvas,
.sequence-flow-column,
.builder-card,
.template-preview,
.preview-box,
.note-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.form-block legend {
  font-weight: 800;
  padding: 0 6px;
}

.advanced-box {
  padding: 10px;
}

.advanced-box summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.advanced-box summary::-webkit-details-marker {
  display: none;
}

.advanced-box summary::after {
  content: "Show";
  float: right;
  color: var(--muted);
  font-size: 12px;
}

.advanced-box[open] summary::after {
  content: "Hide";
}

.advanced-box .form-stack {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

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

.mode-btn {
  border-color: var(--control-border);
  background: var(--surface);
  color: var(--text);
}

.mode-btn.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.visually-hidden-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}

.checkbox-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

.inline-start {
  align-items: start;
}

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

.day-grid label {
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px 6px;
  font-size: 12px;
}

.day-grid input {
  width: 13px;
  height: 13px;
}

.sequence-form {
  gap: 12px;
}

.wizard-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.wizard-tab {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.wizard-tab.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.sequence-progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.sequence-progress strong,
.sequence-progress span {
  display: block;
}

.sequence-progress strong {
  font-size: 13px;
}

.sequence-progress span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.sequence-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.sequence-progress-bar span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-violet));
  transition: width 0.2s ease;
}

.sequence-panel {
  display: none;
}

.sequence-panel.active {
  display: grid;
  gap: 12px;
}

.prereq-panel {
  display: grid;
  gap: 8px;
}

.inline-alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-alert.error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
}

.inline-alert.warning {
  border-color: var(--warning-line);
  background: var(--warning-soft);
  color: var(--warning-text);
}

.inline-alert.subtle {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.info-panel,
.review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  display: grid;
  gap: 8px;
}

.info-panel p,
.review-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.review-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  min-width: 0;
}

.review-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.review-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.sequence-canvas {
  padding: 12px;
}

.sequence-flow-column {
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.flow-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flow-head h4 {
  margin: 0;
  font-size: 15px;
}

.sequence-step-list {
  display: grid;
  gap: 8px;
  max-width: 940px;
  margin: 0 auto;
  width: 100%;
}

.sequence-step-block {
  display: grid;
  gap: 6px;
}

.sequence-step-card {
  border: 1px solid #cbd6e2;
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface);
  display: grid;
  gap: 7px;
  cursor: pointer;
}

.sequence-step-card:hover,
.sequence-step-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 135, 242, 0.13);
}

.sequence-step-card.dragging {
  opacity: 0.7;
}

.sequence-step-card.drop-target {
  border-color: var(--brand);
}

.sequence-step-head,
.builder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.sequence-step-index {
  margin: 0 0 3px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.sequence-type-badge {
  border: 1px solid #c9d4df;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface-muted);
  color: var(--neutral-text);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.sequence-step-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.sequence-step-actions,
.builder-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sequence-step-actions button,
.builder-actions button {
  padding: 6px 9px;
  font-size: 11px;
}

.sequence-inline-editor {
  border-top: 1px dashed var(--line-strong);
  padding-top: 10px;
  display: grid;
  gap: 9px;
}

.sequence-inline-title {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sequence-between,
.sequence-end-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sequence-between::before,
.sequence-end-add::before {
  content: "";
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}

.sequence-between-btn {
  min-width: 118px;
  height: 31px;
  border-radius: 999px;
  border: 1px dashed #a9b7c6;
  background: var(--surface);
  color: #31516a;
  padding: 0 12px;
  font-size: 12px;
}

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

.builder-card {
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 8px;
}

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

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

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.template-preview,
.preview-box,
.note-box {
  padding: 10px;
  display: grid;
  gap: 5px;
}

.template-preview-name,
.template-preview-line,
.template-preview-body,
.preview-box p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.template-preview-name {
  font-weight: 800;
}

.template-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 12px;
  align-items: start;
}

.template-compose-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.template-compose-main .sun-editor {
  border-color: var(--field-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 42, 56, 0.06);
  font-family: inherit;
}

.template-compose-main .se-toolbar {
  background: #f6f9fb;
  outline: none;
}

.template-compose-main .se-btn {
  border-radius: 6px;
}

.template-compose-main .se-wrapper {
  background: var(--surface);
}

.template-compose-main .se-wrapper-wysiwyg {
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

.template-editor-label {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  font-size: 13px;
  font-weight: 750;
}

.template-editor-label .helper {
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}

.rich-editor-shell {
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 42, 56, 0.06);
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f6f9fb;
}

.rich-tool {
  width: auto;
  min-width: 34px;
  min-height: 32px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 750;
}

.rich-tool:hover,
.rich-tool:focus {
  border-color: var(--brand);
  background: var(--brand-soft);
  outline: none;
}

.underlined {
  text-decoration: underline;
}

.rich-toolbar-separator {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
  margin: 0 3px;
}

.rich-editor {
  min-height: 360px;
  padding: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  overflow: auto;
}

.rich-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(22, 135, 242, 0.15);
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #7a8a96;
}

.rich-editor p,
.rich-editor ul,
.rich-editor ol,
.rich-editor h2,
.rich-editor h3 {
  margin-top: 0;
}

.rich-editor h2,
.rich-editor h3 {
  line-height: 1.25;
}

.template-token {
  display: inline-block;
  border: 1px solid rgba(22, 135, 242, 0.18);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.template-variable-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: 520px;
  min-height: 360px;
  overflow: hidden;
}

.template-variable-head {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.template-variable-head strong,
.template-variable-head span {
  display: block;
}

.template-variable-head strong {
  font-size: 14px;
}

.template-variable-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-variable-controls {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f6f9fb;
}

.template-variable-list {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px;
  overflow: auto;
}

.template-variable-item {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.template-variable-item:hover,
.template-variable-item:focus {
  border-color: rgba(22, 135, 242, 0.18);
  background: var(--brand-soft);
  outline: none;
}

.template-variable-item strong,
.template-variable-item small {
  display: block;
}

.template-variable-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.template-variable-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.template-variable-item code {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 999px;
  background: #edf3f6;
  padding: 3px 7px;
  color: #31516a;
  font-size: 11px;
}

.signature-manager {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 12px;
}

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

.section-head h4,
.section-head p,
.compact-head h4 {
  margin: 0;
}

.signature-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 12px;
  align-items: start;
}

.signature-form,
.signature-side,
.signature-preview,
.signature-list {
  display: grid;
  gap: 10px;
}

.signature-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.compact-head {
  min-height: auto;
  padding-bottom: 0;
}

.signature-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
}

.signature-preview-content {
  min-height: 92px;
  border: 1px solid #d5dee7;
  border-radius: 7px;
  background: var(--surface);
  padding: 12px;
  overflow-wrap: anywhere;
}

.signature-preview-content p {
  margin-top: 0;
}

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

.signature-list-item.default {
  border-color: rgba(22, 135, 242, 0.22);
  background: var(--brand-soft);
}

.signature-list-item strong,
.signature-list-item span {
  display: block;
}

.signature-list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-list-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.loading-inline {
  color: var(--muted);
  font-size: 13px;
}

.note-box {
  align-content: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.picker-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 8px;
}

.picker-results {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
}

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

.picker-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 112px;
}

.picker-item strong,
.picker-item span {
  display: block;
}

.picker-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.picker-item button {
  justify-self: start;
}

.picker-item.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(22, 135, 242, 0.11);
}

.picker-item.selected strong {
  color: var(--brand-strong);
}

.picker-item.selected button {
  border-color: rgba(22, 135, 242, 0.22);
  background: var(--surface);
  color: var(--brand-strong);
  opacity: 1;
}

.sticky-form-actions {
  position: sticky;
  top: 8px;
  z-index: 35;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.sticky-form-actions.unified-form-actions {
  justify-content: flex-end;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.selection-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 5px 6px 5px 10px;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.selection-pill em {
  color: var(--muted);
  font-style: normal;
}

.selection-pill button {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--neutral-text);
}

.selection-summary {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.selection-summary strong {
  color: var(--text);
}

.selection-summary.empty {
  border-style: dashed;
  background: var(--surface-muted);
}

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

.detail-card {
  max-width: 1120px;
}

.audience-detail-card {
  width: 100%;
  max-width: none;
}

.detail-panel {
  display: grid;
  gap: 12px;
}

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

.detail-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
  display: grid;
  gap: 4px;
  min-width: 0;
}

.detail-row span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.detail-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.timeline-item > span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.timeline-item strong,
.timeline-item p {
  margin: 0;
}

.timeline-item p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.metric-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.launch-card {
  width: 100%;
}

.workflow-note,
.launch-readiness {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-muted);
  display: grid;
  gap: 3px;
}

.workflow-note {
  margin: 10px 0 12px;
}

.workflow-note strong,
.launch-readiness strong {
  font-size: 13px;
}

.workflow-note p,
.launch-readiness span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.launch-readiness.ready {
  border-color: rgba(20, 134, 109, 0.28);
  background: var(--success-soft);
}

.analytics-layout {
  gap: 12px;
}

.analytics-search-form {
  max-width: 720px;
}

.analytics-overview {
  align-items: start;
}

.analytics-card-list {
  display: grid;
  gap: 8px;
}

.analytics-list-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  white-space: normal;
}

.analytics-list-item:hover,
.analytics-list-item:focus {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--text);
  outline: none;
}

.analytics-list-item strong,
.analytics-list-item em,
.analytics-mini-metrics b {
  display: block;
}

.analytics-list-item em {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.35;
}

.analytics-mini-metrics {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--brand-strong);
  font-size: 12px;
}

.analytics-detail-card {
  min-height: 220px;
}

.analytics-detail-panel {
  display: grid;
  gap: 12px;
}

.analytics-section {
  display: grid;
  gap: 8px;
}

.analytics-section h4 {
  margin: 4px 0 0;
  font-size: 15px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) 120px 110px;
  align-items: end;
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 8px;
}

.output {
  margin: 0;
  min-height: 300px;
  max-height: 70vh;
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--code-line);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 12px;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

@media (max-width: 1320px) {
  .grid-2,
  .grid-3,
  .form-grid,
  .provider-fields,
  .detail-grid,
  .metric-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

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

  .inline-form,
  .builder-grid,
  .field-row,
  .template-compose,
  .signature-layout,
  .account-form-layout,
  .provider-picker {
    grid-template-columns: 1fr;
  }

  .account-form-aside {
    position: static;
  }

  .template-variable-panel {
    max-height: none;
    min-height: 280px;
  }
}

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

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(88vw, 320px);
    z-index: 80;
    transform: translateX(-104%);
    transition: transform 0.2s ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .workspace {
    padding: 10px;
  }

  .workspace-topbar,
  .hero-panel,
  .page-toolbar,
  .card-head {
    flex-wrap: wrap;
  }

  .hero-actions,
  .toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-actions button,
  .toolbar-actions button {
    flex: 1 1 160px;
  }

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

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

  .mode-toggle {
    grid-template-columns: 1fr;
  }

  .wizard-tabs {
    grid-template-columns: 1fr;
  }

  .analytics-list-item {
    grid-template-columns: 1fr;
  }

  .analytics-mini-metrics {
    justify-items: start;
  }

  .setup-item,
  .inline-alert {
    grid-template-columns: 1fr;
  }

  .setup-item {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .toast-root {
    top: auto;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

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

  .chips {
    width: 100%;
  }

  .chip {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .selection-pill {
    border-radius: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .template-editor-label {
    display: grid;
    gap: 3px;
  }

  .template-editor-label .helper {
    text-align: left;
  }

  .rich-editor-toolbar {
    align-items: stretch;
  }

  .rich-tool {
    flex: 1 1 72px;
  }

  .rich-toolbar-separator {
    display: none;
  }

  .rich-editor {
    min-height: 300px;
    padding: 14px;
  }

  .template-variable-item {
    grid-template-columns: 1fr;
  }

  .template-variable-item code {
    max-width: 100%;
  }

  .signature-list-item {
    grid-template-columns: 1fr;
  }
}
