:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #202a39;
  background: #f6f7f9;
  font-synthesis: none;
  font-size: 14px;
  --blue: #3268ed;
  --border: #e4e7ed;
  --muted: #758094;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: #344054;
  padding: 9px 13px;
  transition: 0.15s;
}
button:hover {
  background: #f0f3fa;
}
button.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
button.danger {
  color: #bc3445;
  border-color: #f1c4cb;
  background: #fff6f7;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
input,
select,
textarea {
  border: 1px solid #dfe3ea;
  border-radius: 7px;
  padding: 10px 12px;
  background: white;
  color: #263345;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid #80a4ff;
  outline-offset: 2px;
}
a {
  color: var(--blue);
}
.loading {
  padding: 60px;
}
.shell {
  display: grid;
  grid-template-columns: 226px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #152236;
  color: #c4cddd;
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 226px;
  height: 100vh;
  padding: 29px 16px 18px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 12px 34px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: white;
}
.brandmark {
  background: #3c70ef;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 19px;
}
.brand small {
  font-size: 11px;
  letter-spacing: 1.8px;
  color: #90a0b6;
  font-weight: 550;
  display: block;
  margin-top: 3px;
}
.navlabel {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #75879f;
  padding: 12px 13px 8px;
  font-weight: 650;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border: 0;
  background: transparent;
  color: #aab8cc;
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 13px;
}
.nav button:hover {
  background: #203249;
  color: white;
}
.nav button.active {
  background: #29456f;
  color: #fff;
}
.ico {
  width: 17px;
  height: 17px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebarfooter {
  margin-top: auto;
  border-top: 1px solid #2c394d;
  padding: 18px 12px 0;
  color: #a1aec1;
  font-size: 12px;
}
.sidebarfooter strong {
  display: block;
  color: #e0e6ef;
  font-weight: 550;
  margin-bottom: 5px;
}
.sidebarfooter .dot {
  margin-right: 5px;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 73px;
  padding: 0 34px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 13px;
}
.crumb {
  font-size: 13px;
  color: #788396;
}
.crumb strong {
  color: #29384b;
  font-weight: 550;
}
.topbar .spacer {
  flex: 1;
}
.search {
  width: min(280px, 25vw);
  background: #f7f8fa;
  font-size: 12px;
  padding: 9px 12px;
}
.env {
  font-size: 12px;
  padding: 8px;
}
.profile {
  border-left: 1px solid var(--border);
  padding-left: 17px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.avatar {
  border-radius: 50%;
  background: #e7edfd;
  color: #3268ed;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.content {
  padding: 30px 34px 36px;
  max-width: 1600px;
  margin: auto;
}
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 23px;
  gap: 14px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8690a0;
  font-weight: 650;
  margin-bottom: 8px;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.9px;
  font-weight: 650;
  margin: 0 0 8px;
}
p {
  line-height: 1.6;
}
.subtitle {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.headbuttons {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: #edf3ff;
  color: #385a97;
  border: 1px solid #d9e6ff;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 20px;
}
.notice.amber {
  background: #fff9ed;
  border-color: #f3e4bf;
  color: #8b6a28;
}
.notice strong {
  font-weight: 650;
}
.notice .right {
  margin-left: auto;
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 21px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 18px 20px;
}
.statlabel {
  font-size: 12px;
  color: #6d788a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.statvalue {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 11px 0 8px;
  font-variant-numeric: tabular-nums;
}
.statfoot {
  font-size: 11px;
  color: #8a93a2;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 20px;
  border-bottom: 1px solid #f0f1f5;
  gap: 10px;
}
.cardhead h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 0;
}
.cardhead small {
  font-size: 11px;
  color: var(--muted);
}
.cardbody {
  padding: 19px 20px;
}
.legend {
  display: flex;
  gap: 13px;
  font-size: 10px;
  color: #7c8696;
}
.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #91a3bd;
}
.dot.blue {
  background: #4c79ee;
}
.dot.green {
  background: #28a67e;
}
.chart {
  height: 230px;
  position: relative;
  padding: 10px 0;
}
.chart svg {
  width: 100%;
  height: 100%;
}
.emptychart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8993a4;
  font-size: 12px;
  flex-direction: column;
  gap: 8px;
}
.emptychart strong {
  color: #617085;
  font-weight: 500;
}
.quiet {
  font-size: 11px;
  color: #8a94a3;
}
.listrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eef0f4;
  font-size: 12px;
  gap: 12px;
}
.listrow:last-child {
  border: 0;
}
.listrow small {
  font-size: 11px;
  display: block;
  color: #8891a1;
  margin-top: 4px;
}
.badge {
  font-size: 10px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  background: #f0f2f6;
  color: #778295;
  padding: 5px 7px;
  white-space: nowrap;
}
.badge.green {
  background: #eaf8f1;
  color: #258163;
}
.badge.blue {
  background: #edf3ff;
  color: #4d71ba;
}
.badge.amber {
  background: #fff5df;
  color: #9d761e;
}
.badge.red {
  background: #fff0f1;
  color: #b74550;
}
.badge.purple {
  background: #f0ebfa;
  color: #805dab;
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}
th {
  font-size: 10px;
  letter-spacing: 0.25px;
  color: #8b94a3;
  background: #fbfcfd;
  font-weight: 550;
  padding: 12px 19px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 19px;
  border-bottom: 1px solid #eef0f4;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover {
  background: #f9fbff;
}
.domaincell {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 550;
}
.domainicon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fafbfd;
  color: #7b8ca8;
  font-size: 12px;
}
.empty {
  text-align: center;
  padding: 46px 24px;
  color: #8993a4;
  font-size: 12px;
}
.empty strong {
  display: block;
  color: #526075;
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 7px;
}
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 17px;
  align-items: center;
}
.filters input {
  flex: 1;
  max-width: 420px;
  font-size: 12px;
}
.filters select {
  font-size: 12px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.pillcount {
  color: #7d8ba0;
  font-size: 11px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field label {
  font-size: 11px;
  color: #7b8595;
  display: block;
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  font-size: 12px;
}
.fieldvalue {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 12px;
  background: #fafbfd;
}
.policyitem {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 15px;
  font-size: 12px;
  line-height: 1.7;
}
.policyitem strong {
  font-weight: 600;
}
.bottomnote {
  margin-top: 16px;
  color: #8a94a3;
  font-size: 11px;
  line-height: 1.7;
}
.loginpage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.loginbrand {
  background: #152236;
  padding: 60px;
  color: #b0bfd5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.loginbrand .brand {
  padding: 0 0 60px;
}
.loginbrand h1 {
  font-size: 39px;
  line-height: 1.2;
  color: white;
  max-width: 400px;
  letter-spacing: -1.5px;
  font-weight: 600;
}
.loginbrand p {
  font-size: 14px;
  max-width: 380px;
  line-height: 1.9;
}
.loginformwrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 40px;
}
.loginform {
  width: 360px;
}
.loginform h1 {
  font-size: 26px;
  margin-bottom: 9px;
}
.loginform p {
  color: #7c889a;
  font-size: 13px;
  margin-bottom: 30px;
}
.loginform label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin: 18px 0 8px;
}
.loginform input {
  width: 100%;
}
.loginform button {
  margin-top: 23px;
  width: 100%;
  padding: 12px;
}
.error {
  font-size: 12px;
  color: #b93f50;
  background: #fff0f2;
  border-radius: 6px;
  padding: 10px;
  margin-top: 14px;
  line-height: 1.5;
}
.mfasetup {
  padding: 12px;
  background: #f5f7fd;
  word-break: break-all;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 14px;
}
.footerline {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #929baa;
  margin-top: 22px;
}
dialog {
  width: min(680px, 94vw);
  max-height: 88vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 20px 80px #11213b30;
}
dialog::backdrop {
  background: #15223666;
}
dialog h2 {
  font-size: 20px;
  margin: 0 0 20px;
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.dialoghead h2 {
  margin: 0;
}
dialog .fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  font-size: 12px;
}
dialog label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.timeline {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.event {
  padding: 12px 0 12px 18px;
  border-left: 2px solid #d8e3fa;
  font-size: 12px;
  position: relative;
}
.event:before {
  content: "";
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #5882df;
  position: absolute;
  left: -4px;
  top: 17px;
}
.event small {
  display: block;
  color: #8692a2;
  font-size: 10px;
  margin-top: 5px;
}
.actionform input,
.actionform textarea {
  width: 100%;
  margin-bottom: 14px;
}
.actionform p {
  font-size: 12px;
  color: #7c8798;
}
.actionform button {
  margin-right: 8px;
}
#toast {
  display: none;
  position: fixed;
  right: 25px;
  bottom: 25px;
  border: 1px solid #dce4ee;
  box-shadow: 0 8px 28px #1d314322;
  background: #fff;
  border-radius: 9px;
  padding: 15px 20px;
  z-index: 9;
  max-width: 430px;
  font-size: 13px;
}
#toast.show {
  display: block;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .search {
    display: none;
  }
}
@media (max-width: 760px) {
  .shell {
    grid-template-columns: 64px 1fr;
  }
  .sidebar {
    width: 64px;
    padding: 20px 7px;
  }
  .brand {
    padding: 0 7px 24px;
  }
  .brandname,
  .navlabel,
  .nav .label,
  .sidebarfooter {
    display: none;
  }
  .nav button {
    justify-content: center;
    padding: 13px 7px;
  }
  .main {
    grid-column: 2;
  }
  .topbar {
    padding: 0 14px;
    height: 64px;
  }
  .crumb,
  .profile .usertext {
    display: none;
  }
  .content {
    padding: 19px 14px;
  }
  .pagehead {
    flex-direction: column;
  }
  h1 {
    font-size: 23px;
  }
  .stat {
    padding: 14px;
  }
  .statvalue {
    font-size: 27px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .loginpage {
    display: block;
  }
  .loginbrand {
    display: none;
  }
  .loginformwrap {
    min-height: 100vh;
    padding: 25px;
  }
  .policyitem {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .notice {
    align-items: flex-start;
  }
  .notice .right {
    display: none;
  }
  .filters {
    flex-wrap: wrap;
  }
  .footerline {
    display: block;
  }
  .footerline span {
    display: block;
    margin-bottom: 6px;
  }
}

.mail-preview {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin: 20px 0;
}
.preview-subject label {
  font-size: 12px;
  color: var(--muted);
}
.preview-subject h3 {
  margin: 7px 0 16px;
  overflow-wrap: anywhere;
}
.preview-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.preview-tabs button[aria-pressed="true"] {
  background: #edf3ff;
  color: #2458cc;
  border-color: #b5caff;
}
.mail-preview-frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}
.mail-preview-text {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 18px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  font:
    14px/1.65 ui-monospace,
    monospace;
  margin: 0;
}
.mail-preview [hidden] {
  display: none;
}
dialog .dialoghead {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  padding: 8px 0;
}

.message-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  color: #4d71ba;
  background: #f7f9ff;
  border: 1px solid #dce5f5;
  border-radius: 8px;
}
.message-details:hover {
  background: #edf3ff;
  border-color: #9fb6e9;
}
.message-details:focus-visible {
  outline: 2px solid #3268ed;
  outline-offset: 3px;
}
.marketing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.marketing-grid .card {
  min-width: 0;
}
.marketing-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #eef0f4;
}
.marketing-pager .quiet {
  margin-right: auto;
}
.actionform select,
.actionform input[type="file"] {
  width: 100%;
  margin-bottom: 14px;
}
.consent-check {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  color: #344054 !important;
  line-height: 1.5;
  margin: 8px 0 16px;
}
.consent-check input {
  width: auto !important;
  margin: 3px 0 0;
}
.message-details svg,
[data-campaign-detail] svg {
  display: block;
}
@media (max-width: 1100px) {
  .marketing-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .marketing-pager {
    justify-content: center;
    flex-wrap: wrap;
  }
  .marketing-pager .quiet {
    width: 100%;
    margin: 0;
    text-align: center;
    order: -1;
  }
}

.template-editor-dialog {
  width: min(1440px, 97vw);
  max-height: 95vh;
  padding: 0;
  overflow: hidden;
}
.template-editor-dialog .template-editor-head {
  padding: 20px 24px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.template-editor-dialog .template-editor-head h2 {
  font-size: 22px;
}
.template-editor-form {
  overflow: auto;
  max-height: calc(95vh - 86px);
  padding: 20px 24px 24px;
}
.template-meta {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
  gap: 16px;
  margin-bottom: 16px;
}
.template-meta input {
  width: 100%;
  margin-top: 6px;
}
.template-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: #f8faff;
  border-radius: 9px;
  padding: 10px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 4;
}
.template-toolbar button {
  color: #315ea9;
  border-color: #d5e0f5;
}
.toolbar-note {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.editor-insert-card {
  border: 1px solid #cedcf7;
  background: #f7faff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 12px;
}
.insert-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.insert-card-title button {
  padding: 4px 8px;
}
.insert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 150px;
  gap: 12px;
  align-items: end;
}
.insert-grid input {
  width: 100%;
  margin-top: 6px;
}
.editor-insert-card > .primary {
  margin-top: 13px;
}
.editor-insert-card > .quiet {
  margin-left: 10px;
}
.template-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 620px;
}
.template-code-pane,
.template-preview-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.template-code-pane {
  border-right: 1px solid var(--border);
}
.pane-head {
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}
.pane-head strong {
  font-size: 13px;
}
.pane-head > span {
  font-size: 10px;
  color: var(--muted);
}
.visual-edit-status {
  display: block;
  font-size: 10px;
  color: #758094;
  margin-top: 3px;
  transition: 0.2s;
}
.visual-edit-status.synced {
  color: #258163;
}
#templateHtml {
  border: 0;
  border-radius: 0;
  resize: none;
  flex: 1;
  min-height: 568px;
  padding: 17px;
  background: #101827;
  color: #d7e1ef;
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  tab-size: 2;
  outline: 0;
}
#templateHtml:focus {
  outline: 2px solid #6d98ff;
  outline-offset: -2px;
}
.preview-devices {
  display: flex;
  gap: 5px;
}
.preview-devices button {
  font-size: 10px;
  padding: 6px 8px;
}
.preview-devices button[aria-pressed="true"] {
  background: #e9f0ff;
  color: #2458cc;
  border-color: #aac1f1;
}
.visual-formatbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.visual-formatbar button {
  font-size: 10px;
  min-width: 31px;
  padding: 6px 8px;
}
.visual-formatbar > span {
  height: 22px;
  width: 1px;
  background: var(--border);
  margin: 0 3px;
}
.visual-link-panel {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 10px;
  background: #f7f9ff;
  border-bottom: 1px solid #d6e0f3;
}
.visual-link-panel[hidden] {
  display: none;
}
.visual-link-panel label {
  min-width: 280px;
  flex: 1;
  margin: 0;
}
.visual-link-panel input {
  display: block;
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 11px;
}
.visual-link-panel button {
  padding: 7px 10px;
  font-size: 10px;
}
.visual-link-panel > span {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
}
.visual-selection-panel {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  background: #f4f7ff;
  border-bottom: 1px solid #d6e0f3;
}
.visual-selection-panel > strong {
  align-self: center;
  margin-right: 4px;
  font-size: 11px;
}
.visual-selection-panel > span {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
}
.visual-selection-panel label {
  min-width: 105px;
  margin: 0;
}
.visual-selection-panel input,
.visual-selection-panel select {
  display: block;
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 11px;
}
.visual-selection-panel input[type="color"] {
  width: 52px;
  padding: 3px;
}
.visual-selection-panel button {
  padding: 7px 9px;
  font-size: 10px;
}
.template-preview-viewport {
  flex: 1;
  background: #e8ebf0;
  padding: 20px;
  display: flex;
  justify-content: center;
  overflow: auto;
  transition: 0.2s;
}
.template-preview-viewport iframe {
  width: 100%;
  height: 100%;
  min-height: 508px;
  border: 0;
  background: white;
  box-shadow: 0 4px 18px #1d31431c;
  transition: width 0.2s;
}
.template-preview-viewport.mobile iframe {
  width: 390px;
  max-width: 100%;
}
.plain-text-panel {
  border: 1px solid var(--border);
  border-radius: 9px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #fbfcfe;
}
.plain-text-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}
.plain-text-panel label {
  margin: 14px 0 7px;
}
.plain-text-panel textarea {
  width: 100%;
  resize: vertical;
}
.template-editor-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
}
.template-editor-actions > div {
  display: flex;
  gap: 8px;
}
.template-editor-actions code {
  background: #eef2f8;
  padding: 2px 5px;
  border-radius: 4px;
}
@media (max-width: 1100px) {
  .template-workspace {
    grid-template-columns: 1fr;
  }
  .template-code-pane {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .insert-grid {
    grid-template-columns: 1fr 1fr;
  }
  .template-preview-viewport {
    min-height: 520px;
  }
  .template-meta {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .visual-link-panel {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .visual-link-panel label {
    min-width: 100%;
  }
  .visual-link-panel > span {
    width: 100%;
  }
  .template-editor-dialog {
    width: 100vw;
    max-width: none;
    max-height: 100vh;
    border-radius: 0;
  }
  .template-editor-dialog .template-editor-form {
    max-height: calc(100vh - 82px);
    padding: 14px;
  }
  .template-toolbar {
    flex-wrap: wrap;
  }
  .toolbar-note {
    width: 100%;
    margin: 3px 0 0;
  }
  .insert-grid {
    grid-template-columns: 1fr;
  }
  .template-workspace {
    min-height: 480px;
  }
  .template-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .template-editor-actions > div {
    flex-wrap: wrap;
  }
  .template-editor-actions > div button {
    flex: 1;
  }
  .template-preview-viewport {
    padding: 8px;
  }
  .visual-selection-panel {
    align-items: stretch;
  }
  .visual-selection-panel label {
    flex: 1 1 130px;
  }
}

.template-meta-error {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #f0b8c0;
  border-radius: 8px;
  background: #fff2f4;
  color: #ad3343;
  font-size: 12px;
  font-weight: 600;
}
.template-meta input.invalid {
  border-color: #d8495b;
  background: #fff8f9;
  box-shadow: 0 0 0 2px #f5c7cd;
}
