/* 二期 PC 样式：与 theme.css / pc.css 变量保持一致 */
.p2-body { animation: viewIn .2s ease; }
.p2-desc { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); text-indent: 0; }
.p2-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.p2-loading, .p2-error, .p2-empty {
  padding: 28px 16px; text-align: center; font-size: 12.5px; color: var(--muted-2);
}
.p2-error { color: var(--red); }

/* 网格与卡片 */
.p2-grid { display: grid; gap: 12px; margin: 14px 0; }
.p2-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p2-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p2-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.p2-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: #fff;
  position: relative; overflow: hidden;
}
.p2-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--blue); opacity: .65;
}
.p2-card.warn::before { background: var(--orange); }
.p2-card.bad::before { background: var(--red); }
.p2-card.good::before { background: var(--green); }
.p2-card-k { font-size: 11.5px; color: var(--muted); }
.p2-card-v { font-size: 22px; font-weight: 600; color: var(--ink); margin: 4px 0 2px; letter-spacing: -.01em; }
.p2-card-f { font-size: 11px; color: var(--muted-2); }

/* 面板 */
.p2-panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: 14px 0; overflow: hidden; }
.p2-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 15px; border-bottom: 1px solid var(--line-2); background: #fafbfe;
}
.p2-panel-head h3 { margin: 0; font-size: 13px; color: var(--ink); font-weight: 600; }
.p2-panel-body { padding: 13px 15px; }
.p2-panel-body.flush { padding: 0; }
.p2-panel-tools { display: flex; gap: 6px; align-items: center; }

/* 表格 */
.p2-table-wrap { overflow: auto; }
.p2-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.p2-table th {
  text-align: left; padding: 9px 10px; background: #f6f8fd; color: var(--muted);
  font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--line-2);
}
.p2-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: middle; }
.p2-table tr:hover td { background: #fafcff; }
.p2-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p2-table td.act { white-space: nowrap; text-align: right; }
.p2-table .p2-empty { text-align: center; padding: 26px 0; color: var(--muted-2); }
.p2-link { color: var(--blue); cursor: pointer; }
.p2-link:hover { text-decoration: underline; }
.p2-mono { font-family: Consolas, monospace; font-size: 11.5px; color: var(--muted); }

/* 进度条 */
.p2-bar { height: 6px; border-radius: 4px; background: #eef1f7; overflow: hidden; }
.p2-bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; transition: width .4s; }
.p2-bar.warn i { background: var(--orange); }
.p2-bar.bad i { background: var(--red); }
.p2-bar.good i { background: var(--green); }

/* 表单 */
.p2-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.p2-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); }
.p2-field.full { grid-column: 1 / -1; }
.p2-field > span { color: var(--muted); font-size: 11.5px; }
.p2-field em { font-style: normal; font-size: 10.5px; color: var(--muted-2); }
.p2-field textarea.input { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.p2-field select.input { height: 32px; }
.p2-req { color: var(--red); }
.p2-form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.p2-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }

/* 分段 / 工具条 */
.p2-seg { display: inline-flex; background: #f2f4f9; border-radius: 7px; padding: 2px; gap: 2px; }
.p2-seg button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 5px;
  font-size: 11.5px; color: var(--muted); cursor: pointer;
}
.p2-seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(20, 40, 90, .1); }
.p2-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.p2-toolbar .input { height: 30px; width: 200px; }
.p2-toolbar .spacer { flex: 1; }
.p2-hint { font-size: 11.5px; color: var(--muted-2); }

/* 列表 */
.p2-list { display: flex; flex-direction: column; }
.p2-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px dashed var(--line-2); font-size: 12.5px;
}
.p2-row:last-child { border-bottom: 0; }
.p2-row .grow { flex: 1; min-width: 0; }
.p2-row b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }
.p2-row span { color: var(--muted); font-size: 11.5px; }
.p2-row .tail { color: var(--muted-2); font-size: 11px; white-space: nowrap; }

/* 时间线 */
.p2-timeline { position: relative; padding-left: 18px; }
.p2-timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.p2-tl-item { position: relative; padding: 0 0 12px; font-size: 12px; color: var(--ink-2); }
.p2-tl-item::before {
  content: ""; position: absolute; left: -16px; top: 4px; width: 7px; height: 7px;
  border-radius: 50%; background: #fff; border: 2px solid var(--blue);
}
.p2-tl-item b { color: var(--ink); font-weight: 500; }
.p2-tl-item em { display: block; font-style: normal; font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* 登录 */
.p2-login {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 20% 10%, #1b2a4a, #0d1524 60%);
}
.p2-login-card {
  width: 380px; background: #fff; border-radius: 14px; padding: 28px 30px 22px;
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .6);
}
.p2-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.p2-login-brand .mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, #3d78f2, #1f5ae0); color: #fff;
}
.p2-login-brand b { font-size: 14px; display: block; color: var(--ink); }
.p2-login-brand small { font-size: 9.5px; letter-spacing: .16em; color: var(--muted-2); }
.p2-login-card h2 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.p2-login-sub { margin: 0 0 16px; font-size: 11.5px; color: var(--muted-2); line-height: 1.7; }
.p2-login-err { min-height: 16px; font-size: 11.5px; color: var(--red); margin: 6px 0; }
.p2-login-btn { width: 100%; height: 36px; }
.p2-login-foot { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); margin-top: 14px; }
.p2-login-foot a { color: var(--blue); }

/* 全局搜索浮层 */
.p2-search-panel {
  position: absolute; left: 0; right: 0; top: 38px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(15, 30, 60, .35); padding: 8px; max-height: 460px; overflow: auto;
}
.p2-search-total { font-size: 10.5px; color: var(--muted-2); padding: 4px 8px 6px; }
.p2-search-k { font-size: 10.5px; color: var(--muted); padding: 5px 8px; letter-spacing: .04em; }
.p2-search-k em { font-style: normal; color: var(--muted-2); margin-left: 4px; }
.p2-search-item { padding: 7px 9px; border-radius: 6px; cursor: pointer; }
.p2-search-item:hover { background: #f4f7fd; }
.p2-search-item b { display: block; font-size: 12px; color: var(--ink); font-weight: 500; }
.p2-search-item span { font-size: 10.5px; color: var(--muted-2); }

/* 消息 */
.p2-msg-list { display: flex; flex-direction: column; }
.p2-msg {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px;
  border-bottom: 1px dashed var(--line-2); font-size: 12px;
}
.p2-msg.unread b { color: var(--ink); }
.p2-msg b { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.p2-msg p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); text-indent: 0; }
.p2-msg em { font-style: normal; font-size: 10.5px; color: var(--muted-2); margin-left: auto; white-space: nowrap; }
.p2-msg-type {
  font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--blue-50);
  color: var(--blue); white-space: nowrap;
}
.p2-msg.unread .p2-msg-type { background: var(--blue); color: #fff; }

/* 流程块 */
.p2-flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 0 8px; }
.p2-flow-node {
  min-width: 118px; border: 1px solid var(--line); border-right: 0; padding: 9px 11px;
  background: #fbfcff; position: relative;
}
.p2-flow-node:last-child { border-right: 1px solid var(--line); }
.p2-flow-node b { display: block; font-size: 12px; color: var(--ink); font-weight: 500; }
.p2-flow-node span { font-size: 10.5px; color: var(--muted-2); }
.p2-flow-node.on { background: var(--blue-50); border-color: #bcd2f7; }
.p2-flow-node em {
  font-style: normal; display: inline-block; margin-top: 4px; font-size: 9.5px;
  padding: 1px 5px; border-radius: 3px; background: #eef2fa; color: var(--muted);
}

/* 分栏与键值 */
.p2-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.p2-kv { display: grid; grid-template-columns: 88px 1fr; gap: 7px 10px; font-size: 12px; }
.p2-kv dt { color: var(--muted); }
.p2-kv dd { margin: 0; color: var(--ink); }

/* 标签页 */
.p2-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; }
.p2-tabs button {
  border: 0; background: transparent; padding: 8px 14px; font-size: 12.5px;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.p2-tabs button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }

/* 图表 */
.p2-bars { display: flex; align-items: flex-end; gap: 14px; height: 130px; padding: 8px 4px 0; }
.p2-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.p2-bars .col i { width: 100%; max-width: 42px; background: linear-gradient(180deg, #6f9bf0, #2f6fe4); border-radius: 4px 4px 0 0; display: block; }
.p2-bars .col b { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.p2-donut { display: flex; gap: 18px; align-items: center; }
.p2-legend { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.p2-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

@media (max-width: 1280px) {
  .p2-grid-4, .p2-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p2-split { grid-template-columns: 1fr; }
}
