/**
 * 三昌泵业 · 商机工作台（Web 后台）
 * 设计基准：design/homepage-concept.html（2026-10-21）
 */

:root {
  --blue: #1577c1;
  --blue2: #3196df;
  --navy: #102b48;
  --ink: #172b42;
  --muted: #7b8b9d;
  --line: #e7edf3;
  --bg: #f5f8fb;
  --green: #169b70;
  --amber: #d78a22;
  --red: #d85d5d;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--ink);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }

/* ===== 布局骨架 ===== */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 27px 38px 32px; max-width: 1530px; margin: 0 auto; width: 100%; flex: 1; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 244px; flex-shrink: 0;
  background: linear-gradient(180deg, #102b48 0%, #0d2742 100%);
  color: #fff;
  padding: 24px 15px 18px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.sidebar:after {
  content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  border: 1px solid rgba(99, 178, 239, .08); left: -150px; bottom: 70px;
  box-shadow: 0 0 0 34px rgba(99, 178, 239, .025), 0 0 0 68px rgba(99, 178, 239, .02);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 9px 23px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.brand img { width: 43px; height: 43px; object-fit: contain; background: #fff; border-radius: 12px; padding: 3px; }
.brand-name { font-size: 16px; font-weight: 750; letter-spacing: .6px; }
.brand-sub { font-size: 10px; color: #9eb4c9; margin-top: 4px; letter-spacing: .25px; }

.workspace {
  display: flex; align-items: center; gap: 10px; margin: 21px 5px 23px;
  padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 12px; background: rgba(255, 255, 255, .055);
}
.workspace-icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(49, 150, 223, .19); display: grid; place-items: center; color: #64b9f5; flex-shrink: 0; }
.workspace-copy { font-size: 11px; color: #9bb1c6; }
.workspace-copy b { display: block; color: #f5f9ff; font-size: 12px; margin-bottom: 2px; }

.nav-label { font-size: 10px; color: #718da8; letter-spacing: 1.2px; padding: 0 12px; margin: 3px 0 9px; }
.nav { display: grid; gap: 5px; }
.nav a {
  height: 43px; color: #acc0d2; display: flex; align-items: center; gap: 12px;
  padding: 0 12px; border-radius: 10px; font-size: 12px; position: relative; z-index: 1;
}
.nav svg { width: 17px; height: 17px; opacity: .9; flex-shrink: 0; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a.active { color: #fff; background: linear-gradient(100deg, rgba(36, 139, 213, .34), rgba(36, 139, 213, .14)); box-shadow: inset 3px 0 #51b4f3; }
.nav a.active svg { color: #64bdff; }
.nav .count { margin-left: auto; background: #e9a844; color: #42300f; border-radius: 20px; font-size: 10px; font-weight: 700; padding: 2px 7px; }
.nav-spacer { height: 25px; }

.sidebar-bottom { margin-top: auto; position: relative; z-index: 1; }
.source-state { border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 13px 14px; background: rgba(255, 255, 255, .045); margin: 0 3px 16px; }
.source-state .label { font-size: 10px; color: #8ca7c0; display: flex; justify-content: space-between; }
.source-state strong { font-size: 12px; color: #e7f5ff; }
.source-state p { font-size: 10px; color: #9ab0c5; margin: 9px 0 0; }
.online { display: inline-flex; align-items: center; gap: 5px; color: #6cd6aa !important; }
.offline { color: #f0b26d !important; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #46c891; display: inline-block; }
.dot.warn { background: #e9a844; }

.profile { display: flex; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.avatar {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #39a2e6, #1265ad); flex-shrink: 0;
}
.profile b { font-size: 11px; display: block; }
.profile small { color: #8ca4bc; font-size: 9px; }
.profile form { margin-left: auto; }
.profile .more { color: #8ca4bc; background: none; border: 0; cursor: pointer; font-size: 15px; padding: 2px 4px; }
.profile .more:hover { color: #fff; }

/* ===== 顶栏 ===== */
.topbar {
  height: 70px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 38px; position: sticky; top: 0; z-index: 50;
}
.crumb { font-size: 12px; color: #9aa7b5; }
.crumb b { color: #43556a; font-weight: 650; }
.top-right { display: flex; align-items: center; gap: 17px; }
.top-search {
  height: 35px; width: 254px; border: 1px solid #e6edf4; border-radius: 9px;
  display: flex; align-items: center; gap: 8px; padding: 0 11px; background: #fbfcfe;
}
.top-search input { border: 0; outline: 0; flex: 1; font-size: 12px; background: transparent; color: var(--ink); }
.top-search svg { width: 15px; height: 15px; color: #9ba9b7; flex-shrink: 0; }
.bell { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; color: #60778e; position: relative; background: none; border: 0; cursor: pointer; }
.bell:hover { background: #f2f6fa; }
.bell.has-new:after { content: ""; position: absolute; width: 5px; height: 5px; background: #ee7969; border: 2px solid #fff; border-radius: 50%; right: 5px; top: 4px; }
.top-divider { height: 25px; border-left: 1px solid var(--line); }
.top-user { display: flex; align-items: center; gap: 8px; }
.top-user .avatar { width: 30px; height: 30px; }
.top-user b { font-size: 11px; }
.top-user small { display: block; color: #91a0af; font-size: 9px; margin-top: 2px; }
.logout-btn { background: none; border: 1px solid #e2e8ef; border-radius: 8px; color: #5d7185; padding: 7px 10px; cursor: pointer; font-size: 11px; }
.logout-btn:hover { color: var(--red); border-color: #f3d7d7; background: #fdf7f7; }

/* ===== 标题行 ===== */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 10px; color: var(--blue); font-weight: 700; letter-spacing: 1.3px; margin-bottom: 8px; }
.title-row h1 { font-size: 25px; letter-spacing: -.5px; margin: 0; font-weight: 750; color: #172c43; }
.title-row .sub { margin: 7px 0 0; color: #8493a3; font-size: 11px; }
.title-actions { display: flex; align-items: center; gap: 10px; }

/* ===== 按钮 ===== */
.btn {
  border: 1px solid #e2e9f0; background: #fff; border-radius: 8px;
  padding: 9px 13px; font-size: 11px; color: #5d7185; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; line-height: 1.2;
}
.btn:hover { border-color: #cbd9e5; color: var(--ink); }
.btn-primary {
  background: linear-gradient(120deg, #248ed0, #1674ba); color: #fff; border: 0;
  box-shadow: 0 5px 12px rgba(20, 115, 184, .18); font-weight: 650; padding: 10px 15px;
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-danger { border-color: #f3d7d7; color: var(--red); background: #fdf7f7; }
.btn-sm { padding: 6px 10px; font-size: 10px; }

/* ===== 欢迎横幅 ===== */
.welcome {
  min-height: 111px; border: 1px solid #dcecf7; border-radius: 15px;
  margin-bottom: 17px; padding: 18px 23px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(105deg, #e8f4fc 0%, #f1f8fd 47%, #f7fbfe 100%);
}
.welcome:after {
  content: ""; position: absolute; right: 104px; top: -96px; width: 260px; height: 260px;
  border: 1px solid rgba(28, 128, 195, .08); border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(28, 128, 195, .025), 0 0 0 53px rgba(28, 128, 195, .02);
}
.welcome-copy { position: relative; z-index: 1; }
.welcome h2 { font-size: 15px; margin: 0 0 7px; color: #23415c; }
.welcome h2 span { color: var(--blue); }
.welcome p { font-size: 11px; color: #7890a5; margin: 0; }
.welcome-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.meta-date { font-size: 10px; color: #6b859b; text-align: right; line-height: 1.7; }
.meta-date b { color: #3b5872; font-size: 12px; }
.vline { height: 30px; border-left: 1px solid #d5e6f2; }
.sync { font-size: 10px; color: #5f7f98; }
.sync strong { display: block; font-size: 11px; color: #3979a8; margin-top: 4px; }

/* ===== KPI 卡 ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 19px; }
.kpi {
  background: #fff; border: 1px solid #e8eef4; border-radius: 13px;
  padding: 16px 17px 14px; position: relative; min-height: 111px;
  box-shadow: 0 4px 14px rgba(29, 56, 83, .025);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 11px; color: #8090a0; }
.kpi-icon { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; }
.kpi-icon svg { width: 15px; height: 15px; }
.ki-blue { background: #e8f4fc; color: #2488c9; }
.ki-green { background: #eaf8f2; color: #21a377; }
.ki-amber { background: #fff5e5; color: #d4972b; }
.ki-violet { background: #f0edfc; color: #7666c1; }
.kpi-value { font-size: 25px; font-weight: 750; letter-spacing: -.5px; margin-top: 8px; color: #1c334b; }
.kpi-value small { font-size: 12px; font-weight: 500; margin-left: 4px; color: #8393a2; }
.kpi-note { font-size: 10px; color: #9aa7b4; margin-top: 2px; }
.kpi-foot { position: absolute; right: 16px; bottom: 16px; font-size: 9px; color: #8c9ba9; }
.rise { color: #199a70; font-weight: 650; }

/* ===== 双栏与面板 ===== */
.columns { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(310px, .88fr); gap: 17px; align-items: start; }
.right-col { display: grid; gap: 15px; }
.panel { background: #fff; border: 1px solid #e7edf3; border-radius: 13px; box-shadow: 0 4px 14px rgba(29, 56, 83, .025); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 19px 14px; border-bottom: 1px solid #edf1f5; }
.panel-title { font-size: 13px; font-weight: 700; color: #253a50; display: flex; align-items: center; gap: 9px; }
.panel-title .bar { width: 3px; height: 14px; border-radius: 5px; background: #278bca; }
.panel-title .bar.amber { background: #e5a142; }
.panel-title .bar.green { background: #28a980; }
.panel-sub { font-size: 10px; color: #9ba8b5; margin-top: 4px; }
.link { font-size: 11px; color: #3988ba; }
.link:hover { text-decoration: underline; }
.opps-head { display: flex; align-items: center; gap: 7px; }
.filter-mini { border: 1px solid #e7edf2; padding: 5px 8px; border-radius: 6px; font-size: 10px; color: #708296; background: #fff; }

/* 重点商机行 */
.row { padding: 14px 19px 13px; border-bottom: 1px solid #edf1f5; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fafdfe; }
.row-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.notice { font-size: 10px; border-radius: 5px; padding: 4px 6px; margin-right: 7px; font-weight: 650; white-space: nowrap; }
.notice.a { background: #eaf4fc; color: #287fb5; }
.notice.b { background: #f0edfb; color: #7565b7; }
.row-title { font-size: 13px; color: #243a50; font-weight: 650; line-height: 1.55; }
.row-title a { color: inherit; }
.row-title a:hover { color: var(--blue); }
.row-state { font-size: 10px; color: #168b63; background: #eaf7f1; padding: 4px 7px; border-radius: 20px; white-space: nowrap; }
.row-state.pre { color: #7565b7; background: #f0edfb; }
.row-meta { display: flex; align-items: center; gap: 14px; color: #8796a5; font-size: 11px; margin-top: 7px; flex-wrap: wrap; }
.row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.row-meta svg { width: 12px; height: 12px; color: #9cabb8; }
.row-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 10px; }
.project-no { font-size: 10px; color: #9ba8b5; }
.deadline { font-size: 11px; color: #8292a1; }
.deadline strong { color: #d38437; font-weight: 650; }
.deadline strong.urgent { color: #c9574e; }
.panel-more { padding: 11px 18px; text-align: center; }

/* 采集任务卡 */
.task { padding: 16px 17px; }
.task-top { display: flex; align-items: center; justify-content: space-between; }
.task-name { font-size: 12px; font-weight: 700; color: #2c4258; }
.task-state { font-size: 10px; padding: 4px 7px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.task-state.ok { color: #168a61; background: #eaf7f0; }
.task-state.run { color: #b37723; background: #fff4e2; }
.task-state.fail { color: #c9574e; background: #fdeeee; }
.task-state .dot { width: 5px; height: 5px; }
.task-info { font-size: 10px; color: #8b99a7; margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; }
.progress { height: 5px; background: #edf2f6; border-radius: 5px; margin-top: 10px; overflow: hidden; }
.progress i { height: 100%; width: 100%; display: block; background: linear-gradient(90deg, #38b889, #53c99b); border-radius: 5px; }
.progress i.run { background: linear-gradient(90deg, #e9b95c, #f0cd85); }
.task-foot { display: flex; justify-content: space-between; margin-top: 9px; font-size: 10px; color: #8292a1; align-items: center; }
.task-foot b { color: #415970; font-weight: 650; }

/* 复核面板 */
.review-count { font-size: 10px; color: #b37723; background: #fff4e2; border-radius: 20px; padding: 4px 8px; }
.review-item { display: flex; align-items: center; gap: 10px; padding: 11px 17px; border-bottom: 1px solid #f0f3f6; }
.review-item:last-child { border: 0; }
.review-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: #fff5e5; color: #ce8a26; flex-shrink: 0; }
.review-icon.blue { background: #edf4fb; color: #4b88b4; }
.review-text { font-size: 11px; color: #596d81; flex: 1; }
.review-text small { display: block; font-size: 10px; color: #a0acb7; margin-top: 3px; }
.review-arrow { color: #a6b2bd; }

/* 采集概况 */
.run-body { padding: 13px 17px 2px; }
.run-line { display: flex; align-items: center; gap: 9px; }
.run-icon { width: 25px; height: 25px; border-radius: 8px; background: #eaf4fc; color: #2587c5; display: grid; place-items: center; flex-shrink: 0; }
.run-copy { font-size: 11px; color: #708294; line-height: 1.7; }
.run-copy b { font-size: 11px; color: #3c5369; }
.run-time { margin-left: auto; font-size: 10px; color: #9aa7b4; }
.run-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 13px; margin-top: 12px; border-top: 1px solid #edf1f5; }
.run-stats > div { text-align: center; border-right: 1px solid #edf1f5; }
.run-stats > div:last-child { border: 0; }
.run-stats b { font-size: 13px; color: #304c66; display: block; }
.run-stats small { font-size: 9px; color: #9aa8b5; display: block; margin-top: 3px; }

/* 页脚 */
.app-footer { font-size: 10px; color: #a3aeba; text-align: center; padding: 19px 0 4px; }

/* ===== 通用兼容层（列表/详情/复核/管理等页面沿用） ===== */
.card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px; margin-bottom: 17px; box-shadow: 0 4px 14px rgba(29, 56, 83, .025); }
.card-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #edf1f5; }
.card-title { font-size: 13px; font-weight: 700; color: #253a50; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.error { color: #b42318; }
.warnbox { background: #fff8e9; border: 1px solid #f0ddb0; padding: 9px 13px; border-radius: 9px; }
.inline { display: inline; }
.linklike { background: none; border: none; color: var(--blue); cursor: pointer; padding: 0; font: inherit; }
.linklike:hover { text-decoration: underline; }

.filter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 18px; margin-bottom: 17px; }
.form-group { display: flex; align-items: center; gap: 6px; }
.form-group label { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.form-input, .form-select {
  padding: 8px 11px; font-size: 12px; border: 1px solid #e5edf3; border-radius: 9px;
  outline: none; background: #fff; color: var(--ink);
}
.form-input:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(21, 119, 193, .12); }

.table-container { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(29, 56, 83, .025); }
table.data-table { width: 100%; border-collapse: collapse; text-align: left; }
table.data-table thead th { background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data-table tbody td { padding: 11px 14px; border-bottom: 1px solid #f0f3f6; vertical-align: middle; }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table tbody tr:hover { background: #fafdfe; }

table.kv { width: 100%; border-collapse: collapse; }
table.kv th { width: 130px; text-align: left; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px dashed var(--line); white-space: nowrap; font-size: 12px; }
table.kv td { padding: 9px 12px; border-bottom: 1px dashed var(--line); word-break: break-all; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.detail-item { display: flex; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.detail-label { width: 120px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.detail-value { flex: 1; word-break: break-all; }

.report-box {
  background: #fdfdfd; border: 1px solid var(--line); border-radius: 9px; padding: 14px;
  font-family: Consolas, monospace; font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; color: #1e293b; max-height: 480px; overflow-y: auto;
}

/* 公告原文正文：按原站"公告正文"版式渲染（full_html 白名单清洗后 |safe 直出） */
.report-html {
  margin-top: 10px; background: #fdfdfd; border: 1px solid var(--line);
  border-radius: 9px; padding: 16px 18px; max-height: 640px; overflow-y: auto;
  font-size: 13px; line-height: 1.8; color: #1e293b; word-break: break-word;
}
.report-html p { margin: 6px 0; }
.report-html table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 12.5px; }
.report-html caption { caption-side: top; font-weight: 600; padding: 4px 0 8px; color: #334155; }
.report-html th, .report-html td { border: 1px solid #d7dee8; padding: 6px 10px; text-align: left; vertical-align: top; }
.report-html th { background: #f1f5f9; font-weight: 600; }
.report-html thead th { background: #eaf1f8; }
.report-html img { max-width: 100%; height: auto; display: block; margin: 8px 0; }
.report-html a { color: var(--blue); text-decoration: underline; word-break: break-all; }
.report-html h1, .report-html h2, .report-html h3, .report-html h4, .report-html h5, .report-html h6 {
  font-size: 15px; margin: 14px 0 6px; color: #0f172a;
}
.report-html ul, .report-html ol { padding-left: 24px; margin: 6px 0; }
.report-html li { margin: 2px 0; }
.report-html pre { background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow: auto; font-size: 12px; }
.report-html blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--line); color: #475569; }
.report-html hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
pre.excerpt { background: #f8fafc; border: 1px solid var(--line); padding: 9px 11px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; font-size: 11px; max-height: 220px; overflow: auto; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; }
.page-item { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; }
.page-item:hover { border-color: #cbd9e5; }
.page-item.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-item.disabled { opacity: .5; pointer-events: none; }

.empty-box { padding: 40px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-valid { background: #eaf7f1; color: #168b63; }
.badge-review { background: #fef3c7; color: #b45309; }
.badge-expired { background: #f1f5f9; color: #64748b; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }
.badge-resulted { background: #e0e7ff; color: #4338ca; }
.tag { display: inline-block; background: #eef4fb; color: #35739f; border-radius: 5px; padding: 2px 7px; font-size: 11px; margin-right: 4px; }

label { display: block; margin: 8px 0; font-size: 12px; color: #50677d; }
label input, label select, label textarea {
  width: 100%; margin-top: 5px; padding: 8px 11px; font-size: 12px;
  border: 1px solid #e5edf3; border-radius: 9px; outline: none; background: #fff; font-family: inherit;
}
label input:focus, label select:focus, label textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(21, 119, 193, .12); }
form button[type=submit] { margin-top: 8px; }
.actions { white-space: nowrap; }
.actions form { margin: 3px 0; display: flex; gap: 5px; align-items: center; }
.w120 { width: 120px; }

/* ===== 响应式自适应 ===== */

/* 中屏：双栏变单栏、KPI 两列 */
@media (max-width: 1180px) {
  .columns { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

/* 窄屏：侧边栏抽屉化 + 顶栏精简 + 间距压缩 */
@media (max-width: 920px) {
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 200;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 6px 0 24px rgba(10, 30, 52, .25);
    width: 252px;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop {
    display: none; position: fixed; inset: 0; z-index: 150;
    background: rgba(10, 30, 52, .45);
  }
  body.nav-open .nav-backdrop { display: block; }

  .main { width: 100%; }
  .topbar { padding: 0 16px; height: 60px; }
  .nav-toggle {
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid #e2e8ef; border-radius: 9px;
    background: #fff; cursor: pointer; color: #43556a; flex-shrink: 0;
  }
  .crumb .crumb-root { display: none; }   /* 窄屏只留当前页名 */
  .top-search { width: auto; flex: 1; min-width: 0; }
  .top-user > div:last-child { display: none; }  /* 只留头像 */
  .logout-btn { display: none; }               /* 退出走侧边栏个人档 */

  .content { padding: 18px 16px 26px; }
  .title-row h1 { font-size: 21px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .kpi { min-height: 96px; padding: 13px 14px 12px; }
  .kpi-value { font-size: 21px; }
  .welcome { padding: 15px 17px; }
  .welcome-meta { width: 100%; justify-content: flex-start; }
  .meta-date { text-align: left; }
  .panel-head { padding: 14px 15px 11px; flex-wrap: wrap; }
  .row { padding: 12px 15px 11px; }
  .row-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
  .card { padding: 14px 15px; }
  .filter-form { padding: 12px 14px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-label { width: 96px; }
}

/* 手机竖屏：KPI 单列、状态行收紧 */
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .title-actions { width: 100%; }
  .title-actions .btn { flex: 1; justify-content: center; }
  .row-meta { gap: 9px; font-size: 10px; }
  .review-item { padding: 10px 14px; }
  .run-stats b { font-size: 12px; }
}

/* 汉堡键：桌面隐藏 */
.nav-toggle { display: none; }

/* 登录页窄屏已在模板内处理（左品牌区隐藏） */
@media (max-width: 860px) {
  .login-split { min-height: 100vh; }
  .login-box { width: min(372px, calc(100vw - 40px)); padding: 30px 0; }
}
