/* ============================================================
   工作区与变量域（FUNCTION-PARITY-2）样式：变量编辑器窗口 + 功能区对话框 + 工作区行双击态
   真机依据边界：变量编辑器帧未采集 → 窗口几何不做像素声明，只保证 MATLAB 语义可用。
   ============================================================ */

#ws-window-layer, #ws-dialog-layer {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1032px;
  pointer-events: none; z-index: 46;
}
#ws-dialog-layer { z-index: 60; }

/* 变量编辑器窗口（2-03） */
.ws-editor-window {
  position: absolute; pointer-events: auto; display: flex; flex-direction: column;
  background: #f0f0f0; border: 1px solid #7d7d7d; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  font-family: var(--font-ui); z-index: 47;
}
.ws-editor-titlebar {
  flex: 0 0 26px; display: flex; align-items: center;
  background: linear-gradient(#f7f7f7, #ececec); border-bottom: 1px solid #c8c8c8;
}
.ws-editor-title { margin-left: 8px; font-size: 12px; color: #1a1a1a; }
.ws-editor-close {
  margin-left: auto; width: 34px; height: 26px; font-size: 13px; color: #333333;
}
.ws-editor-close:hover { background: #e81123; color: #ffffff; }
.ws-editor-toolbar {
  flex: 0 0 26px; display: flex; align-items: center; gap: 8px; padding: 0 6px;
  background: #f5f5f5; border-bottom: 1px solid #d0d0d0; font-size: 11px; color: #212121;
}
.ws-editor-size { color: #5f5f5f; }
.ws-editor-tool {
  height: 20px; padding: 0 8px; font-size: 11px; color: #212121;
  background: #fdfdfd; border: 1px solid #c8c8c8; border-radius: 2px;
}
.ws-editor-tool:hover { background: #e3f0fb; }
.ws-editor-body { flex: 1 1 auto; overflow: auto; background: #ffffff; }
.ws-editor-grid { border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.ws-editor-grid th {
  position: sticky; top: 0; background: #ececec; border: 1px solid #c8c8c8;
  font-weight: normal; color: #333333; padding: 1px 6px; min-width: 42px;
}
.ws-editor-grid tbody th { position: sticky; left: 0; background: #ececec; }
.ws-editor-grid td {
  border: 1px solid #dcdcdc; padding: 1px 6px; min-width: 42px; text-align: right;
  color: #1a1a1a; white-space: nowrap;
}
.ws-editor-grid td:focus { outline: 2px solid #0a58a5; outline-offset: -2px; background: #eef6ff; }
.ws-editor-status {
  flex: 0 0 20px; line-height: 20px; padding: 0 6px; font-size: 11px; color: #333333;
  background: #ececec; border-top: 1px solid #d0d0d0; white-space: nowrap; overflow: hidden;
}

/* 功能区对话框（2-06/2-07/2-08/2-09/2-10） */
.ws-dialog-overlay {
  position: absolute; inset: 0; pointer-events: auto;
  background: rgba(0, 0, 0, 0.10);
}
.ws-dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-width: 420px; max-width: 640px; background: #f7f7f7;
  border: 1px solid #7d7d7d; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.36);
  display: flex; flex-direction: column; font-family: var(--font-ui);
}
.ws-dialog-titlebar {
  flex: 0 0 30px; display: flex; align-items: center;
  background: linear-gradient(#fbfbfb, #ededed); border-bottom: 1px solid #c8c8c8;
}
.ws-dialog-title { margin-left: 10px; font-size: 12px; color: #1a1a1a; }
.ws-dialog-close { margin-left: auto; width: 34px; height: 30px; font-size: 14px; color: #333333; }
.ws-dialog-close:hover { background: #e81123; color: #ffffff; }
.ws-dialog-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow: auto; }
.ws-dialog-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #212121; }
.ws-dialog-row > span:first-child, .ws-dialog-row { white-space: nowrap; }
.ws-dialog-input {
  flex: 1 1 auto; height: 24px; padding: 0 6px; font-size: 12px;
  border: 1px solid #b8b8b8; background: #ffffff; color: #1a1a1a; min-width: 220px;
}
.ws-dialog-textarea {
  font-family: var(--font-mono); font-size: 12px; border: 1px solid #b8b8b8;
  background: #ffffff; color: #1a1a1a; padding: 6px; resize: vertical;
}
.ws-dialog-list { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; }
.ws-dialog-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #212121; }
.ws-dialog-hint { font-size: 11px; color: #6a6a6a; line-height: 1.5; }
.ws-dialog-footer {
  flex: 0 0 38px; display: flex; justify-content: flex-end; align-items: center;
  gap: 8px; padding: 0 10px; background: #f0f0f0; border-top: 1px solid #d0d0d0;
}
.ws-dialog-btn {
  min-width: 74px; height: 24px; font-size: 12px; color: #212121;
  background: #fdfdfd; border: 1px solid #b8b8b8; border-radius: 2px;
}
.ws-dialog-btn:hover { background: #e3f0fb; }
.ws-dialog-primary { border-color: #0a58a5; }
.ws-dialog-error { font-size: 12px; color: #b00020; }
.ws-dialog-message-line { font-size: 12px; color: #212121; }

/* 工作区行双击（打开变量编辑器）与选中态 */
.ws-row { cursor: default; }
.ws-row:hover { background: #e8e8e8; }
