:root {
  --green: #67c23a;
  --green-dark: #43a82d;
  --blue: #409eff;
  --orange: #e6a23c;
  --red: #f56c6c;
  --sidebar: #304156;
  --sidebar-deep: #263445;
  --active: #1f2d3d;
  --bg: #f0f2f5;
  --line: #ebeef5;
  --text: #303133;
  --muted: #909399;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.app.collapsed { grid-template-columns: 58px 1fr; }
.app.collapsed .brand-title,
.app.collapsed .brand-sub,
.app.collapsed .menu-search,
.app.collapsed .menu-label,
.app.collapsed .menu-count,
.app.collapsed .group-title span:not(.menu-icon),
.app.collapsed .arrow { display: none; }
.sidebar { color: #bfcbd9; background: var(--sidebar); min-height: 100vh; overflow: hidden; }
.brand { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #fff; background: #2b3b4f; }
.brand-mark { width: 32px; height: 30px; border-radius: 4px; background: var(--green); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.brand-title { font-weight: 700; line-height: 18px; }
.brand-sub { color: #8aa4bd; font-size: 11px; }
.menu-search { padding: 10px; background: var(--sidebar-deep); }
.menu-search input { width: 100%; height: 30px; color: #d7dde5; background: #1f2d3d; border: 1px solid #3b4c60; border-radius: 4px; padding: 0 9px; outline: none; }
.menu-tree { height: calc(100vh - 106px); overflow-y: auto; padding-bottom: 18px; }
.group-title, .menu-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #bfcbd9;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
}
.group-title:hover, .menu-item:hover { color: #fff; background: var(--sidebar-deep); }
.group.open > .group-title { color: #fff; }
.menu-icon { width: 16px; text-align: center; color: #93a4b7; }
.menu-count { margin-left: auto; min-width: 24px; height: 18px; padding: 0 6px; border-radius: 9px; background: #1f2d3d; color: #8aa4bd; font-size: 12px; text-align: center; }
.arrow { color: #7b8a9b; }
.children { display: none; background: #1f2d3d; }
.group.open > .children { display: block; }
.sub-title { height: 32px; padding: 0 12px 0 30px; display: flex; align-items: center; color: #8aa4bd; font-size: 12px; }
.menu-item { padding-left: 42px; font-size: 13px; line-height: 18px; }
.menu-item.active { color: var(--green); background: var(--active); border-right: 3px solid var(--green); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 50px; background: #fff; border-bottom: 1px solid #e6e8ee; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.top-left, .top-right { display: flex; align-items: center; gap: 12px; }
.sys-title { font-weight: 700; color: #1f2d3d; }
.env-tag { height: 20px; padding: 0 7px; border-radius: 2px; color: #409eff; border: 1px solid #b3d8ff; background: #ecf5ff; font-size: 12px; }
.icon-btn { width: 30px; height: 30px; border: 1px solid #dcdfe6; background: #fff; color: #606266; border-radius: 3px; }
.text-btn { border: 0; background: transparent; color: #606266; padding: 0; }
.text-btn:hover { color: var(--green); }
.user { padding-left: 12px; border-left: 1px solid #ebeef5; color: #606266; }
.tagbar { min-height: 34px; padding: 4px 12px; display: flex; gap: 6px; align-items: center; background: #fff; border-bottom: 1px solid #e6e8ee; overflow-x: auto; }
.tag { height: 24px; padding: 0 10px; border: 1px solid #d8dce5; background: #fff; color: #606266; border-radius: 2px; white-space: nowrap; }
.tag.active { color: var(--green); border-color: var(--green); }
.content { padding: 14px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.breadcrumb { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
h1 { margin: 0; font-size: 18px; font-weight: 700; }
.page-note { color: var(--muted); font-size: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 2px; }
.query-card { padding: 16px 16px 4px; margin-bottom: 10px; }
.query-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 12px 16px; }
.form-item { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.form-item label { color: #606266; text-align: right; }
.el-input, .el-select { width: 100%; height: 32px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 10px; color: #606266; background: #fff; }
.query-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0; }
.btn { min-width: 68px; height: 32px; border-radius: 4px; border: 1px solid #dcdfe6; color: #606266; background: #fff; }
.btn.primary { color: #fff; background: var(--green); border-color: var(--green); }
.btn.primary:hover { background: var(--green-dark); }
.btn.link { min-width: auto; border: 0; color: var(--green); background: transparent; }
.btn.blue { color: #409eff; border-color: #b3d8ff; background: #ecf5ff; }
.btn.warn { color: #b88230; border-color: #f5dab1; background: #fdf6ec; }
.btn.danger { color: #fff; border-color: var(--red); background: var(--red); }
.btn.mini { min-width: 42px; height: 26px; padding: 0 8px; font-size: 12px; color: var(--green); border-color: #c2e7b0; background: #f0f9eb; }
.toolbar { height: 46px; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; gap: 8px; align-items: center; }
.hint { color: var(--muted); font-size: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1180px; }
th, td { height: 42px; border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: center; white-space: nowrap; }
th { background: #f5f7fa; color: #606266; font-weight: 700; }
tr:hover td { background: #f5f7fa; }
.ops { display: flex; justify-content: center; gap: 6px; }
.pager { height: 46px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 12px; color: #606266; }
.page-no { min-width: 28px; height: 28px; border-radius: 3px; display: grid; place-items: center; background: var(--green); color: #fff; }
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 2px; font-size: 12px; border: 1px solid transparent; }
.status.ok { color: #529b2e; background: #f0f9eb; border-color: #e1f3d8; }
.status.wait { color: #b88230; background: #fdf6ec; border-color: #faecd8; }
.status.info { color: #409eff; background: #ecf5ff; border-color: #d9ecff; }
.status.stop { color: #c45656; background: #fef0f0; border-color: #fde2e2; }
.status.gray { color: #606266; background: #f4f4f5; border-color: #e9e9eb; }
.process-card { padding: 14px; margin-bottom: 10px; }
.process-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.process-head strong { font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.step { border: 1px solid #e6e8ee; background: #fafafa; padding: 10px; min-height: 80px; border-radius: 2px; }
.step strong { display: block; color: #303133; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 12px; white-space: normal; }
.step.done { border-color: #c2e7b0; background: #f0f9eb; }
.step.warn { border-color: #faecd8; background: #fdf6ec; }
.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { padding: 16px; }
.metric-name { color: var(--muted); }
.metric-value { font-size: 28px; font-weight: 700; margin-top: 8px; }
.metric-foot { color: var(--muted); font-size: 12px; margin-top: 6px; }
.wide { grid-column: span 2; }
.timeline { display: grid; gap: 10px; margin-top: 12px; }
.line-row { display: grid; grid-template-columns: 112px 1fr 80px; gap: 10px; align-items: center; }
.bar { height: 8px; border-radius: 4px; overflow: hidden; background: #ebeef5; }
.bar span { display: block; height: 100%; background: var(--green); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.mini-panel { padding: 14px; }
.mini-title { font-weight: 700; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 10px; }
.kv dt { color: var(--muted); text-align: right; }
.kv dd { margin: 0; color: var(--text); }
.notice { padding: 10px 12px; background: #fdf6ec; border: 1px solid #faecd8; color: #b88230; margin-bottom: 10px; border-radius: 2px; }
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.22); z-index: 10; }
.drawer { position: fixed; right: 0; top: 0; z-index: 11; width: 620px; height: 100vh; background: #fff; box-shadow: -4px 0 14px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.drawer-head { height: 62px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 16px; font-weight: 700; }
.drawer-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.drawer-body { padding: 16px; overflow: auto; }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 20; background: #f0f9eb; border: 1px solid #e1f3d8; color: #529b2e; padding: 9px 16px; border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
@media (max-width: 1280px) {
  .query-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
}
