#vacancy-forms-workspace,
#vacancy-forms-workspace *,
.vf-modal-layer,
.vf-modal-layer * { box-sizing: border-box; min-width: 0; letter-spacing: 0; }

.vf-workspace { width: 100%; max-width: 1380px; margin: 0 auto; color: #172033; }
.vf-workspace button, .vf-workspace input, .vf-workspace textarea, .vf-workspace select,
.vf-modal-layer button, .vf-modal-layer input, .vf-modal-layer textarea, .vf-modal-layer select { font: inherit; }

.vf-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 16px; border-bottom: 1px solid #dbe2ea; }
.vf-page-head h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; }
.vf-primary, .vf-add-field button { min-height: 40px; padding: 9px 15px; border: 1px solid #2563eb; border-radius: 6px; background: #2563eb; color: #fff; font-weight: 650; cursor: pointer; }
.vf-primary:hover, .vf-add-field button:hover { background: #1d4ed8; border-color: #1d4ed8; }
.vf-primary:disabled, .vf-add-field button:disabled, .vf-field header button:disabled { opacity: .45; cursor: not-allowed; }

.vf-page-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 650px; margin-top: 16px; border: 1px solid #dbe2ea; border-radius: 8px; overflow: hidden; background: #fff; }
.vf-list { padding: 12px; border-right: 1px solid #e2e8f0; background: #f7f9fc; }
.vf-list > input { width: 100%; min-height: 40px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.vf-list > div { display: grid; gap: 5px; }
.vf-list-item { display: grid; gap: 4px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #334155; text-align: left; cursor: pointer; }
.vf-list-item:hover { border-color: #cbd5e1; background: #fff; }
.vf-list-item.is-active { border-color: #93b4ea; background: #eaf2ff; color: #174da8; }
.vf-list-item span { overflow-wrap: anywhere; font-size: 13px; font-weight: 700; }
.vf-list-item small { color: #718096; font-size: 11px; }

.vf-editor { padding: 18px; }
.vf-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #e2e8f0; }
.vf-editor-head > div:first-child > span, .vf-eyebrow, .vf-modal > header span { color: #2563eb; font-size: 11px; font-weight: 800; }
.vf-editor-head h2 { margin: 4px 0 0; font-size: 20px; line-height: 1.25; }
.vf-editor-head > div:last-child { display: flex; gap: 8px; }
.vf-danger { min-height: 40px; padding: 8px 12px; border: 1px solid #f0b5b5; border-radius: 6px; background: #fff; color: #b42318; cursor: pointer; }

.vf-editor-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; gap: 18px; }
.vf-builder { display: grid; gap: 14px; }
.vf-section { padding-bottom: 16px; border-bottom: 1px solid #e4e9ef; }
.vf-section:last-child { border-bottom: 0; }
.vf-section h3 { margin: 0 0 12px; font-size: 15px; }
.vf-section-title { display: flex; align-items: center; justify-content: space-between; }
.vf-section-title > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #edf2f7; color: #526174; font-size: 12px; font-weight: 700; }

.vf-meta-grid, .vf-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vf-meta-grid label, .vf-field-grid label, .vf-preview > label { display: grid; gap: 6px; }
.vf-meta-grid label > span, .vf-field-grid label > span, .vf-preview label > span, .vf-preview legend { color: #435168; font-size: 12px; font-weight: 700; }
.vf-wide { grid-column: 1 / -1; }
.vf-meta-grid input, .vf-meta-grid textarea, .vf-field-grid input, .vf-field-grid textarea, .vf-field header select,
.vf-add-field select, .vf-preview input, .vf-preview textarea, .vf-preview select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #172033; outline: 0; }
.vf-meta-grid textarea, .vf-field-grid textarea, .vf-preview textarea { min-height: 86px; resize: vertical; }
.vf-meta-grid input:focus, .vf-meta-grid textarea:focus, .vf-field-grid input:focus, .vf-field-grid textarea:focus, .vf-field header select:focus, .vf-add-field select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.vf-system-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.vf-system-fields > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border: 1px solid #dbe2ea; border-radius: 6px; background: #f8fafc; }
.vf-system-fields b { font-size: 13px; }
.vf-system-fields small { color: #64748b; font-size: 11px; }
.vf-fields { display: grid; gap: 9px; }
.vf-field { border: 1px solid #dbe2ea; border-radius: 7px; background: #fff; overflow: hidden; }
.vf-field > header { display: grid; grid-template-columns: 32px minmax(150px, 220px) 1fr; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #e5eaf0; background: #f7f9fc; }
.vf-field > header > span { color: #7b8ba1; font-size: 12px; font-weight: 800; }
.vf-field > header > div { display: flex; justify-content: flex-end; gap: 3px; }
.vf-field header button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #526174; cursor: pointer; }
.vf-field header button:hover { background: #e8edf4; color: #172033; }
.vf-field header button.is-danger { color: #b42318; }
.vf-field-grid { padding: 11px; }
.vf-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; }
.vf-check input { width: 17px; min-height: 17px; }
.vf-add-field { display: grid; grid-template-columns: minmax(180px, 260px) auto; justify-content: start; gap: 8px; margin-top: 10px; }

.vf-role-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.vf-role-group { margin: 0; padding: 10px; border: 1px solid #dbe2ea; border-radius: 7px; }
.vf-role-group legend { padding: 0 5px; color: #64748b; font-size: 11px; font-weight: 800; }
.vf-role-group > label { display: flex; align-items: flex-start; gap: 8px; padding: 7px 5px; border-radius: 5px; cursor: pointer; }
.vf-role-group > label:hover { background: #f5f8fc; }
.vf-role-group input { margin-top: 2px; }
.vf-role-group label > span { display: grid; gap: 2px; }
.vf-role-group b { color: #334155; font-size: 12px; }
.vf-role-group small { color: #8a5c13; font-size: 10px; }

[data-vf-preview] { position: sticky; top: 14px; }
.vf-preview { display: grid; gap: 11px; padding: 16px; border: 1px solid #ced8e5; border-radius: 8px; background: #f8fafc; }
.vf-preview h3 { margin: -4px 0 0; font-size: 19px; }
.vf-preview > p { margin: -4px 0 2px; color: #64748b; font-size: 12px; line-height: 1.5; }
.vf-preview input:disabled, .vf-preview textarea:disabled, .vf-preview select:disabled { opacity: 1; background: #fff; color: #64748b; }
.vf-preview fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.vf-preview-check { display: flex !important; align-items: flex-start; gap: 7px !important; }
.vf-preview-check input { width: 16px; min-height: 16px; margin-top: 1px; }
.vf-preview small { color: #77859a; font-size: 10px; line-height: 1.4; }
.vf-preview em { color: #dc2626; font-style: normal; }
.vf-preview > button { min-height: 40px; border: 0; border-radius: 6px; background: #2563eb; color: #fff; font-weight: 700; opacity: 1; }

.vf-empty, .vf-loading { display: grid; place-items: center; min-height: 180px; color: #64748b; }
.vf-toast { position: fixed; right: 20px; bottom: 20px; z-index: 10050; max-width: min(420px, calc(100vw - 40px)); padding: 11px 14px; border-radius: 6px; background: #172033; color: #fff; font-size: 13px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .18s ease; }
.vf-toast.is-visible { opacity: 1; transform: translateY(0); }
.vf-toast.is-error { background: #a1261d; }

html.vf-modal-open { overflow: hidden; }
.vf-modal-layer { position: fixed; inset: 0; z-index: 10020; display: grid; place-items: stretch end; color: #172033; }
.vf-modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(15, 23, 42, .52); }
.vf-modal { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(1040px, calc(100vw - 42px)); height: 100%; overflow: hidden; background: #f8fafc; box-shadow: -18px 0 45px rgba(15, 23, 42, .2); }
.vf-modal > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #dbe2ea; background: #fff; }
.vf-modal > header h2 { margin: 3px 0 0; font-size: 18px; }
.vf-modal > header > button { width: 36px; height: 36px; border: 0; border-radius: 6px; background: #eef2f7; color: #334155; font-size: 24px; cursor: pointer; }
.vf-modal-body { min-height: 0; overflow: auto; padding: 18px; }

@media (max-width: 1100px) {
  .vf-editor-columns { grid-template-columns: minmax(0, 1fr); }
  [data-vf-preview] { position: static; }
  .vf-preview { max-width: 620px; }
}

@media (max-width: 820px) {
  .vf-page-shell { grid-template-columns: 1fr; }
  .vf-list { border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .vf-list > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vf-role-groups { grid-template-columns: 1fr; }
  .vf-modal { width: 100%; }
}

@media (max-width: 620px) {
  .vf-page-head, .vf-editor-head { align-items: stretch; flex-direction: column; }
  .vf-page-head .vf-primary, .vf-editor-head .vf-primary { width: 100%; }
  .vf-list > div, .vf-meta-grid, .vf-field-grid, .vf-system-fields { grid-template-columns: 1fr; }
  .vf-field > header { grid-template-columns: 28px minmax(0, 1fr); }
  .vf-field > header > div { grid-column: 1 / -1; }
  .vf-add-field { grid-template-columns: 1fr; }
  .vf-editor, .vf-modal-body { padding: 12px; }
}
