/* A single editor family across add, edit and import correction flows. */
#suite-dialog.editor-dialog {
  width: min(1480px, calc(100% - 64px));
  max-width: none;
  background: #f1f5f9;
  border: 1px solid #bacddd;
  border-radius: 14px;
  scroll-padding: 96px 0 90px;
}
#suite-dialog.editor-dialog-compact { width: min(920px, calc(100% - 64px)); }
.editor-dialog .dialog-head {
  background: linear-gradient(110deg, #142e45, #102439);
  color: #fff;
  border-bottom: 3px solid #0788df;
  padding: 20px 28px;
}
.editor-dialog .dialog-head h2 { font-size: 25px; line-height: 1.3; letter-spacing: -.3px; }
.editor-dialog .dialog-head .icon-button { color: #e3f2ff; border: 1px solid #658197; border-radius: 7px; }
.editor-dialog .dialog-head .icon-button:hover { background: #294c68; }
.editor-dialog .dialog-body { padding: 26px 28px 0; }
.editor-dialog .dialog-body > p { max-width: 100ch; line-height: 1.6; }
.editor-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.editor-panel {
  min-width: 0;
  margin: 0;
  padding: 0 20px 20px;
  border: 1px solid #cbdde9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 5px #16395406;
}
.editor-panel legend { padding: 0 8px; margin-left: -8px; font-size: 17px; font-weight: 650; color: #164f7a; max-width: 100%; line-height: 1.6; }
.editor-panel-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border-radius: 7px; background: #e1f2ff; color: #007bc9; font-size: 12px; font-weight: 700; margin-right: 9px; vertical-align: middle; }
.editor-panel-help { margin: 7px 0 18px; color: #61768a; font-size: 13px; line-height: 1.5; }
.editor-panel .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.editor-panel .field { min-width: 0; gap: 7px; }
.editor-panel .field > span { color: #294b68; font-size: 14px; font-weight: 500; }
.editor-panel input:not([type="checkbox"]), .editor-panel select, .editor-panel textarea { min-width: 0; width: 100%; background: #fbfdff; border-color: #c4d6e5; border-radius: 6px; min-height: 43px; font-size: 14px; }
.editor-panel textarea { min-height: 98px; resize: vertical; }
.editor-panel input:focus-visible, .editor-panel select:focus-visible, .editor-panel textarea:focus-visible { outline: 2px solid #0088e8; outline-offset: 2px; background: #fff; }
.editor-panel .field-invalid { padding: 10px; background: #e8f5ff; border-radius: 7px; outline: 1px solid #0088e8; }
.editor-panel .field-invalid input, .editor-panel .field-invalid select, .editor-panel .field-invalid textarea { border-color: #0088e8; }
.editor-panel .field.checkbox { padding: 10px 12px; border: 1px solid #dae7f0; border-radius: 7px; background: #f3f8fc; }
.editor-panel .field.checkbox > span { font-size: 13px; }
.editor-panel .form-help, .editor-panel small { line-height: 1.5; }
.record-editor > .form-actions { margin: 22px -28px 0; padding: 16px 28px; border-top: 1px solid #c8dce9; background: #fff; box-shadow: 0 -5px 16px #193b5108; gap: 12px; }
.record-editor > .form-actions .danger { margin-right: auto; }
.record-editor > .form-actions .primary { min-width: 150px; }
.record-editor > .form-error:not(:empty) { margin-top: 18px; }
.editor-dialog-compact .editor-panels { grid-template-columns: 1fr; }
@media (max-width: 1000px) {
  #suite-dialog.editor-dialog { width: calc(100% - 32px); }
  .editor-panels { columns: 1; column-gap: 0; gap: 20px; }
  .editor-dialog .dialog-body { padding: 20px 22px 0; }
  .record-editor > .form-actions { margin-inline: -22px; padding-inline: 22px; }
}
@media (max-width: 600px) {
  #suite-dialog.editor-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
  .editor-dialog .dialog-head { padding: 15px 16px; }
  .editor-dialog .dialog-head h2 { font-size: 21px; }
  .editor-dialog .dialog-body { padding: 18px 12px 0; }
  .editor-panel { padding: 0 14px 16px; }
  .editor-panel legend { font-size: 16px; }
  .editor-panel .form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .editor-panel .form-grid .full { grid-column: 1 / -1; }
  .editor-panel input:not([type="checkbox"]), .editor-panel select, .editor-panel textarea { font-size: 16px; }
  .record-editor > .form-actions { margin-inline: -12px; padding: 12px; gap: 8px; flex-wrap: wrap; }
  .record-editor > .form-actions .button { min-height: 44px; }
  .record-editor > .form-actions .primary { min-width: 0; flex: 1; }
}
.editor-panels > .editor-panel:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Compact section flow avoids row-height gaps while keeping the source/tab sequence intact. */
#suite-dialog.editor-dialog{background:rgba(241,245,249,.9);backdrop-filter:blur(12px)}#suite-dialog.editor-dialog .dialog-head{background:linear-gradient(110deg,rgba(20,46,69,.96),rgba(16,36,57,.94));backdrop-filter:blur(8px)}.editor-panels{display:block;columns:2;column-gap:22px;column-fill:balance;align-items:unset}.editor-panel{display:inline-block;box-sizing:border-box;width:100%;margin:0 0 18px;vertical-align:top;break-inside:avoid;page-break-inside:avoid;background:rgba(255,255,255,.8)}#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox){display:grid;grid-template-columns:minmax(100px,38%) minmax(0,1fr);align-items:center;gap:5px 10px}#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>span{grid-column:1;grid-row:1;line-height:1.35}#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>input,#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>select,#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>textarea,#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>.button,#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>.page-actions{grid-column:2;grid-row:1;width:100%;min-width:0}#suite-dialog.editor-dialog .editor-panel .field:not(.checkbox)>small{grid-column:2;line-height:1.4}#suite-dialog.editor-dialog .record-editor>.form-actions{background:rgba(255,255,255,.84);backdrop-filter:blur(8px)}.editor-dialog-compact .editor-panels{columns:1}
@media(max-width:1000px){.editor-panels{columns:1;column-gap:0}.editor-panel{margin-bottom:16px}}
/* Transparent, compact editor shells for every add and edit flow. */
#suite-dialog.editor-dialog{width:min(920px,calc(100% - 32px));background:rgba(255,255,255,.73);backdrop-filter:none;box-shadow:none}
#suite-dialog.editor-dialog:has(.editor-panels > .editor-panel:nth-child(3)){width:min(1120px,calc(100% - 32px))}
#suite-dialog.editor-dialog .dialog-body{background:rgba(255,255,255,.73)}
#suite-dialog.editor-dialog:not(:has(.editor-panels > .editor-panel:nth-child(3))) .editor-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;columns:initial;column-gap:0;align-items:start}
#suite-dialog.editor-dialog .editor-panel{background:rgba(255,255,255,.73);box-shadow:none}
#suite-dialog.editor-dialog .editor-panel legend{color:#123e63}
#suite-dialog.editor-dialog .editor-panel .editor-panel-help,
#suite-dialog.editor-dialog .editor-panel .form-help,
#suite-dialog.editor-dialog .editor-panel small{color:#385675}
#suite-dialog.editor-dialog .record-editor>.form-actions{background:rgba(255,255,255,.73);backdrop-filter:none;box-shadow:none}
@media(max-width:1000px){
  #suite-dialog.editor-dialog,
  #suite-dialog.editor-dialog:has(.editor-panels > .editor-panel:nth-child(3)){width:calc(100% - 32px)}
  #suite-dialog.editor-dialog:not(:has(.editor-panels > .editor-panel:nth-child(3))) .editor-panels{grid-template-columns:1fr}
}
@media(max-width:600px){
  #suite-dialog.editor-dialog,
  #suite-dialog.editor-dialog:has(.editor-panels > .editor-panel:nth-child(3)){width:calc(100% - 16px)}
  #suite-dialog.editor-dialog:not(:has(.editor-panels > .editor-panel:nth-child(3))) .editor-panels{grid-template-columns:1fr}
}
/* Keep labels and controls readable inside compact side-by-side editor groups. */
#suite-dialog.editor-dialog:not(:has(.editor-panels > .editor-panel:nth-child(3))) .editor-panel .form-grid{grid-template-columns:minmax(0,1fr)}
