/* =====================
   全局变量 & 重置
===================== */
:root {
  --primary: #8B1538;
  --primary-dark: #6f102c;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;

  --bg: #f6f7f9;
  --card-bg: #ffffff;
  --text-main: #2c2c2c;
  --text-muted: #666;
  --border: #e5e7eb;

  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-main);
}

.hidden { display: none !important; }

/* 兼容你之前用过的 tailwind 类（不依赖 tailwind） */
.w-full { width: 100%; }
.justify-center { justify-content: center; }

/* =====================
   登录页
===================== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #7b1333, #b01f48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 420px;
  max-width: 92vw;
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.login-logo h1 {
  margin: 0;
  text-align: center;
  font-family: "Noto Serif SC", serif;
  color: var(--primary);
  font-size: 26px;
  letter-spacing: 1px;
}

.login-logo p {
  text-align: center;
  color: #777;
  margin: 8px 0 26px;
  font-size: 14px;
}

.login-hint {
  margin-top: 16px;
  background: #fafafa;
  border: 1px dashed var(--border);
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  color: #666;
}

/* =====================
   表单
===================== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.form-input,
select.form-input,
textarea.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: #fff;
  color: var(--text-main);
}

textarea.form-input { resize: vertical; }

.form-input:focus,
select.form-input:focus,
textarea.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.12);
}

/* =====================
   按钮
===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: #f1f1f1;
  color: #333;
  border-color: #e6e6e6;
}

.btn-secondary:hover { background: #e5e5e5; }

.btn-danger {
  background: #fdecea;
  color: var(--danger);
  border-color: #f6c3bf;
}

.btn-danger:hover {
  background: #fbd7d3;
}

/* =====================
   顶部导航
===================== */
.top-nav {
  height: 64px;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-content {
  height: 100%;
  width: 100%;
  max-width: none;      /* ✅ 铺满屏幕 */
  margin: 0;            /* ✅ 不再居中留白 */
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nav-brand h1 {
  font-size: 18px;
  margin: 0;
}

.nav-brand span {
  font-size: 13px;
  opacity: 0.9;
}

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

.nav-user {
  font-size: 14px;
  opacity: 0.95;
  white-space: nowrap;
}

/* 消息按钮 */
.message-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.message-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}

/* =====================
   标签页导航
===================== */
.tab-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 40;
}

.tab-nav-content {
  width: 100%;
  max-width: none;      /* ✅ 铺满屏幕 */
  margin: 0;            /* ✅ 不再居中留白 */
  display: flex;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
}

.tab-nav-content::-webkit-scrollbar { height: 8px; }
.tab-nav-content::-webkit-scrollbar-thumb { background: #ddd; border-radius: 999px; }

.tab-btn {
  padding: 14px 16px;
  font-size: 14px;
  border: none;
  background: none;
  cursor: pointer;
  color: #555;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--primary); }

.tab-btn.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom-color: var(--primary);
}

/* =====================
   主内容区
===================== */
.main-content {
  width: 100%;
  max-width: none;      /* ✅ 铺满屏幕 */
  margin: 18px 0;       /* ✅ 只保留上下间距 */
  padding: 0 24px 60px; /* ✅ 左右留一点内边距 */
}

/* =====================
   卡片
===================== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
  overflow: hidden;
}

.card-title {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 700;
}

/* =====================
   表格（美观 & 显示稳定）
   - 容器横向滚动
   - 默认所有列 1 行省略号
   - 仅【题目】列最多 2 行（不再叠加多个补丁，统一在这里）
===================== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;     /* 字段多，保证不挤压 */
  background: #fff;
  table-layout: fixed;   /* 关键：列宽稳定，不会“忽宽忽窄” */
}

thead {
  background: #f3f4f6;
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;

  /* 默认：所有列 1 行 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* 给一点上限，避免个别列过宽（table-layout:fixed 下主要靠列宽分配） */
  max-width: 360px;
  line-height: 1.4;
}

th {
  font-weight: 700;
  color: #444;
}

tbody tr:hover {
  background: #fafafa;
}

/* 题目列：最多 2 行（命中任意一种即可生效） */
td.title-cell,
td[data-field="title"],
td[data-col="title"]{
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;

  -webkit-line-clamp: 2; /* 现有兼容写法 */
  line-clamp: 2;         /* 标准属性：加上用于减少提示/增强兼容 */

  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.45;
  max-height: calc(1.45em * 2);
  min-width: 320px;
  max-width: 520px;
}


/* 操作列/编辑按钮：始终一行 */
td.actions-cell,
td[data-col="actions"]{
  white-space: nowrap;
}

/* 表格操作按钮区域 */
.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.table-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

/* =====================
   状态标签
===================== */
.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

.status-wait { background: #eee; color: #666; }
.status-success { background: #e8f7ef; color: var(--success); }
.status-warning { background: #fff3e0; color: var(--warning); }
.status-danger { background: #fdecea; color: var(--danger); }

.status-proofing { background: #eef6ff; color: var(--info); }
.status-proof-done { background: #e8f7ef; color: var(--success); }

/* =====================
   倒计时 / 超时
===================== */
.countdown-safe { color: var(--success); font-weight: 700; }
.countdown-warn { color: var(--warning); font-weight: 800; }
.countdown-danger,
.overdue {
  color: var(--danger);
  font-weight: 900;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* =====================
   链接
===================== */
a { color: var(--info); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

.proof-link {
  font-weight: 800;
  color: var(--info);
  text-decoration: underline;
}

/* =====================
   模态弹窗（修复“显示不全”）
   - max-height + 内部滚动
===================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 18px;
}

.modal-content {
  width: 920px;
  max-width: 96vw;
  max-height: 88vh;     /* 关键：限制高度 */
  overflow: auto;       /* 关键：内容滚动 */
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
}

.close-btn:hover { color: var(--danger); }

/* =====================
   消息中心
===================== */
.messages-container {
  max-width: 1200px;
  margin: 0 auto;
}

.message-list {
  margin-top: 24px;
}

.message-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.message-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.3s;
}

.message-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--primary);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.message-item:hover::before {
  background: var(--primary);
}

.message-item.unread {
  background: linear-gradient(135deg, #fef3f2 0%, #ffffff 100%);
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.message-item.unread::before {
  background: var(--primary);
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.message-type {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  box-shadow: 0 1px 3px rgba(3, 105, 161, 0.1);
  letter-spacing: 0.3px;
}

.message-type.rating_request {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.1);
}

.message-type.assignment {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.1);
}

.message-type.revision {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  color: #9f1239;
  box-shadow: 0 1px 3px rgba(159, 18, 57, 0.1);
}

.message-type.proofread {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #6b21a8;
  box-shadow: 0 1px 3px rgba(107, 33, 168, 0.1);
}

.message-type.reform {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  color: #9a3412;
  box-shadow: 0 1px 3px rgba(154, 52, 18, 0.1);
}

.message-type.deadline {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  box-shadow: 0 1px 3px rgba(153, 27, 27, 0.1);
}

.unread-indicator {
  color: var(--danger);
  font-size: 18px;
  line-height: 1;
  margin-left: auto;
}

.message-title {
  font-weight: 600;
  font-size: 16px;
  color: #111827;
  margin-bottom: 8px;
  line-height: 1.4;
}

.message-content {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 12px;
}

.message-manuscript {
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 8px;
  font-size: 13px;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.message-time {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-time::before {
  content: '🕐';
  font-size: 14px;
}

.message-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.message-actions .btn {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 8px;
  transition: all 0.3s;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.message-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 100%);
}

.message-actions .btn-outline {
  border-width: 1.5px;
}

.message-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.message-stats-detail {
  margin-top: 30px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message-stats-detail h3 {
  font-size: 17px;
  margin-bottom: 18px;
  color: #111827;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

/* =====================
   小工具条（排序/筛选条常用容器）
===================== */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.toolbar .form-input {
  width: auto;
  min-width: 180px;
}

/* =====================
   响应式
===================== */
@media (max-width: 768px) {
  .nav-content,
  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .login-card {
    width: 92vw;
    padding: 30px 22px;
  }

  th, td { max-width: 220px; }
  table { min-width: 1100px; }
  .modal-content { width: 96vw; }
}
/* =====================================================
   PATCH：表格所有列强制一行 + 不省略 + 横向滚动查看（最终版）
   目标：
   - 所有 th/td 一律不换行
   - 不出现省略号
   - 内容完整展示（通过横向滚动查看）
===================================================== */

/* 1) 表格容器：开启横向滚动 */
.table-wrapper{
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* 2) 表格：宽度按内容撑开（关键），不要被父容器压扁 */
.table-wrapper table{
  width: max-content !important;   /* 让表格按内容自然扩展 */
  min-width: 100% !important;      /* 同时保证不比容器窄（避免很少列时难看） */
  table-layout: auto !important;   /* 不要 fixed，否则容易挤压 */
}

/* 3) 所有表头/单元格：一行展示 + 不省略 + 不断词 */
.table-wrapper th,
.table-wrapper td{
  white-space: nowrap !important;  /* 一行 */
  overflow: visible !important;    /* 不裁剪 */
  text-overflow: clip !important;  /* 不省略号 */
  max-width: none !important;      /* 取消你之前的 max-width */
  word-break: keep-all !important; /* 不拆字 */
  overflow-wrap: normal !important;/* 不强制断行 */
}

/* 4) 额外：防止某些元素（按钮/标签）把单元格撑出奇怪高度 */
.table-wrapper td .btn,
.table-wrapper td .status,
.table-wrapper td a{
  white-space: nowrap !important;
}
/* =====================================================
   Safari 兼容性补丁（修复 DevTools 提示）
   1) user-select -> -webkit-user-select
   2) backdrop-filter -> -webkit-backdrop-filter + 降级
===================================================== */

/* 1) 按钮禁止选中文本：Safari 需要 -webkit-user-select */
.btn{
  -webkit-user-select: none;   /* Safari */
  user-select: none;           /* Standard */
  -webkit-touch-callout: none; /* iOS Safari 长按不弹出菜单（可选但推荐） */
}

/* 2) 你截图提示的 backdrop-filter：Safari 需要 -webkit-backdrop-filter
   如果你是在 #stickyHScrollBar .hscroll-outer 里用的，就在 CSS 里补这一段。
   （你截图显示它在 index.html 里写了 backdrop-filter，所以这段放 CSS 里能彻底消掉提示） */
#stickyHScrollBar .hscroll-outer{
  /* 建议给半透明背景，不然 blur 可能看起来没效果 */
  background: rgba(255, 255, 255, 0.65);

  -webkit-backdrop-filter: blur(6px); /* Safari */
  backdrop-filter: blur(6px);         /* Standard */
}

/* 2.1) 降级：如果浏览器不支持 backdrop-filter，就用更实一点的背景 */
@supports not ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
  #stickyHScrollBar .hscroll-outer{
    background: rgba(255, 255, 255, 0.92);
  }
}

/* =====================================================
   FINAL SIMPLE PATCH
   表格顶部增加一个原生横向滚动条
===================================================== */

/* 顶部横向滚动条容器 */
.table-wrapper::before{
  content: "";
  display: block;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
}

/* 让顶部滚动条可滚 */
.table-wrapper::before{
  scrollbar-color: #cbd5e1 #f3f4f6;
}

/* WebKit 滚动条高度 */
.table-wrapper::before::-webkit-scrollbar{
  height: 14px;
}

/* =====================================================
   FINAL PATCH - 表格顶部横向滚动条（真实 DOM 版）
===================================================== */

.table-scroll-outer{
  width: 100%;
}

.table-scroll-top{
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
}

.table-scroll-top > div{
  height: 1px;
}

/* =====================================================
   终极样式补丁 v3.0
   - 双滚动条样式
   - 统一表格样式
   - 图标按钮优化
===================================================== */

/* 双滚动条容器 */
.table-scroll-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 0;
}

.table-scroll-bar {
  width: 100%;
  height: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
  margin-bottom: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.table-scroll-bar::-webkit-scrollbar {
  height: 14px;
}

.table-scroll-bar::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 8px;
}

.table-scroll-bar::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
  border-radius: 8px;
  border: 2px solid #f0f0f0;
}

.table-scroll-bar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #a0a0a0, #808080);
}

.scroll-bar-inner {
  height: 1px;
  pointer-events: none;
}

/* 表格容器 */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: white;
}

.table-wrapper::-webkit-scrollbar {
  height: 14px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
  border-radius: 8px;
  border: 2px solid #f0f0f0;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #a0a0a0, #808080);
}

/* 表格样式 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.data-table thead {
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-size: 13px;
}

.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  font-size: 13px;
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.data-table tbody tr.dragging {
  opacity: 0.4;
  background: #e3f2fd;
}

/* 图标按钮（✏️编辑按钮） */
.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.7;
}

.icon-btn:hover {
  transform: scale(1.2);
  opacity: 1;
}

.icon-btn:active {
  transform: scale(0.95);
}

/* 操作列 */
.action-cell {
  text-align: center;
  padding: 8px !important;
}

/* 拖动手柄 */
.drag-handle {
  cursor: move;
  text-align: center;
  color: #999;
  font-size: 16px;
  user-select: none;
}

.drag-handle:hover {
  color: #333;
}

/* 卡片头部带检索 */
.card-header-with-search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

.card-header-with-search .card-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

/* 检索框 */
.search-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input {
  width: 280px;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
}

.search-input:focus {
  border-color: #4CAF50;
outline: none;
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-btn {
padding: 8px 16px;
background: #4CAF50;
color: white;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
}

.search-btn:hover {
background: #45a049;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.search-btn:active {
transform: translateY(0);
}

/* 工具栏 */
.toolbar {
display: flex;
gap: 10px;
margin-bottom: 16px;
flex-wrap: wrap;
}

/* 期数分组 */
.issue-section {
margin-bottom: 32px;
}

.issue-header {
font-size: 16px;
font-weight: 700;
padding: 12px 16px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 8px;
margin-bottom: 12px;
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 快捷面板 */
.quick-panels {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 24px;
}

.quick-panel {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 12px;
padding: 16px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.panel-title {
font-size: 15px;
font-weight: 700;
margin-bottom: 12px;
color: #2c3e50;
padding-bottom: 8px;
border-bottom: 2px solid #e9ecef;
}

.panel-content {
display: flex;
flex-direction: column;
gap: 8px;
}

.panel-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background: white;
border: 1px solid #e9ecef;
border-radius: 6px;
transition: all 0.2s;
}

.panel-row:hover {
background: #f1f3f5;
border-color: #4CAF50;
transform: translateX(2px);
}

.panel-label {
font-weight: 600;
color: #495057;
}

.panel-empty {
text-align: center;
color: #adb5bd;
padding: 20px;
font-size: 13px;
}

/* 按钮尺寸 */
.btn-sm {
padding: 6px 12px;
font-size: 13px;
border-radius: 5px;
}

/* 状态徽章 */
.status-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}

.status-success {
background: #d4edda;
color: #155724;
}

.status-warning {
background: #fff3cd;
color: #856404;
}

.status-danger {
background: #f8d7da;
color: #721c24;
}

.status-info {
background: #d1ecf1;
color: #0c5460;
}

.status-default {
background: #e9ecef;
color: #495057;
}

/* 链接按钮 */
.link-btn {
color: #007bff;
text-decoration: none;
font-weight: 600;
transition: all 0.2s;
}

.link-btn:hover {
color: #0056b3;
text-decoration: underline;
}

/* 表单控件 */
.form-select {
padding: 6px 10px;
border: 1px solid #ced4da;
border-radius: 5px;
font-size: 13px;
background: white;
cursor: pointer;
transition: border-color 0.2s;
}

.form-select:hover {
border-color: #4CAF50;
}

.form-select:focus {
border-color: #4CAF50;
outline: none;
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-select.compact {
min-width: 120px;
max-width: 180px;
}

/* 空状态 */
.empty-state, .empty-cell {
text-align: center;
padding: 40px 20px;
color: #adb5bd;
font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
.quick-panels {
grid-template-columns: 1fr;
}

.search-input {
width: 200px;
}
}

@media (max-width: 768px) {
.card-header-with-search {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}

.search-box {
width: 100%;
}

.search-input {
flex: 1;
}
}

/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.issue-section {
animation: fadeIn 0.3s ease;
}

/* 确保所有页面样式一致 */
#tabContent .card {
background: white;
border-radius: 12px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 打印样式优化 */
@media print {
.search-box,
.toolbar,
.icon-btn,
.drag-handle,
.quick-panels {
display: none !important;
}

.table-scroll-bar {
display: none !important;
}

.table-wrapper {
overflow: visible !important;
border: none !important;
}
}


/* 本文编辑工作台补充样式 */

/* 截止日期徽章 */
.deadline-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #ff6b6b;
  color: white;
  margin-left: 8px;
}

.deadline-overdue {
  color: #d32f2f;
  font-weight: 700;
  animation: pulse 1.5s ease-in-out infinite;
}

.deadline-urgent {
  color: #f57c00;
  font-weight: 700;
}

.deadline-normal {
  color: #388e3c;
  font-weight: 600;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 紧急面板行 */
.panel-urgent {
  border-left: 3px solid #f44336;
  background: #ffebee;
}

.panel-urgent:hover {
  background: #ffcdd2;
}

/* 高亮行（待处理） */
.row-highlight {
  background: #fff9e6 !important;
  border-left: 3px solid #ffa726;
}

.row-highlight:hover {
  background: #fff3d1 !important;
}

/* 快捷面板（如果之前没有） */
.quick-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.quick-panel {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #2c3e50;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  transition: all 0.2s;
}

.panel-row:hover {
  background: #f1f3f5;
  border-color: #4CAF50;
  transform: translateX(2px);
}

.panel-label {
  font-weight: 600;
  color: #495057;
}

.panel-empty {
  text-align: center;
  color: #adb5bd;
  padding: 20px;
  font-size: 13px;
}

/* 响应式调整 */
@media (max-width: 1400px) {
  .quick-panels {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .quick-panels {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   聚类功能完整样式 v4.0
===================================================== */

/* 筛选容器 */
.filter-bar-container {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

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

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

/* 排序行 */
.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 筛选网格 */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.form-select.compact {
  padding: 6px 10px;
  font-size: 13px;
}

/* 筛选操作按钮 */
.filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: #6c757d;
  font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 1400px) {
  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .advanced-filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .advanced-filters-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    flex-direction: column;
  }
}

/* 按钮样式优化 */
.btn-info {
  background: #17a2b8;
  color: white;
  border: none;
}

.btn-info:hover {
  background: #138496;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* 滚动条美化 */
.advanced-filters-grid::-webkit-scrollbar {
  width: 8px;
}

.advanced-filters-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.advanced-filters-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.advanced-filters-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* =====================================================
   补丁 v5.4 - 样式修复
   1. 隐藏下方滚动条
   2. 编辑弹窗垂直布局
===================================================== */

/* 隐藏表格容器的底部滚动条 */
.table-wrapper {
  width: 100%;
  overflow-x: hidden !important; /* 强制隐藏底部滚动条 */
  overflow-y: visible;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: white;
}

/* 保持顶部滚动条样式 */
.table-scroll-bar {
  width: 100%;
  height: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
  margin-bottom: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.table-scroll-bar::-webkit-scrollbar {
  height: 14px;
}

.table-scroll-bar::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 8px;
}

.table-scroll-bar::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
  border-radius: 8px;
  border: 2px solid #f0f0f0;
}

.table-scroll-bar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #a0a0a0, #808080);
}

.scroll-bar-inner {
  height: 1px;
  pointer-events: none;
}

/* 编辑弹窗垂直布局 */
.modal-vertical-layout {
  max-width: 700px;
  width: 95%;
}

.modal-body-vertical {
  max-height: 70vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-body-vertical .form-group {
  margin-bottom: 16px;
}

.modal-body-vertical .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 6px;
}

.modal-body-vertical .form-label .required {
  color: #dc3545;
}

.modal-body-vertical .form-input,
.modal-body-vertical .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-body-vertical .form-input:focus,
.modal-body-vertical .form-select:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-body-vertical textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

/* 优化滚动条样式 */
.modal-body-vertical::-webkit-scrollbar {
  width: 10px;
}

.modal-body-vertical::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.modal-body-vertical::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.modal-body-vertical::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .modal-vertical-layout {
    width: 98%;
    max-width: none;
  }

  .modal-body-vertical {
    max-height: 65vh;
    padding: 16px;
  }
}

/* =====================================================
   期数管理UI样式 (从 issue_management.css 合并)
   版本: V3.0
   日期: 2025-12-26
   ===================================================== */

/* 页面容器 */
.issue-management-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 页面标题区 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: #2c3e50;
}

.page-subtitle {
  margin: 5px 0 0 0;
  font-size: 14px;
  color: #7f8c8d;
}

/* 表格容器 */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #95a5a6;
}

.empty-state p:first-child {
  font-size: 48px;
  margin: 0 0 10px 0;
}

.text-muted {
  color: #95a5a6;
  font-size: 14px;
}

/* 进度条 */
.progress-bar-container {
  position: relative;
  width: 100%;
  height: 24px;
  background-color: #ecf0f1;
  border-radius: 12px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  transition: width 0.3s ease;
  border-radius: 12px;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
  color: #2c3e50;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

/* 描述单元格 */
.description-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 按钮组 */
.btn-group {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.icon-btn.danger:hover {
  border-color: #e74c3c;
  background: #fee;
}

/* 徽章 */
.badge-info {
  background-color: #d6eaf8;
  color: #2471a3;
}

.badge-warning {
  background-color: #fef5e7;
  color: #d68910;
}

.badge-primary {
  background-color: #e8daef;
  color: #7d3c98;
}

.badge-success {
  background-color: #d5f4e6;
  color: #1e8449;
}

.badge-secondary {
  background-color: #e5e7e9;
  color: #5d6d7e;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
}

.form-label.required::after {
  content: ' *';
  color: #e74c3c;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #95a5a6;
}

.form-static {
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #7f8c8d;
}

/* 响应式 */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .modal-dialog {
    width: 95%;
    max-height: 95vh;
  }

  .btn-group {
    flex-wrap: wrap;
  }
}

/* =====================================================
   数据总览页面样式 - 统计卡片和任务卡片
   ===================================================== */

/* 总览容器 */
.overview-container {
  padding: 10px 0;
}

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

/* 统计卡片 */
.stat-card {
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 42px;
  margin-bottom: 14px;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

/* 任务卡片 */
.task-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  cursor: pointer;
}

.task-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateX(4px);
}

.task-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-right: 18px;
  flex-shrink: 0;
}

.task-info {
  flex: 1;
}

.task-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 500;
}

.task-count {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

/* 区域标题 */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 28px 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .stats-grid[style*="repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .stats-grid[style*="repeat(4"],
  .stats-grid[style*="repeat(2"] {
    grid-template-columns: 1fr !important;
  }

  .stat-card {
    padding: 22px 18px;
  }

  .stat-icon {
    font-size: 36px;
  }

  .stat-number {
    font-size: 30px;
  }

  .task-card {
    padding: 16px;
  }

  .task-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .task-count {
    font-size: 26px;
  }
}
