/* 子系统通用样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f3f5f9; color: #1f2937; line-height: 1.7; }
.topbar2 {
  background: #fff; border-bottom: 1px solid #e5e9f2;
  padding: 12px 28px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 5;
}
.topbar2 .back {
  display: inline-flex; align-items: center; gap: 4px;
  color: #475569; font-size: 14px; cursor: pointer;
  background: #f1f5f9; padding: 6px 14px; border-radius: 6px;
}
.topbar2 .back:hover { background: #e2e8f0; }
.topbar2 .syslogo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600;
}
.topbar2 .systitle { font-size: 17px; font-weight: 600; color: #0f172a; }
.topbar2 .sysdesc { font-size: 12px; color: #94a3b8; }
.topbar2 .grow { flex: 1; }
.topbar2 .user { display: flex; align-items: center; gap: 8px; }
.topbar2 .avatar { width: 32px; height: 32px; border-radius: 50%; background: #0052d9; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.topbar2 .uname { font-size: 13px; font-weight: 600; }
.topbar2 .urole { font-size: 11px; color: #94a3b8; }

.container { max-width: 1180px; margin: 0 auto; padding: 24px 28px 80px; }

/* 系统级未读消息条 */
.notice-bar {
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 14px 18px;
  margin-bottom: 18px; font-size: 13px;
  display: flex; align-items: center; gap: 14px;
}
.notice-bar .icon { font-size: 18px; }
.notice-bar .count {
  background: #ef4444; color: #fff; padding: 2px 9px;
  border-radius: 10px; font-size: 12px; font-weight: 600;
}
.notice-bar .latest { flex: 1; }
.notice-bar .mark {
  background: #fff; border: 1px solid #fde68a;
  padding: 5px 12px; border-radius: 6px;
  cursor: pointer; font-size: 12px; color: #92400e;
}
.notice-bar.empty { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.notice-bar.empty .count { background: #16a34a; }

.section { background: #fff; border-radius: 12px; padding: 22px 26px; margin-bottom: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.section h2 { font-size: 17px; color: #0f172a; margin-bottom: 14px; padding-left: 12px; border-left: 4px solid var(--c1); }
.section h3 { font-size: 15px; color: #0f172a; margin: 12px 0 8px; }

.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi .card { background: #fcfdff; border: 1px solid #e5e9f2; border-radius: 10px; padding: 16px 18px; }
.kpi .label { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.kpi .value { font-size: 22px; font-weight: 700; color: #0f172a; }
.kpi .delta { font-size: 11px; margin-top: 4px; color: #64748b; }
.kpi .delta.ok { color: #16a34a; }
.kpi .delta.warn { color: #ea580c; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid #eef0f6; padding: 10px 12px; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #475569; font-weight: 600; }
.muted { color: #94a3b8; font-size: 12px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.approved { background: #dcfce7; color: #166534; }
.pill.rejected { background: #fee2e2; color: #991b1b; }
.pill.reserved { background: #e0f2fe; color: #075985; }
.pill.deducted { background: #ddd6fe; color: #5b21b6; }
.pill.draft { background: #f1f5f9; color: #475569; }

.empty-state { text-align: center; padding: 40px 0; color: #94a3b8; font-size: 13px; }

.btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; border: none; }
.btn.primary { background: #0052d9; color: #fff; }
.btn.primary:hover { background: #003eaf; }
.btn.danger { background: #fee2e2; color: #991b1b; }
.btn.danger:hover { background: #fecaca; }
.btn.ghost { background: #f1f5f9; color: #475569; }

@media (max-width: 920px) {
  .kpi { grid-template-columns: repeat(2, 1fr); }
}
