/* ============================================================
   data-cleaner.css —— 2-10「数据清洗器」App（MATLAB Data Cleaner）浮动窗口样式。
   几何逐像素来自真机帧：docs/reference/surfaces/data-cleaner-empty-1920x1080.png
   （1920x1080，真机 R2025b；窗口外框 (239,105) 1441x841，标题栏 30、蓝条 28、ribbon 92）。
   文字全部为真实 DOM 文本（标题/按钮标签/组标题/空白态提示），图标是
   docs/reference/data-cleaner-ref-assets.json 登记的单个官方位图（tools/extract-data-cleaner-assets.py）。
   ============================================================ */

.dc-layer {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1032px;
  pointer-events: none; z-index: 75;
}

.dc-window {
  position: absolute; display: flex; flex-direction: column;
  background: #ffffff; border: 1px solid #7d7d7d; border-radius: 8px;
  /* 真机帧四边框色不同（DWM 圆角/阴影混合的量测值，逐像素校准）：上/右浅、左/下深 */
  border-top-color: #b2b2b2; border-right-color: #b8b8b8; border-bottom-color: #9a9a9a;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.30);
  pointer-events: auto; overflow: hidden; z-index: 80;
  font-family: var(--font-ui); color: var(--text);
}
.dc-window[hidden] { display: none; }

/* ---------------- 标题栏（30px + 底部分隔线） ---------------- */
.dc-titlebar {
  position: relative; flex: 0 0 31px; height: 31px;
  background: linear-gradient(90deg, #f4f0fc 0%, #f6f0f8 45%, #f9f1ef 100%);
  border-bottom: 1px solid #7d7d7d;
}
.dc-titlebar .dc-icon { position: absolute; }
.dc-title {
  position: absolute; left: 28px; top: 3px; font-size: 12px; line-height: 1;
  color: #000000; font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.dc-win-btn {
  position: absolute; top: 0; height: 30px; width: 46px;
  display: block; border: 0; background: transparent; padding: 0;
}
.dc-win-btn:hover { background: #e5e5e5; }
.dc-win-btn .dc-icon { position: absolute; }

/* ---------------- 蓝条 + 主页页签 + 帮助页签 ---------------- */
.dc-tabbar { position: relative; flex: 0 0 28px; height: 28px; background: #004073; }
.dc-tab {
  position: absolute; left: 3px; top: 4px; width: 100px; height: 24px;
  background: #f5f5f5; border-radius: 4px 4px 0 0;
  font-size: 11px; line-height: 24px; text-align: center; color: #212121;
  font-family: "MatCjk11", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.dc-tabbar .dc-icon { position: absolute; }

/* ---------------- ribbon（92px + 底部分隔线） ---------------- */
.dc-ribbon {
  position: relative; flex: 0 0 93px; height: 93px; background: #f5f5f5;
  border-bottom: 1px solid #7d7d7d;
}
.dc-sep { position: absolute; top: 8px; width: 1px; height: 83px; background: #bfbfbf; }
.dc-group-label {
  position: absolute; font-size: 11px; line-height: 1; color: #616161;
  font-family: "MatCjk11", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  transform: translateX(-50%) translateY(-1px);
}

.dc-ribbon-btn {
  position: absolute; top: 0; height: 70px; border: 0; background: transparent;
  padding: 0; display: block;
}
.dc-ribbon-btn .dc-icon, .dc-file-btn .dc-icon { position: absolute; }
.dc-btn-label {
  position: absolute; font-size: 12px; line-height: 1; color: #212121;
  font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.dc-ribbon-btn.disabled .dc-btn-label { color: #ababab; }
/* 真机空白态：只有文字变灰，图标保持原色（逐像素量测：图标无透明度衰减） */
.dc-ribbon-btn:not(.disabled):hover { background: #e8f0f8; }

/* 清洗方法画廊（真机白底圆角框 + 右侧滚动条槽） */
.dc-gallery {
  position: absolute; background: #ffffff; border: 1px solid #bfbfbf;
}
.dc-gallery-items { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; }
.dc-gallery-gutter {
  position: absolute; left: 570px; top: 0; width: 19px; height: 66px;
  background: #f5f5f5; border-left: 1px solid #bfbfbf;
}
.dc-gallery .dc-icon { position: absolute; }
.dc-method {
  position: absolute; top: 1px; width: 76px; height: 64px; border: 0;
  background: transparent; padding: 0; display: block;
}
.dc-method .dc-icon { position: absolute; }
.dc-method-label {
  position: absolute; font-size: 12px; line-height: 1; color: #212121; white-space: nowrap;
  font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.dc-method.disabled .dc-method-label { color: #ababab; }
.dc-method:not(.disabled):hover { background: #eaf2fa; }

/* 视图组复选框 */
.dc-view-row {
  position: absolute; width: 170px; height: 22px; border: 0; background: transparent;
  padding: 0; display: block;
}
.dc-view-row .dc-icon { position: absolute; }
.dc-view-label {
  position: absolute; font-size: 12px; line-height: 1; color: #212121;
  font-family: "MatCjk12", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.dc-view-row.disabled .dc-view-label { color: #ababab; }

/* ---------------- 内容区 ---------------- */
.dc-content { position: relative; flex: 1 1 auto; background: #ffffff; overflow: hidden; }

.dc-blank {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 3px 0 0 1px;
  font-size: 20px; line-height: 1; color: #0072bd;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "MatCjk12", sans-serif;
}
.dc-blank[hidden] { display: none; }

.dc-data-view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.dc-data-view[hidden] { display: none; }

.dc-toolbar {
  flex: 0 0 30px; height: 30px; display: flex; align-items: center; gap: 10px;
  padding: 0 10px; background: #fafafa; border-bottom: 1px solid #e0e0e0;
  font-size: 12px; color: #212121;
}
.dc-toolbar-name { font-weight: 400; }
.dc-toolbar-shape { color: #5f5f5f; }
.dc-toolbar-status { margin-left: auto; color: #005b96; }

.dc-main { flex: 1 1 auto; display: flex; min-height: 0; }
.dc-table-wrap { flex: 1 1 auto; overflow: auto; border-right: 1px solid #e0e0e0; }
.dc-table { border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.dc-table th, .dc-table td {
  border: 1px solid #dcdcdc; padding: 1px 8px; min-width: 64px; text-align: right;
  color: #212121; white-space: nowrap;
}
.dc-table thead th {
  position: sticky; top: 0; background: #ececec; font-weight: 400; text-align: center;
  color: #333333; z-index: 2;
}
.dc-table tbody th.dc-rownum {
  position: sticky; left: 0; background: #ececec; font-weight: 400; color: #5f5f5f;
  text-align: right; min-width: 40px;
}
.dc-table th.dc-corner { background: #ececec; min-width: 40px; }

.dc-summary {
  flex: 0 0 360px; overflow: auto; padding: 4px 8px; background: #ffffff;
}
.dc-summary[hidden] { display: none; }
.dc-panel-title { font-size: 12px; color: #212121; margin: 2px 0 4px; }
.dc-summary-table { border-collapse: collapse; font-family: var(--font-mono); font-size: 11px; }
.dc-summary-table th, .dc-summary-table td {
  border: 1px solid #dcdcdc; padding: 1px 5px; text-align: right; white-space: nowrap; color: #212121;
}
.dc-summary-table thead th { background: #ececec; font-weight: 400; text-align: center; color: #333333; }
.dc-summary-table tbody th { background: #f5f5f5; font-weight: 400; text-align: left; }

.dc-preview {
  flex: 0 0 178px; height: 178px; border-top: 1px solid #e0e0e0;
  position: relative; background: #ffffff; overflow: hidden;
}
.dc-chart { position: absolute; left: 6px; top: 8px; }
.dc-legend {
  position: absolute; right: 12px; top: 10px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid #e0e0e0; padding: 3px 6px;
  font-size: 11px; color: #333333; max-height: 150px; overflow: hidden;
}
.dc-legend[hidden] { display: none; }
.dc-legend-item { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.dc-legend-chip { width: 12px; height: 3px; display: inline-block; }

/* ---------------- App 内模态对话框 ---------------- */
.dc-dialog-overlay {
  position: absolute; inset: 0; background: rgba(30, 30, 30, 0.10); z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.dc-dialog {
  width: 560px; max-width: 90%; background: #f7f7f7; border: 1px solid #7d7d7d;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.30); display: flex; flex-direction: column;
}
.dc-dialog-titlebar {
  flex: 0 0 30px; display: flex; align-items: center;
  background: linear-gradient(#fbfbfb, #ededed); border-bottom: 1px solid #c8c8c8;
}
.dc-dialog-title { margin-left: 10px; font-size: 12px; color: #1a1a1a; }
.dc-dialog-close { margin-left: auto; width: 34px; height: 30px; font-size: 14px; color: #333333; }
.dc-dialog-close:hover { background: #e81123; color: #ffffff; }
.dc-dialog-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow: auto; }
.dc-dialog-form { display: flex; flex-direction: column; gap: 8px; }
.dc-dialog-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #212121; }
.dc-dialog-row > span { white-space: nowrap; }
.dc-dialog-input {
  flex: 1 1 auto; height: 26px; padding: 0 6px; font-size: 12px;
  border: 1px solid #b8b8b8; background: #ffffff; color: #1a1a1a; min-width: 220px;
}
.dc-dialog-hint { font-size: 11px; color: #5f5f5f; white-space: pre-wrap; }
.dc-dialog-footer {
  display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px;
  border-top: 1px solid #d8d8d8; background: #f2f2f2;
}
.dc-dialog-btn {
  height: 26px; padding: 0 18px; font-size: 12px; border: 1px solid #b8b8b8;
  background: #fdfdfd; color: #212121;
}
.dc-dialog-btn:hover { background: #e8f0f8; }
.dc-dialog-btn.primary { background: #0072bd; border-color: #0072bd; color: #ffffff; }
.dc-dialog-btn.primary:hover { background: #005b96; }
.dc-dialog-list {
  display: flex; flex-direction: column; gap: 2px; border: 1px solid #d0d0d0;
  background: #ffffff; max-height: 240px; overflow: auto; padding: 2px;
}
.dc-dialog-item {
  display: block; width: 100%; text-align: left; padding: 4px 8px; font-size: 12px;
  border: 0; background: transparent; color: #212121;
}
.dc-dialog-item:hover { background: #eaf2fa; }
.dc-dialog-item.selected { background: #d6e9f8; }
.dc-dialog-error { font-size: 11px; color: #c42b1c; }
