/* Configure/Operate: keep the existing RTL palette and typography, prioritize usable form space. */
#modal.ux-workspace {
  width: min(1120px, calc(100vw - 48px)); max-width: calc(100vw - 48px);
  max-height: 94dvh; border-radius: 14px; margin: auto;
  overflow: hidden;
}
#modal.ux-workspace .modal-head { padding: 16px 24px; min-height: 76px; box-sizing: border-box; }
#modal.ux-workspace .modal-head h2 { font-size: 20px; color: #243b5b; }
#modal.ux-workspace .modal-head .iconbutton { width: 44px; height: 44px; flex: none; }
#modal.ux-workspace .modal-body {
  max-height: calc(94dvh - 100px); padding: 0 24px 0; overflow: auto;
  scrollbar-gutter: stable; overscroll-behavior: contain;
}
#modal.ux-workspace .form-grid { gap: 18px 24px; }
#modal.ux-workspace label { color: #42546e; line-height: 1.8; }
#modal.ux-workspace input:not([type=checkbox]):not([type=radio]),
#modal.ux-workspace select, #modal.ux-workspace textarea { min-height: 44px; font-size: 14px; }
#modal.ux-workspace .btn { min-height: 42px; }
#modal.ux-workspace :is(.form-actions,.pp-form-bottom) {
  position: sticky; bottom: 0; z-index: 5; background: #fff;
  padding: 14px 0; margin-top: 24px; border-top: 1px solid #dce5f0;
  box-shadow: 0 -8px 16px #233b5d05;
}
#modal.ux-workspace .pp-tabs, #modal.ux-workspace .product-form-tabs, #modal.ux-workspace .iv-tabs { margin-top: 16px; }
.ux-form-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0; margin-bottom: 16px; border-bottom: 1px solid #e3eaf4; position: relative; }
.ux-field-search { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.ux-field-search input { width: 280px; max-width: 100%; font-weight: 400; }
.ux-form-meta { display: grid; gap: 5px; font-size: 11px; color: #65758c; text-align: end; }
.ux-save-state { font-size: 12px; color: #49617d; }
.ux-save-state[data-dirty=true] { color: #97500b; font-weight: 600; }
.ux-form-meta kbd { font: 11px monospace; direction: ltr; display: inline-block; border: 1px solid #dce5ef; border-radius: 4px; padding: 3px 5px; background: #f7f9fc; }
#ux-field-results:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; padding: 12px; border: 1px solid #dce5ef; border-radius: 8px; background: #f5f8fc; font-size: 12px; }
.ux-field-result { min-height: 44px; padding: 8px 14px; border: 1px solid #d5dfec; border-radius: 6px; background: #fff; color: #304c74; text-align: right; }
.ux-field-result:hover { background: #eaf1fc; }
.ux-field-highlight { outline: 3px solid #426ac7 !important; outline-offset: 3px; }
#modal.ux-workspace :is(input,select,textarea,button):focus-visible { outline: 2px solid #315bd6; outline-offset: 3px; }
@media (min-width: 1000px) {
  #modal.ux-workspace .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  #modal.ux-workspace { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; margin: 0; height: 100dvh; }
  #modal.ux-workspace .modal-head { padding: 12px 16px; min-height: 72px; }
  #modal.ux-workspace .modal-head h2 { font-size: 18px; }
  #modal.ux-workspace .dialog-icon { display: none; }
  #modal.ux-workspace .modal-body { padding: 0 14px; max-height: calc(100dvh - 80px); scrollbar-gutter: auto; }
  #modal.ux-workspace .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #modal.ux-workspace :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; min-width: 0; max-width: 100%; }
  #modal.ux-workspace button { min-height: 44px; }
  .ux-field-search { flex-direction: column; align-items: stretch; width: 100%; gap: 4px; }
  .ux-field-search input { width: 100%; box-sizing: border-box; }
  .ux-form-meta { text-align: start; grid-template-columns: 1fr auto; width: 100%; }
  #modal.ux-workspace :is(.form-actions,.pp-form-bottom) { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #modal.ux-workspace .fw-dialog-back { padding-bottom: env(safe-area-inset-bottom); }
}
#ux-command { width: min(680px, calc(100vw - 32px)); max-width: calc(100vw - 32px); padding: 24px; box-sizing: border-box; border-radius: 14px; margin: auto; }
#ux-command header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
#ux-command h2 { font-size: 19px; margin: 0 0 8px; color: #243b5b; }
#ux-command p, #ux-command label { font-size: 12px; line-height: 1.9; color: #62748b; }
#ux-command header button { min-width: 44px; height: 44px; font-size: 24px; }
#ux-command-search { width: 100%; box-sizing: border-box; font-size: 16px; min-height: 48px; margin: 8px 0 16px; }
#ux-command-results { max-height: 49dvh; overflow: auto; display: grid; gap: 4px; font-size: 13px; scrollbar-gutter: stable; }
#ux-command-results button { text-align: right; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 14px; min-height: 48px; border-radius: 7px; color: #334e72; background: #fff; border: 1px solid transparent; }
#ux-command-results button[data-active=true], #ux-command-results button:hover { background: #eef4ff; border-color: #d8e3f7; }
#ux-command-results strong { font-size: 13px; font-weight: 600; }
#ux-command-results small { font-size: 10px; color: #6e7f96; }
#ux-command footer { border-top: 1px solid #e2eaf4; padding-top: 14px; margin-top: 14px; font-size: 11px; color: #63748b; }
#ux-command footer span { display: block; margin-top: 5px; }
.ux-command-trigger { white-space: nowrap; min-height: 40px; font-size: 12px; }
@media(max-width:650px) { .top-actions { min-width: 0; gap: 6px; } .top-actions .searchbox { display: none; } #ux-command { padding: 18px; } #ux-command-results button { align-items: start; flex-direction: column; gap: 5px; } .ux-command-trigger { min-height: 44px; padding: 6px 10px; font-size: 11px; } }
@media print { .ux-form-tools, .ux-command-trigger, #ux-command { display: none !important; } }
