/* ============================================================
   app.css —— 布局与组件样式
   ============================================================ */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }

/* ---------------- 通用控件 ---------------- */
.btn {
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 9px 16px; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--bg-elev2);
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; display: block; padding: 11px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); border-radius: var(--r-sm);
  padding: 7px 12px; font-size: 13px; transition: all .15s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--bg-hover); }
.ghost-btn.sm { padding: 5px 9px; font-size: 12px; }
.mini-btn {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line); border-radius: var(--r-sm);
  padding: 4px 10px; font-size: 12px; font-weight: 600;
}
.mini-btn:hover { background: var(--accent); color: #fff; }
.icon-btn {
  background: transparent; border: none; color: var(--text-2);
  padding: 8px; border-radius: var(--r-sm); display: inline-flex;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 500px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 440px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 40px 36px 28px; text-align: center;
}
.login-logo {
  width: 66px; height: 66px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px; color: var(--accent); overflow: hidden;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-title { margin: 0; font-size: 24px; letter-spacing: 1px; }
.login-sub { margin: 8px 0 0; color: var(--text-2); font-size: 13px; letter-spacing: 1.5px; }
.login-slogan {
  display: inline-block; margin: 16px 0 30px; padding: 5px 16px;
  border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line);
  font-size: 13.5px; font-weight: 600; letter-spacing: 2.5px; color: var(--accent);
}

.field { display: block; text-align: left; margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-elev2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 0 12px; transition: border-color .15s, box-shadow .15s;
}
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-icon { color: var(--text-3); flex: none; }
.input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); padding: 11px 0; min-width: 0;
}
.pwd-eye { background: none; border: none; color: var(--text-3); padding: 4px; display: inline-flex; }
.pwd-eye:hover { color: var(--text); }

.checkbox-row {
  display: flex; align-items: center; gap: 8px; text-align: left;
  color: var(--text-2); font-size: 13px; margin: 4px 0 18px; cursor: pointer;
}
.checkbox-row input { accent-color: var(--accent); width: 15px; height: 15px; }

.login-hint {
  display: flex; gap: 10px; text-align: left; align-items: flex-start;
  background: var(--bg-elev2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 22px;
  color: var(--text-2); font-size: 12.5px; line-height: 1.6;
}
.login-hint svg { flex: none; margin-top: 2px; color: var(--accent); }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 12px 0 0; }
.login-foot { color: var(--text-3); font-size: 12px; margin: 18px 0 0; }

/* ---------------- 应用框架 ---------------- */
.app-view { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; color: #fff; overflow: hidden;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 16px; letter-spacing: .5px; }
.brand-text i { font-style: normal; font-size: 11.5px; color: var(--text-3); letter-spacing: .5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.usermenu { position: relative; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 152px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 6px; z-index: 40;
}
.dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text); padding: 9px 12px; border-radius: var(--r-sm); font-size: 13.5px;
}
.dropdown button:hover { background: var(--bg-hover); }

.layout { flex: 1; display: flex; min-height: 0; }

/* ---------------- 左侧树导航 ---------------- */
.sidebar {
  width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-elev); border-right: 1px solid var(--border);
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; font-weight: 600; font-size: 14px;
}
.sidebar-tools { padding: 0 14px 10px; }
.tree-search, .ctrl {
  width: 100%; background: var(--bg-elev2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); padding: 8px 11px; outline: none;
}
.tree-search:focus, .ctrl:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tree-scroll { flex: 1; overflow: auto; padding: 4px 8px 16px; }
.sidebar-foot {
  display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border);
}
.sidebar-foot .ghost-btn { flex: 1; justify-content: center; }

/* 树节点 */
.tnode { user-select: none; }
.tnode-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid transparent;
}
.tnode-row:hover { background: var(--bg-hover); }
.tnode-row.active { background: var(--accent-soft); border-color: var(--accent-line); }
.tnode-toggle {
  width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); background: none; border: none; padding: 0; font-size: 11px;
}
.tnode-toggle.empty { visibility: hidden; }
.tnode-toggle svg { transition: transform .15s; }
.tnode.open > .tnode-row .tnode-toggle svg { transform: rotate(90deg); }
.lvl-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.lvl-O      { background: var(--accent); }
.lvl-KR     { background: var(--ok); }
.lvl-task   { background: var(--warn); }
.lvl-subtask{ background: var(--text-3); }
.tnode-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.tnode.active .tnode-name { font-weight: 600; }
.tnode-meta { font-size: 11.5px; color: var(--text-3); flex: none; }
.tnode-children { margin-left: 16px; border-left: 1px dashed var(--border); padding-left: 4px; }
.tnode.hit > .tnode-row .tnode-name { color: var(--accent); }
mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }

/* ---------------- 内容区 ---------------- */
.content { flex: 1; min-width: 0; padding: 20px 24px 40px; }

/* 看板卡片 */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.stat-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 15px 16px; position: relative; overflow: hidden;
}
.stat-card .sc-label { color: var(--text-2); font-size: 12.5px; margin-bottom: 8px; }
.stat-card .sc-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-card.urgent .sc-value { color: var(--tag-urgent-fg); }
.stat-card.key .sc-value { color: var(--tag-key-fg); }
.stat-card.daily .sc-value { color: var(--tag-daily-fg); }
.stat-card.ok .sc-value { color: var(--ok); }
.stat-card.danger .sc-value { color: var(--danger); }
.stat-card .sc-bar { height: 4px; border-radius: 3px; background: var(--bg-elev2); margin-top: 10px; overflow: hidden; }
.stat-card .sc-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* 筛选栏 */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 18px;
}
.filter-main { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.filter-main .ctrl { width: auto; min-width: 128px; padding: 7px 10px; font-size: 13px; }
.filter-main #f-keyword { min-width: 220px; flex: 1; }
.filter-side { display: flex; gap: 8px; }

/* 详情区 */
.detail-area { min-height: 200px; }
.detail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 70px 20px; color: var(--text-3);
  background: var(--bg-elev); border: 1px dashed var(--border-2); border-radius: var(--r-lg);
}
.detail-empty svg { opacity: .5; }

.detail-head {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px;
}
.detail-title-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.detail-title { font-size: 19px; font-weight: 700; margin: 0; flex: 1; min-width: 200px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.detail-actions { display: flex; gap: 8px; }
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 22px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.detail-grid .dg-item .dg-k { color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.detail-grid .dg-item .dg-v { font-size: 14px; }
.progress-line { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 8px; border-radius: 5px; background: var(--bg-elev2); overflow: hidden; min-width: 80px; }
.progress-track > i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width .25s; }
.progress-track.done > i { background: var(--ok); }
.progress-track.delayed > i { background: var(--danger); }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag-urgent { background: var(--tag-urgent-bg); color: var(--tag-urgent-fg); }
.tag-key    { background: var(--tag-key-bg);    color: var(--tag-key-fg); }
.tag-daily  { background: var(--tag-daily-bg);  color: var(--tag-daily-fg); }
.tag-dept   { background: var(--tag-dept-bg);   color: var(--tag-dept-fg); }
.tag-muted  { background: var(--bg-elev2); color: var(--text-3); }

.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.st-pending { color: var(--text-2); } .st-pending .dot { background: var(--text-3); }
.st-doing   { color: var(--accent); } .st-doing .dot { background: var(--accent); }
.st-done    { color: var(--ok); }     .st-done .dot { background: var(--ok); }
.st-delayed { color: var(--danger); } .st-delayed .dot { background: var(--danger); }

/* 列表表格 */
.table-wrap {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto;
}
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th, table.grid td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.grid td:nth-child(4) { white-space: normal; } /* 协助部门允许多行 */
table.grid th { background: var(--bg-elev2); color: var(--text-2); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: var(--bg-hover); }
table.grid td.name-cell { max-width: 320px; }
table.grid td.name-cell .row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-row { text-align: center; color: var(--text-3); padding: 40px 0; }
.sec-title { font-size: 14px; font-weight: 600; margin: 22px 0 10px; color: var(--text-2); }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  animation: pop .18s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.form-row { display: grid; gap: 7px; }
.form-row.two { grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row label { font-size: 13px; color: var(--text-2); }
.form-row .req::after { content: " *"; color: var(--danger); }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg-elev2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); padding: 9px 11px; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-textarea { resize: vertical; min-height: 68px; }
.form-err { color: var(--danger); font-size: 12.5px; min-height: 16px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-choice {
  border: 1px solid var(--border); background: var(--bg-elev2); color: var(--text-2);
  border-radius: 20px; padding: 5px 12px; font-size: 12.5px;
}
.tag-choice.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dept-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dept-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--tag-dept-bg); color: var(--tag-dept-fg); border-radius: 20px; padding: 3px 6px 3px 11px; font-size: 12.5px; }
.dept-chip button { background: none; border: none; color: inherit; opacity: .7; padding: 0 3px; font-size: 14px; line-height: 1; }
.dept-chip button:hover { opacity: 1; }
.range-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; accent-color: var(--accent); }

/* Toast */
.toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--text); padding: 10px 18px; border-radius: 30px; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; animation: drop .2s ease;
}
.toast.ok { border-color: var(--ok); } .toast.ok .t-ico { color: var(--ok); }
.toast.err { border-color: var(--danger); } .toast.err .t-ico { color: var(--danger); }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

.only-mobile { display: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .sidebar { position: fixed; left: 0; top: var(--topbar-h); z-index: 35; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-flex; }
}
@media (max-width: 640px) {
  :root { --topbar-h: 56px; }
  .content { padding: 14px 12px 40px; }
  .brand-text i { display: none; }
  .filter-main .ctrl, .filter-main #f-keyword { min-width: 0; width: 100%; }
  .filter-main { gap: 8px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-row.two { grid-template-columns: 1fr; }
  .login-card { padding: 30px 22px 22px; }
}

/* ---------------- 模块导航 ---------------- */
.modnav {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 8px 24px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.modnav-group { display: flex; align-items: center; gap: 6px; }
.modnav-group-label { font-size: 11.5px; color: var(--text-3); margin-right: 2px; }
.modnav-item {
  border: 1px solid var(--border); background: var(--bg-elev2); color: var(--text-2);
  border-radius: 20px; padding: 5px 13px; font-size: 13px; white-space: nowrap; transition: all .15s;
}
.modnav-item:hover { color: var(--text); border-color: var(--border-2); }
.modnav-item.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.modnav-item.is-ph { opacity: .7; }
.modnav-more {
  border: 1px solid var(--border); background: var(--bg-elev2); color: var(--text-2);
  border-radius: 20px; padding: 5px 13px; font-size: 13px; cursor: pointer; transition: all .15s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
}
.modnav-more:hover { color: var(--text); border-color: var(--border-2); background: var(--bg-hover); }
.modnav-more.open { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.modnav-more-wrap { position: relative; display: inline-flex; }
.modnav-more-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 6px; z-index: 40;
  display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto;
}
.modnav-more-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text-2); padding: 9px 12px; border-radius: var(--r-sm); font-size: 13.5px; white-space: nowrap;
}
.modnav-more-item:hover { background: var(--bg-hover); color: var(--text); }
.modnav-more-item.on { color: var(--accent); background: var(--accent-soft); }

/* ---------------- 我的项目（首页层） ---------------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 6px; }
.proj-card {
  text-align: left; cursor: pointer; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px; transition: all .15s; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
}
.proj-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.proj-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.proj-card:hover::before { opacity: .8; }
.proj-card.is-cur { border-color: var(--accent); }
.proj-card.is-cur::before { opacity: 1; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.pc-cur { font-size: 11px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 9px; flex: none; }
.pc-line { font-size: 13.5px; color: var(--text-2); }
.pc-line b { color: var(--text); font-size: 15px; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.pc-badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.pc-badge.is-warn { background: rgba(248,81,73,.16); color: var(--danger); }
.pc-badge.is-ok { background: rgba(63,185,80,.16); color: var(--ok); }
.pc-meta { font-size: 12.5px; color: var(--text-3); }
.proj-empty {
  text-align: center; padding: 56px 20px; color: var(--text-2); line-height: 1.8;
  background: var(--bg-elev); border: 1px dashed var(--border-2); border-radius: var(--r-lg);
}
.proj-empty span { display: block; font-size: 13px; color: var(--text-3); margin-top: 6px; }

.module-area { min-height: 200px; }
.mod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.mod-title { font-size: 20px; margin: 0; }
.mod-sub { margin: 6px 0 0; color: var(--text-2); font-size: 13px; max-width: 720px; }
.mod-tools { margin: 0 0 14px; }
.row-ops { display: inline-flex; gap: 6px; white-space: nowrap; }
.muted { color: var(--text-3); }

/* 指标 / 台账表格操作列 */
table.grid td.row-ops { white-space: nowrap; }

/* 三方渠道卡片 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ch-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.ch-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.ch-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.ch-line { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.ch-k { display: inline-block; width: 46px; color: var(--text-3); }
.ch-note { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }

/* 复盘 / 速报卡片 */
.retro-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 12px; }
.retro-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.retro-body { font-size: 13.5px; line-height: 1.7; }
.retro-sec { margin-top: 8px; }
.retro-sec-k { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.kr-block { color: var(--danger); font-size: 13px; }

/* 占位模块 */
.placeholder-block {
  text-align: center; padding: 60px 20px; color: var(--text-3);
  background: var(--bg-elev); border: 1px dashed var(--border-2); border-radius: var(--r-lg);
}
.ph-icon { font-size: 40px; margin-bottom: 10px; }
.placeholder-block h3 { margin: 0 0 8px; color: var(--text-2); }
.placeholder-block p { max-width: 520px; margin: 0 auto; font-size: 13.5px; line-height: 1.7; }

/* （甘特图样式已随模块一并移除） */
/* 树拖拽控件 */
.tnode-drag { display: inline-flex; color: var(--text-3); margin-left: 2px; cursor: grab; }
.tnode-row[draggable="true"] { cursor: default; }
.tnode-row.dragging { opacity: .4; }
.tnode-order { display: inline-flex; flex-direction: column; line-height: 1; }
.tnode-up, .tnode-down { background: none; border: none; color: var(--text-3); font-size: 9px; padding: 0 3px; cursor: pointer; }
.tnode-up:hover, .tnode-down:hover { color: var(--accent); }

@media (max-width: 640px) {
  .modnav { padding: 8px 12px; gap: 10px; }
  .mod-head { margin-bottom: 12px; }
}

/* 绩效看板 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.stat-num { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.mod-sub2 { font-size: 15px; margin: 22px 0 10px; color: var(--text-2); }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item { display: flex; align-items: center; gap: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; }
.rank-no { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.rank-name { width: 120px; font-size: 13.5px; flex: none; }

/* 消息中心 */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-item { display: flex; gap: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--border-2); border-radius: var(--r-md); padding: 12px 14px; }
.msg-item.msg-warn { border-left-color: var(--danger); }
.msg-item.msg-info { border-left-color: var(--accent); }
.msg-item.msg-ok { border-left-color: var(--ok); }
.msg-icon { font-size: 18px; flex: none; }
.msg-body { flex: 1; }
.msg-text { font-size: 13.5px; line-height: 1.6; }
.msg-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text-3); }

/* 版本动态时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot { position: absolute; left: -19px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.tl-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-head b { font-size: 14px; }
.tl-date { font-size: 12px; color: var(--text-3); }
.tl-body { font-size: 13.5px; line-height: 1.7; margin-top: 6px; color: var(--text-2); }

/* 功能地图 */
.map-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.map-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; cursor: pointer; transition: all .15s; }
.map-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.map-name { font-size: 15px; font-weight: 600; }
.map-desc { font-size: 12.5px; color: var(--text-2); margin: 8px 0 10px; line-height: 1.6; min-height: 40px; }
.map-group { font-size: 11px; color: var(--text-3); }

/* ============ 临时任务（快速捕获） ============ */
.qk-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.qk-tab { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.qk-tab:hover { border-color: var(--accent); }
.qk-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.qk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.qk-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; transition: all .15s; }
.qk-item.is-done { opacity: .6; }
.qk-item.is-done .qk-name { text-decoration: line-through; }
.qk-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qk-name { font-size: 14.5px; font-weight: 600; margin-left: 4px; }
.qk-item-meta { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.qk-item-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ============ 积分排行 ============ */
.rule-card { background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 12px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin: 14px 0 8px; }
.rule-card b { color: var(--text); }
.rule-tier { display: block; margin-top: 6px; color: var(--text-3); }
.pts-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.pts-card { display: flex; gap: 14px; align-items: center; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.pts-rank { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-2); }
.pts-card:nth-child(1) .pts-rank { background: linear-gradient(135deg,#f6d365,#fda085); color: #fff; border: none; }
.pts-main { flex: 1; min-width: 0; }
.pts-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.pts-level { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600; color: #fff; }
.lv-实习 { background: #7c8794; }
.lv-铜牌 { background: #c87f3a; }
.lv-银牌 { background: #9aa7b3; }
.lv-金牌 { background: #e0b13a; }
.lv-钻石 { background: linear-gradient(135deg,#3ad2ff,#7b6cff); }
.pts-total { font-size: 13px; color: var(--text-2); margin: 2px 0 8px; }
.pts-total b { color: var(--accent); }
.pts-break { display: flex; flex-direction: column; gap: 5px; }
.pts-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.pts-bar-k { width: 64px; flex: 0 0 64px; }
.pts-bar-track { flex: 1; height: 7px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.pts-bar-track i { display: block; height: 100%; border-radius: 999px; }
.pts-bar-track.ok i { background: var(--ok); }
.pts-bar-track.key i { background: var(--accent); }
.pts-bar-track.dept i { background: #4db6ac; }
.pts-bar-track.danger i { background: var(--danger); }
.pts-bar-track.gold i { background: #e0b13a; }
.pts-bar b { width: 34px; flex: 0 0 34px; text-align: right; color: var(--text-2); }

/* ============ 侧栏头部操作 ============ */
.sidebar-head-actions { display: inline-flex; gap: 6px; }

/* ============ 关爱模式（无障碍） ============ */
#btn-care.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
body.care-mode { --text-2: var(--text); --text-3: var(--text-2); font-size: 17px; line-height: 1.7; }
body.care-mode .ghost-btn,
body.care-mode .mini-btn,
body.care-mode .btn,
body.care-mode input,
body.care-mode select,
body.care-mode textarea { font-size: 16px; }
body.care-mode .tnode-name,
body.care-mode .detail-grid .dg-item .dg-v,
body.care-mode .msg-text,
body.care-mode .detail-title { font-size: 17px; }
body.care-mode :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
body.care-mode .tnode-row.active { border-width: 2px; }

/* ============ 消息铃铛角标 ============ */
#btn-bell { position: relative; }
.bell-badge {
  position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}

/* ============ 消息中心（分类 / 已读） ============ */
.msg-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.msg-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-tab {
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.msg-tab:hover { border-color: var(--accent); }
.msg-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.msg-badge { background: var(--bg-elev2); color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 11px; min-width: 18px; text-align: center; }
.msg-tab.on .msg-badge { background: rgba(255,255,255,.25); color: #fff; }
.msg-item { cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; }
.msg-item:hover { border-color: var(--accent); }
.msg-item.is-read { opacity: .62; }
.msg-item.is-read .msg-text { color: var(--text-2); }
.msg-unread { color: var(--accent); font-weight: 600; }
.msg-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }

/* ============ 模板库 ============ */
.tpl-grid { gap: 16px; }
.tpl-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; transition: all .15s;
}
.tpl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tpl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 600; }
.tpl-meta { font-size: 12.5px; color: var(--text-3); }
.tpl-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; flex: 1; }
.tpl-apply { margin-top: 4px; }

/* ============ 团队效能：负载标签 ============ */
.load-pill { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.load-high { background: rgba(248,81,73,.16); color: var(--danger); }
.load-mid  { background: rgba(240,180,60,.18); color: #d9a020; }
.load-low  { background: rgba(63,185,80,.16); color: var(--ok); }

/* ============ 备注列内联编辑 ============ */
.editable-desc {
  cursor: text; border: 1px dashed var(--border); border-radius: var(--r-sm);
  padding: 8px 10px; min-height: 20px; transition: all .15s; line-height: 1.7;
}
.editable-desc:hover { border-color: var(--accent); background: var(--bg-hover); }
.editable-desc .muted { color: var(--text-3); }
.desc-edit-input {
  width: 100%; min-height: 72px; background: var(--bg-elev2); border: 1px solid var(--accent);
  border-radius: var(--r-sm); color: var(--text); padding: 8px 10px; outline: none; resize: vertical; font-size: 14px; line-height: 1.6;
}

/* ============ 在线同步状态徽标 ============ */
.sync-status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
  user-select: none;
}
.sync-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.sync-status.on { color: var(--ok); border-color: rgba(63,185,80,.4); }
.sync-status.on::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(63,185,80,.18); }
.sync-status.off { color: var(--text-3); }

/* ============ 全员灵感共创区 ============ */
.co-wrap { display: flex; flex-direction: column; gap: 20px; }
/* 项目公开数据大盘 */
.dash-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; }
.dash-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.dash-metrics { margin-top: 16px; }
.dash-sub { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
/* 灵感共创区 */
.co-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; }
.co-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.co-input-row { display: flex; flex-direction: column; gap: 10px; }
.co-text { min-height: 64px; resize: vertical; }
.co-input-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.co-input-meta select { flex: 1; min-width: 160px; }
.co-pool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; flex-wrap: wrap; }
.co-pool-title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.co-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.co-card { background: var(--bg-elev2); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; transition: all .15s; }
.co-card:hover { border-color: var(--accent); }
.co-open { border-left-color: var(--text-3); }
.co-claimed { border-left-color: var(--accent); }
.co-done { border-left-color: var(--ok); opacity: .9; }
.co-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.co-card-text { font-size: 14.5px; line-height: 1.65; color: var(--text); margin-bottom: 8px; }
.co-card-meta { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.co-card-ops { display: flex; gap: 8px; margin-top: 12px; }

/* ============ 贡献纪念墙 ============ */
.memorial-wrap { display: flex; flex-direction: column; gap: 22px; }
.mem-section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mem-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mem-card-top { display: flex; align-items: center; gap: 12px; }
.mem-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: 0 0 auto; }
.mem-id { min-width: 0; }
.mem-name { font-size: 16px; font-weight: 700; }
.mem-role { font-size: 12.5px; color: var(--text-2); }
.mem-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.mem-stat { display: flex; flex-direction: column; }
.mem-stat b { font-size: 19px; color: var(--accent); }
.mem-stat span { font-size: 11.5px; color: var(--text-3); }
.mem-period { font-size: 12px; color: var(--text-3); }
.mem-depart, .mem-restore { align-self: flex-start; }
/* 纪念区（离场）：肃穆金 + 暗底 */
.mem-memorial-block { background: linear-gradient(180deg, rgba(196,164,84,.10), rgba(196,164,84,.03)); border: 1px solid rgba(196,164,84,.35); border-radius: var(--r-md); padding: 18px; }
.mem-empty { font-size: 13.5px; color: var(--text-2); line-height: 1.7; padding: 6px 2px; }
.mem-departed { background: rgba(30,28,24,.6); border-color: rgba(196,164,84,.4); position: relative; }
.mem-departed .mem-name { color: #e9d9a8; }
.mem-departed .mem-stat b { color: #e0c074; }
.mem-avatar-x { background: rgba(196,164,84,.18); color: #e0c074; }
.mem-ribbon { position: absolute; top: 10px; right: 12px; font-size: 11px; color: #e0c074; border: 1px solid rgba(196,164,84,.5); border-radius: 999px; padding: 2px 9px; letter-spacing: .5px; }

/* 项目切换器（自定义深色下拉，按项目隔离） */
.project-switcher { display: flex; align-items: center; gap: 6px; }
.ps-wrap { position: relative; display: inline-flex; align-items: center; }
.ps-trigger {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--bg-elev2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-sm); padding: 6px 10px; font-size: 13px; max-width: 190px;
  transition: border-color .15s, background .15s;
}
.ps-trigger:hover { border-color: var(--border-2); }
.ps-trigger.open { border-color: var(--accent); }
.ps-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.ps-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 132px; }
.ps-caret { flex: none; opacity: .7; }
.ps-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 6px; z-index: 45;
  display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto;
}
.ps-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text-2); padding: 9px 12px; border-radius: var(--r-sm); font-size: 13.5px;
}
.ps-item:hover { background: var(--bg-hover); color: var(--text); }
.ps-item.on { color: var(--accent); background: var(--accent-soft); }

/* ============ 主动提醒横幅（B3：逾期 / 临近截止 主动提示） ============ */
.reminder-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(225,29,72,.12), rgba(245,158,11,.10));
  border: 1px solid rgba(225,29,72,.35); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
}
.reminder-banner .rb-ico { font-size: 18px; flex: none; }
.reminder-banner .rb-text { flex: 1; min-width: 160px; font-size: 13.5px; line-height: 1.5; }
.reminder-banner .rb-text b { color: var(--danger); }
.reminder-banner .rb-ops { display: inline-flex; gap: 8px; flex: none; }

/* ============ 一键汇报（B1）：可打印汇报弹层 ============ */
.report-mask { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 300; animation: fade .15s ease; }
.report-panel { width: 100%; max-width: 920px; max-height: 92vh; display: flex; flex-direction: column; background: #fff; color: #1f2937; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); overflow: hidden; }
.report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #e5e7eb; background: #f8fafc; flex: none; flex-wrap: wrap; }
.report-toolbar .rt-title { font-size: 15px; font-weight: 700; color: #111827; }
.report-toolbar .rt-periods { display: inline-flex; gap: 6px; }
.report-period { border: 1px solid #cbd5e1; background: #fff; color: #475569; border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; }
.report-period.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.report-toolbar .rt-ops { display: inline-flex; gap: 8px; }
.report-body { padding: 26px 30px 40px; overflow: auto; }
.report-body h1.rp-h1 { font-size: 22px; margin: 0 0 4px; color: #111827; }
.report-body .rp-sub { color: #6b7280; font-size: 13px; margin: 0 0 20px; }
.report-body .rp-sec { margin: 24px 0 10px; font-size: 15px; font-weight: 700; color: #111827; border-left: 4px solid #2563eb; padding-left: 10px; }
.report-body .rp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.report-body .rp-card { background: #f3f6fb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; }
.report-body .rp-card .c-k { color: #6b7280; font-size: 12px; }
.report-body .rp-card .c-v { font-size: 22px; font-weight: 700; color: #111827; margin-top: 4px; }
.report-body .rp-card.danger .c-v { color: #e11d48; }
.report-body .rp-card.ok .c-v { color: #059669; }
.report-body table.rp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.report-body table.rp-tbl th, .report-body table.rp-tbl td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.report-body table.rp-tbl th { background: #f1f5f9; color: #475569; font-weight: 600; }
.report-body .rp-bar { display: inline-block; width: 90px; height: 8px; border-radius: 6px; background: #e5e7eb; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.report-body .rp-bar > i { display: block; height: 100%; background: #2563eb; }
.report-body .rp-muted { color: #9ca3af; }
.report-body .rp-warn { color: #e11d48; font-weight: 600; }
.report-body .rp-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #eef2ff; color: #4338ca; }
.report-body .rp-tag.warn { background: #fee2e2; color: #b91c1c; }
@media print {
  body * { visibility: hidden !important; }
  #report-view, #report-view * { visibility: visible !important; }
  #report-view { position: absolute; inset: 0; background: #fff !important; }
  .report-mask { background: #fff !important; padding: 0; display: block; }
  .report-panel { max-width: none; max-height: none; box-shadow: none; border-radius: 0; }
  .report-toolbar { display: none !important; }
  .report-body { overflow: visible; padding: 0; }
}

/* ============ 顶栏窄屏适配（B2：防溢出，隐藏文字只留图标） ============ */
@media (max-width: 640px) {
  .topbar-right { gap: 6px; }
  .topbar-right .ghost-btn > span:not(.bell-badge) { display: none; }
  #btn-user #user-name { display: none; }
  #btn-user svg:last-child { display: none; }
  .sync-status { padding: 3px 7px; font-size: 11px; }
  .ps-trigger { max-width: 130px; }
  .reminder-banner { padding: 10px 12px; }
}

/* ============ 积分兑换模块 ============ */
.redeem-avail { font-size: 14px; margin: 6px 0 12px; color: #374151; }
.redeem-avail b { font-size: 20px; color: #2563eb; margin: 0 2px; }
.redeem-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.redeem-form .form-input { width: auto; min-width: 150px; }
.redeem-tip { margin-top: 12px; font-size: 12px; color: #6b7280; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px 12px; }
.redeem-list { display: flex; flex-direction: column; gap: 12px; }
.redeem-item { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; background: #fff; }
.redeem-row { margin: 4px 0; }
.redeem-snap { font-size: 12px; color: #475569; background: #f1f5f9; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.redeem-finlist { display: flex; flex-direction: column; gap: 8px; }
.redeem-fin { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tag-fin { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #ecfdf5; color: #047857; }
.tag-paid { color: #059669; font-weight: 600; }
.tag-pending { color: #d97706; font-weight: 600; }
.redeem-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.redeem-table th, .redeem-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.redeem-table th { background: #f1f5f9; color: #475569; font-weight: 600; }

/* 积分规则设置弹窗 */
.rule-set-body { max-height: 62vh; overflow: auto; }
.rule-set-group { margin-bottom: 12px; padding: 10px 12px; background: var(--bg-soft, #f8fafc); border: 1px solid var(--border); border-radius: var(--r-md); }
.rule-set-gtitle { font-weight: 600; color: var(--text); font-size: 13px; margin-bottom: 8px; }
.rule-set-group .form-row { margin-bottom: 8px; }
.rule-set-group .form-row:last-child { margin-bottom: 0; }

/* ============ 品牌设置弹窗（logo / 名称 / 副标题 / 口号） ============ */
.brand-set-body { max-height: 66vh; overflow: auto; }
.brand-logo-row { display: flex; align-items: center; gap: 16px; }
.brand-logo-prev {
  width: 76px; height: 76px; border-radius: 18px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
}
.brand-logo-prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-logo-ops { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.brand-logo-ops .tip { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.brand-preview {
  border: 1px dashed var(--border); border-radius: var(--r-md);
  padding: 12px 14px; background: var(--bg-elev2);
}
.brand-preview .bp-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.brand-preview .bp-bar { display: flex; align-items: center; gap: 11px; }
.brand-preview .bp-logo {
  width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: none;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
}
.brand-preview .bp-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-preview .bp-name { font-size: 16px; font-weight: 700; }
.brand-preview .bp-sub { font-size: 11.5px; color: var(--text-3); }
