/* 元古 & 瑭所 供应链汇总中台 小样样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f4f5f7; --card: #fff; --line: #e5e7eb;
  --ink: #1f2937; --muted: #6b7280;
  --brand: #8c5a2b; --brand2: #b98a4e;
  --ok: #16a34a; --warn: #d97706; --crit: #dc2626;
  --blue: #2563eb;
}
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
.topbar { background: linear-gradient(135deg, #5d3a1a, var(--brand2)); color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 42px; height: 42px; background: #fff; color: var(--brand); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.brand h1 { font-size: 19px; letter-spacing: 1px; }
.brand .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18); }
.badge.live { color: #d1fae5; }
.btn { border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn:hover { background: rgba(255,255,255,.22); }
.btn.ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.btn.ghost:hover { background: #f0f0f0; }
.btn.danger { color: var(--crit); }
.btn.primary { background: var(--brand); border: none; color: #fff; }
.btn.primary:hover { background: var(--brand2); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.tabs { display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 24px; }
.tab { padding: 12px 18px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; display: flex; gap: 6px; align-items: center; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.count { display: none; background: var(--crit); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; font-style: normal; }
.count.show { display: inline-block; }
main { padding: 18px 24px 30px; max-width: 1280px; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; color: #374151; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.hint { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi .num { font-size: 28px; font-weight: 700; margin-top: 4px; }
.kpi .lbl { font-size: 13px; color: var(--muted); }
.kpi.warn .num { color: var(--crit); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 9px 10px; background: #f9fafb; border-bottom: 2px solid var(--line); color: #374151; white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #f1f2f4; }
.tbl tr:hover td { background: #faf7f2; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.warn { background: #fef3c7; color: #92400e; }
.tag.crit { background: #fee2e2; color: #991b1b; }
.tag.info { background: #dbeafe; color: #1e40af; }
.tag.gray { background: #f3f4f6; color: #4b5563; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bar .label { width: 150px; text-align: right; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .track { flex: 1; background: #f0f1f3; height: 18px; border-radius: 5px; overflow: hidden; position: relative; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--brand2), var(--brand)); border-radius: 5px; transition: width .5s; }
.bar .fill.warn { background: linear-gradient(90deg, #fbbf24, #d97706); }
.bar .fill.crit { background: linear-gradient(90deg, #f87171, #dc2626); }
.bar .val { width: 90px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log { font-size: 12px; color: var(--muted); max-height: 240px; overflow: auto; }
.log.tall { max-height: 420px; }
.log div { padding: 3px 0; border-bottom: 1px dashed #f0f1f3; display: flex; gap: 8px; }
.log .ts { color: #9ca3af; white-space: nowrap; }
.list { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow: auto; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.item .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.item .name { font-weight: 600; }
.item .meta { font-size: 12px; color: var(--muted); }
.item .row { display: flex; gap: 16px; font-size: 13px; margin: 4px 0; }
.item .row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.item .actions { display: flex; gap: 8px; margin-top: 10px; }
.search { border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; width: 240px; }
.connectors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 980px) { .connectors { grid-template-columns: 1fr; } }
.conn { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.conn .head { display: flex; justify-content: space-between; align-items: center; }
.conn .head h4 { font-size: 15px; }
.conn .meta { font-size: 12px; color: var(--muted); margin: 6px 0; }
.conn .statusline { display: flex; gap: 16px; font-size: 13px; margin-top: 8px; flex-wrap: wrap; }
.foot { text-align: center; color: #9ca3af; font-size: 12px; padding: 16px; }
.empty { color: #9ca3af; text-align: center; padding: 24px; font-size: 13px; }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }