/* [2026-02-23] 修改：CoreUI 官方风格桥接层（精简版） */
/* 原因：前一版桥接样式自定义过重，与 CoreUI 官方演示风格差异较大 */
/* 影响：统一回归 CoreUI 官方色彩、边框、间距与组件语义，减少“魔改感” */
/* 未改动：业务逻辑、接口、数据库结构与路由不变 */

:root {
  /* [2026-02-24] 修改：补齐 CoreUI 变量兜底（无 coreui.bundle 场景） */
  /* 原因：案件页关闭 CoreUI bundle 时，--cui-* 变量缺失会导致颜色计算失效（出现全黑/文字丢失） */
  /* 影响：即使不加载 CoreUI 主样式，也有稳定的浅色默认变量可用 */
  /* 未改动：页面逻辑、接口调用与路由保持不变 */
  --cui-body-bg: #f4f7fb;
  --cui-body-color: #0f172a;
  --cui-secondary-color: #64748b;
  --cui-border-color: #dbe2eb;
  --cui-border-color-translucent: rgba(148, 163, 184, 0.28);
  --cui-primary: #4f46e5;
  --cui-primary-text-emphasis: #3730a3;
  --cui-danger: #ef4444;
  --cui-header-color: #0f172a;
  --cui-font-sans-serif: "SF Pro Text", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;

  --app-mobile-nav-height: 62px;
  --app-glass-bg: rgba(255, 255, 255, 0.72);
  --app-glass-border: rgba(148, 163, 184, 0.24);
  --app-glass-shadow: 0 8px 24px rgba(15, 23, 42, 0.11);
  --app-glass-blur: blur(16px);
  --app-sidebar-bg: rgba(255, 255, 255, 0.72);
  --app-sidebar-border: rgba(148, 163, 184, 0.32);
  --app-sidebar-color: #1e293b;
  --app-sidebar-hover-bg: rgba(88, 86, 214, 0.12);
  --app-sidebar-active-bg: rgba(88, 86, 214, 0.2);
  --app-sidebar-active-color: #2f2ca9;
  --app-ios-radius-xxl: 20px;
  --app-ios-radius-xl: 16px;
  --app-ios-radius-lg: 12px;
  --app-ios-ease: cubic-bezier(.22, .61, .36, 1);
  --app-focus-ring: 0 0 0 2px rgba(88, 86, 214, 0.22);
}

[data-theme='dark'] {
  /* [2026-02-24] 修改：补齐暗色 CoreUI 变量兜底（无 coreui.bundle 场景） */
  /* 原因：暗色模式下 --cui-* 缺失会使容器与按钮退化为透明/纯黑 */
  /* 影响：暗色模式保持深蓝灰层次，不再出现“全黑一片” */
  /* 未改动：主题切换流程与存储逻辑保持不变 */
  --cui-body-bg: #0f172a;
  --cui-body-color: #e2e8f0;
  --cui-secondary-color: #94a3b8;
  --cui-border-color: rgba(148, 163, 184, 0.32);
  --cui-border-color-translucent: rgba(148, 163, 184, 0.32);
  --cui-primary: #60a5fa;
  --cui-primary-text-emphasis: #3b82f6;
  --cui-danger: #f87171;
  --cui-header-color: #e2e8f0;

  --app-glass-bg: rgba(15, 23, 42, 0.62);
  --app-glass-border: rgba(148, 163, 184, 0.24);
  --app-glass-shadow: 0 10px 30px rgba(2, 6, 23, 0.4);
  --app-sidebar-bg: rgba(15, 23, 42, 0.74);
  --app-sidebar-border: rgba(148, 163, 184, 0.24);
  --app-sidebar-color: rgba(255, 255, 255, 0.88);
  --app-sidebar-hover-bg: rgba(255, 255, 255, 0.09);
  --app-sidebar-active-bg: rgba(88, 86, 214, 0.34);
  --app-sidebar-active-color: #eef2ff;
  --app-focus-ring: 0 0 0 2px rgba(147, 197, 253, 0.24);
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
  font-family: var(--cui-font-sans-serif);
}

/* [2026-02-23] 修改：主题切换时临时关闭动画过渡 */
/* 原因：页面混用多套样式时，背景和边框过渡会造成“半灰半白”视觉残留 */
/* 影响：深浅色切换即时生效，避免切换后需要刷新才完全稳定 */
/* 未改动：正常交互动画与悬停动画在非切换时保持原有表现 */
html.theme-switching *,
body.theme-switching * {
  transition: none !important;
  animation: none !important;
}

a,
a:hover,
a:focus {
  text-decoration: none;
}

/* [2026-02-23] 修改：全局交互曲线统一为 iOS 风格 */
/* 原因：不同组件过渡节奏不一致，点击与悬停体验偏“硬” */
/* 影响：按钮、菜单、卡片交互更加圆润连贯，但不增加额外业务开销 */
/* 未改动：现有事件、路由、接口逻辑保持不变 */
* {
  transition-timing-function: var(--app-ios-ease);
}

/* 顶部壳层：贴近 CoreUI Header */
.topbar,
.ant-header,
.unified-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem 1rem;
  background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%);
  color: var(--cui-header-color, var(--cui-body-color));
  border-bottom: 1px solid var(--app-glass-border);
  border-radius: var(--app-ios-radius-xl);
  backdrop-filter: var(--app-glass-blur);
  -webkit-backdrop-filter: var(--app-glass-blur);
  box-shadow: var(--app-glass-shadow);
  transition: background .24s var(--app-ios-ease), border-color .24s var(--app-ios-ease), box-shadow .24s var(--app-ios-ease);
}

.brand,
.ant-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: inherit;
}

.brand-mark,
.ant-logo-badge {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: .66rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cui-primary-bg-subtle, rgba(50, 31, 219, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

.brand-text,
.ant-logo-title {
  font-weight: 600;
  line-height: 1.2;
}

.brand-sub {
  color: var(--cui-secondary-color);
  font-size: .75rem;
}

.topbar-actions,
.ant-header-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.user-chip,
.ant-user-chip {
  border: 1px solid var(--cui-border-color);
  border-radius: 50rem;
  background: color-mix(in srgb, var(--app-glass-bg) 80%, transparent);
  color: var(--cui-body-color);
  padding: .25rem .65rem;
  font-size: .8rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.theme-toggle,
.ant-theme-toggle,
.ant-icon-btn {
  border: 1px solid var(--cui-border-color);
  border-radius: var(--cui-border-radius-pill, 50rem);
  background: color-mix(in srgb, var(--app-glass-bg) 84%, transparent);
  color: var(--cui-body-color);
  padding: .3rem .6rem;
  font-size: .8rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .18s var(--app-ios-ease), box-shadow .2s var(--app-ios-ease), border-color .2s var(--app-ios-ease), background .2s var(--app-ios-ease);
}

.theme-toggle:hover,
.ant-theme-toggle:hover,
.ant-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

.theme-toggle:focus-visible,
.ant-theme-toggle:focus-visible,
.ant-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--app-focus-ring);
}

/* 主体布局 */
.ant-layout,
.app-shell {
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
}

.ant-layout-body {
  display: flex;
  min-height: calc(100vh - 56px);
  margin-top: 0 !important;
  width: 100%;
}

/* 侧栏：液态玻璃 + 主题联动 */
.ant-sider {
  width: 256px;
  min-width: 256px;
  flex: 0 0 256px;
  background: color-mix(in srgb, var(--app-sidebar-bg) 88%, var(--cui-body-bg) 12%);
  color: var(--app-sidebar-color);
  border: 1px solid var(--app-sidebar-border);
  border-radius: var(--app-ios-radius-xxl);
  box-shadow: var(--app-glass-shadow);
  backdrop-filter: saturate(1.12) blur(12px);
  -webkit-backdrop-filter: saturate(1.12) blur(12px);
  padding: .75rem .625rem;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  height: auto !important;
  z-index: 2;
  overflow-y: auto;
}

.ant-sider-menu {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.ant-sider-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--app-sidebar-color);
  border-radius: var(--app-ios-radius-lg);
  padding: .55rem .65rem;
  border: 1px solid transparent;
  transition: transform .18s var(--app-ios-ease), background .2s var(--app-ios-ease), color .2s var(--app-ios-ease), border-color .2s var(--app-ios-ease);
}

.ant-sider-item:hover {
  color: var(--app-sidebar-color);
  background: var(--app-sidebar-hover-bg);
  transform: translateX(1px);
  border-color: color-mix(in srgb, var(--app-sidebar-border) 56%, transparent);
}

.ant-sider-item.active {
  color: var(--app-sidebar-active-color);
  background: var(--app-sidebar-active-bg);
  border-color: color-mix(in srgb, var(--app-sidebar-border) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.ant-sider-item:focus-visible {
  outline: none;
  box-shadow: var(--app-focus-ring);
}

.ant-content,
.page-shell {
  flex: 1;
  min-width: 0;
  padding: 1rem;
  background: var(--cui-body-bg);
  margin-left: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  overflow: visible !important;
}

/* 卡片与常见容器回归 Bootstrap/CoreUI 质感 */
.ant-card,
.settings-card,
.upload-card,
.profile-section,
.notification-list,
.history-list,
.edit-card,
.page-editor,
.modal-card,
.modal-content,
.hero-panel,
.quick-card,
.pdf-tool-card,
.example-box,
.file-item,
.complaint-upload,
.complaint-info,
.ai-log-box,
.pdf-frame-card,
.view-toolbar,
.pdf-preview-box {
  background: color-mix(in srgb, var(--app-glass-bg) 84%, var(--cui-body-bg) 16%);
  color: var(--cui-body-color);
  border: 1px solid var(--app-glass-border);
  border-radius: 1.1rem;
  box-shadow: var(--app-glass-shadow);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ant-card,
  .settings-card,
  .upload-card,
  .hero-panel,
  .pdf-tool-card,
  .modal-card,
  .modal-content,
  .pdf-frame-card {
    backdrop-filter: saturate(1.12) blur(8px);
    -webkit-backdrop-filter: saturate(1.12) blur(8px);
  }
}

.page-title,
.page-header h1,
.ant-card-title,
.section-title,
.form-label,
.history-title,
.notification-title,
.upload-title,
.complaint-title,
.example-title,
.file-name {
  color: var(--cui-body-color);
}

.page-subtitle,
.page-header p,
.form-hint,
.history-meta,
.notification-message,
.notification-time,
.upload-hint,
.complaint-hint,
.file-size,
.empty-desc {
  color: var(--cui-secondary-color);
}

/* 表单统一 */
input,
select,
textarea,
.form-input,
.form-textarea,
.history-title-input,
#promptInput,
#systemPrompt,
#pdfFilename {
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
  border: 1px solid var(--cui-border-color);
  border-radius: var(--cui-border-radius, .375rem);
}

input::placeholder,
textarea::placeholder {
  color: var(--cui-secondary-color);
}

/* 按钮统一 */
.ant-btn,
.btn,
button {
  border-radius: 999px;
  transition: transform .18s var(--app-ios-ease), box-shadow .2s var(--app-ios-ease), background .2s var(--app-ios-ease), border-color .2s var(--app-ios-ease), color .2s var(--app-ios-ease);
}

.ant-btn:hover:not(:disabled),
.btn:hover:not(:disabled),
button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ant-btn:focus-visible,
.btn:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--app-focus-ring);
}

.ant-btn-primary,
.btn-primary,
.btn-send,
.btn-edit {
  background: var(--cui-primary);
  border-color: var(--cui-primary);
  color: #fff;
}

.ant-btn-primary:hover,
.btn-primary:hover,
.btn-send:hover,
.btn-edit:hover {
  background: var(--cui-primary-text-emphasis, #0a58ca);
  border-color: var(--cui-primary-text-emphasis, #0a58ca);
}

.ant-btn,
.btn,
.btn-outline,
.btn-ghost,
.btn-batch,
.btn-ghostlite {
  background: color-mix(in srgb, var(--app-glass-bg) 80%, transparent);
  border: 1px solid var(--cui-border-color);
  color: var(--cui-body-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-danger,
.btn-delete,
.btn-batch-danger {
  background: var(--cui-danger);
  border-color: var(--cui-danger);
  color: #fff;
}

/* 暗黑模式下关键卡片防止发白 */
[data-theme='dark'] .upload-card,
[data-theme='dark'] .settings-card,
[data-theme='dark'] .history-list,
[data-theme='dark'] .history-item,
[data-theme='dark'] .complaint-upload,
[data-theme='dark'] .complaint-info,
[data-theme='dark'] .notification-list,
[data-theme='dark'] .profile-section,
[data-theme='dark'] .view-toolbar,
[data-theme='dark'] .pdf-preview-box,
[data-theme='dark'] .pdf-frame-card {
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
  border-color: var(--cui-border-color-translucent, rgba(255, 255, 255, .2));
}

/* [2026-02-23] 修改：A4 预览编辑区在任意主题下固定白底 */
/* 原因：用户要求 A4 页面必须与最终导出 PDF 一致，不受暗黑模式影响 */
/* 影响：A4 编辑/预览区域保持白纸效果，避免暗黑模式下出现黑底偏差 */
/* 未改动：A4 页面排版结构、导出逻辑和页码逻辑保持不变 */
.a4-page {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #e5e7eb !important;
}

.a4-page .page-title,
.a4-page .section-label,
.a4-page .evidence-text,
.a4-page .image-label,
.a4-page .page-footer {
  color: #111827 !important;
}

[data-theme='dark'] .a4-page,
[data-theme='dark'] .a4-page * {
  color: #111827 !important;
}

/* [2026-02-23] 修改：补齐暗黑模式下常见亮色残留模块 */
/* 原因：部分页面存在后置内联样式，导致通知、个人中心、设置等模块仍出现白块 */
/* 影响：暗黑模式下关键模块统一为深色背景，跨页面视觉更一致 */
/* 未改动：模块功能、交互和数据逻辑保持不变 */
[data-theme='dark'] .notification-item,
[data-theme='dark'] .notification-item:hover,
[data-theme='dark'] .notification-item.unread,
[data-theme='dark'] .notification-item.unread:hover,
[data-theme='dark'] .menu-item,
[data-theme='dark'] .menu-item:hover,
[data-theme='dark'] .menu-icon,
[data-theme='dark'] .empty-state,
[data-theme='dark'] .view-toolbar,
[data-theme='dark'] .edit-toolbar {
  background: var(--cui-body-bg) !important;
  color: var(--cui-body-color) !important;
  border-color: var(--cui-border-color-translucent, rgba(255, 255, 255, .2)) !important;
}

[data-theme='dark'] .notification-message,
[data-theme='dark'] .notification-time,
[data-theme='dark'] .empty-desc,
[data-theme='dark'] .form-label {
  color: var(--cui-secondary-color) !important;
}

[data-theme='dark'] .form-input:disabled {
  background: color-mix(in srgb, var(--cui-body-bg) 90%, #fff 10%) !important;
  color: var(--cui-secondary-color) !important;
}

/* [2026-02-23] 修改：壳层布局统一锁定（桌面端） */
/* 原因：多套旧样式并存时，侧栏固定定位和内容偏移规则会互相覆盖，导致内容被挡住 */
/* 影响：桌面端主页面统一为“左侧栏 + 右内容”的弹性布局，不再出现侧栏压内容 */
/* 未改动：页面业务模块、接口与数据逻辑保持不变 */
body .ant-layout,
body .ant-layout-body {
  overflow: visible !important;
}

body .ant-layout .ant-layout-body > .ant-sider {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  width: 256px !important;
  min-width: 256px !important;
  flex: 0 0 256px !important;
  height: auto !important;
  margin: 0 !important;
}

body .ant-layout .ant-layout-body > .ant-content,
body .ant-layout .ant-layout-body > .page-shell {
  margin-left: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

body .topbar,
body .ant-header,
body .unified-topbar {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 1035 !important;
}

/* [2026-02-23] 修改：统一侧栏菜单字体、间距和激活态，防止跨页漂移 */
/* 原因：不同页面引入的旧CSS会修改菜单高度、字号、图标偏移 */
/* 影响：侧栏在全站保持同一视觉节奏和定位 */
/* 未改动：菜单项文案和跳转地址保持不变 */
body .ant-sider-menu {
  gap: .35rem !important;
}

body .ant-sider-item,
body .ant-sider-item:link,
body .ant-sider-item:visited {
  min-height: 44px !important;
  border-radius: .85rem !important;
  padding: .65rem .75rem !important;
  font-size: .875rem !important;
  line-height: 1.2 !important;
  font-weight: 550 !important;
  text-decoration: none !important;
}

body .ant-sider-icon {
  width: 1.1rem !important;
  min-width: 1.1rem !important;
  text-align: center !important;
  font-size: 1rem !important;
  line-height: 1 !important;
}

/* [2026-02-23] 修改：统一底部导航文字大小与位置 */
/* 原因：旧CSS和运行时样式会造成底部菜单文字大小与高度在页面间跳变 */
/* 影响：移动端底部导航文案在各页面一致 */
/* 未改动：底部导航菜单项和路由不变 */
.mobile-bottom-nav .nav-item,
.mobile-bottom-nav .nav-item:link,
.mobile-bottom-nav .nav-item:visited {
  min-height: 48px !important;
  font-size: .75rem !important;
  font-weight: 550 !important;
  line-height: 1.15 !important;
}

.mobile-bottom-nav .nav-icon {
  font-size: 1.05rem !important;
  line-height: 1 !important;
}

.mobile-bottom-nav .nav-label {
  font-size: .72rem !important;
  line-height: 1.15 !important;
  letter-spacing: .01em !important;
}

/* [2026-02-23] 修改：转PDF页面上传/生成按钮悬停态统一，不再出现“悬停变白” */
/* 原因：页面内联样式在 hover 时切换为纯白背景，与暗色/玻璃容器割裂 */
/* 影响：上传区和生成按钮在浅色与暗色主题下保持统一风格 */
/* 未改动：按钮功能与事件处理逻辑保持不变 */
.upload-area:hover,
.complaint-upload:hover {
  background: color-mix(in srgb, var(--cui-primary) 10%, var(--cui-body-bg)) !important;
  border-color: color-mix(in srgb, var(--cui-primary) 55%, var(--cui-border-color)) !important;
}

.generate-card .btn-generate {
  background: color-mix(in srgb, var(--app-glass-bg) 82%, var(--cui-body-bg) 18%) !important;
  color: var(--cui-body-color) !important;
  border: 1px solid var(--app-glass-border) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

.generate-card .btn-generate:hover:not(:disabled) {
  background: color-mix(in srgb, var(--cui-primary) 14%, var(--cui-body-bg)) !important;
  color: var(--cui-primary) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14) !important;
}

[data-theme='dark'] .generate-card .btn-generate {
  background: color-mix(in srgb, var(--cui-body-bg) 88%, #fff 12%) !important;
  color: var(--cui-body-color) !important;
  border-color: var(--app-glass-border) !important;
}

[data-theme='dark'] .generate-card .btn-generate:hover:not(:disabled) {
  background: color-mix(in srgb, var(--cui-primary) 22%, var(--cui-body-bg)) !important;
  color: #bfdbfe !important;
}

[data-theme='dark'] .model-select {
  background: color-mix(in srgb, var(--cui-body-bg) 90%, #fff 10%) !important;
  color: var(--cui-body-color) !important;
  border-color: var(--app-glass-border) !important;
}

/* 移动端底部菜单 */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(620px, calc(100% - 14px));
  /* [2026-02-24] 修改：限制底部安全区位移上限，避免菜单下方出现灰色空带 */
  /* 原因：`max(6px, env(safe-area-inset-bottom))` 在 iPhone 上会抬高过多（约34px） */
  /* 影响：底部菜单保持贴近底部，仍保留安全区缓冲但不再产生明显灰条 */
  /* 未改动：底部菜单布局结构、入口顺序与交互逻辑保持不变 */
  bottom: clamp(6px, env(safe-area-inset-bottom), 14px);
  z-index: 1055;
  background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%);
  border: 1px solid var(--app-glass-border);
  border-radius: 18px;
  backdrop-filter: saturate(1.14) blur(14px);
  -webkit-backdrop-filter: saturate(1.14) blur(14px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
  padding: .3rem .32rem calc(.38rem + min(env(safe-area-inset-bottom), 12px));
}

.mobile-bottom-nav .nav-item,
.mobile-bottom-nav .nav-item:link,
.mobile-bottom-nav .nav-item:visited {
  flex: 1;
  min-height: 46px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: .5rem;
  color: var(--cui-secondary-color);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.15;
}

.mobile-bottom-nav .nav-item.active {
  color: var(--cui-primary);
  background: color-mix(in srgb, var(--cui-primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cui-primary) 34%, transparent);
}

.global-mobile-theme-toggle {
  left: 12px !important;
  right: auto !important;
  bottom: calc(74px + env(safe-area-inset-bottom)) !important;
}

/* 桌面端永不显示底部菜单 */
body.device-desktop .mobile-bottom-nav {
  display: none !important;
}

/* [2026-02-23] 修改：移动设备类命中时始终显示底部导航（不依赖宽度媒体查询） */
/* 原因：部分手机横屏/分屏宽度超过 768 时菜单会被媒体查询隐藏，出现“菜单消失” */
/* 影响：只要设备识别为 mobile/tablet 即保持底部菜单可见，桌面端仍隐藏 */
/* 未改动：底部菜单链接、激活态和主题配色逻辑不变 */
html.is-mobile .mobile-bottom-nav,
body.device-mobile .mobile-bottom-nav,
body.device-tablet .mobile-bottom-nav {
  display: flex !important;
}

html.is-mobile body,
body.device-mobile,
body.device-tablet {
  padding-bottom: calc(var(--app-mobile-nav-height) + env(safe-area-inset-bottom));
}

@media (max-width: 991.98px) {
  .ant-sider {
    display: none !important;
  }

  .ant-content,
  .page-shell {
    padding: .75rem;
    margin-left: 0 !important;
    width: 100% !important;
  }

  .brand-sub,
  .user-chip,
  .ant-user-chip {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar,
  .ant-header,
  .unified-topbar {
    padding: .45rem .625rem;
  }

  .actions,
  .preview-actions,
  .history-actions,
  .modal-actions {
    flex-wrap: wrap;
  }
}

/* [2026-02-23] 修改：全局壳层终极统一（以案件列表侧栏为基准） */
/* 原因：多个历史样式文件同时定义 ant-layout/ant-sider/ant-content，导致跨页菜单文字和位置漂移 */
/* 影响：桌面端侧栏与内容区布局统一，移动端底部菜单字号和高度统一 */
/* 未改动：菜单项文案、路由和页面业务逻辑保持不变 */
:root {
  --app-shell-header-height: 56px;
  --app-shell-sidebar-width: 248px;
}

body .ant-layout {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

body .ant-layout-body {
  display: flex !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100vh - var(--app-shell-header-height)) !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body .ant-layout-body > .ant-sider {
  position: sticky !important;
  top: calc(var(--app-shell-header-height) + 8px) !important;
  left: auto !important;
  bottom: auto !important;
  align-self: flex-start !important;
  width: var(--app-shell-sidebar-width) !important;
  min-width: var(--app-shell-sidebar-width) !important;
  flex: 0 0 var(--app-shell-sidebar-width) !important;
  height: calc(100dvh - var(--app-shell-header-height) - 16px) !important;
  max-height: calc(100dvh - var(--app-shell-header-height) - 16px) !important;
  margin: 8px 0 8px 12px !important;
  border-radius: 18px !important;
  padding: 12px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-right: 1px solid var(--app-sidebar-border) !important;
}

body .ant-layout-body > .ant-content,
body .ant-layout-body > .page-shell {
  flex: 1 1 auto !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: calc(100vh - var(--app-shell-header-height)) !important;
  height: auto !important;
  padding: 16px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

body .topbar,
body .ant-header,
body .unified-topbar {
  min-height: var(--app-shell-header-height) !important;
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 1035 !important;
  border-radius: var(--app-ios-radius-xl) !important;
  backdrop-filter: saturate(1.14) blur(14px);
  -webkit-backdrop-filter: saturate(1.14) blur(14px);
}

body .ant-sider-menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 0 !important;
}

body .ant-sider-item,
body .ant-sider-item:link,
body .ant-sider-item:visited {
  min-height: 44px !important;
  border-radius: 14px !important;
  padding: 11px 12px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 560 !important;
  text-decoration: none !important;
}

body .ant-sider-icon {
  width: 18px !important;
  min-width: 18px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  text-align: center !important;
}

/* [2026-02-23] 修改：转PDF页面按钮/上传区悬停态统一（修复悬停发白） */
/* 原因：页面内联样式 hover 会切纯白背景，在深色和玻璃背景下割裂 */
/* 影响：上传区、起诉状上传区、生成按钮在 hover 时保持统一主题色 */
/* 未改动：上传/分析/生成功能逻辑保持不变 */
body .upload-area:hover,
body .complaint-upload:hover {
  background: color-mix(in srgb, var(--cui-primary) 10%, var(--cui-body-bg)) !important;
  border-color: color-mix(in srgb, var(--cui-primary) 55%, var(--cui-border-color)) !important;
}

body .generate-card .btn-generate {
  background: color-mix(in srgb, var(--app-glass-bg) 82%, var(--cui-body-bg) 18%) !important;
  color: var(--cui-body-color) !important;
  border: 1px solid var(--app-glass-border) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body .generate-card .btn-generate:hover:not(:disabled) {
  background: color-mix(in srgb, var(--cui-primary) 14%, var(--cui-body-bg)) !important;
  color: var(--cui-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14) !important;
}

[data-theme='dark'] body .generate-card .btn-generate {
  background: color-mix(in srgb, var(--cui-body-bg) 88%, #fff 12%) !important;
  color: var(--cui-body-color) !important;
  border-color: var(--app-glass-border) !important;
}

[data-theme='dark'] body .generate-card .btn-generate:hover:not(:disabled) {
  background: color-mix(in srgb, var(--cui-primary) 22%, var(--cui-body-bg)) !important;
  color: #bfdbfe !important;
}

[data-theme='dark'] body .model-select {
  background: color-mix(in srgb, var(--cui-body-bg) 90%, #fff 10%) !important;
  color: var(--cui-body-color) !important;
  border-color: var(--app-glass-border) !important;
}

body .mobile-bottom-nav .nav-item,
body .mobile-bottom-nav .nav-item:link,
body .mobile-bottom-nav .nav-item:visited {
  min-height: 48px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-weight: 560 !important;
}

body .mobile-bottom-nav .nav-icon {
  font-size: 17px !important;
  line-height: 1 !important;
}

body .mobile-bottom-nav .nav-label {
  font-size: 11px !important;
  line-height: 1.15 !important;
  letter-spacing: .01em !important;
}

@media (max-width: 991.98px) {
  body .ant-layout-body {
    display: block !important;
  }

  body .topbar,
  body .ant-header,
  body .unified-topbar {
    border-radius: 0 !important;
  }

  body .ant-layout-body > .ant-sider {
    display: none !important;
  }

  body .ant-layout-body > .ant-content,
  body .ant-layout-body > .page-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 12px !important;
  }
}

/* [2026-02-23] 修改：底部菜单改为双边锚定 + 液态滑块高亮 */
/* 原因：left:50% + translateX(-50%) 在不同页面内容高度下会出现横向抖动和遮挡 */
/* 影响：底部菜单全局固定、点击项有平滑滑块动画，减少“菜单左移/样式漂移” */
/* 未改动：底部菜单入口文案、链接地址、桌面端隐藏逻辑保持不变 */
body .mobile-bottom-nav {
  --mobile-nav-glider-x: 0px;
  --mobile-nav-glider-w: 0px;
  --mobile-nav-glider-opacity: 0;
  position: fixed !important;
  /* [2026-02-24] 修改：底部 Dock 安全区采用上限值，修复轻微灰色空白带 */
  /* 原因：超大 safe-area inset 会把菜单整体上移，底部露出背景色 */
  /* 影响：移动端底部视觉更紧凑，iPhone 机型不再出现明显灰条 */
  /* 未改动：Dock 的玻璃质感、滑块动画和桌面端隐藏逻辑保持不变 */
  bottom: clamp(6px, env(safe-area-inset-bottom), 14px) !important;
  left: max(7px, calc((100vw - 620px) / 2)) !important;
  right: max(7px, calc((100vw - 620px) / 2)) !important;
  width: auto !important;
  max-width: 620px !important;
  min-height: 62px !important;
  transform: none !important;
  margin: 0 !important;
  padding: .3rem .32rem calc(.38rem + min(env(safe-area-inset-bottom), 12px)) !important;
  border-radius: 18px !important;
  border: 1px solid var(--app-glass-border) !important;
  background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%) !important;
  backdrop-filter: saturate(1.14) blur(14px) !important;
  -webkit-backdrop-filter: saturate(1.14) blur(14px) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16) !important;
  z-index: 1055 !important;
  display: none;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 4px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  will-change: transform;
}

[data-theme='dark'] body .mobile-bottom-nav {
  background: color-mix(in srgb, var(--app-glass-bg) 94%, var(--cui-body-bg) 6%) !important;
  border-color: color-mix(in srgb, var(--app-glass-border) 92%, transparent 8%) !important;
}

body .mobile-bottom-nav .mobile-nav-glider {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px - env(safe-area-inset-bottom));
  min-height: 44px;
  width: var(--mobile-nav-glider-w);
  border-radius: 13px;
  transform: translate3d(var(--mobile-nav-glider-x), 0, 0);
  opacity: var(--mobile-nav-glider-opacity);
  background: color-mix(in srgb, var(--cui-primary) 14%, var(--app-glass-bg) 86%);
  border: 1px solid color-mix(in srgb, var(--cui-primary) 28%, var(--app-glass-border) 72%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .5);
  pointer-events: none;
  z-index: 1;
  transition: transform .26s var(--app-ios-ease), width .26s var(--app-ios-ease), opacity .16s var(--app-ios-ease);
  will-change: transform, width, opacity;
}

body .mobile-bottom-nav.mobile-nav-no-transition .mobile-nav-glider {
  transition: none !important;
}

[data-theme='dark'] body .mobile-bottom-nav .mobile-nav-glider {
  background: color-mix(in srgb, var(--cui-primary) 24%, rgba(15, 23, 42, .78) 76%);
  border-color: color-mix(in srgb, var(--cui-primary) 46%, rgba(148, 163, 184, .28) 54%);
  box-shadow: 0 12px 24px rgba(2, 6, 23, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}

body .mobile-bottom-nav .nav-item,
body .mobile-bottom-nav .nav-item:link,
body .mobile-bottom-nav .nav-item:visited {
  flex: 1 1 0 !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 4px 2px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  position: relative;
  z-index: 2;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  color: var(--cui-secondary-color) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 560 !important;
  line-height: 1.12 !important;
  letter-spacing: .01em !important;
  transform: translateZ(0);
  transition: color .24s var(--app-ios-ease), transform .18s var(--app-ios-ease);
  will-change: transform, color;
  backface-visibility: hidden;
}

body .mobile-bottom-nav .nav-icon {
  font-size: 17px !important;
  line-height: 1 !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body .mobile-bottom-nav .nav-label {
  font-size: 11px !important;
  line-height: 1.12 !important;
  font-weight: 560 !important;
  letter-spacing: .01em !important;
}

body .mobile-bottom-nav .nav-item.active {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--cui-primary) !important;
}

body .mobile-bottom-nav .nav-item:active {
  transform: scale(.97);
}

@media (prefers-reduced-motion: reduce) {
  body .mobile-bottom-nav .mobile-nav-glider,
  body .mobile-bottom-nav .nav-item {
    transition: none !important;
  }
}

/* [2026-02-24] 修改：移动端底部Dock渲染降负载，提升滑块动画连贯性 */
/* 原因：高 blur + 重阴影在部分手机上会导致切页时底栏动画掉帧 */
/* 影响：移动端保持玻璃感同时降低渲染开销，滑块移动更丝滑 */
/* 未改动：底栏结构、入口顺序与路由逻辑保持不变 */
@media (max-width: 768px) {
  body .mobile-bottom-nav {
    backdrop-filter: saturate(1.08) blur(8px) !important;
    -webkit-backdrop-filter: saturate(1.08) blur(8px) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14) !important;
  }
}

/* [2026-02-24] 修改：桌面与移动端按钮/菜单统一升级为 Liquid Glass 动效 */
/* 原因：用户要求全站按钮和菜单向 iOS 底部 Dock 靠拢，增强丝滑切换与玻璃质感 */
/* 影响：全站常见按钮、侧栏菜单、顶部操作入口和移动端菜单统一为轻透背景+柔和过渡 */
/* 未改动：业务逻辑、路由、接口和数据结构保持不变 */
:root {
  --app-liquid-sheen: linear-gradient(140deg, rgba(255, 255, 255, .52) 0%, rgba(255, 255, 255, .2) 46%, rgba(255, 255, 255, .08) 100%);
  --app-liquid-shadow-soft: 0 10px 24px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .42);
  --app-liquid-shadow-float: 0 14px 30px rgba(15, 23, 42, .2), inset 0 1px 0 rgba(255, 255, 255, .52);
  --app-liquid-shadow-press: 0 6px 16px rgba(15, 23, 42, .16), inset 0 1px 0 rgba(255, 255, 255, .26);
}

[data-theme='dark'] {
  --app-liquid-sheen: linear-gradient(140deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .06) 45%, rgba(255, 255, 255, .02) 100%);
  --app-liquid-shadow-soft: 0 12px 26px rgba(2, 6, 23, .38), inset 0 1px 0 rgba(255, 255, 255, .1);
  --app-liquid-shadow-float: 0 16px 34px rgba(2, 6, 23, .5), inset 0 1px 0 rgba(255, 255, 255, .14);
  --app-liquid-shadow-press: 0 8px 18px rgba(2, 6, 23, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
}

body .btn,
body .ant-btn,
body button,
body .theme-toggle,
body .ant-theme-toggle,
body .ant-icon-btn,
body .menu-item,
body .ant-sider-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--app-glass-border) 86%, transparent 14%) !important;
  background: color-mix(in srgb, var(--app-glass-bg) 88%, var(--cui-body-bg) 12%) !important;
  box-shadow: var(--app-liquid-shadow-soft);
  backdrop-filter: saturate(1.16) blur(14px);
  -webkit-backdrop-filter: saturate(1.16) blur(14px);
  transition:
    transform .22s var(--app-ios-ease),
    box-shadow .26s var(--app-ios-ease),
    border-color .22s var(--app-ios-ease),
    background .22s var(--app-ios-ease),
    color .22s var(--app-ios-ease);
}

body .btn::before,
body .ant-btn::before,
body .theme-toggle::before,
body .ant-theme-toggle::before,
body .ant-icon-btn::before,
body .menu-item::before,
body .ant-sider-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--app-liquid-sheen);
  opacity: .95;
  pointer-events: none;
  z-index: 0;
}

body .btn > *,
body .ant-btn > *,
body .theme-toggle > *,
body .ant-theme-toggle > *,
body .ant-icon-btn > *,
body .menu-item > *,
body .ant-sider-item > * {
  position: relative;
  z-index: 1;
}

body .btn:hover:not(:disabled),
body .ant-btn:hover:not(:disabled),
body .theme-toggle:hover,
body .ant-theme-toggle:hover,
body .ant-icon-btn:hover,
body .menu-item:hover,
body .ant-sider-item:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: var(--app-liquid-shadow-float);
  border-color: color-mix(in srgb, var(--cui-primary) 34%, var(--app-glass-border) 66%) !important;
}

body .btn:active:not(:disabled),
body .ant-btn:active:not(:disabled),
body .theme-toggle:active,
body .ant-theme-toggle:active,
body .ant-icon-btn:active,
body .menu-item:active,
body .ant-sider-item:active {
  transform: scale(.975);
  box-shadow: var(--app-liquid-shadow-press);
}

body .ant-sider-item.active,
body .menu-item.active {
  border-color: color-mix(in srgb, var(--cui-primary) 54%, var(--app-glass-border) 46%) !important;
  background: color-mix(in srgb, var(--cui-primary) 17%, var(--app-glass-bg) 83%) !important;
  box-shadow: 0 14px 26px rgba(15, 23, 42, .19), inset 0 1px 0 rgba(255, 255, 255, .52);
}

body .ant-sider-item.active::after,
body .menu-item.active::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 6px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, #ffffff 36%, var(--cui-primary) 64%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--cui-primary) 56%, transparent);
  z-index: 1;
}

body .btn-primary,
body .ant-btn-primary,
body .btn-send,
body .btn-generate,
body .btn-save {
  background: color-mix(in srgb, var(--cui-primary) 78%, #ffffff 22%) !important;
  border-color: color-mix(in srgb, var(--cui-primary) 82%, #ffffff 18%) !important;
  color: #fff !important;
}

body .btn-primary::before,
body .ant-btn-primary::before,
body .btn-send::before,
body .btn-generate::before,
body .btn-save::before {
  opacity: .5;
}

body .btn-danger,
body .btn-delete,
body .btn-batch-danger {
  background: color-mix(in srgb, var(--cui-danger) 80%, #ffffff 20%) !important;
  border-color: color-mix(in srgb, var(--cui-danger) 82%, #ffffff 18%) !important;
  color: #fff !important;
}

body .topbar-actions .btn,
body .topbar-actions .theme-toggle,
body .topbar-actions .ant-icon-btn,
body .topbar-actions .ant-user-chip {
  min-height: 34px;
  border-radius: 999px !important;
}

body .mobile-bottom-nav .nav-item {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

body .mobile-bottom-nav .nav-item.active .nav-icon {
  transform: translateY(-1px) scale(1.08);
  transition: transform .24s var(--app-ios-ease);
}

@media (prefers-reduced-motion: reduce) {
  body .btn,
  body .ant-btn,
  body .theme-toggle,
  body .ant-theme-toggle,
  body .ant-icon-btn,
  body .menu-item,
  body .ant-sider-item {
    transition: none !important;
    animation: none !important;
  }
}

/* [2026-02-24] 修改：桌面端全局容器/表单/列表继续升级为 Liquid Glass 统一视觉 */
/* 原因：用户反馈当前仅菜单栏明显，桌面端其余区域玻璃化和动效不够“全局” */
/* 影响：桌面端卡片、列表、弹窗、输入框、表格和状态标签统一玻璃层级与丝滑反馈 */
/* 未改动：后端接口、页面路由、数据结构与业务逻辑保持不变 */
@media (min-width: 992px) {
  body {
    background-image:
      radial-gradient(1200px 620px at 8% -12%, color-mix(in srgb, var(--cui-primary) 11%, transparent), transparent 60%),
      radial-gradient(860px 520px at 102% 8%, color-mix(in srgb, #38bdf8 9%, transparent), transparent 68%);
    background-attachment: fixed;
  }

  body .ant-card,
  body .feature-card,
  body .quick-card,
  body .stat-card,
  body .upload-card,
  body .history-item,
  body .notification-item,
  body .profile-section,
  body .info-box,
  body .doc-item,
  body .evidence-item,
  body .upload-visual-item,
  body .message-bubble,
  body .evidence-preview-dialog,
  body .upload-progress-panel,
  body .modal-content,
  body .warning-box,
  body .example-box {
    border: 1px solid color-mix(in srgb, var(--app-glass-border) 88%, transparent 12%) !important;
    background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%) !important;
    box-shadow: var(--app-liquid-shadow-soft) !important;
    border-radius: 16px !important;
    backdrop-filter: saturate(1.15) blur(14px);
    -webkit-backdrop-filter: saturate(1.15) blur(14px);
    transition:
      transform .24s var(--app-ios-ease),
      box-shadow .26s var(--app-ios-ease),
      border-color .22s var(--app-ios-ease),
      background .22s var(--app-ios-ease);
  }

  body .evidence-item:hover,
  body .doc-item:hover,
  body .history-item:hover,
  body .notification-item:hover,
  body .feature-card:hover,
  body .quick-card:hover,
  body .stat-card:hover,
  body .upload-visual-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--app-liquid-shadow-float) !important;
    border-color: color-mix(in srgb, var(--cui-primary) 34%, var(--app-glass-border) 66%) !important;
  }

  body .evidence-toolbar,
  body .batch-toolbar,
  body .evidence-stats,
  body .view-toolbar,
  body .page-header,
  body .actions,
  body .hero-badges {
    border: 1px solid color-mix(in srgb, var(--app-glass-border) 84%, transparent 16%);
    background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .11);
    backdrop-filter: saturate(1.14) blur(12px);
    -webkit-backdrop-filter: saturate(1.14) blur(12px);
  }

  body input:not([type='checkbox']):not([type='radio']):not([type='file']),
  body select,
  body textarea,
  body .form-input,
  body .chat-input,
  body .ant-select,
  body .model-select {
    border: 1px solid color-mix(in srgb, var(--app-glass-border) 90%, transparent 10%) !important;
    background: color-mix(in srgb, var(--app-glass-bg) 92%, var(--cui-body-bg) 8%) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px rgba(15, 23, 42, .08) !important;
    transition: border-color .2s var(--app-ios-ease), box-shadow .2s var(--app-ios-ease), background .2s var(--app-ios-ease);
  }

  body input:not([type='checkbox']):not([type='radio']):not([type='file']):focus,
  body select:focus,
  body textarea:focus,
  body .form-input:focus,
  body .chat-input:focus,
  body .ant-select:focus,
  body .model-select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--cui-primary) 56%, var(--app-glass-border) 44%) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cui-primary) 18%, transparent), 0 10px 20px rgba(15, 23, 42, .12) !important;
  }

  body table,
  body .table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid color-mix(in srgb, var(--app-glass-border) 84%, transparent 16%) !important;
    border-radius: 14px !important;
    overflow: hidden;
    background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .1);
  }

  body .table thead th,
  body table thead th {
    background: color-mix(in srgb, var(--cui-primary) 10%, var(--app-glass-bg) 90%);
    border-bottom: 1px solid color-mix(in srgb, var(--app-glass-border) 84%, transparent 16%);
  }

  body .table tbody tr,
  body table tbody tr {
    transition: background .2s var(--app-ios-ease), transform .2s var(--app-ios-ease);
  }

  body .table tbody tr:hover,
  body table tbody tr:hover {
    background: color-mix(in srgb, var(--cui-primary) 10%, transparent);
  }

  body .badge,
  body .status-tag,
  body .model-tag,
  body .cloud-pill {
    border: 1px solid color-mix(in srgb, var(--app-glass-border) 88%, transparent 12%);
    background: color-mix(in srgb, var(--app-glass-bg) 90%, var(--cui-body-bg) 10%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42);
    border-radius: 999px;
  }

  body .evidence-preview-header,
  body .evidence-preview-detail-panel,
  body .upload-progress-header {
    background: color-mix(in srgb, var(--app-glass-bg) 92%, var(--cui-body-bg) 8%) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--app-glass-border) 88%, transparent 12%) !important;
  }

  [data-theme='dark'] body .ant-card,
  [data-theme='dark'] body .feature-card,
  [data-theme='dark'] body .quick-card,
  [data-theme='dark'] body .stat-card,
  [data-theme='dark'] body .upload-card,
  [data-theme='dark'] body .history-item,
  [data-theme='dark'] body .notification-item,
  [data-theme='dark'] body .profile-section,
  [data-theme='dark'] body .info-box,
  [data-theme='dark'] body .doc-item,
  [data-theme='dark'] body .evidence-item,
  [data-theme='dark'] body .upload-visual-item,
  [data-theme='dark'] body .message-bubble,
  [data-theme='dark'] body .evidence-preview-dialog,
  [data-theme='dark'] body .upload-progress-panel,
  [data-theme='dark'] body .modal-content,
  [data-theme='dark'] body .warning-box,
  [data-theme='dark'] body .example-box {
    background: color-mix(in srgb, var(--app-glass-bg) 92%, var(--cui-body-bg) 8%) !important;
    border-color: color-mix(in srgb, var(--app-glass-border) 84%, transparent 16%) !important;
    box-shadow: 0 14px 30px rgba(2, 6, 23, .42), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  }
}

/* [2026-02-24] 修改：Liquid Glass 全局性能优化（保留风格前提下降低渲染开销） */
/* 原因：用户反馈全站切换后视觉更统一，但部分页面滚动与首屏加载偏慢 */
/* 影响：中小屏和低性能偏好场景下自动降低 blur/阴影强度，列表滚动更流畅 */
/* 未改动：页面功能、交互逻辑、接口调用与路由保持不变 */
body .history-item,
body .evidence-item,
body .doc-item,
body .upload-visual-item,
body .notification-item {
  content-visibility: auto;
  contain-intrinsic-size: 96px;
}

@media (max-width: 1280px), (prefers-reduced-motion: reduce) {
  body .ant-card,
  body .feature-card,
  body .quick-card,
  body .stat-card,
  body .upload-card,
  body .history-item,
  body .notification-item,
  body .profile-section,
  body .info-box,
  body .doc-item,
  body .evidence-item,
  body .upload-visual-item,
  body .message-bubble,
  body .evidence-preview-dialog,
  body .upload-progress-panel,
  body .modal-content,
  body .warning-box,
  body .example-box {
    backdrop-filter: saturate(1.06) blur(8px) !important;
    -webkit-backdrop-filter: saturate(1.06) blur(8px) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .1) !important;
  }
}

@media (max-width: 991.98px) {
  body .ant-card,
  body .feature-card,
  body .quick-card,
  body .stat-card,
  body .upload-card,
  body .history-item,
  body .notification-item,
  body .profile-section,
  body .info-box,
  body .doc-item,
  body .evidence-item,
  body .upload-visual-item,
  body .message-bubble,
  body .evidence-preview-dialog,
  body .upload-progress-panel,
  body .modal-content,
  body .warning-box,
  body .example-box {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* [2026-02-24] 修改：信息可读性修复（弱化过度玻璃化，修复上传弹窗与文件详情不清晰） */
/* 原因：用户反馈浅色模式下部分文字不可读，上传进度弹窗过透明，文件详情信息辨识度低 */
/* 影响：数据密集区改用更实的背景与更高对比，上传进度条和详情面板可读性恢复 */
/* 未改动：上传流程、预览流程、接口请求与业务逻辑保持不变 */
html:not([data-theme='dark']) body .btn,
html:not([data-theme='dark']) body .ant-btn,
html:not([data-theme='dark']) body button,
html:not([data-theme='dark']) body .menu-item,
html:not([data-theme='dark']) body .ant-sider-item {
  color: #0f172a !important;
}

html:not([data-theme='dark']) body .btn-primary,
html:not([data-theme='dark']) body .ant-btn-primary,
html:not([data-theme='dark']) body .btn-danger,
html:not([data-theme='dark']) body .btn-delete,
html:not([data-theme='dark']) body .btn-batch-danger,
html:not([data-theme='dark']) body .btn-edit {
  color: #ffffff !important;
}

html:not([data-theme='dark']) body .history-list,
html:not([data-theme='dark']) body .upload-file-list.upload-visual-panel-list,
html:not([data-theme='dark']) body .upload-progress-panel.upload-visual-panel,
html:not([data-theme='dark']) body .evidence-preview-detail-panel,
html:not([data-theme='dark']) body .evidence-preview-detail-content {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #dbe3ee !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html:not([data-theme='dark']) body .upload-progress-panel.upload-visual-panel {
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22) !important;
}

html:not([data-theme='dark']) body .upload-progress-title,
html:not([data-theme='dark']) body .upload-progress-stats,
html:not([data-theme='dark']) body .upload-visual-name,
html:not([data-theme='dark']) body .upload-visual-summary-text,
html:not([data-theme='dark']) body .upload-visual-note,
html:not([data-theme='dark']) body .evidence-preview-detail-label,
html:not([data-theme='dark']) body .evidence-preview-detail-value {
  color: #0f172a !important;
}

html:not([data-theme='dark']) body .upload-visual-summary-track,
html:not([data-theme='dark']) body .upload-visual-track {
  background: #d8e2ee !important;
  border: 1px solid #cfd9e6;
}

html:not([data-theme='dark']) body .upload-visual-summary-fill,
html:not([data-theme='dark']) body .upload-visual-fill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

[data-theme='dark'] body .upload-progress-panel.upload-visual-panel,
[data-theme='dark'] body .upload-file-list.upload-visual-panel-list,
[data-theme='dark'] body .evidence-preview-detail-panel {
  background: #111827 !important;
  border-color: #334155 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-theme='dark'] body .upload-visual-summary-track,
[data-theme='dark'] body .upload-visual-track {
  background: #334155 !important;
}

/* [2026-02-24] 修改：案件空间按钮可读性兜底（浅色模式） */
/* 原因：用户反馈案件空间部分按钮文字仍发白/不可见 */
/* 影响：仅案件页按钮做高对比覆盖，确保所有操作文案可读 */
/* 未改动：按钮事件、接口请求、预览与上传业务逻辑保持不变 */
html:not([data-theme='dark']) body.app-shell .ant-btn,
html:not([data-theme='dark']) body.app-shell .btn-batch,
html:not([data-theme='dark']) body.app-shell .btn-batch-mode,
html:not([data-theme='dark']) body.app-shell .evidence-preview-action,
html:not([data-theme='dark']) body.app-shell .upload-progress-close,
html:not([data-theme='dark']) body.app-shell .upload-visual-remove {
  color: #0f172a !important;
}

html:not([data-theme='dark']) body.app-shell .ant-btn::before,
html:not([data-theme='dark']) body.app-shell .btn-batch::before,
html:not([data-theme='dark']) body.app-shell .btn-batch-mode::before,
html:not([data-theme='dark']) body.app-shell .evidence-preview-action::before {
  opacity: .42 !important;
}

html:not([data-theme='dark']) body.app-shell .ant-btn-primary,
html:not([data-theme='dark']) body.app-shell .btn-batch-danger {
  color: #ffffff !important;
}

html:not([data-theme='dark']) body.app-shell .upload-progress-panel.upload-visual-panel,
html:not([data-theme='dark']) body.app-shell .upload-progress-header,
html:not([data-theme='dark']) body.app-shell .upload-progress-title,
html:not([data-theme='dark']) body.app-shell .upload-progress-stats,
html:not([data-theme='dark']) body.app-shell .upload-progress-stats span,
html:not([data-theme='dark']) body.app-shell .upload-file-list.upload-visual-panel-list {
  color: #0f172a !important;
}

/* [2026-02-24] 修改：移除鼠标悬停时“黑边”观感（液态气泡边缘柔化） */
/* 原因：用户反馈气泡组件在 hover 时边缘出现黑框感，影响视觉一致性 */
/* 影响：按钮/卡片在 hover 时改为浅色边框与柔和阴影，不再出现黑边突兀感 */
/* 未改动：按钮点击逻辑、上传逻辑、预览逻辑和后端接口保持不变 */
html:not([data-theme='dark']) body .btn,
html:not([data-theme='dark']) body .ant-btn,
html:not([data-theme='dark']) body .menu-item,
html:not([data-theme='dark']) body .ant-sider-item,
html:not([data-theme='dark']) body .ant-card,
html:not([data-theme='dark']) body .history-item,
html:not([data-theme='dark']) body .evidence-item,
html:not([data-theme='dark']) body .doc-item,
html:not([data-theme='dark']) body .upload-visual-item {
  border-color: rgba(148, 163, 184, 0.34) !important;
}

html:not([data-theme='dark']) body .btn:hover:not(:disabled),
html:not([data-theme='dark']) body .ant-btn:hover:not(:disabled),
html:not([data-theme='dark']) body .theme-toggle:hover,
html:not([data-theme='dark']) body .ant-theme-toggle:hover,
html:not([data-theme='dark']) body .ant-icon-btn:hover,
html:not([data-theme='dark']) body .menu-item:hover,
html:not([data-theme='dark']) body .ant-sider-item:hover {
  border-color: rgba(96, 165, 250, 0.42) !important;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.56) !important;
}

html:not([data-theme='dark']) body .evidence-item:hover,
html:not([data-theme='dark']) body .doc-item:hover,
html:not([data-theme='dark']) body .history-item:hover,
html:not([data-theme='dark']) body .notification-item:hover,
html:not([data-theme='dark']) body .feature-card:hover,
html:not([data-theme='dark']) body .quick-card:hover,
html:not([data-theme='dark']) body .stat-card:hover,
html:not([data-theme='dark']) body .upload-visual-item:hover {
  border-color: rgba(96, 165, 250, 0.34) !important;
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.2) !important;
}

/* [2026-02-24] 修改：案件空间主操作按钮可见性兜底 */
/* 原因：用户反馈“上传证据”等 ant-btn-primary 在浅色模式下文案不可见 */
/* 影响：案件空间中的主按钮强制使用稳定深色背景和白字，不再受变量失效影响 */
/* 未改动：按钮点击事件、上传接口、弹窗逻辑和业务流程保持不变 */
html:not([data-theme='dark']) body.app-shell .ant-btn.ant-btn-primary,
html:not([data-theme='dark']) body.app-shell .page-header-actions .ant-btn-primary,
html:not([data-theme='dark']) body.app-shell .ant-card-extra .ant-btn-primary {
  background: #4f46e5 !important;
  border-color: #4338ca !important;
  color: #ffffff !important;
}

html:not([data-theme='dark']) body.app-shell .ant-btn.ant-btn-primary:hover:not(:disabled),
html:not([data-theme='dark']) body.app-shell .page-header-actions .ant-btn-primary:hover:not(:disabled),
html:not([data-theme='dark']) body.app-shell .ant-card-extra .ant-btn-primary:hover:not(:disabled) {
  background: #4338ca !important;
  border-color: #3730a3 !important;
  color: #ffffff !important;
}

html:not([data-theme='dark']) body.app-shell .ant-btn.ant-btn-primary span {
  color: #ffffff !important;
}

/* [2026-02-24] 修改：桌面端侧栏菜单“横跳”修复 */
/* 原因：侧栏 hover/active 叠加 transform 导致菜单项出现左右抖动感 */
/* 影响：桌面端菜单悬停保持稳定，不再出现横向跳动 */
/* 未改动：菜单高亮、链接路由与点击行为保持不变 */
@media (min-width: 992px) {
  body.device-desktop .ant-layout-body > .ant-sider .ant-sider-item,
  body .ant-layout-body > .ant-sider .ant-sider-item {
    transform: none !important;
    transition: background .2s var(--app-ios-ease), color .2s var(--app-ios-ease), border-color .2s var(--app-ios-ease), box-shadow .2s var(--app-ios-ease) !important;
  }

  body.device-desktop .ant-layout-body > .ant-sider .ant-sider-item:hover,
  body .ant-layout-body > .ant-sider .ant-sider-item:hover,
  body.device-desktop .ant-layout-body > .ant-sider .ant-sider-item:active,
  body .ant-layout-body > .ant-sider .ant-sider-item:active {
    transform: none !important;
  }
}

/* [2026-02-24] 修改：文件详情面板可读性增强（暗黑模式重点） */
/* 原因：用户反馈“文件详情”在暗黑模式下文字对比不足，关键信息难以辨认 */
/* 影响：详情面板在浅色/暗色都使用高对比文本与分隔线，信息读取更清晰 */
/* 未改动：详情面板数据来源、展示字段和交互逻辑保持不变 */
body .evidence-preview-detail-panel {
  background: #f8fafc !important;
  border: 1px solid #dbe2eb !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2) !important;
}

body .evidence-preview-detail-content {
  color: #0f172a !important;
}

body .evidence-preview-detail-row {
  padding: 0 0 9px 0;
  margin: 0 0 9px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
}

body .evidence-preview-detail-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body .evidence-preview-detail-label {
  color: #475569 !important;
  font-weight: 650 !important;
}

body .evidence-preview-detail-value {
  color: #0f172a !important;
  font-weight: 560 !important;
}

html[data-theme='dark'] body .evidence-preview-detail-panel,
html[data-coreui-theme='dark'] body .evidence-preview-detail-panel {
  background: #0f172a !important;
  border-color: #334155 !important;
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.5) !important;
}

html[data-theme='dark'] body .evidence-preview-detail-content,
html[data-coreui-theme='dark'] body .evidence-preview-detail-content {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] body .evidence-preview-detail-row,
html[data-coreui-theme='dark'] body .evidence-preview-detail-row {
  border-bottom-color: rgba(148, 163, 184, 0.34) !important;
}

html[data-theme='dark'] body .evidence-preview-detail-label,
html[data-coreui-theme='dark'] body .evidence-preview-detail-label {
  color: #93c5fd !important;
}

html[data-theme='dark'] body .evidence-preview-detail-value,
html[data-coreui-theme='dark'] body .evidence-preview-detail-value {
  color: #f8fafc !important;
}

/* [2026-02-27] 修改：新增全站路由进度条与提交中交互样式 */
/* 原因：页面跳转和提交在弱网场景缺少视觉反馈，用户容易重复点击 */
/* 影响：提供统一“正在处理”状态，提升操作确定性与交互效率 */
/* 未改动：业务逻辑、接口调用、按钮功能与权限流程保持不变 */
.global-route-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 140000;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #0ea5e9 0%, #22c55e 100%);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.45);
  transition: transform .35s ease, opacity .2s ease;
}

.global-route-progress.is-active {
  opacity: 1;
}

body.route-pending {
  cursor: progress;
}

form.is-submit-pending [type='submit'],
button.is-submit-pending,
input.is-submit-pending[type='submit'] {
  opacity: .75;
  filter: saturate(.88);
  pointer-events: none;
}

button.is-submit-pending::after,
input.is-submit-pending[type='submit']::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: submit-pending-spin .65s linear infinite;
  vertical-align: -2px;
}

@keyframes submit-pending-spin {
  to {
    transform: rotate(360deg);
  }
}
