/* ============================================================
   订单智能统计系统 · 苹果风 AI 工作台 UI
   - 蓝白银渐变背景 + 玻璃拟态卡片
   - 左侧固定 sidebar，右侧主工作区
   - 圆角、柔和发光、SF 系字体
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --bg-base: #eef2f9;
  /* 蓝白银三段渐变，模拟天空玻璃感 */
  --bg-grad: linear-gradient(135deg, #dbe6ff 0%, #f1f4ff 30%, #fafbff 55%, #e8eef9 80%, #dde6f3 100%);

  --primary: #5b6cff;
  --primary-2: #7b8cff;
  --primary-soft: rgba(91, 108, 255, 0.10);
  --primary-strong: rgba(91, 108, 255, 0.18);

  --text: #0f172a;
  --text-mute: #64748b;
  --text-dim: #94a3b8;

  --line: rgba(255, 255, 255, 0.7);
  --line-dark: rgba(15, 23, 42, 0.06);
  --hairline: rgba(255, 255, 255, 0.55);

  /* macOS Sequoia 液态玻璃配方 */
  --glass-bg: linear-gradient(180deg,
              rgba(255,255,255,0.78) 0%,
              rgba(255,255,255,0.55) 50%,
              rgba(255,255,255,0.65) 100%);
  --glass-bg-strong: linear-gradient(180deg,
              rgba(255,255,255,0.92) 0%,
              rgba(255,255,255,0.78) 100%);
  --glass-bg-inner: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: saturate(200%) blur(30px);

  /* 多层阴影模拟玻璃悬浮感 */
  --glass-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
    0 -1px 0 rgba(15, 23, 42, 0.04) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.10),
    0 28px 60px rgba(15, 23, 42, 0.06);

  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 11px;
  --r-xs: 8px;

  --side-w: 240px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  background: var(--bg-grad);
  overflow-x: hidden;
}

/* ---- 背景柔光球（更大更柔，模拟环境光透过玻璃）---- */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.7; }
.orb-1 { width: 560px; height: 560px; left: -120px; top: -160px;
         background: radial-gradient(circle, #b9c8ff 0%, transparent 70%); }
.orb-2 { width: 640px; height: 640px; right: -200px; top: 20%;
         background: radial-gradient(circle, #ffd2ec 0%, transparent 70%); opacity: 0.45; }
.orb-3 { width: 520px; height: 520px; left: 25%; bottom: -220px;
         background: radial-gradient(circle, #c5d8ff 0%, transparent 70%); }
.orb-4 { width: 380px; height: 380px; right: 20%; top: 5%;
         background: radial-gradient(circle, #e5f1ff 0%, transparent 70%); opacity: 0.5; }

/* ---- macOS 液态玻璃通用 ---- */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
/* 顶部高光镜面层 */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 35%),
    radial-gradient(120% 60% at 50% -20%, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}
/* 内层细描边（双层 hairline 模拟玻璃边缘折射）*/
.glass::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.glass > * { position: relative; z-index: 1; }

.glass-inner {
  position: relative;
  background: var(--glass-bg-inner);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-md);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: calc(100vh - 24px);
  padding: 20px 16px;
  margin: 12px 0 12px 12px;
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex; align-items: center; gap: 12px; padding: 4px 4px 18px;
}
.brand-mark {
  width: 44px; height: 44px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(91, 108, 255, 0.35));
}
.brand-title { font-weight: 700; letter-spacing: 0.2px; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--text-dim); margin-top: 1px; letter-spacing: 0.5px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-mute);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.55); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-strong));
  color: var(--primary);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -2px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #5b6cff, #9ca8ff);
}
/* SVG 图标统一规格：18×18，等粗描线，跟文字色一致 */
.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: block;
  color: currentColor;
  opacity: 0.85;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }
.nav-label { letter-spacing: 0.2px; }
.nav-divider { height: 1px; background: var(--line-dark); margin: 10px 4px; }

/* ---- 侧栏次级操作按钮（通知中心 / 导出 Excel） ---- */
.side-actions {
  padding: 6px 0;
  margin-top: 14px;
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.side-action-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-mute);
  font-family: inherit;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}
.side-action-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

.btn-soft {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.12), rgba(91, 108, 255, 0.18));
  color: var(--primary);
  border: 1px solid rgba(91, 108, 255, 0.18);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-soft:hover {
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.18), rgba(91, 108, 255, 0.26));
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(91, 108, 255, 0.24);
}

/* ---- 用户卡片 ---- */
.user-block { margin-top: auto; padding-top: 12px; position: relative; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6473ff, #9ca8ff);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 3px 10px rgba(91, 108, 255, 0.3);
  overflow: hidden;
}
.user-avatar.user-avatar--img { background: none; box-shadow: 0 3px 10px rgba(15,23,42,0.18); }
.user-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* 头像修改弹窗 */
.avatar-preview {
  width: 120px; height: 120px; border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #6473ff, #9ca8ff);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 48px;
  box-shadow: 0 6px 20px rgba(15,23,42,0.18);
  border: 3px solid rgba(255,255,255,0.7);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview .avatar-fallback { width:100%; height:100%; display:grid; place-items:center; }
#avatar-modal-body.avatar-drag-over {
  background: rgba(91,108,255,0.10);
  box-shadow: 0 0 0 3px rgba(91,108,255,0.12) inset;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; line-height: 1.2;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.user-popover {
  position: absolute; left: 0; right: 0; bottom: 84px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
}
.user-popover button {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; font-size: 13px;
  color: var(--text);
  background: transparent;
  border: 0; border-radius: var(--r-xs);
  cursor: pointer;
}
.user-popover button:hover { background: var(--primary-soft); color: var(--primary); }

.icon-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  border-radius: 8px;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 18px;
}
.icon-btn:hover { background: rgba(15, 23, 42, 0.06); color: var(--text); }

/* ============================================================
   主工作区
   ============================================================ */
.workspace {
  position: relative;
  z-index: 1;
  padding: 24px 32px 60px;
  max-width: 100%;
  overflow-x: hidden;
}

/* ---- 卡片（液态玻璃）---- */
.card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 18px;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 30%),
    radial-gradient(140% 60% at 50% -20%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
  z-index: 0;
}
.card > * { position: relative; z-index: 1; }
.card h2 {
  font-size: 16px; font-weight: 700; color: var(--text);
  letter-spacing: 0.1px; margin-bottom: 4px;
}
.card h3 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 14px;
}
.hint { color: var(--text-mute); font-size: 13px; margin-bottom: 14px; }
.muted { color: var(--text-dim); }

/* ---- 表单元素 ---- */
textarea, input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  color: var(--text);
}
textarea {
  min-height: 130px; resize: vertical; line-height: 1.55;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.14);
}
input:disabled, textarea:disabled, select:disabled {
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-mute);
  cursor: not-allowed;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.row {
  display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap;
}
.row select { width: 200px; }

/* ---- 按钮 ---- */
button {
  cursor: pointer;
  border: 0;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  font-family: inherit;
  transition: all 0.18s ease;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: linear-gradient(135deg, #5b6cff, #7b8cff);
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 108, 255, 0.32);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(91, 108, 255, 0.42); }
.btn-secondary {
  background: rgba(91, 108, 255, 0.10);
  color: var(--primary);
  border: 1px solid rgba(91, 108, 255, 0.16);
}
.btn-secondary:hover { background: rgba(91, 108, 255, 0.18); }
.btn-ghost {
  background: transparent; color: var(--text-mute);
  padding: 9px 14px;
}
.btn-ghost:hover { background: rgba(15, 23, 42, 0.05); color: var(--text); }
.btn-danger {
  background: rgba(239, 68, 68, 0.10);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.16);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.18); }

button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- 预览卡片（消息录入） ---- */
#preview-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.preview-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
}
.preview-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.badge {
  background: var(--primary); color: #fff; padding: 3px 11px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.5px;
}
.badge.作业 { background: linear-gradient(135deg, #4f7cff, #6b94ff); }
.badge.论文 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.badge.全包 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.type-switch { width: 140px; }
.raw-msg {
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(15, 23, 42, 0.12);
  padding: 9px 13px;
  border-radius: var(--r-xs);
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 12px;
  white-space: pre-wrap;
  max-height: 80px;
  overflow-y: auto;
}
.fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.field-item label {
  display: block; font-size: 11.5px; color: var(--text-mute);
  margin-bottom: 4px; font-weight: 500; letter-spacing: 0.3px;
}
.field-item input, .field-item select { padding: 8px 12px; font-size: 13px; }
.field-item.long { grid-column: 1 / -1; }

/* ---- 订单/用户/日志列表 ---- */
.filters {
  display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap;
}
.filters select { width: 150px; }
.filters input[type="text"] { width: 240px; }
.spacer { flex: 1; }

/* ---- 订单管理页：统一规整版式 ---- */
.records-card { padding: 20px 22px; }
.records-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.records-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.records-title h2 { font-size: 17px; font-weight: 600; margin: 0; }
.records-summary { font-size: 12.5px; display: inline-flex; gap: 12px; align-items: center; }
.records-summary #total-amount-info {
  font-weight: 600; color: var(--primary); font-size: 12.5px;
}
.records-actions { display: flex; gap: 8px; align-items: center; }
.records-actions .btn-soft { padding: 7px 14px; font-size: 12.5px; width: auto; }

.filters-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  background: rgba(91, 108, 255, 0.04);
  border: 1px solid rgba(91, 108, 255, 0.10);
  border-radius: var(--r-sm);
  margin-bottom: 14px;
}
.filters-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters-group .flt {
  min-width: 130px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.filters-search { margin-left: auto; gap: 8px; }
.filters-search input[type="text"] {
  height: 36px;
  width: 260px;
  padding: 0 12px;
  font-size: 13px;
}
.filters-search .btn-primary { height: 36px; padding: 0 18px; font-size: 13px; }

.records-table-wrap { border-radius: var(--r-md); }
.records-table-wrap table th {
  padding: 12px 14px;
  font-size: 11.5px;
  text-transform: none;
  background: rgba(91, 108, 255, 0.05);
  color: var(--text-mute);
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.records-table-wrap table td {
  padding: 12px 14px;
  font-size: 13px;
  vertical-align: middle;
}
.records-table-wrap .col-attach,
.records-table-wrap .col-fb,
.records-table-wrap .col-urge,
.records-table-wrap .col-handover { text-align: center; }

/* ☑ 行勾选格 */
.records-table-wrap .col-check {
  width: 36px;
  text-align: center;
  padding: 8px !important;
}
.records-table-wrap .col-check input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary);
}
/* 当无批量操作权限时，整列（含数据行的空 td）一起隐藏，避免错位 */
#records-table.no-batch .col-check { display: none; }
/* 教务视图：金额 / 支付方式 / 交接 / 附件 整列隐藏 */
#records-table.processor-view .col-amount,
#records-table.processor-view .col-payment,
#records-table.processor-view .col-handover,
#records-table.processor-view .col-attach { display: none; }

/* 浮动批量操作栏 */
.batch-action-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.32);
  color: #fff;
  animation: batchBarSlideUp 0.22s ease-out;
}
@keyframes batchBarSlideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
.batch-info { font-size: 13.5px; color: #fff; }
.batch-info .muted { color: rgba(255, 255, 255, 0.6); }
.batch-actions { display: flex; gap: 8px; align-items: center; }
.batch-actions .btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  padding: 8px 16px;
  font-size: 13px;
}
.batch-actions .btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
}
.batch-actions .btn-soft {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  padding: 8px 14px;
  font-size: 13px;
}
.batch-actions .btn-soft:hover {
  background: rgba(255, 255, 255, 0.20);
}
.batch-actions .btn-ghost {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}
.batch-actions .btn-ghost:hover {
  color: #fff;
}

/* 💰 钱款交接按钮 */
.handover-toggle {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.handover-toggle.handover-pending {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.30);
}
.handover-toggle.handover-pending:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
}
.handover-toggle.handover-done {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.30);
}
.handover-toggle.handover-done:hover {
  background: rgba(16, 185, 129, 0.22);
}
.records-table-wrap tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.35); }
.records-table-wrap tbody tr:hover { background: rgba(91, 108, 255, 0.06); }
.records-table-wrap .row-actions { gap: 4px; flex-wrap: wrap; }
.records-table-wrap .row-actions button {
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.order-serial {
  font-family: "SF Mono", "Menlo", "Monaco", "Cascadia Mono", monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 23, 42, 0.05);
}
table {
  width: 100%; border-collapse: collapse;
}
table th, table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 13px;
  vertical-align: middle;
}
table th {
  background: rgba(255, 255, 255, 0.55);
  font-weight: 600; color: var(--text-mute);
  font-size: 12px; letter-spacing: 0.5px;
  position: sticky; top: 0;
}
table tbody tr { transition: background 0.15s; }
table tbody tr:hover { background: rgba(91, 108, 255, 0.05); }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px;
}
.tag-作业 { background: rgba(79, 124, 255, 0.14); color: #4f7cff; }
.tag-论文 { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.tag-全包 { background: rgba(236, 72, 153, 0.14); color: #ec4899; }
.tag-已处理, .tag-已发 { background: rgba(16, 185, 129, 0.14); color: #059669; }
.tag-未处理, .tag-未发 { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.tag-progress { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }

/* —— 业务视角 5 档极简徽章 —— */
.tag-biz-done {
  background: rgba(16, 185, 129, 0.14); color: #059669;
}
.tag-biz-doing {
  background: rgba(59, 130, 246, 0.14); color: #1d4ed8;
}
.tag-biz-pending {
  background: rgba(239, 68, 68, 0.12); color: #dc2626;
}
.tag-biz-wait-feedback {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.28));
  color: #b45309;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  animation: waitFeedbackPulse 1.6s ease-in-out infinite;
}
@keyframes waitFeedbackPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* 催办红标 */
.urgent-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  background: rgba(239, 68, 68, 0.14); color: #dc2626;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.btn-soft-warn {
  background: rgba(239, 68, 68, 0.10);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.18);
  padding: 5px 12px !important;
  font-size: 12px;
}
.btn-soft-warn:hover { background: rgba(239, 68, 68, 0.18); }

/* 催办横幅 */
.urgent-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #b91c1c;
}
.urgent-banner .urgent-item {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  color: #6b7280;
}
.urgent-banner .urgent-due {
  margin-top: 4px;
  padding: 3px 8px;
  background: rgba(239, 68, 68, 0.10);
  color: #b91c1c;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

/* 日历提醒 */
.reminder-card {
  border: 1px solid rgba(245, 158, 11, 0.20) !important;
}
.reminder-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.30);
}
.reminder-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: transform 0.15s;
}
.reminder-item:hover { transform: translateX(2px); }
.reminder-item .rem-day {
  min-width: 110px;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.reminder-item .rem-info-block { flex: 1; min-width: 0; }
.reminder-item.rem-overdue {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(239, 68, 68, 0.04));
  border-color: rgba(239, 68, 68, 0.25);
}
.reminder-item.rem-overdue .rem-day { color: #b91c1c; }
.reminder-item.rem-critical {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.06));
  border-color: rgba(245, 158, 11, 0.30);
}
.reminder-item.rem-critical .rem-day { color: #b45309; }
.reminder-item.rem-warn .rem-day { color: #d97706; }
.reminder-item.rem-info .rem-day { color: #2563eb; }

/* 扩展字段网格（3 列）*/
.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px;
  background: rgba(91, 108, 255, 0.04);
  border-radius: var(--r-md);
  border: 1px solid rgba(91, 108, 255, 0.10);
  margin-bottom: 14px;
}
.ext-grid .field-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.ext-grid .field-item label {
  min-height: 34px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.ext-grid .field-item input,
.ext-grid .field-item select {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
}

.action-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.log-detail { color: var(--text-mute); font-size: 12.5px; }
.log-ip { font-family: SF Mono, Menlo, Monaco, monospace; font-size: 12px; color: var(--text-mute); }

.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 5px 12px; font-size: 12px; }

/* ---- 模态框 ---- */
.modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modal-card {
  position: relative;
  background: var(--glass-bg-strong);
  backdrop-filter: saturate(220%) blur(40px);
  -webkit-backdrop-filter: saturate(220%) blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  width: 720px; max-width: 92vw;
  max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
    0 32px 80px rgba(15, 23, 42, 0.22),
    0 8px 24px rgba(15, 23, 42, 0.10);
  isolation: isolate;
}
.modal-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 30%);
  pointer-events: none;
}
.modal-card > * { position: relative; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.4);
}

/* ---- 统计看板 ---- */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px;
}
@media (max-width: 1280px) {
  .kpi-row[style*="repeat(6"] { grid-template-columns: repeat(3, 1fr) !important; }
}
.kpi {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 22px 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}
.kpi::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 30%);
  pointer-events: none;
}
.kpi > * { position: relative; }
.kpi:hover { transform: translateY(-2px); }
.kpi-label { color: var(--text-mute); font-size: 12.5px; margin-bottom: 6px; letter-spacing: 0.3px; }
.kpi-value {
  font-size: 28px; font-weight: 700; color: var(--text);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1f2937, #475569);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kpi-value.warn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px;
}
/* 所有看板图表统一限高 + 限制单图最大宽度（避免大屏数据点少时柱子过宽）*/
.card canvas, .grid-2 canvas {
  max-height: 280px !important;
  max-width: 100%;
}
/* 月度趋势(单图占满整行)：限制最大宽度 + 居中，避免大屏过宽 */
section.card > h3 + canvas#chart-monthly {
  max-width: 1100px;
  margin: 0 auto;
  display: block;
}
.data-table { font-size: 13px; }
.data-table th, .data-table td { padding: 9px 12px; }

/* 业务占比图例 */
.dist-legend {
  margin-top: 14px;
  display: flex; flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}
.dist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  background: rgba(255,255,255,0.4);
}
.dist-item:hover { background: rgba(91,108,255,0.06); }
.dist-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex: 0 0 auto;
}
.dist-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-val { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.dist-pct {
  background: rgba(91, 108, 255, 0.10);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  min-width: 50px; text-align: center;
}

/* ---- 附件 ---- */
.attach-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.attach-title {
  font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 10px;
}
.attach-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.attach-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.attach-item:hover { background: rgba(255, 255, 255, 0.9); }
.attach-icon { font-size: 18px; }
.attach-name {
  color: var(--primary); text-decoration: none; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.attach-name:hover { text-decoration: underline; }
.attach-size { font-size: 11.5px; }
.attach-del { padding: 4px 8px !important; font-size: 13px; }
.attach-edit-note { padding: 4px 8px !important; font-size: 12.5px; opacity: 0.6; }
.attach-edit-note:hover { opacity: 1; }
.attach-upload { display: block; padding: 4px 0; }
.attach-upload .btn-secondary { font-size: 12.5px; padding: 7px 14px; }
.attach-block { padding-bottom: 6px; }

/* ============================================================
   💬 统一沟通时间线
   ============================================================ */
.timeline-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(15,23,42,0.06); }

.tl-composer {
  padding: 14px;
  background: rgba(91, 108, 255, 0.05);
  border: 1px solid rgba(91, 108, 255, 0.18);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.tl-composer textarea {
  width: 100%; resize: vertical; min-height: 56px;
  padding: 10px 14px; font-size: 13px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
}
.tl-composer-row {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap;
}
.tl-att-pick { height: 32px; padding: 0 10px; font-size: 12px; max-width: 220px; }
.tl-flag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.08); border-radius: 999px;
  font-size: 12px; cursor: pointer;
}
.tl-flag input { cursor: pointer; }
.tl-flag-warn { color: #b45309; border-color: rgba(245,158,11,0.30); background: rgba(245,158,11,0.08); }

/* 沟通记录暂存附件预览（粘贴 / 拖入 / 点击上传后的待发送文件） */
.tl-staged {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin-top: 8px;
  background: rgba(255,255,255,0.7);
  border: 1px dashed rgba(91,108,255,0.30);
  border-radius: 8px; font-size: 12.5px;
}
.tl-staged-icon { font-size: 16px; }
.tl-staged-name { flex: 1; word-break: break-all; color: #1f2937; }
.tl-staged-size { font-size: 11.5px; }
.tl-staged-x {
  width: 24px; height: 24px; line-height: 1; padding: 0;
  font-size: 14px; color: #ef4444; border-radius: 6px;
}

/* 拖拽高亮 */
.tl-composer.tl-drag-over,
.modal-body.tl-drag-over {
  background: rgba(91,108,255,0.12);
  border-color: rgba(91,108,255,0.45);
  box-shadow: 0 0 0 3px rgba(91,108,255,0.10) inset;
}

.tl-attach-btn { display: inline-flex; align-items: center; gap: 4px; }

/* 沟通记录每条消息前的发送人头像 */
.tl-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: linear-gradient(135deg, #6473ff, #9ca8ff);
  color: #fff; font-weight: 700; font-size: 11px;
  overflow: hidden; flex-shrink: 0;
}
.tl-avatar.tl-avatar--img { background: none; }
.tl-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 主管二次派发提示横幅 */
.supervisor-dispatch-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(245,158,11,0.10));
  border: 1px solid rgba(239,68,68,0.25);
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.supervisor-dispatch-banner > div { flex: 1; }
.supervisor-dispatch-banner .btn-primary {
  white-space: nowrap; padding: 8px 16px; font-size: 13px;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* 求助主管按钮（点击进入难改提交模式） */
.tl-esc-btn { display: inline-flex; align-items: center; gap: 4px; }
.tl-esc-btn.tl-esc-active {
  background: rgba(245,158,11,0.20) !important;
  color: #b45309 !important;
  border-color: rgba(245,158,11,0.50) !important;
}

.timeline-list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; padding-right: 4px; }

.tl-item {
  padding: 11px 14px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 10px;
  border-left: 3px solid rgba(91, 108, 255, 0.40);
  transition: background 0.15s;
}
.tl-item:hover { background: rgba(255,255,255,0.90); }
.tl-item-system {
  background: transparent;
  border: 1px dashed rgba(15,23,42,0.10);
  border-left: 3px solid rgba(148, 163, 184, 0.6);
  padding: 7px 12px;
  font-size: 12px;
}
.tl-item-system .tl-content { color: var(--text-mute); font-size: 12.5px; }
.tl-item-urge { border-left-color: rgba(239,68,68,0.7); background: rgba(239,68,68,0.04); }
.tl-item-escalate { border-left-color: rgba(245,158,11,0.7); background: rgba(245,158,11,0.04); }
.tl-item-message { border-left-color: rgba(91, 108, 255, 0.55); }

.tl-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px;
}
.tl-badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
}
.tl-badge-msg { background: rgba(91, 108, 255, 0.14); color: #3b41c4; }
.tl-badge-urge { background: rgba(239,68,68,0.14); color: #dc2626; }
.tl-badge-esc { background: rgba(245,158,11,0.16); color: #b45309; }
.tl-from { font-weight: 600; color: var(--text); font-size: 13px; }
.tl-role { font-size: 11px; }
.tl-time { font-size: 11px; color: var(--text-mute); }
.tl-state-done {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(34,197,94,0.14); color: #15803d; font-weight: 600;
}
.tl-state-open {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(239,68,68,0.10); color: #dc2626; font-weight: 600;
}

.tl-content {
  margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.tl-att {
  display: inline-block; margin-top: 6px; font-size: 12.5px;
  color: var(--primary); text-decoration: none;
}
.tl-att:hover { text-decoration: underline; }
.tl-due { font-size: 11.5px; color: #b45309; margin-top: 4px; }
.tl-reply {
  margin-top: 8px; padding: 7px 10px;
  background: rgba(91, 108, 255, 0.06);
  border-left: 2px solid rgba(91, 108, 255, 0.40);
  border-radius: 4px;
  font-size: 12.5px; line-height: 1.5;
}
.tl-status { font-size: 11px; margin-top: 4px; }
.tl-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tl-actions button { padding: 4px 10px; font-size: 11.5px; }

.pending-urge-banner {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  padding: 9px 14px;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.10));
  border: 1px solid rgba(245,158,11,0.28);
  border-left: 3px solid rgba(239,68,68,0.6);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.pending-urge-banner strong { color: #b45309; }
.pending-urge-banner .cancel-pending-urge {
  margin-left: auto;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-mute);
}
.pending-urge-banner .cancel-pending-urge:hover {
  background: rgba(239,68,68,0.10); color: #dc2626;
}

.attach-note-text {
  width: 100%; margin-top: 4px;
  padding: 7px 12px;
  background: rgba(91, 108, 255, 0.06);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
  border-left: 3px solid rgba(91, 108, 255, 0.4);
  line-height: 1.5;
}

/* 导出选项 */
.export-radio {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15,23,42,0.05);
  cursor: pointer;
  font-size: 13px;
}
.export-radio input { margin: 0; }

/* 派发选项 */
.dispatch-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: all 0.15s;
}
.dispatch-opt:hover { background: rgba(91, 108, 255, 0.06); border-color: rgba(91, 108, 255, 0.20); }
.dispatch-opt input[type=radio]:checked + span { color: var(--primary); }

/* 加急标记 */
.row-urgent {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), transparent 30%) !important;
}
.urgent-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 4px 10px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.urgent-toggle input { margin: 0; }
.preview-urgent {
  border-left: 4px solid #ef4444 !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.04), rgba(255,255,255,0.6)) !important;
}
.upload-zone {
  margin-top: 14px;
  padding: 12px;
  background: rgba(91, 108, 255, 0.04);
  border: 1px dashed rgba(91, 108, 255, 0.20);
  border-radius: var(--r-sm);
}
.upload-zone .upload-label {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  font-size: 13px;
  padding: 7px 14px;
}
.upload-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 4px;
  font-size: 12px;
}

/* 难改求助横幅 */
.escalate-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.06));
  border: 1px solid rgba(245,158,11,0.30);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #92400e;
}
.escalate-banner .escalate-item {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.55);
  border-radius: 6px;
  color: #78350f;
}

/* 退款标记 */
.tag-已退款 {
  background: rgba(244, 114, 182, 0.16);
  color: #be185d;
}
.refund-banner {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(244, 114, 182, 0.04));
  border: 1px solid rgba(244, 114, 182, 0.22);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #9d174d;
  font-weight: 600;
}

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 300;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.error { background: rgba(185, 28, 28, 0.92); }
.toast.success { background: rgba(5, 150, 105, 0.92); }

/* ============================================================
   通知中心：侧栏按钮 + 抽屉
   ============================================================ */
.side-notif-btn { position: relative; }
.notif-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.4);
  animation: notifBadgePulse 2.4s ease-in-out infinite;
}
@keyframes notifBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.10); }
}

.notif-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 380;
}
.notif-drawer {
  position: fixed;
  top: 14px; bottom: 14px;
  left: 240px;
  width: 460px;
  z-index: 400;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(200%) blur(30px);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-md, 16px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  animation: notifSlideIn 0.22s ease-out;
}
@keyframes notifSlideIn {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.notif-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.notif-drawer-head h3 { font-size: 16px; font-weight: 600; }
.notif-tabs {
  display: flex; gap: 4px;
  padding: 10px 16px 0 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  flex-wrap: wrap;
}
.notif-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 8px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color 0.15s, border-color 0.15s;
}
.notif-tab:hover { color: var(--text); }
.notif-tab.active {
  color: var(--primary, #5b6cff);
  border-bottom-color: var(--primary, #5b6cff);
}
.notif-tab .t-cnt {
  background: rgba(91, 108, 255, 0.10);
  color: var(--primary, #5b6cff);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px; text-align: center;
}
.notif-tab.active .t-cnt {
  background: var(--primary, #5b6cff);
  color: #fff;
}

.notif-body {
  flex: 1; overflow-y: auto;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.notif-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 10px;
  border-left: 3px solid rgba(91, 108, 255, 0.4);
  transition: background 0.15s, transform 0.15s;
}
.notif-card:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(2px);
}
.notif-card.notif-urge { border-left-color: rgba(239, 68, 68, 0.6); }
.notif-card.notif-urgent_order { border-left-color: rgba(245, 158, 11, 0.7); background: rgba(254, 243, 199, 0.4); }
.notif-card.notif-feedback { border-left-color: rgba(91, 108, 255, 0.55); }
.notif-card.notif-refund_alert {
  border-left-color: rgba(244, 114, 182, 0.8);
  background: linear-gradient(135deg, rgba(244,114,182,0.10), rgba(244,114,182,0.04));
}

.notif-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.notif-pill {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.notif-from { font-size: 12.5px; color: var(--text); font-weight: 600; }
.notif-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 2px 0 4px 0; }
.notif-desc {
  font-size: 12.5px; color: var(--text);
  line-height: 1.5;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-foot-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.06);
}
.notif-go-btn {
  margin-left: auto;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
}

.notif-foot {
  padding: 10px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   业务统计页面
   ============================================================ */
.biz-stats-card { padding: 18px 22px; }
.biz-stats-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.biz-stats-header h2 { font-size: 17px; margin: 0 0 4px 0; font-weight: 600; }
.biz-stats-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.biz-stats-toolbar .flt { height: 36px; padding: 0 12px; font-size: 13px; }

/* KPI 卡片行（3 张：录入数 / 应收 / 实际到账） */
.biz-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0;
}
.biz-kpi {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-md);
  transition: transform 0.15s, box-shadow 0.15s;
}
.biz-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(91, 108, 255, 0.10); }
.biz-kpi-primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10), rgba(16, 185, 129, 0.04));
  border-color: rgba(16, 185, 129, 0.30);
}
.biz-kpi-icon { font-size: 28px; flex-shrink: 0; }
.biz-kpi-body { flex: 1; min-width: 0; }
.biz-kpi-num {
  font-size: 22px; font-weight: 700; color: var(--text);
  letter-spacing: 0.3px;
}
.biz-kpi-primary .biz-kpi-num { color: #059669; }
.biz-kpi-label { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; font-weight: 500; }
.biz-kpi-sub { font-size: 11px; margin-top: 4px; }

@media (max-width: 700px) {
  .biz-kpi-row { grid-template-columns: 1fr; }
}

/* 2 列网格（目标 + 排行 / 图表对） */
.biz-grid-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0;
}
.biz-grid-2col > .card { padding: 16px 18px; }
.biz-grid-2col canvas { max-height: 280px !important; }
@media (max-width: 900px) { .biz-grid-2col { grid-template-columns: 1fr; } }

/* 目标进度 */
.targets-list { display: flex; flex-direction: column; gap: 14px; }
.target-row {
  padding: 12px 14px;
  background: rgba(91, 108, 255, 0.04);
  border-radius: var(--r-sm);
}
.target-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.target-label { font-weight: 600; font-size: 13px; }
.target-status { font-size: 12px; }
.target-bar {
  height: 10px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.target-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width 0.4s ease;
}
.target-numbers {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px; font-size: 12.5px;
}

/* 排行榜 */
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; max-height: 540px; overflow-y: auto; }
.lb-row {
  display: grid;
  grid-template-columns: 32px 36px 1fr;
  gap: 10px; align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 10px;
  transition: background 0.15s;
}
.lb-row:hover { background: rgba(255, 255, 255, 0.95); }
.lb-row.lb-me {
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.10), rgba(91, 108, 255, 0.04));
  border-color: rgba(91, 108, 255, 0.30);
}
.lb-rank { font-size: 20px; text-align: center; }
.lb-num { font-size: 13px; color: var(--text-mute); font-weight: 600; }
.lb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6473ff, #9ca8ff);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(91, 108, 255, 0.22);
}
.lb-avatar.lb-avatar--img { background: none; box-shadow: 0 2px 6px rgba(15,23,42,0.15); }
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 订单详情 反费 section（仅超管） */
.rebate-section {
  margin-top: 18px; padding: 14px;
  background: linear-gradient(135deg, rgba(244,114,182,0.06), rgba(244,114,182,0.02));
  border: 1px solid rgba(244,114,182,0.20);
  border-radius: 10px;
}
.rebate-grid {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 12px; margin-top: 8px;
}
.rebate-grid .field-item.long { grid-column: span 1; }
.rebate-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.08); border-radius: 8px;
  cursor: pointer; font-size: 13px;
}
/* 反费只读视图（指定人查看自己订单） */
.rebate-grid-readonly {
  grid-template-columns: 1fr 2fr !important;
}
.rebate-readonly-cell {
  padding: 8px 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 8px;
}

/* ===== 角色权限页：角色概览卡 ===== */
.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.role-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-left: 4px solid #5b6cff;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;  /* 让 flex/grid 子元素允许收缩 */
}
.role-card-head { display: flex; align-items: center; gap: 10px; }
.role-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
  flex-shrink: 0;
}
.role-card-name { font-weight: 700; font-size: 14.5px; color: var(--text); }
.role-card-counts {
  display: flex; gap: 10px; font-size: 12.5px; color: var(--text-mute);
  flex-shrink: 0;
  background: rgba(91, 108, 255, 0.05);
  padding: 4px 10px; border-radius: 999px;
}
.role-card-body { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.role-card-row {
  display: flex; align-items: flex-start; gap: 8px; flex-wrap: nowrap; min-width: 0;
}
.role-card-label {
  flex: 0 0 64px;
  color: var(--text-mute); font-size: 11.5px;
  padding-top: 4px;
  white-space: nowrap;
}
.role-card-chips {
  flex: 1; min-width: 0;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.role-card-meta {
  font-size: 11.5px; color: var(--text-mute); margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}
.role-chip {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(91, 108, 255, 0.10); color: var(--primary);
  font-size: 11.5px; line-height: 1.6;
  white-space: nowrap;
}
.role-chip.role-chip-action {
  background: rgba(16, 185, 129, 0.10); color: #059669;
}
.role-chip.muted { background: rgba(148, 163, 184, 0.14); color: var(--text-mute); }

/* ===== 角色权限页：折叠面板 ===== */
.details-card { padding: 0; overflow: hidden; }
.details-card > summary {
  list-style: none; cursor: pointer;
  padding: 16px 20px;
  display: flex; align-items: center;
  user-select: none;
  background: rgba(91, 108, 255, 0.04);
  border-radius: var(--r-md) var(--r-md) 0 0;
  transition: background 0.15s;
}
.details-card > summary:hover { background: rgba(91, 108, 255, 0.08); }
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary::before {
  content: "▶"; margin-right: 8px; font-size: 11px;
  transition: transform 0.2s; color: var(--text-mute);
}
.details-card[open] > summary::before { transform: rotate(90deg); }
.details-card[open] > summary {
  background: rgba(91, 108, 255, 0.06);
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.details-card > .table-wrap { padding: 0 20px; }
.details-card > .table-wrap:last-child { padding-bottom: 20px; }
.details-card > #sys-settings-list { padding: 16px 20px 20px; }
.perm-subhead {
  margin: 18px 20px 8px 20px;
  font-size: 13.5px; color: var(--text);
  letter-spacing: 0.3px;
}
.perm-subhead:first-of-type { margin-top: 12px; }
.field-group-row td {
  background: rgba(91, 108, 255, 0.05);
  font-size: 12px; color: var(--text-mute); padding: 8px 14px !important;
  font-weight: 600;
}

/* ===== 角色权限矩阵：表格列样式 ===== */
.perm-col-name {
  text-align: left;
  width: 240px; min-width: 200px;
  padding: 10px 12px !important;
}
/* 表头那一列固定不换行；数据行允许换行避免溢出 */
thead .perm-col-name { white-space: nowrap; }
.perm-col-role {
  text-align: center;
  width: 130px; min-width: 120px;
  padding: 10px 6px !important;
}
.perm-col-role input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary);
}
.perm-col-role input[type="checkbox"]:disabled { opacity: 0.55; cursor: not-allowed; }
.perm-role-th {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600;
  line-height: 1.2;
}
.perm-role-icon { font-size: 16px; }
.perm-item-cell {
  display: flex; align-items: center; gap: 8px;
}
.perm-item-icon { font-size: 15px; flex-shrink: 0; }
.perm-item-name { font-weight: 600; font-size: 13px; }
.perm-item-help {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px;
  background: rgba(91, 108, 255, 0.12); color: var(--primary);
  border-radius: 50%;
  font-size: 10.5px; font-weight: 600;
  cursor: help; flex-shrink: 0;
}
.perm-item-help:hover { background: rgba(91, 108, 255, 0.22); }

/* 权限矩阵表整体 */
.details-card table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  table-layout: auto;
}
.details-card table th,
.details-card table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
.details-card table tbody tr:hover { background: rgba(91, 108, 255, 0.03); }

/* ===== 用户编辑弹窗 折叠面板 ===== */
.user-accordion {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  overflow: hidden;
}
.user-accordion > summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 10px 14px; font-weight: 600; font-size: 13px;
  display: flex; align-items: center;
  background: rgba(91, 108, 255, 0.06);
  transition: background 0.15s;
}
.user-accordion > summary:hover { background: rgba(91, 108, 255, 0.10); }
.user-accordion > summary::-webkit-details-marker { display: none; }
.user-accordion > summary::before {
  content: "▶"; margin-right: 8px; font-size: 10px;
  transition: transform 0.2s; color: var(--text-mute);
}
.user-accordion[open] > summary::before { transform: rotate(90deg); }
.user-accordion-body { padding: 12px 14px; }

/* 反费汇总 KPI 卡片 */
.rebate-kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.rebate-kpi {
  padding: 14px 18px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(15,23,42,0.06);
  border-left: 4px solid rgba(91,108,255,0.45);
  border-radius: 10px;
}
.rebate-kpi-label { font-size: 12px; color: var(--text-mute); margin-bottom: 4px; }
.rebate-kpi-value { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.rebate-kpi-pending { border-left-color: #f59e0b; background: rgba(245,158,11,0.06); }
.rebate-kpi-pending .rebate-kpi-value { color: #b45309; }
.rebate-kpi-done { border-left-color: #10b981; background: rgba(16,185,129,0.06); }
.rebate-kpi-done .rebate-kpi-value { color: #059669; }

/* 被指定人视角：只看总反费，隐藏 待确认 / 已确认 两张细分卡 */
#rebate-card.rebate-simple .rebate-kpi-pending,
#rebate-card.rebate-simple .rebate-kpi-done { display: none; }
#rebate-card.rebate-simple .rebate-kpi-row { grid-template-columns: 1fr; }

/* 团队汇总表头像（小一点） */
.ts-avatar {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #6473ff, #9ca8ff);
  color: #fff; font-weight: 700; font-size: 11px;
  overflow: hidden;
  flex-shrink: 0;
}
.ts-avatar.ts-avatar--img { background: none; }
.ts-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-main { min-width: 0; }
.lb-row-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
}
.lb-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.lb-amount { font-weight: 700; color: #059669; font-size: 14px; }
.lb-row-mid { font-size: 11.5px; margin-top: 2px; }
.lb-target {
  margin-top: 6px;
}
.lb-target.lb-target-empty {
  font-size: 11px;
  color: var(--text-mute);
}
.lb-target-text {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px;
  margin-bottom: 4px;
}
.lb-target-bar {
  height: 6px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.lb-target-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* 团队汇总表 */
#team-summary-table th, #team-summary-table td {
  font-size: 12.5px; padding: 10px 12px;
}

/* 🎯 团队目标卡 */
.tt-row { padding: 6px 0; }
.tt-row-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 13.5px;
}
.tt-status { font-size: 12.5px; font-weight: 600; }
.tt-bar {
  height: 14px; background: rgba(15, 23, 42, 0.06);
  border-radius: 999px; overflow: hidden;
}
.tt-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.tt-numbers {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 8px; font-size: 13px;
}

/* 💵 工资测算 */
.salary-grid {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px;
}
@media (max-width: 900px) {
  .salary-grid { grid-template-columns: 1fr; }
}
.salary-summary {
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(91,108,255,0.04));
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.salary-summary-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0;
}
.salary-summary-row.salary-total-row {
  border-top: 1px dashed rgba(15,23,42,0.12);
  margin-top: 6px; padding-top: 12px;
}
.salary-breakdown {
  padding: 12px 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: var(--r-md);
}
.salary-table { width: 100%; font-size: 12.5px; }
.salary-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-mute);
  padding: 6px 8px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.salary-table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(15,23,42,0.04);
}

/* 目标编辑弹窗 */
.target-edit-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.target-edit-row:last-child { border-bottom: none; }
.target-edit-row label {
  flex: 1; font-weight: 500; font-size: 13px;
}
.target-edit-row input {
  width: 160px; height: 36px; padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.10); border-radius: 8px;
}

/* ---- 系统设置行（角色权限页第四节） ---- */
.sys-setting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.sys-setting-row:hover { background: rgba(255, 255, 255, 0.85); }
.sys-setting-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.sys-state-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.sys-state-pill.on {
  background: rgba(34, 197, 94, 0.16); color: #15803d;
}
.sys-state-pill.off {
  background: rgba(239, 68, 68, 0.14); color: #dc2626;
}
.sys-state-pill.dis {
  background: rgba(148, 163, 184, 0.16); color: #64748b;
}
.sys-setting-row.sys-setting-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(248, 250, 252, 0.6);
}
.sys-setting-row.sys-setting-disabled input[type="checkbox"] { cursor: not-allowed; }

/* ---- 移动端简单适配 ---- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative; height: auto; margin: 0;
    border-radius: 0;
    flex-direction: row; align-items: center; flex-wrap: wrap;
    padding: 12px 14px;
  }
  .brand { padding: 0; flex: 1; min-width: 200px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { padding: 7px 12px; }
  .nav-divider { display: none; }
  .side-actions {
    padding: 0; margin: 0 0 0 auto;
    flex-direction: row; gap: 4px;
    border: none;
  }
  .side-action-btn { width: auto; padding: 7px 12px; }
  .user-block { width: 100%; padding-top: 10px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .workspace { padding: 16px; }
  .notif-drawer { left: 14px; right: 14px; width: auto; }
}
