.workspace {
  display: grid;
  grid-template-columns: minmax(430px, 510px) minmax(640px, 1fr);
  height: calc(100vh - 72px);
  overflow: hidden;
}

.editor-panel {
  background: white;
  border-right: 1px solid #d7dee5;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 31px 32px 92px;
  position: relative;
}

.form-scroll-region {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  scrollbar-color: #bdc8d0 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.editor-meta {
  bottom: 15px;
  left: 32px;
  position: absolute;
  right: 32px;
  text-align: center;
}

.editor-footer {
  align-items: center;
  color: #7a8793;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 0;
  line-height: 20px;
}

.editor-footer-links {
  align-items: center;
  display: flex;
  gap: 12px;
  height: 20px;
  justify-content: center;
  line-height: 20px;
}

.editor-footer > span {
  height: 20px;
  line-height: 20px;
}

.editor-footer a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.editor-footer a:hover,
.editor-footer a:focus-visible {
  text-decoration: underline;
}

.editor-footer-version {
  color: #98a3ad;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.editor-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  flex: 0 0 auto;
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.editor-heading h1 {
  color: var(--navy);
  font-size: 26px;
  letter-spacing: -0.03em;
  margin: 0;
}

.section-nav {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  flex: 0 0 auto;
}

.section-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #718090;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  padding: 0 3px 12px;
  position: relative;
  text-decoration: none;
}

.section-nav button::after {
  background: transparent;
  bottom: -1px;
  content: "";
  height: 2px;
  left: 8px;
  position: absolute;
  right: 8px;
}

.section-nav button.active {
  color: var(--navy);
}

.section-nav button.active::after {
  background: var(--teal);
}

.section-nav button span {
  align-items: center;
  background: #eef2f5;
  border-radius: 50%;
  display: flex;
  font-size: 11px;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.section-nav button.active span {
  background: var(--navy);
  color: white;
}

.section-nav button:focus-visible {
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 0 0 2px rgba(17, 140, 131, 0.3);
  outline: none;
}

.marks-toggle {
  align-items: center;
  background: white;
  border: 1px solid #ccd6de;
  border-radius: var(--action-button-radius);
  color: #596979;
  display: flex;
  flex: 0 0 var(--action-button-width);
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  height: var(--action-button-height);
  justify-content: center;
  min-width: var(--action-button-width);
  padding: 0 10px;
  width: var(--action-button-width);
}

.marks-toggle span {
  background: #c6d0d8;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.marks-toggle.selected {
  border-color: #9acdc8;
  box-shadow: 0 1px 3px rgba(24, 44, 61, 0.12);
  color: var(--teal-dark);
}

.marks-toggle.selected span {
  background: var(--teal);
}

.marks-toggle b {
  font: inherit;
}

.footer-option {
  align-items: stretch;
  flex-direction: column;
}

.footer-option-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.footer-config {
  border-top: 1px solid #d9e2e7;
  margin-top: 2px;
  padding-top: 12px;
  width: 100%;
}

.footer-scope-setting {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.footer-scope-setting > span {
  color: #4c5d6e;
  font-size: 12px;
  font-weight: 700;
}

.footer-scope-toggle {
  background: white;
  border: 1px solid #ccd7de;
  border-radius: 7px;
  display: inline-flex;
  overflow: hidden;
}

.footer-scope-toggle button {
  background: white;
  border: 0;
  color: #607080;
  font-size: 12px;
  font-weight: 700;
  height: 36px;
  padding: 0 10px;
}

.footer-scope-toggle button + button {
  border-left: 1px solid #d7e0e5;
}

.footer-scope-toggle button.active {
  background: var(--navy);
  color: white;
}

.footer-scope-toggle button:focus-visible,
.footer-drag-handle:focus-visible,
.footer-move-actions button:focus-visible,
.footer-align-actions button:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(17, 140, 131, 0.36);
  outline: none;
}

.footer-config-note {
  color: #778591;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 8px;
}

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

.footer-field-card {
  background: white;
  border: 1px solid #d4dee4;
  border-radius: 8px;
  display: block;
  min-width: 0;
  padding: 9px;
  transition: border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  width: 100%;
}

.footer-field-card.is-dragging {
  opacity: 0.48;
}

.footer-field-card[data-drop-target="true"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 140, 131, 0.12);
}

.footer-field-heading {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 24px max-content max-content minmax(0, 1fr);
  margin-bottom: 8px;
  min-width: 0;
}

.footer-field-heading strong {
  color: #33485b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-drag-handle,
.footer-move-actions button,
.footer-align-actions button {
  align-items: center;
  background: #f4f7f8;
  border: 1px solid #d6e0e5;
  border-radius: 5px;
  color: #617181;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.footer-drag-handle {
  cursor: grab;
}

.footer-drag-handle:active {
  cursor: grabbing;
}

.footer-drag-handle i {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 4px 0 currentColor, 0 4px currentColor, 4px 4px currentColor, 0 8px currentColor, 4px 8px currentColor;
  height: 2px;
  margin-left: -4px;
  margin-top: -8px;
  width: 2px;
}

.footer-move-actions {
  display: flex;
  gap: 3px;
}

.footer-move-actions button {
  cursor: pointer;
  font: 700 12px/1 Arial, Helvetica, sans-serif;
}

.footer-align-actions {
  border: 1px solid #d6e0e5;
  border-radius: 5px;
  display: inline-flex;
  justify-self: end;
  overflow: hidden;
}

.footer-align-actions button {
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.footer-align-actions button + button {
  border-left: 1px solid #d6e0e5;
}

.footer-align-actions button.active {
  background: #dff4f1;
  color: #087b74;
}

.footer-align-icon {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 10px;
  justify-content: center;
  width: 12px;
}

.footer-align-icon::before,
.footer-align-icon span,
.footer-align-icon::after {
  background: currentColor;
  border-radius: 1px;
  content: "";
  display: block;
  height: 1px;
}

.footer-align-icon::before {
  width: 12px;
}

.footer-align-icon span {
  width: 8px;
}

.footer-align-icon::after {
  width: 10px;
}

[data-footer-align="left"] .footer-align-icon {
  align-items: flex-start;
}

[data-footer-align="center"] .footer-align-icon {
  align-items: center;
}

[data-footer-align="right"] .footer-align-icon {
  align-items: flex-end;
}

.footer-field-card textarea {
  background: white;
  border: 1px solid #cfd9df;
  border-radius: 6px;
  color: var(--ink);
  display: block;
  font: 400 13px/1.4 Arial, Helvetica, sans-serif;
  height: 72px;
  min-height: 72px;
  overflow-y: hidden;
  padding: 8px 10px;
  resize: none;
  width: 100%;
}

.footer-field-card textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 140, 131, 0.1);
  outline: none;
}

.options-list {
  display: grid;
  gap: 12px;
}

.option-card {
  align-items: center;
  background: var(--soft);
  border: 1px solid #dfe6ec;
  border-radius: 10px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.option-card.footer-option {
  align-items: stretch;
}

.option-card-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.option-card-copy strong {
  color: var(--navy);
  font-size: 14px;
}

.option-card-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.signature-option {
  align-items: stretch;
  cursor: default;
  flex-direction: column;
}

.attachment-option {
  margin-top: 14px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.attachment-option[data-drop-active="true"] {
  background: #eefaf8;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 140, 131, 0.12);
}

.local-data-option {
  align-items: center;
  flex-direction: row;
}

.security-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.security-status {
  background: #e7edf1;
  border-radius: 999px;
  color: #647483;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 9px;
  white-space: nowrap;
}

.security-status[data-enabled="true"] {
  background: #dff3ef;
  color: #0a7169;
}

.button-danger-subtle {
  color: #a83b35;
}

.button-danger-subtle:hover {
  background: #fff4f3;
  border-color: #e6b8b4;
}

.button-compact {
  flex: 0 0 auto;
  height: var(--action-button-height);
  min-height: var(--action-button-height);
  padding: 0 10px;
  width: var(--action-button-width);
}

.form-section {
  display: none;
  margin-bottom: 18px;
  padding-bottom: 27px;
}

.form-section.active {
  display: block;
}

.preview-navigation-highlight {
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(0, 140, 133, 0.2);
  transition: box-shadow 180ms ease;
}

.section-title {
  gap: 10px;
  margin-bottom: 17px;
}

.section-title > span {
  align-items: center;
  background: var(--navy);
  border-radius: 7px;
  color: white;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.section-title h2 {
  color: var(--navy);
  font-size: 16px;
  margin: 0 0 2px;
}

.section-title p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.field-grid {
  display: grid;
  gap: 14px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  color: #445365;
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field textarea {
  background: white;
  border: 1px solid #ccd6de;
  border-radius: 7px;
  color: var(--ink);
  font-size: 14px;
  min-width: 0;
  padding: 10px 11px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.field input {
  height: 44px;
}

.date-control {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.date-input-shell {
  min-width: 0;
  position: relative;
}

.date-input-shell #date-display {
  font-family: Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  padding-right: 46px;
}

.date-input-shell .date-native-picker {
  border: 0;
  bottom: 0;
  height: 1px;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  right: 18px;
  width: 1px;
}

.date-control .date-picker-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 3px;
  top: 3px;
  width: 36px;
}

.date-control button {
  background: #edf3f5;
  border: 1px solid #cdd9de;
  border-radius: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
}

.date-control button:hover,
.date-control button:focus-visible {
  background: #e2eef0;
  border-color: #9dbbc0;
}

.date-control .date-picker-button:hover,
.date-control .date-picker-button:focus-visible {
  background: #edf3f5;
}

.calendar-icon {
  border: 1.5px solid #687684;
  border-radius: 2px;
  height: 11px;
  position: relative;
  width: 12px;
}

.calendar-icon::before {
  border-top: 1px solid #687684;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 3px;
}

.calendar-icon::after {
  background: #687684;
  box-shadow: 6px 0 #687684;
  content: "";
  height: 3px;
  left: 1px;
  position: absolute;
  top: -3px;
  width: 2px;
}

.field textarea {
  line-height: 1.55;
  resize: vertical;
}

.rich-text-field {
  background: white;
  border: 1px solid #ccd6de;
  border-radius: 7px;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.rich-text-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 140, 131, 0.1);
}

.rich-text-toolbar {
  align-items: center;
  background: #f5f7f8;
  border-bottom: 1px solid #d9e0e5;
  display: flex;
  gap: 4px;
  padding: 6px;
}

.rich-text-toolbar button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #344252;
  cursor: pointer;
  display: inline-flex;
  font: 600 13px Arial, Helvetica, sans-serif;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 8px;
}

.rich-text-toolbar button:hover {
  background: #e8eef1;
  border-color: #d2dce2;
}

.rich-text-toolbar button:focus-visible {
  box-shadow: 0 0 0 2px rgba(17, 140, 131, 0.22);
  outline: 1px solid var(--teal);
}

.rich-text-toolbar button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.rich-text-toolbar .list-command {
  gap: 5px;
}

.rich-text-toolbar .list-command span {
  font-size: 18px;
  line-height: 1;
}

.rich-text-toolbar .list-command .ordered-list-icon {
  font-size: 13px;
  font-weight: 800;
}

.rich-text-toolbar .word-list-button {
  gap: 0;
  min-width: 30px;
  padding: 0 5px;
}

.word-list-glyph {
  display: grid;
  flex: 0 0 18px;
  gap: 3px;
  width: 18px;
}

.word-list-glyph i {
  background: #3f4b55;
  display: block;
  height: 1px;
  margin-left: 6px;
  position: relative;
  width: 12px;
}

.word-list-glyph i::before {
  color: #1583bd;
  font-style: normal;
  font-weight: 700;
  left: -6px;
  line-height: 6px;
  position: absolute;
  text-align: center;
  width: 4px;
}

.word-list-bullets i::before {
  background: #1583bd;
  content: "";
  height: 2px;
  top: -1px;
  width: 2px;
}

.word-list-numbers i::before {
  font-size: 6px;
  top: -3px;
}

.word-list-numbers i:nth-child(1)::before {
  content: "1";
}

.word-list-numbers i:nth-child(2)::before {
  content: "2";
}

.word-list-numbers i:nth-child(3)::before {
  content: "3";
}

.word-list-button.active .word-list-glyph i,
.word-list-button.active .word-list-bullets i::before {
  background: currentColor;
}

.word-list-button.active .word-list-numbers i::before {
  color: currentColor;
}

.rich-text-editor {
  color: var(--ink);
  font: 14px/1.6 Arial, Helvetica, sans-serif;
  max-height: 220px;
  min-height: 140px;
  overflow-y: auto;
  padding: 10px 11px;
  white-space: pre-wrap;
}

.rich-text-editor:focus {
  outline: none;
}

.rich-text-editor:empty::before {
  color: #8995a0;
  content: attr(data-placeholder);
  pointer-events: none;
}

.manual-signature-hint {
  display: block;
  margin-top: 6px;
}

.rich-text-editor p,
.rich-text-editor div {
  margin: 0 0 10px;
}

.rich-text-editor ul,
.rich-text-editor ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.rich-text-editor li {
  margin-bottom: 3px;
}

#body-editor ul,
#body-editor ol {
  list-style-position: outside;
  padding-left: 40px;
}

#body-editor li {
  padding-left: 6px;
}

.attachments-field {
  position: relative;
}

.attachments-rich-text-field {
  height: 78px;
}

.attachments-rich-text-toolbar {
  background: transparent;
  border: 0;
  gap: 3px;
  height: 22px;
  padding: 0;
  position: absolute;
  right: 0;
  top: -4px;
  z-index: 1;
}

.attachments-rich-text-toolbar button {
  background: transparent;
  border-color: transparent;
  border-radius: 5px;
  color: #344252;
  font-size: 13px;
  height: 22px;
  min-width: 30px;
  padding: 0 5px;
}

.attachments-rich-text-toolbar button:hover {
  background: #e8eef1;
  border-color: #c6d2da;
  color: var(--navy);
}

.attachments-rich-text-toolbar button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.attachments-rich-text-toolbar .list-command {
  gap: 0;
}

.attachments-rich-text-editor {
  height: 100%;
  line-height: 1.55;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 11px;
}

.attachment-picker {
  align-items: center;
  border: 1px dashed #b9c8d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 9px 10px;
}

.attachment-picker input[type="file"] {
  color: transparent;
  flex: 0 0 148px;
  font-size: 0;
  width: 148px;
}

.attachment-picker input[type="file"]::file-selector-button {
  font: 700 13px Arial, Helvetica, sans-serif;
}

.dropzone-copy {
  color: #7a8793;
  flex: 0 0 auto;
  font-size: 12px;
}

.attachments-rich-text-editor p,
.attachments-rich-text-editor div,
.attachments-rich-text-editor ul,
.attachments-rich-text-editor ol {
  margin-bottom: 4px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 140, 131, 0.1);
  outline: none;
}

.field > small {
  color: #667687;
  font-size: 12px;
  line-height: 1.45;
}

.check-row {
  border: 1px solid var(--line);
  border-radius: 9px;
  gap: 11px;
  padding: 13px;
}

.check-row input {
  accent-color: var(--teal);
  height: 17px;
  width: 17px;
}

.check-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.check-row strong {
  color: var(--navy);
  font-size: 13px;
}

.check-row small {
  color: var(--muted);
  font-size: 12px;
}

.mobile-actions {
  display: none;
  flex: 0 0 auto;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

