/* 数智小蜜蜂 · 数据清洗演示
 * 样式对照 src/layout/side-layout.vue、side-menu/index.vue 与 Ant Design Vue 4 默认主题（primaryColor #1677ff，borderRadius 6）
 */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.5715;
  color: rgba(0, 0, 0, 0.88);
  background: #f5f5f5;
  overflow: hidden;
}
button { font-family: inherit; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; height: 100vh; }
.sider {
  width: 200px; flex: 0 0 200px; height: 100vh;
  background: #001529; overflow-y: auto; z-index: 10;
}
.sider::-webkit-scrollbar { width: 4px; }
.sider::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(0, 0, 0, 0.2); }
.logo {
  height: 56px; padding: 8px 15px; display: flex; justify-content: center; align-items: center;
  background: #001529; cursor: pointer;
}
.logo-text { display: flex; flex-direction: column; align-items: center; line-height: 1.3; color: #fff; }
.logo-text .title { font-size: 16px; font-weight: 600; }
.logo-text .subtitle { font-size: 11px; letter-spacing: 1px; opacity: 0.75; margin-top: 2px; }

.menu { list-style: none; margin: 0; padding: 0 0 12px; }
.menu-item, .submenu-title {
  height: 40px; line-height: 40px; margin: 4px; width: calc(100% - 8px);
  padding-left: 24px; padding-right: 16px; border-radius: 8px;
  color: rgba(255, 255, 255, 0.65); cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
  transition: color 0.2s, background-color 0.2s;
}
.menu-item:hover, .submenu-title:hover { color: #fff; }
.menu-item.selected { background: #1677ff; color: #fff; }
.submenu-title .arrow { margin-left: auto; font-size: 10px; transition: transform 0.2s; }
.submenu.open .submenu-title .arrow { transform: rotate(180deg); }
.submenu.child-selected > .submenu-title { color: #fff; }
.submenu-list { list-style: none; margin: 0; padding: 0; background: #000c17; }
.submenu:not(.open) .submenu-list { display: none; }
.submenu-list .menu-item { padding-left: 48px; }
.menu-icon { width: 14px; height: 14px; flex: none; }
.menu-badge {
  font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 10px;
  background: #ff4d4f; color: #fff; margin-left: auto;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.header {
  height: 40px; flex: none; background: #fff; border-bottom: 1px solid #f6f6f6;
  display: flex; align-items: center; justify-content: space-between; z-index: 21;
}
.breadcrumb { margin-left: 15px; color: rgba(0, 0, 0, 0.45); }
.breadcrumb .sep { margin: 0 8px; }
.breadcrumb .last { color: rgba(0, 0, 0, 0.88); }
.user { display: flex; align-items: center; padding: 0 12px; height: 40px; cursor: pointer; }
.user:hover { background: #f6f6f6; }
.avatar {
  width: 20px; height: 20px; border-radius: 50%; margin: 0 5px; background: #87d068;
  color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.content {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 0; position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='160'%3E%3Ctext x='30' y='100' font-size='15' fill='rgba(0,0,0,0.06)' transform='rotate(-20 130 80)' font-family='Microsoft YaHei'%3E演示用户%3C/text%3E%3C/svg%3E");
}
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
.page { padding-bottom: 10px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: #fff; border-radius: 8px; transition: box-shadow 0.2s;
  margin-bottom: 10px;
}
.card:hover { box-shadow: 0 1px 2px -2px rgba(0,0,0,.16), 0 3px 6px 0 rgba(0,0,0,.12), 0 5px 12px 4px rgba(0,0,0,.09); }
.card-head {
  min-height: 38px; padding: 0 12px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between; font-weight: 600;
}
.card-head .extra { font-weight: 400; }
.card-body { padding: 12px; }
.sub-card { border: 1px solid #f0f0f0; border-radius: 8px; }
.sub-card:hover { box-shadow: none; }

/* ---------------- 按钮 ---------------- */
.btn {
  height: 32px; padding: 4px 15px; font-size: 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid #d9d9d9; background: #fff; color: rgba(0, 0, 0, 0.88);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02); display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s; white-space: nowrap; vertical-align: middle;
}
.btn:hover { color: #4096ff; border-color: #4096ff; }
.btn-primary { background: #1677ff; border-color: #1677ff; color: #fff; box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1); }
.btn-primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.btn-link { border: none; background: none; box-shadow: none; color: #1677ff; padding: 4px 0; }
.btn-link:hover { color: #4096ff; }
.btn-danger { color: #ff4d4f; border-color: #ff4d4f; }
.btn-danger:hover { color: #ff7875; border-color: #ff7875; }
.btn-sm { height: 24px; padding: 0 7px; font-size: 14px; border-radius: 4px; }
.btn[disabled], .btn[disabled]:hover {
  cursor: not-allowed; color: rgba(0, 0, 0, 0.25); background: rgba(0, 0, 0, 0.04);
  border-color: #d9d9d9; box-shadow: none;
}
.btn svg { width: 14px; height: 14px; }
.smart-table-btn-block { margin-bottom: 15px; display: flex; justify-content: space-between; }
.smart-table-operate-block .btn { margin-right: 12px; }
.panel-footer {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid #f0f0f0;
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ---------------- 步骤条 ---------------- */
.steps { display: flex; padding: 8px 24px 20px; }
.step { flex: 1; display: flex; overflow: hidden; }
.step:last-child { flex: none; }
.step-icon {
  width: 32px; height: 32px; flex: none; border-radius: 50%; margin-right: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all 0.3s;
}
.step-content { min-width: 0; }
.step-title { position: relative; display: inline-block; padding-right: 16px; font-size: 16px; line-height: 32px; }
.step-title::after {
  content: ''; position: absolute; top: 16px; left: 100%; width: 9999px; height: 1px; background: rgba(5, 5, 5, 0.06);
}
.step:last-child .step-title::after { display: none; }
.step-desc { font-size: 14px; color: rgba(0, 0, 0, 0.45); }
.step.wait .step-icon { background: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.65); }
.step.wait .step-title { color: rgba(0, 0, 0, 0.45); }
.step.process .step-icon { background: #1677ff; color: #fff; }
.step.process .step-title { color: rgba(0, 0, 0, 0.88); font-weight: 600; }
.step.process .step-desc { color: rgba(0, 0, 0, 0.88); }
.step.finish .step-icon { background: #e6f4ff; color: #1677ff; }
.step.finish .step-title::after { background: #1677ff; }
.step.finish .step-title { color: rgba(0, 0, 0, 0.88); }

/* ---------------- 提示条 ---------------- */
.alert {
  display: flex; gap: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid; margin-bottom: 12px;
  align-items: flex-start;
}
.alert .alert-icon { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.alert-body { flex: 1; }
.alert-message { color: rgba(0, 0, 0, 0.88); }
.alert-with-desc { padding: 16px 20px; }
.alert-with-desc .alert-message { font-size: 16px; margin-bottom: 4px; }
.alert-with-desc .alert-icon { width: 22px; height: 22px; margin-top: 2px; }
.alert-desc { color: rgba(0, 0, 0, 0.88); }
.alert.info { background: #e6f4ff; border-color: #91caff; }
.alert.info .alert-icon { color: #1677ff; }
.alert.success { background: #f6ffed; border-color: #b7eb8f; }
.alert.success .alert-icon { color: #52c41a; }
.alert.warning { background: #fffbe6; border-color: #ffe58f; }
.alert.warning .alert-icon { color: #faad14; }
.alert.error { background: #fff2f0; border-color: #ffccc7; }
.alert.error .alert-icon { color: #ff4d4f; }
.alert a, .link { color: #1677ff; cursor: pointer; text-decoration: none; }
.alert a:hover, .link:hover { color: #69b1ff; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-block; height: 22px; line-height: 20px; padding: 0 7px; font-size: 12px;
  border: 1px solid #d9d9d9; border-radius: 4px; background: #fafafa; margin-right: 8px; white-space: nowrap;
}
.tag.blue { color: #0958d9; background: #e6f4ff; border-color: #91caff; }
.tag.green { color: #389e0d; background: #f6ffed; border-color: #b7eb8f; }
.tag.orange { color: #d46b08; background: #fff7e6; border-color: #ffd591; }
.tag.red { color: #cf1322; background: #fff1f0; border-color: #ffa39e; }
.tag.purple { color: #531dab; background: #f9f0ff; border-color: #d3adf7; }
code, .mono { font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 12px; }
code { background: rgba(150, 150, 150, 0.1); border: 1px solid rgba(100, 100, 100, 0.2); border-radius: 3px; padding: 1px 4px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; border: 1px solid #f0f0f0; border-radius: 8px; }
.table-wrap.max-h { max-height: 320px; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th, .table td {
  padding: 8px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
  white-space: nowrap; text-align: left;
}
.table th:last-child, .table td:last-child { border-right: none; }
.table tbody tr:last-child td { border-bottom: none; }
.table th { background: #fafafa; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.table tbody tr:hover td { background: #fafafa; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.cell-modified { background: #fffbe6; }
.table td.cell-error { background: #fff2f0; color: #cf1322; font-weight: 600; }
.table td.cell-fixed { background: #f6ffed; color: #389e0d; }
.table td.masked { color: #0958d9; font-family: SFMono-Regular, Consolas, monospace; font-size: 13px; }
.table tr.row-dropped td { text-decoration: line-through; color: rgba(0, 0, 0, 0.25); background: #fafafa; }

/* Excel 样式的原始文件预览 */
.sheet { border-collapse: collapse; font-size: 13px; width: 100%; }
.sheet td, .sheet th { border: 1px solid #e3e3e3; padding: 3px 8px; white-space: nowrap; height: 26px; }
.sheet thead th { background: #f3f3f3; color: #666; font-weight: 400; text-align: center; position: sticky; top: 0; }
.sheet td.rn { background: #f3f3f3; color: #666; text-align: center; width: 40px; }
.sheet tr.title-row td:not(.rn) { font-weight: 600; font-size: 14px; text-align: center; }
.sheet tr.header-row td:not(.rn) { background: #ddebf7; font-weight: 600; }
.sheet tr.ellipsis td:not(.rn) { color: rgba(0, 0, 0, 0.45); text-align: center; font-style: italic; }
.sheet tr.total-row td:not(.rn) { font-weight: 600; }

.legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: rgba(0, 0, 0, 0.65); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; border: 1px solid #ffe58f; }
.legend i.mod { background: #fffbe6; }
.legend i.err { background: #fff2f0; border-color: #ffccc7; }
.legend i.fix { background: #f6ffed; border-color: #b7eb8f; }

/* ---------------- 上传 ---------------- */
.dragger {
  background: rgba(0, 0, 0, 0.02); border: 1px dashed #d9d9d9; border-radius: 8px;
  padding: 24px 16px; text-align: center; cursor: pointer; transition: border-color 0.3s;
}
.dragger:hover { border-color: #4096ff; }
.dragger-icon { color: #1677ff; margin-bottom: 12px; }
.dragger-icon svg { width: 48px; height: 48px; }
.dragger-text { font-size: 16px; margin: 0 0 4px; }
.dragger-hint { color: rgba(0, 0, 0, 0.45); margin: 0; }
.upload-list-item {
  margin-top: 8px; height: 30px; padding: 0 8px; border-radius: 6px; display: flex; align-items: center; gap: 8px;
  transition: background 0.3s;
}
.upload-list-item:hover { background: rgba(0, 0, 0, 0.04); }
.upload-list-item .file-name { flex: 1; }
.upload-list-item svg { width: 14px; height: 14px; color: rgba(0, 0, 0, 0.45); }

/* ---------------- 选择器 ---------------- */
.select {
  height: 32px; min-width: 160px; padding: 0 11px; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
  transition: border-color 0.2s;
}
.select:hover { border-color: #4096ff; }
.select.open { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1); }
.select .arrow { color: rgba(0, 0, 0, 0.25); font-size: 10px; }
.dropdown {
  position: fixed; z-index: 1050; background: #fff; border-radius: 8px; padding: 4px;
  box-shadow: 0 6px 16px 0 rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12), 0 9px 28px 8px rgba(0,0,0,.05);
  max-height: 256px; overflow-y: auto;
}
.dropdown-option { padding: 5px 12px; border-radius: 4px; cursor: pointer; }
.dropdown-option:hover { background: rgba(0, 0, 0, 0.04); }
.dropdown-option.active { background: #e6f4ff; font-weight: 600; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox .box {
  width: 16px; height: 16px; border: 1px solid #d9d9d9; border-radius: 4px; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; background: #fff; transition: all 0.2s;
}
.checkbox.checked .box { background: #1677ff; border-color: #1677ff; }
.checkbox .box svg { width: 10px; height: 10px; opacity: 0; }
.checkbox.checked .box svg { opacity: 1; }

/* 分段控制器 */
.segmented { display: inline-flex; background: #f5f5f5; padding: 2px; border-radius: 6px; }
.segmented-item { padding: 0 11px; line-height: 28px; border-radius: 4px; cursor: pointer; color: rgba(0, 0, 0, 0.65); transition: all 0.2s; }
.segmented-item:hover { color: rgba(0, 0, 0, 0.88); }
.segmented-item.active { background: #fff; color: rgba(0, 0, 0, 0.88); box-shadow: 0 1px 2px 0 rgba(0,0,0,.03), 0 1px 6px -1px rgba(0,0,0,.02), 0 2px 4px 0 rgba(0,0,0,.02); }

/* 标签页 */
.tabs-nav { display: flex; gap: 32px; border-bottom: 1px solid #f0f0f0; margin-bottom: 12px; }
.tab { padding: 8px 0; cursor: pointer; position: relative; color: rgba(0, 0, 0, 0.88); }
.tab:hover { color: #4096ff; }
.tab.active { color: #1677ff; }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #1677ff; }

/* 进度条 */
.progress { display: flex; align-items: center; gap: 8px; }
.progress-outer { flex: 1; height: 8px; background: rgba(0, 0, 0, 0.06); border-radius: 100px; overflow: hidden; }
.progress-inner { height: 100%; width: 0; background: #1677ff; border-radius: 100px; transition: width 0.15s linear; }
.progress.done .progress-inner { background: #52c41a; }
.progress-text { width: 44px; text-align: right; color: rgba(0, 0, 0, 0.88); font-variant-numeric: tabular-nums; }
.progress.done .progress-text { color: #52c41a; }

/* 统计数值 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { border: 1px solid #f0f0f0; border-radius: 8px; padding: 12px 16px; }
.stat-title { color: rgba(0, 0, 0, 0.45); font-size: 14px; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; color: rgba(0, 0, 0, 0.45); font-weight: 400; margin-left: 4px; }
.stat-foot { margin-top: 6px; font-size: 12px; color: rgba(0, 0, 0, 0.65); }
.ok { color: #52c41a; }
.bad { color: #ff4d4f; }
.muted { color: rgba(0, 0, 0, 0.45); }
.section-title { font-weight: 600; margin: 4px 0 8px; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 5fr 7fr; gap: 12px; }
.desc { color: rgba(0, 0, 0, 0.65); margin: 0 0 12px; }

/* 智能体日志 */
.agent-grid { display: grid; grid-template-columns: 7fr 4fr; gap: 12px; }
.agent-head { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #1677ff; display: inline-block; }
.dot.running { animation: pulse 1.2s infinite; }
.dot.done { background: #52c41a; }
.dot.ask { background: #faad14; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.log { max-height: 440px; overflow-y: auto; padding: 4px 0; }
.log-item { display: flex; gap: 10px; padding: 8px 4px; animation: fadein 0.3s; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.log-icon { width: 20px; height: 20px; flex: none; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.log-icon svg { width: 16px; height: 16px; }
.log-item.done .log-icon { color: #52c41a; }
.log-item.ask .log-icon { color: #faad14; }
.log-body { flex: 1; min-width: 0; }
.log-title { color: rgba(0, 0, 0, 0.88); }
.log-detail { color: rgba(0, 0, 0, 0.45); font-size: 13px; margin-top: 2px; }
.log-time { color: rgba(0, 0, 0, 0.25); font-size: 12px; font-variant-numeric: tabular-nums; }
.log-code {
  margin: 6px 0 0; padding: 8px 10px; background: #f6f8fa; border-radius: 6px; font-size: 12px; line-height: 1.6;
  font-family: SFMono-Regular, Consolas, monospace; color: #24292f; white-space: pre; overflow-x: auto;
}
.log-code .c { color: #6e7781; }
.log-code .k { color: #cf222e; }
.log-code .s { color: #0a3069; }
.spinner {
  width: 14px; height: 14px; border: 2px solid #e6f4ff; border-top-color: #1677ff; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.question {
  border: 1px solid #ffe58f; background: #fffbe6; border-radius: 8px; padding: 12px; margin: 4px 0 8px 30px;
  animation: fadein 0.3s;
}
.question-title { font-weight: 600; margin-bottom: 4px; }
.question-actions { margin-top: 10px; display: flex; gap: 8px; }
.question.answered { background: #fafafa; border-color: #f0f0f0; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; animation: fadein 0.3s; }
.result-list li:last-child { border-bottom: none; }
.sandbox-box { margin-top: 12px; padding: 10px 12px; background: #fafafa; border-radius: 8px; font-size: 13px; color: rgba(0, 0, 0, 0.65); }
.sandbox-box .row { display: flex; gap: 8px; margin: 4px 0; align-items: center; }
.sandbox-box .yes { color: #52c41a; }
.sandbox-box .no { color: #ff4d4f; }

/* 结果页 */
.result { padding: 48px 32px; text-align: center; }
.result-icon { color: #52c41a; margin-bottom: 24px; }
.result-icon svg { width: 72px; height: 72px; }
.result-title { font-size: 24px; line-height: 1.33; margin-bottom: 8px; }
.result-sub { color: rgba(0, 0, 0, 0.45); }
.result-extra { margin-top: 24px; display: flex; justify-content: center; gap: 8px; }
.result-content { background: #fafafa; border-radius: 8px; padding: 16px 24px; margin: 24px auto 0; max-width: 640px; text-align: left; }
.result-content p { margin: 4px 0; }

/* 空状态 */
.empty { text-align: center; padding: 80px 0; color: rgba(0, 0, 0, 0.45); }
.empty svg { width: 64px; height: 41px; margin-bottom: 8px; }

/* 分页 */
.smart-query-table-page { margin-top: 10px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.pager-item { min-width: 32px; height: 32px; line-height: 30px; text-align: center; border-radius: 6px; border: 1px solid transparent; cursor: pointer; }
.pager-item.active { border-color: #1677ff; color: #1677ff; font-weight: 600; }

/* ---------------- 全局提示 / 弹窗 / 抽屉 / 加载 ---------------- */
#message { position: fixed; top: 8px; left: 0; right: 0; z-index: 2010; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.message-notice { padding: 8px; animation: msgin 0.3s; transition: all 0.3s; }
.message-notice.leave { opacity: 0; transform: translateY(-20px); }
@keyframes msgin { from { opacity: 0; transform: translateY(-20px); } }
.message-content {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fff; border-radius: 8px;
  box-shadow: 0 6px 16px 0 rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12), 0 9px 28px 8px rgba(0,0,0,.05);
}
.message-content svg { width: 16px; height: 16px; }
.msg-icon.success { color: #52c41a; }
.msg-icon.info { color: #1677ff; }
.msg-icon.warning { color: #faad14; }

.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 1000; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: fixed; top: 100px; left: 50%; transform: translateX(-50%); width: 520px; z-index: 1001;
  background: #fff; border-radius: 8px; padding: 20px 24px;
  box-shadow: 0 6px 16px 0 rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12), 0 9px 28px 8px rgba(0,0,0,.05);
  animation: zoom 0.2s;
}
@keyframes zoom { from { opacity: 0; transform: translateX(-50%) scale(0.9); } }
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.modal-close { position: absolute; top: 17px; right: 17px; width: 22px; height: 22px; border: none; background: none; cursor: pointer; color: rgba(0, 0, 0, 0.45); border-radius: 4px; font-size: 16px; }
.modal-close:hover { background: rgba(0, 0, 0, 0.06); }
.modal-footer { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; z-index: 1001; background: #fff;
  display: flex; flex-direction: column; box-shadow: -6px 0 16px 0 rgba(0,0,0,.08), -3px 0 6px -4px rgba(0,0,0,.12), -9px 0 28px 8px rgba(0,0,0,.05);
  animation: slidein 0.3s;
}
@keyframes slidein { from { transform: translateX(100%); } }
.drawer-header { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.drawer-header .modal-close { position: static; }
.drawer-body { padding: 16px 24px; overflow-y: auto; flex: 1; }
.round { border: 1px solid #f0f0f0; border-radius: 8px; margin-bottom: 12px; }
.round-head { padding: 8px 12px; background: #fafafa; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; border-radius: 8px 8px 0 0; }
.round-body { padding: 8px 12px; }
.round-body .log-code { margin: 0; }

.loading { position: fixed; inset: 0; z-index: 1100; background: rgba(255, 255, 255, 0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #1677ff; }
.loading .spinner { width: 32px; height: 32px; border-width: 3px; }

/* ---------------- 演示控制（不属于产品界面） ---------------- */
.demo-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 3000; background: rgba(20, 20, 20, 0.88); color: #fff;
  border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.demo-panel .label { opacity: 0.6; margin-right: 4px; }
.demo-panel button, .demo-panel a {
  background: rgba(255, 255, 255, 0.12); color: #fff; border: none; border-radius: 6px; padding: 5px 10px;
  cursor: pointer; font-size: 13px; text-decoration: none;
}
.demo-panel button:hover, .demo-panel a:hover { background: rgba(255, 255, 255, 0.24); }
.demo-panel button.primary { background: #1677ff; }
.demo-panel button.primary:hover { background: #4096ff; }
.demo-caption {
  position: fixed; left: calc(50% + 100px); bottom: 28px; transform: translateX(-50%); z-index: 2999;
  background: rgba(20, 20, 20, 0.85); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 16px;
  max-width: 760px; text-align: center; pointer-events: none; transition: opacity 0.3s;
}
.demo-caption .step-no { color: #69b1ff; margin-right: 8px; font-weight: 600; }
#demo-cursor {
  position: fixed; left: 0; top: 0; z-index: 4000; pointer-events: none; width: 24px; height: 24px;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.click-ripple {
  position: fixed; z-index: 3999; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 3px solid rgba(22, 119, 255, 0.8); pointer-events: none; animation: ripple 0.5s ease-out forwards;
}
@keyframes ripple { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
