/* ============ 大禹平台风格 设计令牌 ============ */
:root {
  --primary: #3370ff;
  --primary-hover: #1f5fff;
  --primary-active: #0f4be0;
  --primary-bg: #eef3ff;
  --primary-bg-soft: #f5f8ff;
  --success: #00b42a;
  --success-bg: #e8faec;
  --warning: #ff7d00;
  --warning-bg: #fff3e8;
  --danger: #f53f3f;
  --danger-bg: #ffece8;
  --purple: #7d4dff;
  --purple-bg: #f0ebff;
  --cyan: #14c9c9;
  --cyan-bg: #e6fffb;

  --text-1: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --text-4: #c9cdd4;
  --border: #e5e6eb;
  --border-2: #f2f3f5;
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-hover: #f7f8fa;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 2px 8px rgba(29,33,41,.06);
  --shadow-md: 0 4px 16px rgba(29,33,41,.10);
  --shadow-lg: 0 8px 32px rgba(29,33,41,.16);
  --sidebar-w: 216px;
  --header-h: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #dde0e6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c9cdd4; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 顶栏 ============ */
.topbar {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
.logo { display: flex; align-items: center; gap: 8px; width: calc(var(--sidebar-w) - 16px); }
.logo .mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #3370ff, #5b8cff);
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(51,112,255,.35);
}
.logo .name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.logo .sub {
  font-size: 11px; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; margin-left: 2px;
}
.topbar-search {
  flex: 0 0 240px; height: 32px; margin-left: 8px;
  background: var(--bg-page); border-radius: 16px;
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
  color: var(--text-3); font-size: 12px; cursor: text;
}
.topbar-spacer { flex: 1; }
.topbar-icons { display: flex; align-items: center; gap: 18px; color: var(--text-2); }
.topbar-icons .ic { cursor: pointer; font-size: 16px; position: relative; }
.topbar-icons .ic:hover { color: var(--primary); }
.topbar-icons .dot { position: absolute; top: -2px; right: -3px; width: 6px; height: 6px; background: var(--danger); border-radius: 50%; }
.env-tag { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.env-tag .g { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg,#ffb347,#ff8c42); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}

/* ============ 侧栏 ============ */
.sidebar {
  position: fixed;
  top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 8px 0;
  overflow-y: auto;
}
.nav-group-title {
  font-size: 11px; color: var(--text-3); padding: 12px 20px 6px;
  letter-spacing: .5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 8px; padding: 9px 12px;
  border-radius: var(--radius); cursor: pointer;
  color: var(--text-2); font-size: 13px;
  transition: background .15s, color .15s;
}
.nav-item .ni-ic { width: 16px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.nav-item.active .ni-ic { color: var(--primary); }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; border-radius: 9px; padding: 0 6px; height: 16px; line-height: 16px; min-width: 16px; text-align: center;
}

/* ============ 主体 ============ */
.main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  padding: 16px;
  min-height: calc(100vh - var(--header-h));
}
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.page-title { font-size: 18px; font-weight: 700; color: var(--text-1); }
.page-desc { font-size: 12px; color: var(--text-3); margin-top: 4px; max-width: 720px; line-height: 1.6; }
.breadcrumb { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.breadcrumb b { color: var(--text-2); font-weight: 500; }

/* ============ 卡片 ============ */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 14px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border-2);
}
.card-head .ttl { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head .ttl .bar { width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
.card-body { padding: 18px; }

/* ============ 统计卡片 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card {
  background: #fff; border-radius: var(--radius-lg); padding: 18px 20px;
  border: 1px solid var(--border-2); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-card .label { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 30px; font-weight: 700; margin-top: 10px; color: var(--text-1); letter-spacing: -.5px; }
.stat-card .trend { font-size: 12px; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }
.stat-card .stat-ic {
  position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.stat-card .pill { font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-left: 6px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 15px; border-radius: var(--radius);
  font-size: 13px; cursor: pointer; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); transition: all .15s; white-space: nowrap;
  user-select: none;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-bg); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--primary-bg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { color: var(--primary); cursor: pointer; font-size: 13px; }
.btn-link:hover { color: var(--primary-hover); text-decoration: none; }
.btn-link.danger { color: var(--danger); }
.btn-link.muted { color: var(--text-3); cursor: not-allowed; }

/* ============ 筛选栏 ============ */
.filter-bar {
  background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm); padding: 16px 18px 4px; margin-bottom: 14px;
}
.filter-grid { display: flex; flex-wrap: wrap; gap: 14px 20px; }
.filter-item { display: flex; flex-direction: column; gap: 5px; }
.filter-item .lab { font-size: 12px; color: var(--text-2); }
.filter-actions { display: flex; align-items: flex-end; gap: 8px; margin-left: auto; padding-bottom: 12px; }
input, select {
  height: 32px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 10px; font-size: 13px; color: var(--text-1); background: #fff;
  outline: none; transition: border-color .15s; font-family: inherit;
}
input { width: 180px; }
select { width: 150px; cursor: pointer; }
input:focus, select:focus { border-color: var(--primary); }
input::placeholder { color: var(--text-4); }
.input-sm { width: 130px; }
textarea {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px;
  font-size: 13px; font-family: inherit; outline: none; resize: vertical; width: 100%;
}
textarea:focus { border-color: var(--primary); }

/* ============ 表格 ============ */
.table-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); }
.table-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border-2);
}
.table-toolbar .ttl { font-size: 14px; font-weight: 600; }
.table-toolbar .sel-info { font-size: 12px; color: var(--text-3); }
.table-toolbar .sel-info b { color: var(--primary); }
.table-toolbar .right { margin-left: auto; display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg-page); color: var(--text-2); font-weight: 600;
  text-align: left; padding: 11px 12px; white-space: nowrap; border-bottom: 1px solid var(--border-2);
  position: sticky; top: 0;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border-2); color: var(--text-1); white-space: nowrap; }
tbody tr:hover { background: var(--primary-bg-soft); }
tbody tr:last-child td { border-bottom: none; }
td .sub { color: var(--text-3); font-size: 11px; margin-top: 2px; }
.cell-actions { display: flex; gap: 12px; }
.checkbox { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }
.col-fix { position: sticky; right: 0; background: #fff; box-shadow: -4px 0 8px rgba(0,0,0,.03); }
tbody tr:hover .col-fix { background: var(--primary-bg-soft); }

/* ============ 标签 ============ */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 1; font-weight: 500;
}
.tag.blue { background: var(--primary-bg); color: var(--primary); }
.tag.green { background: var(--success-bg); color: var(--success); }
.tag.orange { background: var(--warning-bg); color: var(--warning); }
.tag.red { background: var(--danger-bg); color: var(--danger); }
.tag.purple { background: var(--purple-bg); color: var(--purple); }
.tag.cyan { background: var(--cyan-bg); color: var(--cyan); }
.tag.gray { background: #f2f3f5; color: var(--text-3); }
.tag.dot::before { content:''; width:5px; height:5px; border-radius:50%; background: currentColor; }
.tag-pending { color: var(--text-3); font-style: italic; }

/* ============ 分页 ============ */
.pagination {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px; justify-content: flex-end;
  font-size: 13px; color: var(--text-2);
}
.pagination .total { margin-right: auto; color: var(--text-3); }
.page-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fff; color: var(--text-2);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ============ 弹窗 ============ */
.mask {
  position: fixed; inset: 0; background: rgba(29,33,41,.45); z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 560px; max-width: 100%;
  box-shadow: var(--shadow-lg); max-height: calc(100vh - 120px); display: flex; flex-direction: column;
  animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal.lg { width: 760px; }
.modal.xl { width: 920px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-2);
}
.modal-head .ttl { font-size: 16px; font-weight: 600; }
.modal-head .x { cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; }
.modal-head .x:hover { color: var(--text-1); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border-2); display: flex; justify-content: flex-end; gap: 10px; }

/* ============ 表单 ============ */
.form-row { display: flex; align-items: flex-start; margin-bottom: 16px; }
.form-row .fl { width: 110px; flex-shrink: 0; text-align: right; padding-right: 12px; padding-top: 7px; font-size: 13px; color: var(--text-2); }
.form-row .fl .req { color: var(--danger); margin-right: 2px; }
.form-row .fc { flex: 1; }
.form-row .fc input, .form-row .fc select { width: 100%; }
.form-row .fc .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.readonly-val { padding-top: 7px; font-size: 13px; color: var(--text-1); }

/* ============ 详情描述列表 ============ */
.desc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
.desc-item .dt { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.desc-item .dd { font-size: 13px; color: var(--text-1); font-weight: 500; }
.section-title { font-size: 14px; font-weight: 600; margin: 6px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title .bar { width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }

/* ============ 5步计算时间线 ============ */
.steps-timeline { position: relative; padding-left: 8px; }
.step-node { position: relative; padding-left: 36px; padding-bottom: 18px; }
.step-node:not(:last-child)::before {
  content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--border);
}
.step-node .dot {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff;
  z-index: 1;
}
.step-node.hit .dot { background: var(--primary); }
.step-node.miss .dot { background: var(--text-4); }
.step-node .box {
  background: var(--bg-page); border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--border-2);
}
.step-node.hit .box { background: var(--primary-bg-soft); border-color: #d6e4ff; }
.step-node .box .h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.step-node .box .reason { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.step-node .box .effect { font-size: 12px; margin-top: 6px; color: var(--text-1); }
.step-node .box .effect b { color: var(--primary); }

/* 命中分布进度条 */
.dist-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dist-row .nm { width: 130px; font-size: 13px; color: var(--text-2); }
.dist-row .track { flex: 1; height: 8px; background: var(--border-2); border-radius: 4px; overflow: hidden; }
.dist-row .fill { height: 100%; border-radius: 4px; }
.dist-row .pct { width: 44px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text-1); }

/* 风险提醒 */
.risk-list { display: flex; flex-direction: column; gap: 12px; }
.risk-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid; cursor: pointer; transition: box-shadow .15s;
}
.risk-item:hover { box-shadow: var(--shadow-sm); }
.risk-item .ric { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.risk-item .rt { font-weight: 600; font-size: 13px; }
.risk-item .rd { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.risk-item .arr { margin-left: auto; color: var(--text-4); }
.risk-item.warn { background: var(--warning-bg); border-color: #ffe1c2; }
.risk-item.warn .ric { background: #fff; color: var(--warning); }
.risk-item.danger { background: var(--danger-bg); border-color: #ffd4cc; }
.risk-item.danger .ric { background: #fff; color: var(--danger); }
.risk-item.info { background: var(--primary-bg); border-color: #d6e4ff; }
.risk-item.info .ric { background: #fff; color: var(--primary); }

/* 5步说明卡片 */
.calc-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.calc-card {
  border: 1px solid var(--border-2); border-radius: var(--radius); padding: 14px; background: linear-gradient(180deg,#fafbff,#fff);
  position: relative;
}
.calc-card .no { width: 24px; height: 24px; border-radius: 6px; background: var(--primary-bg); color: var(--primary); font-weight: 700; display:flex; align-items:center; justify-content:center; font-size:13px; }
.calc-card .cn { font-size: 13px; font-weight: 600; margin: 10px 0 6px; }
.calc-card .cd { font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-2); margin-bottom: 16px; }
.tab { padding: 9px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* sub-tabs (页面顶部 大禹风格) */
.sub-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.sub-tab { padding: 10px 0; font-size: 14px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sub-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* empty */
.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty .ei { font-size: 44px; opacity: .4; }
.empty .et { margin-top: 12px; font-size: 13px; }

/* toast */
.toast-wrap { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #fff; box-shadow: var(--shadow-md); border-radius: var(--radius); padding: 10px 16px; font-size: 13px;
  display: flex; align-items: center; gap: 8px; animation: pop .2s ease; border: 1px solid var(--border-2);
}
.toast .ti { font-size: 16px; }
.toast.success .ti { color: var(--success); }
.toast.error .ti { color: var(--danger); }
.toast.info .ti { color: var(--primary); }

/* upload */
.upload {
  border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center;
  background: var(--bg-page); cursor: pointer; transition: all .15s;
}
.upload:hover { border-color: var(--primary); background: var(--primary-bg-soft); }
.upload .ui { font-size: 32px; color: var(--primary); }
.upload .ut { font-size: 13px; margin-top: 8px; color: var(--text-2); }
.upload .us { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* result box */
.result-stat { display: flex; gap: 24px; padding: 16px; background: var(--bg-page); border-radius: var(--radius); margin-bottom: 14px; }
.result-stat .rs { text-align: center; flex: 1; }
.result-stat .rsv { font-size: 24px; font-weight: 700; }
.result-stat .rsl { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* alert */
.alert { display: flex; gap: 10px; padding: 10px 14px; border-radius: var(--radius); font-size: 12px; line-height: 1.6; margin-bottom: 14px; }
.alert.info { background: var(--primary-bg); color: var(--text-2); }
.alert.warn { background: var(--warning-bg); color: #8a5300; }
.alert .ai { flex-shrink: 0; }

/* 开关 Toggle */
.toggle { position: relative; display: inline-block; width: 38px; height: 20px; cursor: pointer; vertical-align: middle; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle .slider { position: absolute; inset: 0; background: var(--text-4); border-radius: 20px; transition: background .18s; }
.toggle .slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .slider { background: var(--primary); }
.toggle input:checked + .slider::before { transform: translateX(18px); }
.toggle.disabled { opacity: .5; cursor: not-allowed; }

/* 命中规则 hover 展开 */
.hit-cell { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.hit-more { font-size: 12px; color: var(--text-3); }
.hit-pop { display: none; position: absolute; left: 0; top: 24px; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-md); padding: 8px; white-space: nowrap; }
.hit-cell:hover .hit-pop { display: block; }

/* 版本对比浮层 */
.ver-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ver-col { border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; }
.ver-col .vh { padding: 10px 14px; background: var(--bg-page); font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border-2); }
.ver-col .vr { padding: 9px 14px; font-size: 12px; border-bottom: 1px solid var(--border-2); display: flex; justify-content: space-between; gap: 10px; }
.ver-col .vr:last-child { border-bottom: none; }
.ver-col .vr .k { color: var(--text-3); flex-shrink: 0; }
.ver-col .vr .v { color: var(--text-1); text-align: right; }
.ver-col .vr.diff { background: #fff7e8; }

/* 操作日志右侧抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(29,33,41,.45); z-index: 1100; display: flex; justify-content: flex-end; animation: fade .18s ease; }
.drawer { width: 700px; max-width: 96vw; background: #fff; height: 100%; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,.16); animation: drawerIn .24s ease; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border-2); }
.drawer-head .ttl { font-size: 16px; font-weight: 600; }
.drawer-head .x { cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; }
.drawer-head .x:hover { color: var(--text-1); }
.drawer-subhead { display: flex; background: var(--primary-bg-soft); padding: 11px 22px; font-size: 12px; color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--border-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 22px; }
.oplog-row { display: flex; padding: 16px 0; border-bottom: 1px solid var(--border-2); }
.oplog-row:last-child { border-bottom: none; }
.oplog-time { width: 150px; flex-shrink: 0; font-size: 12px; color: var(--text-2); }
.oplog-event { flex: 1; padding: 0 14px; min-width: 0; }
.oplog-op { width: 120px; flex-shrink: 0; font-size: 12px; color: var(--text-2); }
.oplog-title { font-weight: 600; font-size: 13px; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.oplog-detail { font-size: 12px; color: var(--text-1); line-height: 1.6; margin-bottom: 6px; }
.oplog-meta { font-size: 12px; color: var(--text-3); line-height: 1.8; }
.oplog-meta b { color: var(--text-2); font-weight: 500; }

/* 多选下拉 */
.ms { position: relative; }
.ms-head {
  height: 32px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; font-size: 13px; background: #fff; min-width: 150px; color: var(--text-1);
}
.ms-head:hover { border-color: var(--primary); }
.ms-head .ms-arrow { color: var(--text-3); font-size: 10px; }
.ms-panel {
  position: absolute; top: 36px; left: 0; z-index: 60; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 6px; min-width: 190px; max-height: 260px; overflow-y: auto;
}
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.ms-opt:hover { background: var(--bg-hover); }
.ms-opt input { width: 14px; height: 14px; accent-color: var(--primary); }
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range input { width: 140px; }
.date-range .sep { color: var(--text-3); }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.mt14 { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.muted { color: var(--text-3); }
.fail-list { font-size: 12px; color: var(--text-2); background: var(--danger-bg); border-radius: var(--radius); padding: 10px 14px; margin-top: 10px; max-height: 140px; overflow-y: auto; }
.fail-list div { padding: 2px 0; }
