/* AWGL — 浅色产品化界面（MiniMax 式：留白、卡片层级、蓝主色） */
:root {
  --bg: #f0f2f5;
  --bg-subtle: #e8ebf0;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e2e8f0;
  --border-soft: #edf1f6;
  --text: #1a2332;
  --text-secondary: #3d4d63;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent-warn: #d97706;
  --accent-warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    system-ui, sans-serif;
  --sidebar-w: 260px;

  /* —— 设计系统 DS（案件作战台统一视觉语言） —— */
  --ds-page-title-size: clamp(1.5rem, 2.35vw, 1.75rem);
  --ds-page-title-weight: 700;
  --ds-page-title-lh: 1.22;
  --ds-page-title-track: -0.03em;
  --ds-eyebrow-size: 11px;
  --ds-eyebrow-weight: 600;
  --ds-eyebrow-lh: 1.35;
  --ds-eyebrow-color: #94a3b8;
  --ds-eyebrow-track: 0.06em;
  --ds-lead-size: 15px;
  --ds-lead-lh: 1.6;
  --ds-lead-color: #64748b;
  --ds-lead-max: 36rem;
  --ds-panel-title-size: 17px;
  --ds-panel-title-weight: 650;
  --ds-panel-sub-size: 13px;
  --ds-panel-sub-lh: 1.45;
  --ds-btn-radius: 10px;
  --ds-btn-height-lg: 44px;
  --ds-btn-py-lg: 12px;
  --ds-btn-px-lg: 22px;
  --ds-btn-font-lg: 15px;
  --ds-btn-weight-lg: 600;
  --ds-btn-shadow-primary: 0 1px 2px rgba(37, 99, 235, 0.2), 0 2px 8px rgba(37, 99, 235, 0.12);
  --ds-card-radius: 16px;
  --ds-card-radius-sm: 12px;
  --ds-card-border: 1px solid var(--border-soft);
  --ds-card-shadow-hero: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.06);
  --ds-card-shadow-surface: 0 1px 3px rgba(15, 23, 42, 0.05);
  --ds-stack-gap: 20px;
  --ds-hero-to-content: 0;
  --ds-table-head-bg: #f1f5f9;
  --ds-table-head-size: 12px;
  --ds-table-head-weight: 600;
  --ds-table-head-py: 11px;
  --ds-table-head-px: 12px;
  --ds-badge-size: 10px;
  --ds-badge-minw: 16px;
  --ds-badge-h: 16px;
  --ds-badge-radius: 999px;
  --ds-badge-bg: #f8fafc;
  --ds-badge-fg: #94a3b8;
  --ds-badge-border: 1px solid #e8ecf1;
  --ds-nav-group-size: 10px;
  --ds-nav-group-color: #c5cdd8;
  --ds-nav-group-weight: 500;
  --ds-control-h: 38px;
  --ds-empty-title: 16px;
  --ds-empty-text: 14px;
  --ds-empty-title-compact: 15px;
  --ds-empty-text-compact: 13px;
  --ds-empty-pad-y: 36px;
  --ds-empty-pad-x: 24px;
  --ds-empty-min-h: 200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.awgl-body {
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* —— 应用壳：简洁 = 顶栏 + 主区；专业 = 侧栏 + 顶条 + 主区 —— */
.awgl-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.awgl-root.awgl-root--pro {
  flex-direction: row;
  align-items: stretch;
}

.awgl-root.awgl-root--pro #navMount {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.pro-chrome {
  display: flex;
  width: 100%;
  min-height: 100vh;
  flex: 1;
  min-width: 0;
  background: var(--bg);
}

/* 桌面：固定壳层高度，仅主内容槽纵向滚动（侧栏不随长列表整体漂移） */
@media (min-width: 901px) {
  body.awgl-body:not(.awgl-body--auth) {
    overflow: hidden;
    height: 100vh;
  }

  .awgl-root.awgl-root--pro {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }

  .awgl-root.awgl-root--pro #navMount {
    height: 100%;
    overflow: hidden;
  }

  .pro-chrome {
    height: 100%;
    min-height: 0;
  }

  .pro-column {
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }

  .pro-main-slot {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 0 24px;
}

.sidebar-brand {
  padding: 4px 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2px;
}

.sidebar-brand a {
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
}
.sidebar-brand a:hover {
  color: var(--primary);
  text-decoration: none;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.sidebar--dense .sidebar-link {
  padding: 7px 11px;
  margin: 1px 8px;
  font-size: 13px;
}

.sidebar--dense .sidebar-group-label {
  padding: 14px 12px 6px;
  font-size: 9px;
}

.sidebar--comfortable .sidebar-link {
  padding: 9px 13px;
  margin: 2px 10px;
}

.sidebar--comfortable .sidebar-group-label {
  padding: 20px 14px 6px;
}

.sidebar-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 18px 14px 8px;
  margin: 0;
  line-height: 1.2;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 2px 10px;
  border-radius: 11px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
  border: none;
}
.sidebar-link-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.sidebar-link-icon {
  flex-shrink: 0;
  width: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  opacity: 0.82;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.sidebar--dense .sidebar-link-icon {
  width: 1.45rem;
  font-size: 14px;
}
.sidebar-link:hover {
  background: rgba(99, 102, 241, 0.07);
  color: var(--text);
  text-decoration: none;
  transform: translateX(1px);
}
.sidebar-link:hover .sidebar-link-icon {
  opacity: 1;
  transform: scale(1.07);
}
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.11), rgba(37, 99, 235, 0.03));
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 0 var(--primary);
}
.sidebar-link.active .sidebar-link-icon {
  opacity: 1;
  transform: scale(1.08);
}

.nav-badge {
  flex-shrink: 0;
  min-width: var(--ds-badge-minw);
  height: var(--ds-badge-h);
  padding: 0 4px;
  font-size: var(--ds-badge-size);
  font-weight: 500;
  line-height: var(--ds-badge-h);
  text-align: center;
  border-radius: var(--ds-badge-radius);
  background: var(--ds-badge-bg);
  color: var(--ds-badge-fg);
  border: var(--ds-badge-border);
}
.nav-badge[data-empty="1"] {
  display: none;
}

.pro-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar-pro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-pro .nav-mode-bar {
  display: flex;
  gap: 6px;
}

.pro-main-slot {
  flex: 1;
  overflow: auto;
  min-height: 0;
  background: linear-gradient(180deg, #eef1f6 0%, #f0f2f5 32%, #f0f2f5 100%);
}

.topbar-hint {
  font-size: 11px;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .topbar-hint {
    display: none;
  }
}

/* —— 通用页面栈（MiniMax 式：头卡 + 内容卡） —— */
.page-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ds-stack-gap);
  max-width: 1120px;
}

.page-stack--wide {
  max-width: none;
}

/* —— 内页视觉统一（与案情导览同系：左色条头卡 + 轻卡片） —— */
.awgl-page-unified {
  margin-left: auto;
  margin-right: auto;
  padding: 10px 10px 40px;
}

.awgl-page-unified > .mm-hero-sheet {
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 14px 40px rgba(15, 23, 42, 0.07);
  position: relative;
  overflow: hidden;
  padding-left: 28px;
}

.awgl-page-unified > .mm-hero-sheet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1 0%, #2563eb 100%);
  opacity: 0.92;
  pointer-events: none;
}

@media (max-width: 1366px) {
  .awgl-page-unified > .mm-hero-sheet {
    padding-left: 24px;
  }
}

.awgl-page-unified .mm-list-card {
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 28px rgba(15, 23, 42, 0.05);
}

.awgl-page-unified .mm-list-card .mm-list-card {
  border-radius: 12px;
  box-shadow: none;
}

.awgl-page-unified .mm-list-card-head {
  background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
}

.awgl-page-unified .table-wrap {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.awgl-page-unified .btn-primary.mm-btn-primary-lg,
.awgl-page-unified .mm-btn-primary-lg {
  border-radius: 11px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.22);
}

.awgl-page-unified .empty-state-card {
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.awgl-page-unified.page-stack--snapshot-mvp > section.mm-list-card:first-of-type {
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 14px 40px rgba(15, 23, 42, 0.06);
}

.awgl-page-unified.page-stack--snapshot-mvp > section.mm-list-card:first-of-type::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1 0%, #2563eb 100%);
  opacity: 0.9;
  pointer-events: none;
}

.page-surface {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  padding: 22px 26px 26px;
}

.page-hero {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.page-title-xl {
  margin: 0;
  font-size: var(--ds-page-title-size);
  font-weight: var(--ds-page-title-weight);
  letter-spacing: var(--ds-page-title-track);
  color: var(--text);
  line-height: var(--ds-page-title-lh);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.page-lead {
  margin: 10px 0 0;
  font-size: var(--ds-lead-size);
  line-height: var(--ds-lead-lh);
  color: var(--ds-lead-color);
  max-width: var(--ds-lead-max);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.page-hero-meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.case-switch-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.case-switch-field select {
  min-width: 200px;
  max-width: 100%;
  font-size: 13px;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.content-panel {
  padding: 0;
  overflow: hidden;
}

.content-panel .panel-head {
  padding: 20px 24px 0;
}

.content-panel .panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}

.content-panel .panel-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.filter-bar {
  margin: 16px 24px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: var(--ds-btn-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
}

.filter-bar .field {
  min-width: 120px;
  margin: 0;
}

.data-panel-body {
  margin-top: 12px;
  padding: 0 24px 22px;
}

.data-panel-body .table-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

.empty-plate {
  text-align: center;
  padding: 48px 28px;
  margin: 16px 24px 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.empty-plate-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.empty-plate-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.text-link {
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}
.text-link:hover {
  text-decoration: underline;
}

/* 简洁顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topnav-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.topnav-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topnav-simple {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
}

@media (max-width: 960px) {
  .topnav-simple {
    grid-template-columns: 1fr;
  }
  .topnav-center {
    order: 3;
    width: 100%;
    justify-content: flex-start !important;
  }
  .topnav-actions {
    order: 2;
    width: 100%;
    justify-content: flex-end;
  }
}

.topnav-center {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  min-width: 0;
}

.topnav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.topbar-pro-spacer {
  flex: 1;
  min-width: 8px;
}

.topbar-pro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.brand a {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand a:hover {
  color: var(--primary);
  text-decoration: none;
}

.brand-sub {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.06em;
}

.nav-mode-bar {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-nav-mode {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  opacity: 1;
}
.btn-nav-mode:hover {
  border-color: #cbd5e1;
}

.btn-nav-mode-active {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
}

.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.navlink {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
}
.navlink:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.navlink.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.mode-bar {
  padding: 8px 20px 10px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 22px 56px;
  width: 100%;
}

.awgl-root--pro .layout {
  max-width: none;
  margin: 0;
  padding: 24px 28px 48px;
}

@media (max-width: 1366px) {
  .layout {
    padding: 18px 16px 44px;
  }
  .awgl-root--pro .layout {
    padding: 18px 18px 40px;
  }
  :root {
    --sidebar-w: 240px;
  }
}

/* —— 页面头 / 统计 / 双列 —— */
.page-header-card {
  background: var(--surface-raised);
  border-radius: var(--ds-card-radius);
  box-shadow: var(--ds-card-shadow-hero);
  border: var(--ds-card-border);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.page-header-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.page-header-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.page-header-desc {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
}

.page-header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}
.page-header-links a {
  color: var(--muted);
  text-decoration: none;
}
.page-header-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  transition: box-shadow 0.15s;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-card .stat-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-stack-gap);
  align-items: start;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .dash-two-col {
    grid-template-columns: 1fr;
  }
}

.section-card {
  margin-bottom: 20px;
}

.section-card:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section-title-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin: -8px 0 14px;
}

/* 高风险卡片 */
.risk-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.risk-priority-card {
  border: var(--ds-card-border);
  border-radius: var(--ds-card-radius-sm);
  padding: 16px 18px;
  background: var(--surface);
  box-shadow: var(--ds-card-shadow-surface);
}

.risk-priority-card .risk-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.risk-priority-card .risk-title a {
  color: inherit;
  text-decoration: none;
}
.risk-priority-card .risk-title a:hover {
  color: var(--primary);
}

.risk-priority-card .risk-reason {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

.empty-state-card {
  text-align: center;
  padding: 24px 18px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--ds-card-radius-sm);
  background: linear-gradient(165deg, #f8fafc 0%, #fff 55%);
  color: var(--ds-lead-color);
  font-size: var(--ds-panel-sub-size);
  line-height: var(--ds-panel-sub-lh);
}

/* 列表行 */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feed-row {
  padding: 15px 6px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.feed-row.muted {
  text-align: center;
  padding: 20px 12px;
  color: var(--ds-lead-color);
  font-size: var(--ds-panel-sub-size);
  line-height: var(--ds-panel-sub-lh);
  background: rgba(248, 250, 252, 0.65);
}
.feed-row:last-child {
  border-bottom: none;
}

.feed-main {
  font-weight: 500;
  margin-bottom: 4px;
}

.feed-main a {
  color: var(--text);
  text-decoration: none;
}
.feed-main a:hover {
  color: var(--primary);
}

.feed-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.feed-code {
  margin-right: 6px;
  color: var(--primary);
  font-weight: 500;
}

/* 资料库迷你进度 */
.vault-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vault-mini-row {
  display: grid;
  grid-template-columns: 24px 1fr 40px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.vault-mini-row .bar {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.vault-mini-row .bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 99px;
}

details.pro-dash {
  margin-top: 8px;
}

details.pro-dash > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 14px 0;
  list-style: none;
}
details.pro-dash > summary::-webkit-details-marker {
  display: none;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e8eef4 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: sk 1.2s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes sk {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
}
.skeleton-stat {
  height: 36px;
  width: 48px;
  margin-top: 8px;
}

.workspace-hero,
.hero-product,
.card-product {
  /* 兼容旧类名，统一走浅色卡片 */
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.drop-zone {
  border: 2px dashed var(--border-soft);
  border-radius: var(--ds-card-radius-sm);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
}

.drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
}

h1 {
  font-size: 22px;
  margin: 0 0 12px;
  font-weight: 650;
  color: var(--text);
}

h2 {
  font-size: 17px;
  margin: 24px 0 12px;
  color: var(--text);
  font-weight: 650;
}

h3 {
  font-size: 15px;
  margin: 16px 0 8px;
  color: var(--text-secondary);
  font-weight: 600;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.kpi {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.grid.kpi-core {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.kpi-core .card {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpi-core .card .value {
  color: var(--primary);
}

.vault-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vault-row {
  display: grid;
  grid-template-columns: 28px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.vault-row .bar {
  height: 10px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: none;
  overflow: hidden;
}

.vault-row .bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #93c5fd);
  border-radius: 6px;
}

.dash-split h3 {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--text-secondary);
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.tab-bar button {
  border: 1px solid var(--border-soft);
  background: #fafbfc;
  color: #64748b;
  border-radius: var(--ds-btn-radius);
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: none;
}

.tab-bar button:hover {
  color: var(--text-secondary);
  border-color: #e2e8f0;
  background: #fff;
}

.tab-bar button.active {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(239, 246, 255, 0.75);
  font-weight: 520;
}

.timeline-vertical {
  position: relative;
  padding-left: 18px;
  margin: 8px 0 20px;
  border-left: 2px solid var(--border);
}

.timeline-vertical .tl-item {
  position: relative;
  margin-bottom: 14px;
  padding-left: 12px;
}

.timeline-vertical .tl-item::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
}

.timeline-pane {
  display: none;
}

.timeline-pane.active {
  display: block;
}

.task-group h3 {
  font-size: 13px;
  margin: 16px 0 8px;
  color: var(--primary);
  font-weight: 600;
}

.audit-log-list {
  font-size: 13px;
  max-height: 320px;
  overflow: auto;
}

.audit-log-list .log-line {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.audit-log-list .log-line:last-child {
  border-bottom: none;
}

.card {
  background: var(--surface);
  border: var(--ds-card-border);
  border-radius: var(--ds-card-radius-sm);
  padding: 18px 20px;
  box-shadow: var(--ds-card-shadow-surface);
}

.card .label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.card .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 140px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--ds-btn-radius);
  min-height: var(--ds-control-h);
  padding: 8px 11px;
  font-size: 14px;
  font-family: inherit;
}

select {
  cursor: pointer;
}

textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--ds-btn-radius);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  min-height: 100px;
  width: 100%;
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--ds-btn-radius);
  min-height: var(--ds-control-h);
  padding: 8px 15px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}
.btn:hover {
  border-color: #cbd5e1;
  background: var(--bg);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--ds-btn-shadow-primary);
  min-height: var(--ds-control-h);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-primary.mm-btn-primary-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ds-btn-height-lg);
  padding: var(--ds-btn-py-lg) var(--ds-btn-px-lg);
  font-size: var(--ds-btn-font-lg);
  font-weight: var(--ds-btn-weight-lg);
  border-radius: var(--ds-btn-radius);
  box-shadow: var(--ds-btn-shadow-primary);
  box-sizing: border-box;
}

.btn-accent {
  background: var(--accent-warn-bg);
  border-color: #fcd34d;
  color: #92400e;
}
.btn-accent:hover {
  background: #fef3c7;
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--border-soft);
  color: var(--text);
}

.btn-sm {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 13px;
}

.btn-danger {
  border-color: #fecaca;
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-main-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ds-btn-height-lg);
  padding: var(--ds-btn-py-lg) var(--ds-btn-px-lg);
  font-size: var(--ds-btn-font-lg);
  font-weight: var(--ds-btn-weight-lg);
  border-radius: var(--ds-btn-radius);
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--ds-btn-shadow-primary);
  box-sizing: border-box;
}
.btn-main-lg:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  text-decoration: none;
  color: #fff;
}

.btn-secondary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 550;
  border-radius: var(--ds-btn-radius);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  box-sizing: border-box;
}
.btn-secondary-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th,
table.data td {
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

table.data thead th {
  background: var(--ds-table-head-bg);
  color: var(--text-secondary);
  font-weight: var(--ds-table-head-weight);
  font-size: var(--ds-table-head-size);
  letter-spacing: 0.02em;
  padding: var(--ds-table-head-py) var(--ds-table-head-px);
  vertical-align: middle;
}

table.data tr:hover td {
  background: #f8fafc;
}

table.data tr.group-head td {
  background: #f1f5f9;
  color: var(--primary);
  font-weight: 600;
}

/* 表格仅一行且为 colspan 空说明时，弱化「空表壳」感 */
table.data tbody tr:only-child td[colspan] {
  text-align: center;
  padding: 28px 18px;
  color: var(--ds-lead-color);
  font-size: var(--ds-panel-sub-size);
  line-height: var(--ds-panel-sub-lh);
  background: linear-gradient(180deg, #f8fafc 0%, #fcfcfd 100%);
  border-bottom: none;
  vertical-align: middle;
}

table.data tbody tr:only-child:hover td[colspan] {
  background: linear-gradient(180deg, #f8fafc 0%, #fcfcfd 100%);
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
}

.pill.danger {
  border-color: #fecaca;
  color: var(--danger);
  background: var(--danger-bg);
}

.pill.warn {
  border-color: #fde68a;
  color: #b45309;
  background: var(--accent-warn-bg);
}

.pill.ok {
  border-color: #a7f3d0;
  color: var(--ok);
  background: var(--ok-bg);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 12px 0;
  font-size: 14px;
}

.flash.err {
  border-color: #fecaca;
  background: var(--danger-bg);
  color: #991b1b;
}

.flash.ok {
  border-color: #a7f3d0;
  background: var(--ok-bg);
  color: #065f46;
}

.flash.warn {
  border-color: #fde68a;
  background: var(--accent-warn-bg);
  color: #92400e;
}

.login-panel {
  max-width: 480px;
  margin: 64px auto;
}

.awgl-body--auth {
  background: linear-gradient(165deg, #f0f4ff 0%, #f0f2f5 50%, #fff 100%);
}

.login-api-hint .mono {
  word-break: break-all;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.settings-panel {
  max-width: 640px;
}

.settings-section {
  margin-bottom: 28px;
}

.page-stack > .settings-section {
  margin-bottom: 0;
}

.settings-section h2 {
  margin-top: 0;
}

/* —— 样板页精修（MiniMax 式头卡 / 列表卡 / 工作台） —— */
.mm-hero-sheet {
  background: var(--surface);
  border-radius: var(--ds-card-radius);
  border: var(--ds-card-border);
  box-shadow: var(--ds-card-shadow-hero);
  padding: 26px 28px 24px;
  margin-bottom: var(--ds-hero-to-content);
}

.mm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  align-items: start;
}

@media (max-width: 1366px) {
  .mm-hero-grid {
    gap: 18px 22px;
  }
  .mm-hero-sheet {
    padding: 22px 22px 20px;
  }
}

@media (max-width: 720px) {
  .mm-hero-grid {
    grid-template-columns: 1fr;
  }
}

.mm-hero-copy {
  min-width: 0;
}

.mm-hero-eyebrow {
  margin: 0 0 6px;
  font-size: var(--ds-eyebrow-size);
  font-weight: var(--ds-eyebrow-weight);
  line-height: var(--ds-eyebrow-lh);
  letter-spacing: var(--ds-eyebrow-track);
  text-transform: uppercase;
  color: var(--ds-eyebrow-color);
}

.mm-hero-title {
  margin: 0 0 10px;
  font-size: var(--ds-page-title-size);
  font-weight: var(--ds-page-title-weight);
  letter-spacing: var(--ds-page-title-track);
  line-height: var(--ds-page-title-lh);
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mm-hero-lead {
  margin: 0;
  font-size: var(--ds-lead-size);
  line-height: var(--ds-lead-lh);
  color: var(--ds-lead-color);
  max-width: var(--ds-lead-max);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mm-hero-cta-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-width: min(200px, 100%);
}

.mm-case-sub {
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.mm-case-sub label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.mm-case-sub select {
  width: 100%;
  max-width: 280px;
  font-size: 13px;
  min-height: var(--ds-control-h);
  padding: 8px 10px;
  border-radius: var(--ds-btn-radius);
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.mm-list-card {
  border-radius: var(--ds-card-radius);
  border: var(--ds-card-border);
  box-shadow: var(--ds-card-shadow-surface);
  overflow: hidden;
  background: var(--surface);
}

.mm-list-card-head {
  padding: 18px 22px 14px;
  border-bottom: var(--ds-card-border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.mm-list-card-head h2 {
  margin: 0;
  font-size: var(--ds-panel-title-size);
  font-weight: var(--ds-panel-title-weight);
  color: var(--text);
  word-break: break-word;
}

.mm-list-card-head .mm-list-sub {
  margin: 8px 0 0;
  font-size: var(--ds-panel-sub-size);
  color: var(--ds-lead-color);
  line-height: var(--ds-panel-sub-lh);
  max-width: var(--ds-lead-max);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mm-list-card-body {
  padding: 0 0 8px;
}

.mm-list-card-body .filter-bar {
  margin: 18px 24px 0;
}

.mm-list-card-body .data-panel-body {
  padding: 14px 22px 20px;
}

.mm-table-shell {
  border-radius: var(--ds-card-radius-sm);
  border: var(--ds-card-border);
  overflow: hidden;
  background: #fafbfc;
}

.mm-table-shell table.data thead th {
  background: var(--ds-table-head-bg);
  font-size: var(--ds-table-head-size);
  font-weight: var(--ds-table-head-weight);
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0.02em;
  padding: var(--ds-table-head-py) var(--ds-table-head-px);
  vertical-align: middle;
}

.mm-table-shell table.data tbody tr:hover td {
  background: #fff;
}

.strategy-row td {
  vertical-align: middle;
}

/* 统一空状态：占位图形 + 标题/说明/动作 */
.empty-plate-mm {
  position: relative;
  min-height: var(--ds-empty-min-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--ds-empty-pad-y) var(--ds-empty-pad-x);
  margin: 16px 24px 20px;
  background: linear-gradient(165deg, #f8fafc 0%, #fff 58%);
  border: 1px dashed #cbd5e1;
  border-radius: var(--ds-card-radius-sm);
  box-sizing: border-box;
}

.empty-plate-mm::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary-soft) 0%, #f1f5f9 100%);
  border: var(--ds-card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.empty-plate-mm .empty-plate-title {
  font-size: var(--ds-empty-title);
  font-weight: var(--ds-panel-title-weight);
  color: var(--text);
  margin: 0 0 8px;
  line-height: var(--ds-page-title-lh);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 22rem;
}

.empty-plate-mm .empty-plate-text {
  font-size: var(--ds-empty-text);
  color: var(--ds-lead-color);
  line-height: var(--ds-lead-lh);
  margin: 0;
  max-width: 22rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.empty-plate-mm .btn {
  border-radius: var(--ds-btn-radius);
}

.empty-plate-mm .btn.btn-sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}

/* 办案首页 · 工作台头卡（与 mm-hero 共用 DS） */
.mm-wb-hero {
  background: var(--surface);
  border-radius: var(--ds-card-radius);
  border: var(--ds-card-border);
  box-shadow: var(--ds-card-shadow-hero);
  padding: 26px 28px 22px;
  margin-bottom: 0;
}

.mm-wb-hero .wb-eyebrow {
  margin: 0 0 6px;
  font-size: var(--ds-eyebrow-size);
  font-weight: var(--ds-eyebrow-weight);
  color: var(--ds-eyebrow-color);
  letter-spacing: var(--ds-eyebrow-track);
  line-height: var(--ds-eyebrow-lh);
  text-transform: uppercase;
}

.mm-wb-hero .wb-case-title {
  margin: 0 0 10px;
  font-size: var(--ds-page-title-size);
  font-weight: var(--ds-page-title-weight);
  letter-spacing: var(--ds-page-title-track);
  line-height: var(--ds-page-title-lh);
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mm-wb-hero .wb-stage-line {
  margin: 0 0 12px;
  font-size: var(--ds-lead-size);
  color: var(--text-secondary);
  line-height: var(--ds-lead-lh);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mm-wb-hero .wb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: center;
  margin-bottom: 14px;
}

.mm-wb-hero .wb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
  font-size: 13px;
  opacity: 0.92;
}

.mm-wb-hero .wb-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 450;
}
.mm-wb-hero .wb-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.wb-settings-hint {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: #94a3b8;
}

.wb-settings-hint a {
  color: var(--muted);
  font-weight: 500;
}
.wb-settings-hint a:hover {
  color: var(--primary);
}

.mm-wb-hero .wb-lead {
  margin: 0 0 18px;
  font-size: var(--ds-panel-sub-size);
  line-height: var(--ds-panel-sub-lh);
  color: var(--ds-lead-color);
  max-width: var(--ds-lead-max);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mm-inline-hint {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

.gaps-panel-title {
  margin: 22px 0 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.gaps-panel-title:first-child {
  margin-top: 0;
}

.empty-plate-mm.empty-plate-mm--inline {
  min-height: 128px;
  padding: 22px 18px;
  margin: 8px 0 12px;
}

.empty-plate-mm.empty-plate-mm--inline::before {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 10px;
}

.mm-work-card {
  border-radius: var(--ds-card-radius-sm);
  border: var(--ds-card-border);
  box-shadow: var(--ds-card-shadow-surface);
  background: var(--surface);
  padding: 18px 20px 20px;
}

.mm-work-card .section-title {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 4px;
}

.mm-work-card .section-title-desc {
  margin-bottom: 14px;
}

/* 已完成事项 · 分区卡 */
.mm-done-section {
  background: var(--surface);
  border-radius: var(--ds-card-radius-sm);
  border: var(--ds-card-border);
  box-shadow: var(--ds-card-shadow-surface);
  margin-bottom: 20px;
  overflow: hidden;
}

.mm-done-section-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.mm-done-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.mm-done-section-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.mm-done-section-body {
  padding: 16px 20px 20px;
}

.mm-done-section-body .table-wrap {
  border-radius: 10px;
}

/* 已完成页：大列表卡内嵌分区（避免多层厚卡片） */
.mm-list-card-body.mm-list-card-body--flush {
  padding: 0;
}

.mm-list-card-body--flush > .mm-done-section {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  border-top: 1px solid var(--border-soft);
}

.mm-list-card-body--flush > .mm-done-section:first-child {
  border-top: none;
}

.empty-plate-mm.empty-plate-mm--compact {
  min-height: 148px;
  padding: 26px 20px;
  margin: 12px 0 4px;
}

.empty-plate-mm.empty-plate-mm--compact::before {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 11px;
}

.empty-plate-mm.empty-plate-mm--compact .empty-plate-title {
  font-size: var(--ds-empty-title-compact);
}

.empty-plate-mm.empty-plate-mm--compact .empty-plate-text {
  font-size: var(--ds-empty-text-compact);
}

/* 弹窗内提示：避免错误只写在 #flash 被 dialog 顶层挡住 */
.dlg-flash {
  margin-bottom: 12px;
}
.dlg-flash .flash {
  margin: 0;
}

/* 主体多选：可搜索、可勾选（替代原生 select multiple） */
.party-mp-search {
  width: 100%;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.party-mp-list {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  background: var(--surface);
}
.party-mp-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 6px;
}
.party-mp-row:hover {
  background: var(--bg-subtle);
}
.party-mp-row input {
  margin-top: 3px;
  flex-shrink: 0;
}
.party-mp-row span {
  flex: 1;
  font-size: 14px;
  line-height: 1.35;
}

/* —— 案件快照页 · 总览 MVP（叠宗头 / KPI / 时间主轴 / 摘要足印）—— */
.page-stack--snapshot-mvp .mv-dossier.snap-mvp-dossier {
  border-radius: var(--radius, 12px);
}

/* 叠宗头内边距与 mm-hero-sheet（26×28）对齐，避免 mm-list-card-body 默认无左右 padding 导致贴边、chip 显挤 */
.awgl-page-unified.page-stack--snapshot-mvp
  > section.mm-list-card.snap-mvp-dossier
  > .mm-list-card-body.mv-dossier-inner {
  padding: 24px 26px 22px 28px;
  box-sizing: border-box;
}

@media (max-width: 1366px) {
  .awgl-page-unified.page-stack--snapshot-mvp
    > section.mm-list-card.snap-mvp-dossier
    > .mm-list-card-body.mv-dossier-inner {
    padding: 22px 22px 20px 24px;
  }
}

.mv-dossier-inner {
  padding-top: 0;
}
.mv-dossier-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  line-height: 1.35;
}
.mv-dossier-back {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
}
.mv-dossier-back a {
  text-decoration: none;
}
.mv-dossier-back a:hover {
  text-decoration: underline;
}
.mv-dossier-title {
  margin: 0 0 12px;
  font-size: 1.62rem;
  line-height: 1.25;
  font-weight: 700;
}
.mv-dossier-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.mv-dossier-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}
.mv-dossier-chip strong {
  font-weight: 600;
}
.mv-dossier-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  max-width: 52rem;
}
.mv-kpi-scope-hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  max-width: 52rem;
}

/* 与叠宗头内文左缘对齐（同 28px / 24px 体系），避免 KPI 说明相对标题「外撇」 */
.awgl-page-unified.page-stack--snapshot-mvp > .mv-kpi-scope-hint {
  padding-left: 28px;
  padding-right: 26px;
  box-sizing: border-box;
}

@media (max-width: 1366px) {
  .awgl-page-unified.page-stack--snapshot-mvp > .mv-kpi-scope-hint {
    padding-left: 24px;
    padding-right: 22px;
  }
}

.awgl-page-unified.page-stack--snapshot-mvp > .mv-kpi-strip {
  padding-left: 28px;
  padding-right: 26px;
  box-sizing: border-box;
}

@media (max-width: 1366px) {
  .awgl-page-unified.page-stack--snapshot-mvp > .mv-kpi-strip {
    padding-left: 24px;
    padding-right: 22px;
  }
}

.mv-snapshot-toolbar {
  margin: 14px 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.06));
  background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
}
.mv-snapshot-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.mv-snapshot-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mv-snapshot-toolbar-case {
  min-width: 200px;
  flex: 1 1 220px;
}
.mv-snapshot-toolbar-save {
  flex-shrink: 0;
}
/* 工具条内的主操作：保留可点性，降低相对磁贴 KPI 的视觉抢占 */
.mv-snapshot-toolbar .btn-primary.mv-toolbar-btn-copy {
  background: rgba(25, 118, 210, 0.14);
  color: #0d47a1;
  border: 1px solid rgba(25, 118, 210, 0.38);
  box-shadow: none;
}
.mv-snapshot-toolbar .btn-primary.mv-toolbar-btn-copy:hover {
  background: rgba(25, 118, 210, 0.22);
}

.mv-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 8px;
}
.mv-kpi-card {
  flex: 1 1 110px;
  min-width: 100px;
  padding: 12px 14px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  background: var(--surface, #fff);
  text-align: center;
  box-sizing: border-box;
}
.mv-kpi-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.mv-kpi-label {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted, #6b7280);
}

.snap-tl-overview.mv-spine-host {
  padding-top: 8px;
}
.mv-spine-list {
  position: relative;
  padding-left: 6px;
  border-left: 2px solid rgba(25, 118, 210, 0.2);
  margin-left: 8px;
}
.mv-spine-node.snap-tl-card {
  margin-left: 0;
  overflow: hidden;
}
.mv-spine-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 4px 2px 2px 0;
}
.mv-spine-summary::-webkit-details-marker,
.mv-spine-summary::marker {
  display: none;
}
.mv-spine-summary-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 200px;
}
.mv-spine-date {
  font-size: 12px;
}
.mv-spine-title-text {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}
.mv-spine-type-line {
  font-size: 12px;
  margin: 0;
}
.mv-spine-summary-tags {
  margin-top: 0;
  flex-shrink: 0;
}
.mv-spine-body {
  display: flex;
  gap: 0;
  margin: 10px 0 6px;
  padding: 0 0 4px 4px;
}
.mv-spine-rail {
  width: 3px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(25, 118, 210, 0.45),
    rgba(25, 118, 210, 0.12)
  );
  margin-right: 14px;
  align-self: stretch;
  min-height: 32px;
}
.mv-spine-detail-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mv-spine-block-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted, #6b7280);
}
.mv-spine-p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.mv-spine-muted {
  margin: 0;
  font-size: 13px;
}
.mv-link-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 14px;
  line-height: 1.45;
}
.mv-link-list a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mv-dl {
  margin: 0;
  font-size: 13px;
}
.mv-dl-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 8px 12px;
  margin-bottom: 8px;
  align-items: start;
}
.mv-dl-row dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted, #6b7280);
}
.mv-dl-row dd {
  margin: 0;
}

.mv-foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
@media (max-width: 768px) {
  .mv-foot-grid {
    grid-template-columns: 1fr;
  }
}
.mv-foot-heading {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.mv-foot-body {
  font-size: 14px;
  line-height: 1.45;
}
.mv-foot-ul {
  margin: 0;
  padding-left: 1.1rem;
}
.mv-foot-ul li {
  margin-bottom: 10px;
}

/* —— P2.A 案情导览 / 原件阅读器 —— */
.reader-back-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 4px;
}
.reader-back-sep {
  color: var(--muted);
  user-select: none;
}
.evidence-reader-card {
  margin-bottom: 18px;
}
.evidence-reader-head {
  margin-bottom: 8px;
}
.evidence-reader-title {
  margin: 0 0 4px;
  font-size: var(--ds-panel-title-size, 17px);
  font-weight: var(--ds-panel-title-weight, 650);
}
.reader-attach-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 4px;
}
.reader-preview-main {
  min-height: 120px;
}
.reader-ocr-details {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--surface);
}
.reader-ocr-details summary {
  list-style: none;
}
.reader-ocr-details summary::-webkit-details-marker {
  display: none;
}
.case-brief-dossier-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 650;
}
.case-brief-summary {
  margin-top: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 14px;
}
.case-brief-entries-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 650;
}
.case-brief-link-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.75;
  font-size: 14px;
  color: var(--text-secondary);
}
.case-brief-link-list a {
  font-weight: 600;
}

/* —— 案情导览门户（MiniMax 式浅色 / 渐变入口卡 / 动效） —— */
.cb-portal {
  max-width: 1120px;
  margin: 0 auto;
}

@keyframes cb-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cb-animate {
  animation: cb-fade-up 0.55s ease-out both;
}
.cb-animate--1 {
  animation-delay: 0.06s;
}
.cb-animate--2 {
  animation-delay: 0.12s;
}
.cb-animate--3 {
  animation-delay: 0.18s;
}
.cb-animate--4 {
  animation-delay: 0.24s;
}

.cb-banner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 32px;
  padding: 28px 32px;
  margin-bottom: 8px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.cb-banner-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 20px 0 0 20px;
}
.cb-banner-main {
  position: relative;
  flex: 1;
  min-width: min(100%, 280px);
  padding-left: 12px;
}
.cb-banner-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cb-banner-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 8px;
}
.cb-banner-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.cb-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.35);
}
.cb-banner-meta {
  margin: 0;
  font-size: 14px;
}
.cb-banner-switch {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 200px;
}
.cb-switch-label {
  font-size: 12px;
}
.cb-case-select {
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  color: var(--text);
}

.cb-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 650;
  color: var(--text);
}
.cb-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}
.cb-section-title-text {
  flex-shrink: 0;
}

.cb-entry-section {
  margin: 22px 0;
}
.cb-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
@media (min-width: 900px) {
  .cb-entry-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.cb-entry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.cb-entry-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}
.cb-entry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  border-color: transparent;
}
.cb-entry-card--timeline::before {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}
.cb-entry-card--snapshot::before {
  background: linear-gradient(90deg, #ec4899, #f472b6);
}
.cb-entry-card--tasks::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.cb-entry-card--gaps::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}
.cb-entry-card--evidence::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.cb-entry-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  transition: transform 0.25s ease;
}
.cb-entry-card:hover .cb-entry-icon {
  transform: scale(1.06);
}
.cb-entry-card--timeline .cb-entry-icon {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
.cb-entry-card--snapshot .cb-entry-icon {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}
.cb-entry-card--tasks .cb-entry-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}
.cb-entry-card--gaps .cb-entry-icon {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}
.cb-entry-card--evidence .cb-entry-icon {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.cb-entry-name {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 4px;
}
.cb-entry-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.cb-brief-wide {
  margin: 22px 0;
  padding: 26px 28px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}
.cb-brief-wide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cb-brief-wide-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}
.cb-expand-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.cb-expand-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.cb-brief-body-wrap {
  margin-bottom: 18px;
}
.cb-brief-summary-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.cb-brief-body-wrap--expanded .cb-brief-summary-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.cb-dispute-heading {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}
.cb-dispute-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.cb-dispute-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}
.cb-dispute-item:hover {
  background: var(--bg-subtle);
}
.cb-dispute-item--a {
  border-left: 3px solid #dc2626;
}
.cb-dispute-item--b {
  border-left: 3px solid #d97706;
}
.cb-dispute-item--c {
  border-left: 3px solid #0284c7;
}
.cb-dispute-item--d {
  border-left: 3px solid #059669;
}
.cb-dispute-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cb-dispute-item-title {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 2px;
}
.cb-dispute-item-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.cb-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 820px) {
  .cb-two-col {
    grid-template-columns: 1fr;
  }
}

.cb-panel {
  padding: 22px 22px 18px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}
.cb-panel .cb-section-title {
  margin-bottom: 8px;
}
.cb-panel-hint {
  margin: 0 0 12px;
  font-size: 12px;
}
.cb-panel-footer {
  margin: 14px 0 0;
  font-size: 13px;
}
.cb-footer-sep {
  margin: 0 8px;
  color: var(--muted);
}
.cb-text-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.cb-text-link:hover {
  text-decoration: underline;
}

.cb-timeline-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cb-tl-node {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
}
.cb-tl-date {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted);
}
.cb-tl-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.cb-priority-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cb-priority-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
}
.cb-priority-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.cb-priority-title a {
  color: var(--primary);
  text-decoration: none;
}
.cb-priority-title a:hover {
  text-decoration: underline;
}
.cb-priority-rule {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
}

.cb-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cb-recent-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.cb-recent-row:hover {
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}
.cb-recent-code {
  font-size: 12px;
  color: var(--muted);
}
.cb-recent-title {
  font-size: 14px;
  font-weight: 500;
}
.cb-recent-meta {
  font-size: 12px;
}

.cb-dispute-notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  line-height: 1.55;
}
.cb-dispute-notice-title {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
}
.cb-dispute-notice-body {
  margin: 0;
}

.cb-brief-source-hint {
  font-size: 13px;
  line-height: 1.55;
  margin: -2px 0 14px;
  max-width: 42rem;
}

/* —— 资料阅读器：顶/底操作条与两侧翻附件 —— */
.reader-chrome-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.reader-back-prominent {
  font-weight: 600;
}

.reader-file-nav--secondary {
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
  opacity: 0.72;
}
.reader-file-nav--secondary .btn {
  font-size: 12px;
}

.reader-preview-frame {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 8px 0 12px;
  position: relative;
}
.reader-preview-stage {
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow: hidden;
}
.reader-preview-main {
  min-height: min(72vh, 640px);
}
.reader-preview-main img,
.reader-preview-main iframe {
  display: block;
  width: 100%;
  vertical-align: top;
}

.reader-side-nav {
  flex-shrink: 0;
  width: 44px;
  min-height: 120px;
  border: none;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
  border-radius: 12px 0 0 12px;
}
.reader-side-nav--next {
  border-radius: 0 12px 12px 0;
}
.reader-side-nav:hover {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary);
}
.reader-side-nav:active {
  transform: scale(0.98);
}
@media (max-width: 560px) {
  .reader-side-nav {
    width: 36px;
    font-size: 22px;
  }
}

.reader-chrome-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.reader-chrome-bottom-spacer {
  flex: 1;
  min-width: 8px;
}

.reader-attach-hint {
  margin: 8px 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  line-height: 1.45;
}

.reader-preview-frame--no-attach-nav .reader-side-nav {
  display: none !important;
}

.reader-preview-frame--no-attach-nav .reader-preview-stage {
  border-radius: 12px;
}

/* 缺口雷达：规则透明化说明与表格内解释 */
.gaps-radar-intro-wrap {
  margin-bottom: 4px;
}
.gaps-radar-notice {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-elevated, var(--bg-secondary, rgba(0, 0, 0, 0.03)));
  font-size: 13px;
  line-height: 1.55;
  max-width: 920px;
}
.gaps-radar-notice-title {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 14px;
}
.gaps-radar-notice-body {
  margin: 0;
}
.gaps-rule-explain {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  max-width: 42em;
}

/* —— 上手引导 / 一页帮助 —— */
.help-onepager {
  max-width: 40rem;
  margin: 0 auto;
  padding: 28px 18px 48px;
  box-sizing: border-box;
}
.help-onepager-head {
  margin-bottom: 20px;
}
.help-onepager-back {
  margin: 0 0 4px;
  font-size: 13px;
}
.help-onepager-back a {
  text-decoration: none;
}
.help-onepager-back a:hover {
  text-decoration: underline;
}
.help-onepager-title {
  margin: 8px 0 6px;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.help-onepager-sub {
  margin: 0;
  font-size: 14px;
}
.help-onepager-section {
  margin-bottom: 14px;
  padding: 16px 18px;
}
.help-onepager-h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
}
.help-onepager-p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.help-onepager-p:last-child {
  margin-bottom: 0;
}
.help-onepager-ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14px;
  line-height: 1.6;
}
.help-onepager-ul li {
  margin-bottom: 8px;
}
.help-onepager-label {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, var(--muted));
}
.help-onepager-section > .help-onepager-label:first-of-type {
  margin-top: 0;
}
.help-onepager-q {
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.help-onepager-footnote {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
  font-size: 13px;
}

.cb-onboard-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(37, 99, 235, 0.04) 100%);
}
.cb-onboard-hint-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.cb-onboard-hint-link {
  margin-left: 6px;
  white-space: nowrap;
}

.awgl-reader-onboard {
  margin-bottom: 14px;
  padding: 12px 14px;
}
.awgl-reader-onboard-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.login-welcome-copy {
  line-height: 1.55;
  font-size: 14px;
}
.login-help-link a {
  text-decoration: none;
}
.login-help-link a:hover {
  text-decoration: underline;
}

@media print {
  .page-stack--snapshot-mvp .mv-snapshot-toolbar,
  .page-stack--snapshot-mvp .mv-spine-filters,
  .page-stack--snapshot-mvp #snapTlExpandRow,
  .page-stack--snapshot-mvp #btnCopyFoot,
  #navMount {
    display: none !important;
  }
  .layout .page-stack--snapshot-mvp {
    max-width: none;
  }
  .mv-spine-node.snap-tl-card {
    break-inside: avoid;
  }
}

.mm-sub-mobile,
.mv-dossier-lead-short {
  display: none;
}

.login-welcome-mobile-only {
  display: none;
}

/* =============================================================================
   M1 移动端：主路径 + 阅读器最小兜底（≤768px；360/390/412/768 自测）
   ============================================================================= */
:root {
  --awgl-mobile-bar-h: 52px;
}

@media (max-width: 768px) {
  .awgl-chrome-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    min-width: 0;
  }

  body.awgl-body:not(.awgl-body--auth) {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .awgl-root.awgl-root--pro {
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 100vh;
    overflow: visible;
  }

  .awgl-root.awgl-root--pro #navMount {
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    display: flex;
  }

  .awgl-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    height: var(--awgl-mobile-bar-h);
    padding: 0 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .awgl-mobile-menu-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--bg-subtle);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .awgl-mobile-menu-icon {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    box-shadow:
      0 -6px 0 var(--text-secondary),
      0 6px 0 var(--text-secondary);
    border-radius: 1px;
  }

  .awgl-mobile-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 650;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .awgl-mobile-bar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .awgl-mobile-bar-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
  }
  .awgl-mobile-bar-link:hover {
    background: var(--primary-soft);
    text-decoration: none;
  }

  .awgl-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  body.awgl-nav-drawer-open .awgl-nav-backdrop {
    display: block;
    opacity: 1;
  }

  .pro-chrome {
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    min-width: 0;
  }

  #awglSidebarNav.sidebar {
    position: fixed;
    left: 0;
    top: var(--awgl-mobile-bar-h);
    bottom: 0;
    width: min(300px, 88vw);
    max-width: 100%;
    z-index: 45;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
    border-right: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }

  body.awgl-nav-drawer-open #awglSidebarNav.sidebar {
    transform: translateX(0);
  }

  .awgl-drawer-only-mobile {
    display: block;
  }

  .sidebar-drawer-case {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(37, 99, 235, 0.04);
  }

  .sidebar-drawer-case-link {
    font-size: 13px;
    font-weight: 600;
  }

  .sidebar-drawer-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--border-soft);
    background: var(--surface);
  }

  .sidebar-drawer-footer-label {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .nav-mode-bar--drawer {
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-mode-bar--drawer .btn {
    flex: 1;
    min-width: 0;
  }

  .awgl-drawer-logout {
    width: 100%;
    margin-top: 10px;
    min-height: 44px;
  }

  .pro-column {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .topbar-pro {
    display: none !important;
  }

  .awgl-mode-bar-desktop {
    display: none !important;
  }

  .pro-main-slot {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .awgl-root--pro .layout {
    padding: 14px 14px 32px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  /* —— 案情导览 —— */
  .cb-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .cb-banner-main,
  .cb-banner-switch {
    width: 100%;
  }
  .cb-banner-title-row {
    flex-wrap: wrap;
  }
  .cb-two-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .cb-two-col > .cb-panel {
    width: 100%;
  }
  .cb-entry-grid {
    grid-template-columns: 1fr;
  }
  @media (min-width: 390px) {
    .cb-entry-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  .cb-onboard-hint-text br {
    display: none;
  }
  .cb-onboard-hint-text {
    font-size: 13px;
  }

  /* —— 时间线 —— */
  .mm-hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .mm-hero-cta-col {
    width: 100%;
  }
  .mm-btn-primary-lg {
    width: 100%;
    min-height: 48px;
  }
  .tl-filter-row-mobile {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .tl-filter-row-mobile .field {
    min-width: 100% !important;
  }
  .tl-table-outer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
    max-width: 100%;
  }
  .tl-table-outer .table-wrap {
    min-width: 640px;
  }

  /* —— 快照 —— */
  .mv-dossier-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .mv-dossier-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mv-dossier-lead {
    font-size: 13px;
  }
  .mv-dossier-lead-full,
  .mm-sub-desktop {
    display: none !important;
  }
  .mv-dossier-lead-short,
  .mm-sub-mobile {
    display: inline !important;
  }
  .mv-kpi-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  @media (max-width: 360px) {
    .mv-kpi-strip {
      grid-template-columns: 1fr;
    }
  }
  .mv-kpi-scope-hint {
    font-size: 12px;
    line-height: 1.45;
  }
  .mv-snapshot-toolbar-inner {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .snap-mvp-foot-card .mv-foot-grid {
    grid-template-columns: 1fr !important;
  }
  .page-stack--snapshot-mvp #out {
    min-height: 220px !important;
  }

  /* —— 资料详情阅读器 —— */
  .evidence-detail-layout .reader-chrome-top a[href="evidence.html"] {
    display: none;
  }
  .evidence-detail-layout .reader-chrome-top #btnReaderBack {
    order: 2;
  }
  .evidence-detail-layout .reader-chrome-top a[href="case-brief.html"] {
    order: 1;
  }
  .reader-chrome-top {
    padding: 10px 12px;
    gap: 8px;
  }
  .reader-chrome-top .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  .reader-onboard-details {
    margin-bottom: 10px;
  }
  .reader-onboard-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
  }
  .reader-onboard-details .awgl-reader-onboard-text {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 12px;
  }
  .evidence-reader-head .muted {
    display: none;
  }
  .reader-file-nav--secondary {
    display: none;
  }
  .reader-preview-main {
    min-height: min(48vh, 420px);
  }
  .reader-chrome-bottom {
    position: sticky;
    bottom: 0;
    z-index: 20;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  }
  .reader-chrome-bottom .btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  .reader-chrome-bottom a.btn {
    display: inline-flex;
    align-items: center;
  }
  .reader-chrome-bottom-spacer {
    display: none;
  }
  .evidence-detail-layout .toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .evidence-detail-layout .toolbar .btn {
    min-height: 44px;
  }
  .evidence-detail-layout .grid {
    display: flex;
    flex-direction: column;
  }
  main.layout.evidence-detail-layout {
    display: flex;
    flex-direction: column;
  }
  /* 默认 order:0 会排在 1/2 之前，导致标题压在阅读器上；统一先沉底再只提起顶栏与阅读器 */
  main.layout.evidence-detail-layout > * {
    order: 10;
  }
  main.layout.evidence-detail-layout > .reader-chrome-top {
    order: 1;
  }
  main.layout.evidence-detail-layout > .evidence-reader-card {
    order: 2;
  }
  main.layout.evidence-detail-layout > #headTitle {
    font-size: 1.15rem;
    line-height: 1.3;
    word-break: break-word;
  }

  /* 登录页 */
  .login-panel {
    padding: 16px 12px;
    max-width: 100%;
  }
  .login-panel .card {
    padding: 18px 16px;
  }
  .login-welcome-desktop {
    display: none !important;
  }
  .login-welcome-mobile-only {
    display: block !important;
  }
  .login-welcome-mobile-only.login-welcome-details {
    display: list-item !important;
    margin: 0 0 10px;
    font-size: 13px;
  }
  .login-welcome-details summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
  }
  .awgl-body--auth .btn-primary {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
  .login-api-compact summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
  }
}

@media (min-width: 769px) {
  .awgl-chrome-shell {
    display: contents;
  }

  .awgl-mobile-bar,
  .awgl-nav-backdrop {
    display: none !important;
  }

  .awgl-drawer-only-mobile {
    display: none !important;
  }

  #awglSidebarNav.sidebar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: var(--sidebar-w) !important;
    max-width: none !important;
    transform: none !important;
    box-shadow: none !important;
    z-index: auto !important;
  }

  body.awgl-nav-drawer-open {
    overflow: auto;
  }
}
