/* Mail Studio web app. Colours come from --ui-* tokens, switched by [data-theme]. */

:root {
  --ui-bg: #f5f7fb;
  --ui-surface: #ffffff;
  --ui-surface-hover: #f3f6fc;
  --ui-border: #e4e9f1;
  --ui-input-border: #dce3ee;
  --ui-text: #243044;
  --ui-label: #506078;
  --ui-muted: #6f7d93;
  --ui-accent: #4768da;
  --ui-accent-hover: #3656c7;
  --ui-accent-soft: #eaf0ff;
  --ui-accent-text: #3757c6;
  --ui-danger: #c2413b;
  --ui-danger-soft: #fbecea;
  --ui-success: #237a4b;
  --ui-success-soft: #e6f4ec;
  --ui-focus: #6b8aec33;
  --radius: 10px;

  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ui-text);
  background: var(--ui-bg);
}

:root[data-theme="dark"] {
  --ui-bg: #10151f;
  --ui-surface: #171f2c;
  --ui-surface-hover: #222d3e;
  --ui-border: #2c3749;
  --ui-input-border: #425169;
  --ui-text: #e8edf6;
  --ui-label: #bac8da;
  --ui-muted: #9eacc0;
  --ui-accent-soft: #2c3d5e;
  --ui-accent-text: #dbe5ff;
  --ui-danger: #f08a84;
  --ui-danger-soft: #3a2224;
  --ui-success: #7fd3a3;
  --ui-success-soft: #1d3327;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ui-accent); }
code { font-size: 0.9em; }
.muted { color: var(--ui-muted); }
.small { font-size: 13px; }

/* ---- Brand ------------------------------------------------------------- */

.brand { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; }
.brand__accent { color: var(--ui-accent); }

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--ui-input-border);
  border-radius: 9px;
  background: var(--ui-surface);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--ui-surface-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--ui-accent-hover); }
.btn--danger { color: var(--ui-danger); }
.btn:focus-visible, .nav-link:focus-visible, .field input:focus { outline: none; box-shadow: 0 0 0 3px var(--ui-focus); }

/* ---- Forms ------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { color: var(--ui-label); font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ui-input-border);
  border-radius: 8px;
  background: var(--ui-surface);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ui-accent); outline: 3px solid var(--ui-focus); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input[type="color"] { padding: 2px; height: 36px; }
.field__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field__head > span, .field__head > label { color: var(--ui-label); font-size: 13px; font-weight: 700; }
.field__error { color: var(--ui-danger); }
.form { display: flex; flex-direction: column; gap: 16px; border: 0; margin: 0; padding: 0; min-width: 0; }
.hint { color: var(--ui-muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; gap: 10px; }

/* ---- Cards, notices, empty states -------------------------------------- */

.card {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius);
  padding: 24px;
}
.form-card { display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin-bottom: 24px; }
.form-card h2 { font-size: 17px; }

.notice { padding: 11px 14px; border-radius: 9px; font-size: 14px; background: var(--ui-accent-soft); }
.notice--error { background: var(--ui-danger-soft); color: var(--ui-danger); }
.notice--success { background: var(--ui-success-soft); color: var(--ui-success); }

.empty {
  padding: 48px 24px;
  border: 1px dashed var(--ui-input-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ui-muted);
}
.empty h2 { margin-bottom: 8px; color: var(--ui-text); font-size: 17px; }

/* ---- Login and setup --------------------------------------------------- */

.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth__card { display: flex; flex-direction: column; gap: 16px; width: min(420px, 100%); padding: 32px; }
.auth__card h1 { font-size: 22px; letter-spacing: -0.3px; }

/* ---- Signed-in layout -------------------------------------------------- */

.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 14px;
  border-right: 1px solid var(--ui-border);
  background: var(--ui-surface);
}
.sidebar .brand { padding: 0 10px; }
.sidebar nav, .sidebar__footer { display: flex; flex-direction: column; gap: 2px; }
.sidebar__footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--ui-border); }
.nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ui-text);
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-link:hover { background: var(--ui-surface-hover); }
.nav-link.is-active { background: var(--ui-accent-soft); color: var(--ui-accent-text); }
.nav-link--button { border: 0; background: none; text-align: left; font-weight: 500; color: var(--ui-muted); cursor: pointer; }

.content { padding: 32px 40px 64px; max-width: 1100px; width: 100%; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; letter-spacing: -0.4px; margin-bottom: 4px; }

/* ---- Tables and badges ------------------------------------------------- */

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.table th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ui-muted); }
.table td { border-top: 1px solid var(--ui-border); }
.table__actions { text-align: right; }

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--ui-surface-hover);
  color: var(--ui-muted);
}
.table td > .badge:first-child { margin-left: 0; }
.badge--sending, .badge--scheduled { background: var(--ui-accent-soft); color: var(--ui-accent-text); }
.badge--sent { background: var(--ui-success-soft); color: var(--ui-success); }
.badge--paused, .badge--cancelled { background: var(--ui-danger-soft); color: var(--ui-danger); }

/* ---- Everyday screens ------------------------------------------------- */

a.btn { text-decoration: none; color: inherit; }
a.btn--primary { color: #fff; }
.page-header__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.crumbs { margin-bottom: 10px; font-size: 14px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.card__title { font-size: 17px; margin-bottom: 14px; }
.card + .card, .columns + .card, .card + .danger-zone, .table + .danger-zone { margin-top: 20px; }
.form-card--wide { max-width: 820px; }
.notice + .notice, .notice + .table, .notice + .card { margin-top: 12px; }
.page-header + .notice { margin-bottom: 16px; }

.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .field { flex: 1; min-width: 200px; }
.toolbar > .btn { margin-bottom: 1px; }
.toolbar input.search, .toolbar > select {
  padding: 9px 12px; border: 1px solid var(--ui-input-border); border-radius: 8px; background: var(--ui-surface);
}
.toolbar input.search { flex: 1; min-width: 200px; }
.toolbar__link { margin-left: auto; align-self: center; font-size: 14px; }
.more { display: flex; justify-content: center; margin-top: 16px; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions .btn { padding: 6px 10px; font-size: 13px; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--ui-accent); }
.check small { display: block; }
.consent { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.consent legend { color: var(--ui-label); font-size: 13px; font-weight: 700; margin-bottom: 8px; padding: 0; }
.consent > input:not([type]), .consent > input[type="datetime-local"] {
  padding: 9px 12px; border: 1px solid var(--ui-input-border); border-radius: 8px; background: var(--ui-surface); width: 100%;
}
.inset { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 9px; background: var(--ui-surface-hover); }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.columns .form-card { max-width: none; margin-bottom: 0; }
.columns > .card + .card { margin-top: 0; }
.facts { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.facts div { display: flex; gap: 10px; }
.facts dt { color: var(--ui-muted); min-width: 110px; }
.facts dd { margin: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ui-border); }
.plain-list li:first-child { border-top: 0; }

.table--plain { border: 0; border-radius: 0; background: none; }
.table--plain th { padding-left: 0; }
.table--plain td { padding-left: 0; }
.table--compact th, .table--compact td { padding: 6px 12px 6px 0; font-size: 13px; white-space: nowrap; }
.table-scroll { overflow-x: auto; max-width: 100%; }

.danger-zone {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px;
  padding: 16px 20px; border: 1px solid var(--ui-danger-soft); border-radius: var(--radius);
}
.btn--danger { color: var(--ui-danger); }

.dropzone {
  display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 2px dashed var(--ui-input-border);
  border-radius: var(--radius); cursor: pointer; text-align: center; align-items: center;
}
.dropzone:hover { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.dropzone input { max-width: 100%; }
.problems { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--radius); }
.stat strong { font-size: 24px; letter-spacing: -0.5px; }
.stat span { color: var(--ui-muted); font-size: 13px; }
.stat--good strong { color: var(--ui-success); }
.stat--warn strong { color: #b7791f; }
.stat--bad strong { color: var(--ui-danger); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ui-border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--ui-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.is-active { color: var(--ui-accent-text); border-bottom-color: var(--ui-accent); }
.tabs__count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--ui-surface-hover); margin-left: 4px; }

.settings { display: flex; flex-direction: column; gap: 20px; }
.settings .form-card { margin-bottom: 0; max-width: 820px; }
.settings details summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.status-box { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.dns code { word-break: break-all; font-size: 12px; }
.dns__status { white-space: nowrap; font-weight: 700; font-size: 13px; }
.dns__status--ok { color: var(--ui-success); }
.dns__status--missing, .dns__status--wrong { color: var(--ui-danger); }
.copy { display: inline-flex; gap: 6px; align-items: flex-start; }
.copy__button { border: 1px solid var(--ui-input-border); background: var(--ui-surface); border-radius: 6px; font-size: 11px; padding: 1px 6px; cursor: pointer; flex: none; }

.send { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.send__main { display: flex; flex-direction: column; gap: 20px; }
.send__main .form-card, .send__side .form-card { max-width: none; margin-bottom: 0; }
.send__side { position: sticky; top: 20px; }
.audience { font-size: 15px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.checklist li { display: flex; gap: 8px; }
.checklist .is-ok > span:first-child { color: var(--ui-success); font-weight: 800; }
.checklist .is-missing { color: var(--ui-danger); }

.report__status { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.report__status .badge { margin-left: 0; }
.progress { position: relative; height: 30px; border-radius: 8px; background: var(--ui-surface-hover); overflow: hidden; border: 1px solid var(--ui-border); }
.progress__bar { position: absolute; inset: 0 auto 0 0; background: var(--ui-accent-soft); transition: width .4s; }
.progress span { position: relative; display: block; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.report__email { margin-top: 20px; }
.report__email-head { display: flex; justify-content: space-between; align-items: center; }
.report__email-head .card__title { margin: 0; }
.report__frame { width: 100%; height: 640px; border: 1px solid var(--ui-border); border-radius: 8px; margin-top: 14px; background: #fff; }

/* ---- Signup form ------------------------------------------------------- */

.signup-card { margin-top: 24px; }
.signup-share { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--ui-border); }
.signup-share a { word-break: break-all; }
textarea.code {
  width: 100%; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 12px;
  border: 1px solid var(--ui-input-border); border-radius: 8px; background: var(--ui-surface-hover); resize: vertical;
}

/* ---- Getting started ------------------------------------------------- */

.setup-nudge {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 9px; text-decoration: none;
  background: var(--ui-accent-soft); color: var(--ui-accent-text); border: 1px solid transparent;
}
.setup-nudge span { font-size: 12px; opacity: .85; }
.setup-nudge.is-active { border-color: var(--ui-accent); }
.setup-progress { height: 8px; border-radius: 999px; background: var(--ui-surface-hover); overflow: hidden; max-width: 820px; }
.setup-progress__bar { height: 100%; background: var(--ui-success); transition: width .4s; }
.setup-count { margin: 8px 0 16px; font-size: 14px; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.step { border: 1px solid var(--ui-border); border-radius: var(--radius); background: var(--ui-surface); }
.step.is-open { border-color: var(--ui-accent); }
.step__head { display: flex; gap: 14px; align-items: center; width: 100%; padding: 14px 18px; border: 0; background: none; text-align: left; cursor: pointer; }
.step__head small { display: block; color: var(--ui-muted); font-size: 13px; }
.step__mark {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  border: 2px solid var(--ui-input-border); color: var(--ui-muted);
}
.step.is-done .step__mark { background: var(--ui-success); border-color: var(--ui-success); color: #fff; }
.step__body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.step__body .card { box-shadow: none; }
.step__body .form-card { max-width: none; margin-bottom: 0; }
.guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* ---- Small screens ----------------------------------------------------- */

@media (max-width: 760px) {
  .page-header { flex-direction: column; }
  .page-header__actions { justify-content: flex-start; }
  .send { grid-template-columns: 1fr; }
  .send__side { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .toolbar__link { margin-left: 0; }
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--ui-border); gap: 12px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar__footer { flex-direction: row; flex-wrap: wrap; margin-top: 0; padding-top: 8px; }
  .content { padding: 24px 16px 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .table th:nth-child(n+3), .table td:nth-child(n+3) { display: none; }
  .table td.table__actions { display: table-cell; }
}

/* ---- Editor ------------------------------------------------------------ */

.row-link { color: inherit; text-decoration: none; }
.row-link:hover { color: var(--ui-accent); }

.editor { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); height: 100vh; overflow: hidden; }
.editor-message { padding: 40px; display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.editor__bar {
  display: flex; align-items: center; gap: 18px; padding: 10px 18px;
  background: var(--ui-surface); border-bottom: 1px solid var(--ui-border);
}
.editor__back { font-weight: 600; text-decoration: none; white-space: nowrap; }
.editor__title { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; }
.editor__title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor__controls { display: flex; gap: 10px; }
.editor__notice { padding: 10px 18px 0; }
.editor__body { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; min-height: 0; }
.editor__panel { overflow-y: auto; background: var(--ui-surface); padding: 16px; }
.editor__panel--left { border-right: 1px solid var(--ui-border); }
.editor__panel--right { border-left: 1px solid var(--ui-border); }
.editor__canvas { overflow: hidden; display: flex; min-height: 0; transition: background .2s; }

.save-status { font-size: 13px; color: var(--ui-muted); white-space: nowrap; }
.save-status--error { color: var(--ui-danger); }
.save-status--saved::before { content: "✓ "; color: var(--ui-success); }

.segmented { display: inline-flex; border: 1px solid var(--ui-input-border); border-radius: 9px; overflow: hidden; }
.segmented button { border: 0; background: var(--ui-surface); padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--ui-input-border); }
.segmented button.is-active { background: var(--ui-accent-soft); color: var(--ui-accent-text); }

/* Outline */
.outline { display: flex; flex-direction: column; gap: 16px; }
.outline__group { display: flex; flex-direction: column; gap: 4px; }
.outline__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.outline__list li { position: relative; }
.outline__item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 8px; background: none; text-align: left; cursor: pointer;
}
.outline__item:hover { background: var(--ui-surface-hover); }
.outline__item.is-selected { background: var(--ui-accent-soft); border-color: var(--ui-accent); color: var(--ui-accent-text); }
.outline__item.is-dragging { opacity: .4; }
.outline__item[draggable="true"] { cursor: grab; }
.outline__icon--text { font-weight: 800; font-size: 13px; }
.form > .segmented { align-self: flex-start; }
.outline__icon { width: 22px; text-align: center; flex: none; }
.outline__item small { display: block; color: var(--ui-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline__item > span:last-child { min-width: 0; }
.drop-before::before, .drop-after::after {
  content: ""; position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 2px; background: var(--ui-accent);
}
.drop-before::before { top: -3px; }
.drop-after::after { bottom: -3px; }
.panel-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ui-muted); font-weight: 700; margin-top: 4px; }

.library { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px;
  border: 1px solid var(--ui-border); border-radius: 9px; background: var(--ui-surface); font-size: 12px; cursor: pointer;
}
.tile:hover { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.tile__icon { font-size: 18px; }

/* Preview */
.preview { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 20px; min-height: 0; position: relative; }
.preview__frame { flex: 1; width: 100%; max-width: 760px; border: 0; border-radius: 6px; background: transparent; }
.preview--mobile .preview__frame {
  max-width: 375px; border: 10px solid #1e2532; border-radius: 28px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.preview__error { position: absolute; top: 16px; left: 16px; right: 16px; }
.preview__loading { position: absolute; top: 6px; right: 16px; font-size: 12px; }

/* Inspector */
.inspector__title { font-size: 17px; margin-bottom: 14px; }
.inspector__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ui-border); }
.inspector__actions .btn { padding: 6px 10px; font-size: 13px; }
.inspector__footer { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ui-border); }

.field .merge-menu { width: auto; flex: none; max-width: 60%; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.merge-menu { font-size: 12px; padding: 3px 6px; border: 1px solid var(--ui-input-border); border-radius: 6px; background: var(--ui-surface); }
.image-field__thumb { max-width: 100%; max-height: 140px; object-fit: contain; border-radius: 6px; border: 1px solid var(--ui-border); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; align-self: flex-start; }
.image-field__row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.image-field__row input[type="url"] { flex: 1; min-width: 120px; }
.image-field__row label.btn { cursor: pointer; }
.image-field__row label.btn.is-disabled { opacity: .55; cursor: not-allowed; }

.presets { display: grid; gap: 6px; }
.preset {
  text-align: left; padding: 9px 11px; border: 1px solid var(--ui-border); border-radius: 9px;
  background: var(--ui-surface); cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.preset:hover { border-color: var(--ui-accent); }
.preset small { color: var(--ui-muted); font-size: 12px; }
.colours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.colour { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.colour input { width: 34px; height: 30px; padding: 0; border: 1px solid var(--ui-input-border); border-radius: 6px; background: none; cursor: pointer; flex: none; }
.toggles { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ui-label); font-weight: 700; }
.toggles > span { margin-right: auto; }
.toggle { width: 34px; height: 30px; border: 1px solid var(--ui-input-border); border-radius: 7px; background: var(--ui-surface); cursor: pointer; }
.toggle.is-active { background: var(--ui-accent-soft); border-color: var(--ui-accent); color: var(--ui-accent-text); }

@media (max-width: 1100px) {
  .editor__body { grid-template-columns: 210px minmax(0, 1fr) 290px; }
}
@media (max-width: 860px) {
  .editor { height: auto; overflow: visible; }
  .editor__bar { flex-wrap: wrap; }
  .editor__body { grid-template-columns: 1fr; }
  .editor__canvas { height: 70vh; }
  .editor__panel--left, .editor__panel--right { border: 0; border-top: 1px solid var(--ui-border); }
}
