/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

/* ===== Layout ===== */
.app-header {
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
.app-header h1 { font-size: 18px; font-weight: 600; }
.app-header .user-info { font-size: 14px; opacity: 0.8; }
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}
.nav-backdrop { display: none; }

.app-nav {
  background: #16213e;
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 200px;
  padding: 16px 0;
  overflow-y: auto;
}
.app-nav a {
  display: block;
  padding: 12px 24px;
  color: #a0aec0;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.app-nav a:hover, .app-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.05);
  border-left-color: #4a90d9;
}

.app-content {
  margin-left: 200px;
  margin-top: 56px;
  padding: 24px;
  min-height: calc(100vh - 56px);
}

/* ===== Cards ===== */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.card-header h2 { font-size: 16px; font-weight: 600; color: #1a1a2e; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: #4a90d9; color: #fff; }
.btn-primary:hover { background: #357abd; }
.btn-success { background: #48bb78; color: #fff; }
.btn-success:hover { background: #38a169; }
.btn-danger { background: #e53e3e; color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-warning { background: #dd6b20; color: #fff; }
.btn-warning:hover { background: #c05621; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-outline {
  background: transparent;
  border: 1px solid #4a90d9;
  color: #4a90d9;
}
.btn-outline:hover { background: #4a90d9; color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: #4a90d9; }
.btn-cancel { background: #edf2f7; color: #4a5568; }
.btn-cancel:hover { background: #e2e8f0; color: #2d3748; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 16px; }
.tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  color: #718096;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab:hover { color: #4a90d9; }
.tab.active { color: #4a90d9; font-weight: 600; border-bottom-color: #4a90d9; }

/* ===== Filter Bar ===== */
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .form-control { width: auto; min-width: 200px; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}
.page-info { font-size: 13px; color: #718096; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #4a5568;
}
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74,144,217,0.1);
}
/* 占位文字弱化：比正文更小更浅，聚焦时再淡一些，避免与已填内容混淆 */
.form-control::placeholder { color: #a0aec0; font-size: 13px; opacity: 1; }
.form-control:focus::placeholder { color: #cbd5e0; }
textarea.form-control { resize: vertical; min-height: 60px; }

/* ===== Tables ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.table th {
  background: #f7fafc;
  font-weight: 600;
  color: #4a5568;
  font-size: 13px;
  text-transform: uppercase;
}
.table tr:hover { background: #f7fafc; }
/* 外层包一个滚动容器：表格自身保持 table 布局（列对齐），窄屏时由容器横向滑动 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 操作列吸附右侧：不用划到最右就能点按钮（手机端尤其重要） */
.table th.col-action, .table td.col-action {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -8px 0 8px -8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}
.table th.col-action { background: #f7fafc; }
.table tr:hover td.col-action { background: #f7fafc; }

/* ===== Status Badges ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: #c6f6d5; color: #276749; }
.badge-warning { background: #fefcbf; color: #975a16; }
.badge-danger { background: #fed7d7; color: #9b2c2c; }
.badge-info { background: #bee3f8; color: #2a4365; }
.badge-default { background: #e2e8f0; color: #4a5568; }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 8px;
  padding: 0 24px 24px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 -24px 20px;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.modal-header h3 { font-size: 18px; }
/* 关闭按钮是弹窗的唯一退路（点遮罩不再关闭），因此做得明显一些，并给足移动端点击区域 */
.modal-close {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 34px;
  flex: 0 0 36px;
  text-align: center;
  font-size: 22px;
  cursor: pointer;
  color: #718096;
}
.modal-close:hover { color: #fff; background: #e53e3e; border-color: #e53e3e; }
/* 误点遮罩时的轻微抖动，提示“这里点不会关闭” */
@keyframes modalShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.shake { animation: modalShake 0.35s ease; }
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ===== 单选组（采购金额区间等二选一场景）：一行并排，窄屏自动换行 ===== */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.radio-item {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.radio-item:hover { border-color: #4a90d9; }
.radio-item.selected { border-color: #4a90d9; background: rgba(74, 144, 217, 0.07); }
.radio-item input[type="radio"] { flex: none; margin: 0; accent-color: #4a90d9; }
.radio-item > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.4; }
.radio-item strong { font-size: 14px; font-weight: 600; color: #1a202c; }
.radio-item small { font-size: 12px; color: #718096; }

/* ===== Confirm Dialog (自定义二次确认) ===== */
.confirm-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 600;
  justify-content: center;
  align-items: center;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  padding: 28px 24px 20px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  border-top: 6px solid #4a90d9;
  animation: confirmPop 0.22s ease;
}
.confirm-box.confirm-success { border-top-color: #48bb78; }
.confirm-box.confirm-danger { border-top-color: #e53e3e; }
.confirm-box.confirm-warning { border-top-color: #dd6b20; }
@keyframes confirmPop {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.confirm-icon {
  width: 64px;
  height: 64px;
  line-height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  font-size: 34px;
}
.confirm-success .confirm-icon { background: rgba(72,187,120,0.14); }
.confirm-danger .confirm-icon { background: rgba(229,62,62,0.14); }
.confirm-warning .confirm-icon { background: rgba(221,107,32,0.14); }
.confirm-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; color: #1a202c; }
.confirm-danger .confirm-title { color: #c53030; }
.confirm-success .confirm-title { color: #2f855a; }
.confirm-message {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 22px;
  text-align: left;
  word-break: break-word;
}
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions .btn { flex: 1; justify-content: center; padding: 10px 0; font-size: 15px; }
/* 自定义输入弹窗（取代原生 prompt）内的输入框 */
.confirm-input { margin-top: 12px; text-align: left; }

/* ===== Progress Bar ===== */
.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #4a90d9, #48bb78);
  border-radius: 4px;
  transition: width 0.3s;
}

/* ===== 采购详情概要（一行信息块 + 一行进度条，取代旧版 8 行 label） ===== */
.proc-summary { margin-bottom: 16px; }
.proc-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 12px; color: #718096; }
.proc-chips .chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 12px; white-space: nowrap; }
.proc-chips .chip b { color: #2d3748; font-weight: 600; }
.proc-chips .chip .badge { font-size: 11px; padding: 0 6px; }
.proc-chips .chip-warn { background: #fefcbf; border-color: #d69e2e; color: #975a16; font-weight: 600; }
.proc-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.proc-progress .progress-bar { flex: 1; margin: 0; }
.proc-percent { font-size: 12px; color: #718096; white-space: nowrap; }

/* ===== 进度看板（分段进度条 + 延期黄色警告） ===== */
.board-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: 12px; color: #718096; }
.board-legend span { display: inline-flex; align-items: center; gap: 4px; }
.seg-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.board-row { padding: 14px 0; border-bottom: 1px solid #edf2f7; cursor: pointer; }
.board-row:hover { background: #f7fafc; }
/* 有延期环节的单子左侧加一条黄色标尺，列表扫一眼就能看到 */
.board-row-overdue { border-left: 3px solid #d69e2e; padding-left: 10px; margin-left: -13px; }
.board-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.board-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-project { color: #4a90d9; font-weight: 600; font-size: 13px; }
.board-side { display: flex; align-items: baseline; gap: 12px; font-size: 13px; color: #718096; }
.board-progress { font-weight: 600; color: #2d3748; }
.board-elapsed { white-space: nowrap; }
.board-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #718096; margin: 6px 0 8px; }
.board-warn { color: #b7791f; font-weight: 600; }
.board-delayed { color: #d69e2e; }
.board-tip { font-size: 12px; color: #718096; margin-top: 12px; }
/* 规则说明（只给桌面看，窄屏隐藏以多留几行给列表） */
.board-note { font-size: 12px; color: #a0aec0; margin: 0 0 12px; }

.seg-list { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.seg {
  flex: 1 0 auto;
  min-width: 72px;
  max-width: 150px;
  border-radius: 4px;
  padding: 6px;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  border: 1px solid transparent;
}
.seg-name { display: block; word-break: break-all; }
.seg-days { display: block; font-size: 11px; opacity: 0.9; }
.seg-completed { background: #48bb78; }
.seg-processing { background: #4a90d9; }
/* 正在延期：黄色警告色 + 描边，色弱也能分辨 */
.seg-overdue { background: #d69e2e; border-color: #b7791f; box-shadow: 0 0 0 2px rgba(214, 158, 46, 0.25); }
/* 延期完成：浅黄留痕，与“当前卡住”的亮黄区分 */
.seg-delayed { background: #feebc8; color: #975a16; }
.seg-pending { background: #edf2f7; color: #718096; }
.seg-skipped { background: #e2e8f0; color: #a0aec0; }
.seg-rejected { background: #e53e3e; }

/* ===== Workflow Timeline ===== */
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #fff;
}
.timeline-item.completed::before {
  background: #48bb78;
  border-color: #48bb78;
}
.timeline-item.processing::before {
  background: #4a90d9;
  border-color: #4a90d9;
  animation: pulse 1.5s infinite;
}
.timeline-item.skipped::before {
  background: #e2e8f0;
  border-color: #e2e8f0;
}
.timeline-item.rejected::before {
  background: #e53e3e;
  border-color: #e53e3e;
}
.timeline-item .node-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.timeline-item .node-name { font-weight: 600; font-size: 14px; }
/* 处理人与时间换行成第二行，避开旧版一行内用 | 拼接导致的挤成一团 */
.timeline-item .node-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 5px; font-size: 12px; color: #718096; }
.timeline-item .node-remark { margin-top: 6px; font-size: 12px; color: #4a5568; background: #f7fafc; border-left: 2px solid #e2e8f0; border-radius: 0 4px 4px 0; padding: 4px 8px; word-break: break-all; }
/* 延期一律黄色告警系（时间线与列表共用）：正在延期用描边强调，延期完成只做浅黄留痕 */
.delay-tag { display: inline-block; padding: 0 8px; border: 1px solid #d69e2e; border-radius: 10px; background: #fefcbf; color: #975a16; font-size: 12px; font-weight: 600; white-space: nowrap; }
.delay-tag.light { border-color: transparent; background: #feebc8; font-weight: 400; }
.timeline-item.overdue::before { background: #d69e2e; border-color: #d69e2e; animation: pulseWarn 1.5s infinite; }

@keyframes pulseWarn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214, 158, 46, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(214, 158, 46, 0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,144,217,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(74,144,217,0); }
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #1a1a2e; }
.stat-card .stat-label { font-size: 13px; color: #718096; margin-top: 4px; }

/* ===== Role Selector ===== */
.role-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 8px;
}
.role-selector .role-label {
  font-size: 13px;
  font-weight: 500;
  min-width: 80px;
  color: #4a5568;
}
.role-selector .role-user {
  flex: 1;
  font-size: 14px;
  color: #1a1a2e;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .app-header { padding: 0 12px; }
  .app-header h1 { font-size: 16px; }
  .app-header .user-info { font-size: 12px; }

  /* 侧栏改为抽屉，默认收起，点击汉堡滑出 */
  .app-nav {
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 160;
    box-shadow: 2px 0 12px rgba(0,0,0,0.25);
  }
  body.nav-open .app-nav { transform: translateX(0); }
  .nav-backdrop {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 150;
  }
  body.nav-open .nav-backdrop { display: block; }

  .app-content { margin-left: 0; padding: 12px; }

  .card { padding: 12px; margin-bottom: 12px; }
  .card-header { flex-wrap: wrap; gap: 8px; }
  .card-header h2 { font-size: 15px; }

  /* 表格：改为“外层容器横向滚动 + 操作列吸附右侧”，不再把 table 自身变成 block
     （那样每一行会各自成一个表，列宽对不齐，sticky 也失效） */
  .table { width: max-content; min-width: 100%; }
  .table th, .table td { padding: 8px 10px; white-space: nowrap; }
  /* 操作列窄屏限宽并竖排按钮，避免两个并排把小屏占掉一半 */
  .table th.col-action, .table td.col-action { width: 1%; max-width: 92px; padding: 8px 6px; }
  .table td.col-action .btn { display: block; margin: 2px 0; }

  /* 筛选区是手机版的空间大户：压成两行小控件（下拉 + 重置 / 输入框 + 查询），
     靠 order 把第二个按钮提到输入框前面，不用改各页面的 DOM 结构 */
  .filter-bar { gap: 6px; margin-bottom: 10px; }
  .filter-bar .form-control { min-width: 0; width: auto; flex: 1 1 calc(100% - 62px); padding: 5px 8px; font-size: 13px; }
  .filter-bar .form-control::placeholder { font-size: 12px; }
  .filter-bar select.form-control { order: 1; }
  .filter-bar input.form-control { order: 3; }
  .filter-bar .btn { order: 4; flex: 0 0 auto; padding: 5px 10px; font-size: 13px; }
  .filter-bar .btn + .btn { order: 2; }

  /* tab 带计数后容易撑破窄屏，改成局部横向滑动 */
  .tabs { gap: 0; margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { padding: 7px 12px; font-size: 13px; white-space: nowrap; }

  .pagination { justify-content: center; gap: 8px; flex-wrap: wrap; }

  .modal {
    width: 96%;
    max-width: none;
    padding: 0 12px 14px;
    max-height: 92vh;
  }
  .modal-header { margin: 0 -12px 12px; padding: 12px; }
  /* 详情头部徽章与时间线再缩一号，多留几行给流程列表 */
  .proc-chips { gap: 4px 6px; }
  .proc-chips .chip { padding: 2px 7px; }
  .proc-summary { margin-bottom: 12px; }
  .timeline-item .node-meta { gap: 2px 10px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
  .stat-card { padding: 10px 12px; }
  .stat-card .stat-value { font-size: 20px; }

  .timeline { padding-left: 24px; }

  /* 看板：窄屏下标题与进度换行堆叠，分段保持横向滑动；说明文字让位给数据 */
  .board-row-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .board-side { width: 100%; justify-content: space-between; }
  .board-row-overdue { margin-left: 0; }
  .seg { min-width: 64px; font-size: 11px; padding: 5px 4px; }
  .board-legend { gap: 8px; }
  .board-note { display: none; }

  .toast-container { top: 64px; left: 12px; right: 12px; }
  .toast { font-size: 13px; }
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 300;
}
.toast {
  background: #fff;
  border-radius: 6px;
  padding: 12px 20px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid #4a90d9;
}
.toast.success { border-left-color: #48bb78; }
.toast.error { border-left-color: #e53e3e; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #a0aec0;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== 列表延期标记 ===== */
/* 延期标签复用上面的 .delay-tag；未超期与无截止时间的单元格保持空白 */
.table .delay-tag { margin: 1px 0; }

/* ===== Login Overlay (含无权限拦截) ===== */
.login-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  z-index: 700; /* 高于弹窗，保证未登录/无权限时无法操作任何业务内容 */
  justify-content: center;
  align-items: center;
}
.login-overlay.show { display: flex; }
.login-box {
  background: #fff;
  border-radius: 12px;
  padding: 40px 32px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-box .login-icon { font-size: 44px; margin-bottom: 8px; }
.login-box h2 { font-size: 18px; color: #1a1a2e; margin-bottom: 12px; }
.login-box p { font-size: 14px; color: #718096; margin-bottom: 20px; word-break: break-all; }
.login-box .login-tip {
  font-size: 12px;
  color: #a0aec0;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
  line-height: 1.6;
}
/* 无权限状态：标题区标红，避免与“登录中”混淆 */
.login-overlay.denied .login-box { border-top: 4px solid #e53e3e; }
.login-overlay.denied .login-box h2 { color: #c53030; }
.login-overlay.denied .login-box .login-icon { filter: grayscale(0.2); }

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 24px;
  color: #718096;
}
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: #4a90d9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
