/* =========================================================
   联核租服务平台 — 后台端共享设计系统
   深蓝 #173E64 + 橙 #E8751A + 数据蓝 #0EA5E9 三主色，PingFang SC
   组件结构与联核实验室平台保持一致，便于双平台视觉统一
   ========================================================= */
:root {
  --brand-orange: #E8751A;
  --brand-orange-d: #C9501A;
  --primary: #173E64;
  --primary-dark: #0F2940;
  --primary-mid: #2A5A8C;
  --navy: #173E64;
  --panel: #FFFFFF;
  --panel-border: #E2E8F0;
  --bg: #F5F7FA;
  --slate: #475569;
  --text-dim: #64748B;
  --text: #0F172A;
  --green: #16A34A;
  --green-led: #22C55E;
  --blue: #0EA5E9;
  --blue-light: #E0F2FE;
  --blue-ink: #0E7BC4;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans); background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(232,117,26,0.18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 8px; }

.app { display: flex; flex-direction: column; min-height: 100vh; }

/* ===== 顶栏 ===== */
.topbar {
  height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 24px;
  padding: 0 24px; background: #FFFFFF;
  border-bottom: 1px solid var(--panel-border); position: sticky; top: 0; z-index: 20;
}
.top-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -0.02em; flex-shrink: 0; }
.top-brand b { color: var(--brand-orange); font-weight: 800; }
.top-brand span { color: var(--primary); font-weight: 800; }
.top-role { font-size: 12px; font-weight: 600; color: var(--brand-orange); background: rgba(232,117,26,0.10); border: 1px solid rgba(232,117,26,0.35); padding: 3px 10px; border-radius: 999px; }
.top-search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px;
  background: #FFFFFF; border: 1px solid var(--panel-border); border-radius: 10px; padding: 9px 14px; color: var(--slate);
}
.top-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font-size: 14px; font-family: inherit; }
.top-search input::placeholder { color: var(--text-dim); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.top-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green); }
.top-status .led { width: 8px; height: 8px; border-radius: 50%; background: var(--green-led); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.top-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #475569; }
.top-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#E8751A,#C9501A); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #FFFFFF; font-size: 13px; }
.top-exit { font-size: 13px; color: #475569; padding: 7px 14px; border: 1px solid var(--panel-border); border-radius: 8px; transition: .2s; }
.top-exit:hover { color: var(--brand-orange); border-color: var(--brand-orange); }

/* ===== 布局 ===== */
.layout { display: flex; flex: 1; }
.sidebar {
  width: 224px; flex-shrink: 0; padding: 22px 16px; border-right: 1px solid var(--panel-border);
  background: #FFFFFF; overflow-y: auto;
}
.nav-group { font-size: 11px; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; margin: 18px 10px 10px; }
.nav-group:first-child { margin-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  font-size: 14px; color: #475569; cursor: pointer; transition: .18s; margin-bottom: 4px;
}
.nav-item svg { width: 18px; height: 18px; stroke: #64748B; flex-shrink: 0; }
.nav-item:hover { background: #F0F4F8; color: #0F172A; }
.nav-item.active { background: linear-gradient(90deg, rgba(232,117,26,0.10), transparent); color: #0F172A; font-weight: 600; }
.nav-item.active svg { stroke: var(--brand-orange); }
.nav-badge { margin-left: auto; font-size: 11px; background: rgba(232,117,26,0.18); color: var(--brand-orange); padding: 1px 8px; border-radius: 999px; }

.content { flex: 1; padding: 26px 30px; overflow: auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; color: #0F172A; }
.page-head .crumb { font-size: 13px; color: #64748B; margin-bottom: 4px; }
.page-head .time { font-size: 13px; color: #475569; }

/* 概览卡 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { position: relative; padding: 18px 20px; border-radius: 14px; overflow: hidden; background: #FFFFFF; border: 1px solid var(--panel-border); }
.stat .ico { width: 34px; height: 34px; border-radius: 9px; background: rgba(14,165,233,0.12); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.stat .ico svg { width: 18px; height: 18px; stroke: var(--blue); }
.stat .label { font-size: 13px; color: #475569; }
.stat .val { font-size: 28px; font-weight: 800; color: #0F172A; margin: 4px 0 2px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: 12px; color: var(--green); }
.stat .delta.down { color: #FF8A5C; }

/* 主区两栏 */
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-bottom: 22px; }
.card { background: #FFFFFF; border: 1px solid var(--panel-border); border-radius: 12px; padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: #0F172A; display: flex; align-items: center; gap: 9px; }
.card-head h3 .tag { font-size: 11px; font-weight: 600; color: var(--brand-orange); border: 1px solid rgba(232,117,26,0.4); padding: 2px 8px; border-radius: 999px; }
.card-head .more { font-size: 13px; color: #475569; cursor: pointer; }
.card-head .more:hover { color: var(--brand-orange); }

/* 数据闭环流水线 */
.pipeline { width: 100%; height: 200px; }
.pl-node { cursor: pointer; transition: .2s; }
.pl-node:hover .pl-box { stroke: var(--brand-orange); }
.pl-box { fill: #F8FAFC; stroke: #E2E8F0; stroke-width: 1.4; transition: .2s; }
.pl-title { fill: #0F172A; font-size: 12.5px; font-weight: 700; font-family: var(--font-sans); }
.pl-sub { fill: #64748B; font-size: 10px; font-family: var(--font-sans); }
.pl-arrow { stroke: rgba(14,165,233,0.6); stroke-width: 1.6; fill: none; }
.pl-loop { stroke: #E2E8F0; stroke-width: 1.4; stroke-dasharray: 5 4; fill: none; }
.pl-move { fill: var(--brand-orange); }

/* 动态流 */
.stream { display: flex; flex-direction: column; gap: 0; }
.stream-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed #E2E8F0; }
.stream-item:last-child { border-bottom: none; }
.stream-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--brand-orange); }
.stream-dot.b { background: var(--blue); }
.stream-dot.g { background: var(--green-led); }
.stream-body { flex: 1; }
.stream-body .t { font-size: 13.5px; color: #0F172A; }
.stream-body .m { font-size: 12px; color: #64748B; margin-top: 3px; }
.stream-time { font-size: 11px; color: #64748B; white-space: nowrap; }

/* 模块 / 列表卡 */
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.module {
  position: relative; padding: 20px; border-radius: 14px; cursor: pointer;
  background: #FFFFFF; border: 1px solid var(--panel-border); transition: transform .2s, border-color .2s;
}
.module:hover { transform: translateY(-2px); border-color: rgba(232,117,26,0.4); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.module .m-ico { width: 42px; height: 42px; border-radius: 11px; background: rgba(14,165,233,0.12); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.module .m-ico svg { width: 21px; height: 21px; stroke: var(--blue); }
.module h4 { margin: 0 0 6px; font-size: 16px; color: #0F172A; font-weight: 700; }
.module p { margin: 0 0 14px; font-size: 13px; color: #475569; line-height: 1.6; min-height: 40px; }
.module .m-meta { display: flex; gap: 18px; margin-bottom: 12px; }
.module .m-meta div { font-size: 12px; color: #64748B; }
.module .m-meta b { display: block; font-size: 19px; color: #0F172A; font-weight: 800; font-variant-numeric: tabular-nums; }
.module .m-foot { display: flex; align-items: center; justify-content: space-between; }
.module .m-status { font-size: 12px; color: var(--green); display: flex; align-items: center; gap: 6px; }
.module .m-status .led { width: 7px; height: 7px; border-radius: 50%; background: var(--green-led); }
.module .m-go { font-size: 13px; color: var(--brand-orange); font-weight: 600; }

.section-title { font-size: 15px; font-weight: 700; color: #0F172A; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.section-title .bar { width: 4px; height: 16px; border-radius: 2px; background: var(--brand-orange); }

/* 数据状态标签（供数据类页面使用） */
.tag-data { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; }
.tag-open { background: rgba(14,165,233,0.14); color: var(--blue-ink); }
.tag-wait { background: rgba(255,138,92,0.16); color: #C25A1E; }
.tag-done { background: rgba(22,163,74,0.14); color: #147A34; }
.tag-new { background: rgba(232,117,26,0.14); color: var(--brand-orange-d); }
.tag-live { background: rgba(34,197,94,0.14); color: #15803D; }

/* 工作台表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: #64748B; padding: 10px 12px; border-bottom: 1px solid var(--panel-border); font-size: 12.5px; }
.tbl td { padding: 12px; border-bottom: 1px solid #F1F5F9; color: #0F172A; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .tag-cell { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }

.demo-cta { display:inline-flex; align-items:center; gap:6px; padding:9px 16px; border-radius:9px; background:linear-gradient(135deg,var(--brand-orange),var(--brand-orange-d)); color:#fff; font-size:13px; font-weight:600; cursor:pointer; border:none; transition:.18s; white-space:nowrap; }
.demo-cta:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(232,117,26,0.3); }

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
}
