/* ============================================================
   HRCore — NetSuite 风格 UI  (零构建静态原型)
   深色顶栏 + 左侧模块栏 + portlet 卡片 + 密集数据表 + 状态 pill
   ============================================================ */
:root {
  --ns-topbar:   #1c3d5a;
  --ns-topbar2:  #15314a;
  --ns-accent:   #2f6fb0;
  --ns-accent-d: #21527f;
  --ns-bg:       #eef2f5;
  --ns-card:     #ffffff;
  --ns-line:     #d6dde3;
  --ns-line-2:   #e5eaee;
  --ns-head:     #f4f7f9;
  --ns-head-2:   #eaf0f4;
  --ns-text:     #243240;
  --ns-muted:    #6b7884;
  --ns-faint:    #9aa6b1;

  --ok-fg:#1f8a4c; --ok-bg:#e3f5ea;
  --info-fg:#2f6fb0; --info-bg:#e6f0f9;
  --warn-fg:#a9711a; --warn-bg:#fbf0d8;
  --mute-fg:#5d6b78; --mute-bg:#eceef0;
  --danger-fg:#c0392b; --danger-bg:#fbe6e3;
  --purple-fg:#6b4ea0; --purple-bg:#efe9f7;

  --sb-w: 212px;
  --top-h: 46px;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--ns-text);
  background: var(--ns-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ns-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
.ns-top {
  height: var(--top-h);
  background: linear-gradient(180deg, var(--ns-topbar) 0%, var(--ns-topbar2) 100%);
  color: #eaf1f7;
  display: flex; align-items: center;
  padding: 0 14px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.ns-logo { display:flex; align-items:center; gap:9px; font-weight:700; letter-spacing:.2px; }
.ns-logo .mark {
  width:26px; height:26px; border-radius:6px;
  background: linear-gradient(135deg,#3f86c8,#2f6fb0);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:800; font-size:14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.ns-logo .name { font-size:15px; }
.ns-logo .sub { font-size:11px; color:#9fc0dc; font-weight:500; margin-left:2px; }

.ns-top .grow { flex:1; }
.ns-search {
  display:flex; align-items:center; gap:6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  border-radius:5px; padding:5px 9px; width:300px;
  color:#cfe0ee;
}
.ns-search input {
  background:transparent; border:0; outline:0; color:#fff; font-size:12.5px; width:100%;
}
.ns-search input::placeholder { color:#a8c2d8; }

.ns-top .tools { display:flex; align-items:center; gap:14px; margin-left:14px; }
.ns-top .tools .ic { color:#bcd3e6; cursor:pointer; display:flex; }
.ns-top .tools .ic:hover { color:#fff; }
.ns-user { display:flex; align-items:center; gap:8px; cursor:pointer; }
.ns-user .av {
  width:28px; height:28px; border-radius:50%;
  background:#3f86c8; color:#fff; font-weight:700; font-size:12px;
  display:flex; align-items:center; justify-content:center;
}
.ns-user .who { line-height:1.15; }
.ns-user .who b { font-size:12.5px; display:block; color:#fff; font-weight:600; }
.ns-user .who span { font-size:10.5px; color:#9fc0dc; }

/* ---------- shell ---------- */
.ns-body { display:flex; min-height: calc(100vh - var(--top-h)); }

/* ---------- sidebar ---------- */
.ns-side {
  width: var(--sb-w); flex:0 0 var(--sb-w);
  background: #fbfcfd;
  border-right: 1px solid var(--ns-line);
  padding: 8px 0 24px;
}
.ns-side .grp {
  padding: 14px 16px 5px; font-size:10.5px; font-weight:700; letter-spacing:.6px;
  color: var(--ns-faint); text-transform: uppercase;
}
.ns-side a.item {
  display:flex; align-items:center; gap:9px;
  padding: 7px 16px; color: var(--ns-text); font-size:13px;
  border-left: 3px solid transparent;
}
.ns-side a.item:hover { background:#eef3f7; text-decoration:none; }
.ns-side a.item .ic { color: var(--ns-muted); display:flex; width:16px; justify-content:center; }
.ns-side a.item.active {
  background:#e7f0f8; border-left-color: var(--ns-accent);
  color: var(--ns-accent-d); font-weight:600;
}
.ns-side a.item.active .ic { color: var(--ns-accent); }
.ns-side a.item .badge {
  margin-left:auto; background:var(--danger-bg); color:var(--danger-fg);
  font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:9px;
}

/* ---------- content ---------- */
.ns-content { flex:1; min-width:0; padding: 0 20px 40px; }
.ns-crumb { font-size:11.5px; color:var(--ns-muted); padding:12px 0 0; }
.ns-crumb a { color:var(--ns-muted); }
.ns-pagehead { display:flex; align-items:flex-end; gap:14px; padding:4px 0 14px; border-bottom:1px solid var(--ns-line); margin-bottom:16px; }
.ns-pagehead h1 { font-size:21px; margin:6px 0 0; font-weight:600; color:#1c2b38; }
.ns-pagehead .desc { font-size:12.5px; color:var(--ns-muted); margin-top:3px; }
.ns-pagehead .actions { margin-left:auto; display:flex; gap:8px; align-items:center; }

/* ---------- buttons ---------- */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:600; cursor:pointer;
  padding:6px 12px; border-radius:5px; border:1px solid var(--ns-line);
  background:#fff; color:var(--ns-text);
}
.btn:hover { background:#f3f6f9; }
.btn.primary { background:linear-gradient(180deg,#3a82c4,#2f6fb0); border-color:#2a649f; color:#fff; }
.btn.primary:hover { background:linear-gradient(180deg,#3577b6,#2a649f); }
.btn.ghost { background:transparent; border-color:transparent; color:var(--ns-accent); }
.btn.sm { padding:3px 8px; font-size:11.5px; }

/* ---------- KPI portlets ---------- */
.kpi-row { display:grid; grid-template-columns: repeat(6, 1fr); gap:12px; margin-bottom:16px; }
.kpi {
  background:var(--ns-card); border:1px solid var(--ns-line); border-radius:7px;
  padding:12px 13px; position:relative; overflow:hidden;
}
.kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--ns-accent); }
.kpi.g::before{background:var(--ok-fg);} .kpi.a::before{background:var(--warn-fg);}
.kpi.r::before{background:var(--danger-fg);} .kpi.p::before{background:var(--purple-fg);}
.kpi .lbl { font-size:11.5px; color:var(--ns-muted); }
.kpi .val { font-size:25px; font-weight:700; color:#1c2b38; line-height:1.1; margin-top:5px; }
.kpi .sub { font-size:11px; margin-top:3px; color:var(--ns-faint); }
.kpi .sub .up{color:var(--ok-fg);} .kpi .sub .down{color:var(--danger-fg);}

/* ---------- portlet card ---------- */
.grid { display:grid; gap:14px; }
.grid.c2 { grid-template-columns: 1fr 1fr; }
.grid.c3 { grid-template-columns: 1fr 1fr 1fr; }
.grid.s21 { grid-template-columns: 2fr 1fr; }
.portlet { background:var(--ns-card); border:1px solid var(--ns-line); border-radius:7px; overflow:hidden; }
.portlet > .ph {
  display:flex; align-items:center; gap:8px;
  background:linear-gradient(180deg,#f7fafc,#eef3f7);
  border-bottom:1px solid var(--ns-line);
  padding:8px 12px; font-weight:600; font-size:13px; color:#243240;
}
.portlet > .ph .ic { color:var(--ns-accent); display:flex; }
.portlet > .ph .right { margin-left:auto; font-size:11.5px; font-weight:500; }
.portlet > .pb { padding:12px; }
.portlet > .pb.flush { padding:0; }

/* ---------- tables ---------- */
table.ns { width:100%; border-collapse:collapse; font-size:12.5px; }
table.ns th, table.ns td { padding:6px 10px; text-align:left; border-bottom:1px solid var(--ns-line-2); white-space:nowrap; }
table.ns thead th {
  background:var(--ns-head); color:#46586a; font-weight:600; font-size:11.5px;
  border-bottom:1px solid var(--ns-line); position:sticky; top:0;
  cursor:default; user-select:none;
}
table.ns tbody tr:hover { background:#f5f9fc; }
table.ns td.num, table.ns th.num { text-align:right; font-variant-numeric: tabular-nums; }
table.ns td .muted { color:var(--ns-muted); }
table.ns .name-cell { font-weight:600; color:#1c2b38; }
table.ns .name-cell small { display:block; font-weight:400; color:var(--ns-faint); font-size:10.5px; }
.table-wrap { max-height: none; overflow:auto; }

/* ---------- pills ---------- */
.pill {
  display:inline-flex; align-items:center; gap:4px;
  font-size:11px; font-weight:600; padding:2px 8px; border-radius:11px; line-height:1.5;
  white-space:nowrap;
}
.pill::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.9; }
.pill.ok{color:var(--ok-fg);background:var(--ok-bg);}
.pill.info{color:var(--info-fg);background:var(--info-bg);}
.pill.warn{color:var(--warn-fg);background:var(--warn-bg);}
.pill.mute{color:var(--mute-fg);background:var(--mute-bg);}
.pill.danger{color:var(--danger-fg);background:var(--danger-bg);}
.pill.purple{color:var(--purple-fg);background:var(--purple-bg);}
.pill.flat::before{display:none;}

/* entity tag */
.tag { display:inline-block; font-size:10.5px; font-weight:600; padding:1px 7px; border-radius:4px;
       background:#eef3f7; color:#4a6075; border:1px solid #dde6ee; }

/* ---------- progress ---------- */
.prog { display:flex; align-items:center; gap:8px; min-width:120px; }
.prog .bar { flex:1; height:7px; border-radius:4px; background:#e7edf2; overflow:hidden; }
.prog .bar > i { display:block; height:100%; background:linear-gradient(90deg,#3a82c4,#2f6fb0); border-radius:4px; }
.prog .bar > i.ok{ background:linear-gradient(90deg,#2b9e5e,#1f8a4c); }
.prog .bar > i.warn{ background:linear-gradient(90deg,#d39a3c,#a9711a); }
.prog .pct { font-size:11px; color:var(--ns-muted); width:34px; text-align:right; }

/* ---------- checklist / steps ---------- */
.steps { display:flex; gap:0; margin:2px 0 4px; }
.steps .st { display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--ns-muted); }
.steps .st + .st::before { content:""; width:22px; height:1px; background:var(--ns-line); margin:0 8px; }
.steps .st .dot { width:16px;height:16px;border-radius:50%;border:1.5px solid var(--ns-line); display:flex;align-items:center;justify-content:center; font-size:9px; color:#fff; background:#fff; }
.steps .st.done .dot{ background:var(--ok-fg); border-color:var(--ok-fg);}
.steps .st.done { color:var(--ok-fg); }
.steps .st.cur .dot{ background:var(--ns-accent); border-color:var(--ns-accent);}
.steps .st.cur { color:var(--ns-accent-d); font-weight:600; }

.chk { list-style:none; margin:0; padding:0; }
.chk li { display:flex; align-items:center; gap:9px; padding:7px 2px; border-bottom:1px dashed var(--ns-line-2); font-size:12.5px; }
.chk li:last-child{border-bottom:0;}
.chk .box { width:16px;height:16px;border-radius:4px;border:1.5px solid var(--ns-line); display:flex;align-items:center;justify-content:center;color:#fff; font-size:10px; }
.chk li.done .box{ background:var(--ok-fg); border-color:var(--ok-fg);}
.chk li.done .t{ color:var(--ns-muted); }
.chk li.block .box{ background:var(--danger-bg); border-color:var(--danger-fg); color:var(--danger-fg); }
.chk .meta{ margin-left:auto; font-size:11px; color:var(--ns-faint); }

/* ---------- misc ---------- */
.note { font-size:12px; padding:9px 12px; border-radius:6px; border:1px solid; line-height:1.5; }
.note.warn{ background:var(--warn-bg); border-color:#ecd49a; color:#7a560f; }
.note.info{ background:var(--info-bg); border-color:#bcd6ef; color:#1e4a72; }
.note.danger{ background:var(--danger-bg); border-color:#edb8b0; color:#8a2a1e; }
.filters { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.filters select, .filters input {
  font-size:12.5px; padding:5px 8px; border:1px solid var(--ns-line); border-radius:5px; background:#fff; color:var(--ns-text);
}
.spacer{ flex:1; }
.legend { display:flex; gap:14px; font-size:11.5px; color:var(--ns-muted); flex-wrap:wrap; }
.kv { display:grid; grid-template-columns: 96px 1fr; gap:6px 10px; font-size:12.5px; }
.kv dt{ color:var(--ns-muted); } .kv dd{ margin:0; color:var(--ns-text); font-weight:500; }
.section-title{ font-size:13px; font-weight:700; color:#33485c; margin:16px 0 8px; display:flex; align-items:center; gap:7px;}
.section-title .ic{color:var(--ns-accent);display:flex;}

.empty { text-align:center; color:var(--ns-faint); font-size:12.5px; padding:26px; }

/* tabs */
.tabs { display:flex; gap:2px; border-bottom:1px solid var(--ns-line); margin-bottom:14px; }
.tabs button { border:0; background:transparent; padding:8px 14px; font-size:13px; cursor:pointer; color:var(--ns-muted); border-bottom:2px solid transparent; font-weight:500;}
.tabs button.active{ color:var(--ns-accent-d); border-bottom-color:var(--ns-accent); font-weight:600; }

/* responsive */
@media (max-width: 1200px){ .kpi-row{ grid-template-columns: repeat(3,1fr);} }
/* ---------- 移动端 ---------- */
.ns-burger{ display:none; align-items:center; color:#bcd3e6; cursor:pointer; margin-right:4px; }
.ns-burger:hover{ color:#fff; }
.ns-overlay{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:45; }
.ns-overlay.show{ display:block; }

@media (max-width: 980px){
  .ns-burger{ display:flex; }
  .ns-side{ position:fixed; top:var(--top-h); left:0; bottom:0; width:236px; transform:translateX(-100%); transition:transform .22s ease; z-index:50; overflow:auto; }
  .ns-side.open{ transform:translateX(0); box-shadow:6px 0 24px rgba(0,0,0,.25); }
  .ns-content{ padding:0 14px 36px; }
  .grid.c2,.grid.c3,.grid.s21{ grid-template-columns:1fr; }
  .ns-search{ width:150px; }
}
@media (max-width: 720px){
  .ns-search{ display:none; }
  .ns-user .who{ display:none; }
  .ns-pagehead{ flex-wrap:wrap; }
  .ns-pagehead .actions{ margin-left:0; width:100%; }
  .kpi-row{ grid-template-columns:repeat(2,1fr) !important; }
}
/* 窄屏:数据表转堆叠卡片(依赖 NS.table 注入的 td[data-label]) */
@media (max-width: 640px){
  table.ns thead{ display:none; }
  table.ns, table.ns tbody{ display:block; width:100%; }
  table.ns tr{ display:block; border:1px solid var(--ns-line); border-radius:7px; margin:0 0 10px; padding:3px 0; background:#fff; }
  table.ns tr:hover{ background:#fff; }
  table.ns td{ display:flex; justify-content:space-between; align-items:center; gap:14px; border:0; border-bottom:1px dashed var(--ns-line-2); padding:7px 12px; white-space:normal; text-align:right; }
  table.ns td:last-child{ border-bottom:0; }
  table.ns td::before{ content:attr(data-label); font-weight:600; color:#46586a; text-align:left; flex:0 0 38%; font-size:11.5px; }
  .table-wrap{ overflow:visible; }
}

/* ---------- modal ---------- */
.modal-ov{ position:fixed; inset:0; background:rgba(20,30,40,.45); display:flex; align-items:flex-start; justify-content:center; z-index:200; padding:60px 16px; overflow:auto; }
.modal{ background:#fff; border-radius:10px; width:480px; max-width:94vw; box-shadow:0 24px 64px rgba(0,0,0,.32); animation:min .16s ease; }
@keyframes min{ from{opacity:0; transform:translateY(-12px);} to{opacity:1; transform:none;} }
.modal .mh{ display:flex; align-items:center; padding:14px 18px; border-bottom:1px solid var(--ns-line); font-weight:600; font-size:15px; color:#1c2b38; }
.modal .mh .x{ margin-left:auto; cursor:pointer; color:var(--ns-muted); font-size:22px; line-height:1; padding:0 2px; }
.modal .mh .x:hover{ color:var(--ns-text); }
.modal .mb{ padding:16px 18px; }
.modal .mf{ display:flex; justify-content:flex-end; gap:8px; padding:12px 18px; border-top:1px solid var(--ns-line); }
.frow{ margin-bottom:12px; }
.frow:last-child{ margin-bottom:0; }
.frow > label{ display:block; font-size:12px; color:var(--ns-muted); margin-bottom:4px; }
.frow input, .frow select, .frow textarea{ width:100%; padding:7px 9px; border:1px solid var(--ns-line); border-radius:5px; font-size:13px; font-family:inherit; background:#fff; color:var(--ns-text); }
.frow input:focus, .frow select:focus, .frow textarea:focus{ outline:none; border-color:var(--ns-accent); box-shadow:0 0 0 3px rgba(47,111,176,.12); }
.frow input:disabled, .frow select:disabled{ background:#f3f5f7; color:var(--ns-muted); }
.frow textarea{ min-height:62px; resize:vertical; }
.frow .help{ font-size:11px; color:var(--ns-faint); margin-top:3px; }
.frow.two{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.frow.two > div{ min-width:0; }

/* ---------- toast ---------- */
.toast-wrap{ position:fixed; top:58px; right:18px; z-index:300; display:flex; flex-direction:column; gap:8px; }
.toast{ background:#fff; border-left:4px solid var(--ok-fg); box-shadow:0 6px 22px rgba(0,0,0,.18); border-radius:6px; padding:10px 14px; font-size:13px; min-width:230px; max-width:340px; animation:tin .2s ease; color:var(--ns-text); }
.toast.err{ border-left-color:var(--danger-fg); }
.toast.info{ border-left-color:var(--info-fg); }
.toast.warn{ border-left-color:var(--warn-fg); }
@keyframes tin{ from{opacity:0; transform:translateX(24px);} to{opacity:1; transform:none;} }

.clickable{ cursor:pointer; }
.row-link{ cursor:pointer; }
table.ns tbody tr.row-link:hover{ background:#eef6fc; }

/* ---------- login ---------- */
.login-body{ background:linear-gradient(135deg,#1c3d5a 0%,#2f6fb0 100%); min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.login-card{ background:#fff; width:368px; max-width:94vw; border-radius:12px; box-shadow:0 24px 70px rgba(0,0,0,.35); padding:28px 26px; }
.login-brand{ display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.login-brand .mark{ width:42px; height:42px; border-radius:10px; background:linear-gradient(135deg,#3f86c8,#2f6fb0); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:21px; }
.login-brand .bn{ font-size:20px; font-weight:700; color:#1c2b38; }
.login-brand .bs{ font-size:12px; color:var(--ns-muted); margin-top:2px; }
.login-demo{ margin-top:18px; border-top:1px solid var(--ns-line); padding-top:14px; }
.login-demo .dt{ font-size:11.5px; color:var(--ns-faint); margin-bottom:8px; }
.login-demo .chips{ display:flex; gap:7px; flex-wrap:wrap; }
.login-demo .chip{ border:1px solid var(--ns-line); background:#f6f9fb; border-radius:20px; padding:4px 12px; font-size:12px; cursor:pointer; color:var(--ns-accent-d); }
.login-demo .chip:hover{ background:#eaf2f8; }

/* ---------- 角色门禁(后端同样强制)---------- */
body[data-role="AUDITOR"] #page-actions{ display:none !important; }
body[data-role="AUDITOR"] .btn-approve,
body[data-role="AUDITOR"] .btn-reject,
body[data-role="AUDITOR"] .btn-eval,
body[data-role="AUDITOR"] .btn-fin,
body[data-role="AUDITOR"] .btn-ho,
body[data-role="AUDITOR"] .btn-new{ display:none !important; }
body[data-role="AUDITOR"] .row-link,
body[data-role="AUDITOR"] .chk li.clickable{ pointer-events:none; }
body[data-role="MANAGER"] .needs-hr,
body[data-role="AUDITOR"] .needs-hr{ display:none !important; }
.ro-banner{ background:var(--info-bg); color:var(--info-fg); font-size:12px; padding:6px 12px; border-radius:6px; margin-bottom:12px; display:none; }
body[data-role="AUDITOR"] .ro-banner{ display:block; }

/* ---------- 组织架构树 ---------- */
.org-scroll{ overflow:auto; padding:10px 4px 20px; }
.tree{ display:inline-block; min-width:100%; }
.tree ul{ position:relative; padding-top:22px; display:flex; justify-content:center; list-style:none; margin:0; }
.tree li{ list-style:none; position:relative; padding:22px 10px 0; text-align:center; }
.tree li::before, .tree li::after{ content:""; position:absolute; top:0; right:50%; border-top:1.5px solid #cdd7df; width:50%; height:22px; }
.tree li::after{ right:auto; left:50%; border-left:1.5px solid #cdd7df; }
.tree li:only-child::after, .tree li:only-child::before{ display:none; }
.tree li:only-child{ padding-top:0; }
.tree li:first-child::before, .tree li:last-child::after{ border:0 none; }
.tree li:last-child::before{ border-right:1.5px solid #cdd7df; border-radius:0 6px 0 0; }
.tree li:first-child::after{ border-radius:6px 0 0 0; }
.tree ul ul::before{ content:""; position:absolute; top:0; left:50%; border-left:1.5px solid #cdd7df; width:0; height:22px; }
.node{ display:inline-block; border:1px solid var(--ns-line); border-radius:8px; background:#fff; padding:8px 12px; min-width:130px; box-shadow:0 1px 2px rgba(0,0,0,.05); text-align:left; }
.node .nm{ font-weight:600; color:#1c2b38; font-size:13px; display:flex; align-items:center; gap:6px; }
.node .ti{ font-size:11px; color:var(--ns-muted); margin-top:2px; }
.node .nb{ font-size:10.5px; color:var(--ns-faint); margin-top:3px; }
.node.root{ background:linear-gradient(180deg,#1c3d5a,#15314a); color:#fff; }
.node.root .nm{ color:#fff; } .node.root .ti{ color:#bcd3e6; }
.node .sdot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.node a{ color:inherit; }

/* ---------- charts ---------- */
.chart-legend{ display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:10px; font-size:11.5px; color:var(--ns-muted); }
.chart-legend .li{ display:flex; align-items:center; gap:6px; }
.chart-legend .sw{ width:10px; height:10px; border-radius:2px; display:inline-block; }
.chart-empty{ color:var(--ns-faint); text-align:center; padding:30px; font-size:12.5px; }

/* ---------- 通知 ---------- */
.topbadge{ position:absolute; top:-5px; right:-7px; background:#e0584a; color:#fff; font-size:9.5px; font-weight:700; min-width:15px; height:15px; border-radius:8px; display:flex; align-items:center; justify-content:center; padding:0 3px; box-shadow:0 0 0 1.5px var(--ns-topbar); }
.notif{ display:flex; gap:11px; padding:11px 4px; border-bottom:1px dashed var(--ns-line-2); }
.notif:last-child{ border-bottom:0; }
.notif .dot{ width:8px; height:8px; border-radius:50%; background:var(--ns-accent); margin-top:5px; flex:0 0 8px; }
.notif.read .dot{ background:#d6dde3; }
.notif .nx{ flex:1; min-width:0; }
.notif .nt{ font-weight:600; color:#1c2b38; font-size:13px; }
.notif.read .nt{ font-weight:500; color:#46586a; }
.notif .nb{ font-size:12px; color:var(--ns-muted); margin-top:2px; }
.notif .nm{ font-size:11px; color:var(--ns-faint); margin-top:3px; }

/* ---------- 全局搜索结果 ---------- */
.search-results{ position:absolute; top:38px; left:0; right:0; background:#fff; border:1px solid var(--ns-line); border-radius:7px; box-shadow:0 12px 32px rgba(0,0,0,.2); max-height:400px; overflow:auto; display:none; z-index:120; }
.sr-item{ display:flex; align-items:center; gap:10px; padding:8px 11px; border-bottom:1px solid var(--ns-line-2); color:var(--ns-text); }
.sr-item:hover{ background:#f3f7fa; text-decoration:none; }
.sr-item:last-child{ border-bottom:0; }
.sr-type{ flex:0 0 auto; font-size:10.5px; font-weight:700; color:var(--ns-accent-d); background:#e7f0f8; border-radius:4px; padding:2px 7px; }
.sr-x{ display:flex; flex-direction:column; min-width:0; }
.sr-x b{ font-size:13px; color:#1c2b38; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sr-x small{ font-size:11px; color:var(--ns-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sr-empty{ padding:14px; text-align:center; color:var(--ns-faint); font-size:12.5px; }

/* ---------- 打印(隐藏外壳,用于页面导出 PDF)---------- */
@media print {
  .ns-top, .ns-side, .ns-overlay, #page-actions, .ns-crumb, .filters .spacer { display:none !important; }
  .ns-content { padding:0 !important; }
  .portlet { break-inside: avoid; box-shadow:none; }
  body { background:#fff; }
}
