/* ============================================================
   洛杉矶警察局 移动数据终端 · Windows 98 经典主题
   ============================================================ */
:root {
  /* 保留旧变量名, 映射到 Win98 调色板(兼容内联样式) */
  --bg: #008080;          /* 经典桌面青 */
  --bg2: #ffffff;        /* 输入/消息底 */
  --panel: #c0c0c0;      /* 窗口面 */
  --panel2: #d4d0c8;
  --border: #808080;
  --text: #000000;
  --muted: #404040;
  --blue: #000080;
  --blue2: #000080;
  --green: #008000;
  --red: #c00000;
  --amber: #806000;
  --purple: #400080;
  --cyan: #008080;
  --radius: 0;

  /* Win98 专用 */
  --face: #c0c0c0;
  --face-hi: #dfdfdf;
  --face-lo: #808080;
  --hi-grad: linear-gradient(90deg, #000080, #1084d0);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pixelated MS Sans Serif", "MS Sans Serif", "Tahoma", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  min-height: 100vh;
}
/* 经典滚动条 */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #dfdfdf; }
::-webkit-scrollbar-thumb {
  background: #c0c0c0; border: 2px solid; border-color: #fff #404040 #404040 #fff;
}
::-webkit-scrollbar-button {
  background: #c0c0c0; border: 2px solid; border-color: #fff #404040 #404040 #fff;
  height: 16px; width: 16px;
}

/* ---------- 顶部标题栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--hi-grad);
  padding: 3px 6px; height: 34px;
  color: #fff;
}
.brand { font-weight: 700; letter-spacing: 1px; color: #fff; font-size: 16px; }
.brand .brand-star { color: #ffd700; }
.brand .brand-sub { color: #d4e4ff; font-size: 12px; font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.brand-lg { font-size: 22px; font-weight: 700; color: var(--blue); letter-spacing: 2px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.role-badge {
  padding: 2px 10px; font-size: 12px; font-weight: 700;
  background: #fff; color: var(--blue);
  border: 2px solid; border-color: #404040 #fff #fff #404040;
}
.role-管理员 { background: #ffd9a0; }
.role-市民扮演者 { background: #ffffa0; }
.role-警员 { background: #a0d8ff; }
.role-巡逻监督员 { background: #ffd0a0; }
.ic-name { color: #fff; font-weight: 700; font-size: 13px; }
.ic-name small { display: block; color: #d4e4ff; font-size: 11px; font-weight: 400; }
.top-status {
  font-size: 12px; padding: 2px 10px; background: #c0c0c0; color: #000;
  border: 2px solid; border-color: #404040 #fff #fff #404040;
}
.top-status.on { background: #c0ffc0; color: #003300; font-weight: 700; }
.top-status.off { background: #ffe0a0; color: #402000; font-weight: 700; }
.top-status.offline { background: #ffc0c0; color: #600000; font-weight: 700; }
.top-clock {
  font-size: 12px; padding: 2px 10px; background: #000; color: #00ff00;
  font-family: 'Courier New', monospace; font-weight: 700;
  border: 2px solid; border-color: #404040 #fff #fff #404040;
  letter-spacing: 1px; white-space: nowrap;
}
.btn-icon {
  background: #c0c0c0; color: #000; text-decoration: none;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
  padding: 4px 10px; cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; line-height: 1;
}
.btn-icon:active { border-color: #404040 #fff #fff #404040; box-shadow: inset 1px 1px #808080; }
.badge-dot {
  position: absolute; top: -4px; right: -6px; background: #c00000; color: #fff;
  border: 1px solid #fff; font-size: 11px; padding: 0 5px; min-width: 14px; text-align: center;
  font-weight: 700;
}
#notif-bell, #chat-btn { position: relative; }

/* ---------- 布局 ---------- */
.app-body { display: flex; align-items: flex-start; gap: 4px; padding: 4px; min-height: calc(100vh - 34px); }
.sidebar {
  width: 270px; flex-shrink: 0; background: var(--panel);
  border: 2px solid; border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px #808080;
  padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-title {
  color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px;
  background: var(--hi-grad); letter-spacing: 1px; margin-bottom: 2px;
}
.sidebar-badge-wrap {
  text-align: center; padding: 8px 4px 6px;
  border-bottom: 1px solid #808080; margin-bottom: 4px;
  flex-shrink: 0;
}
.sidebar-badge-wrap canvas {
  width: 180px; height: 285px; display: block; margin: 0 auto;
}
.sidebar-badge-num {
  font-family: "Courier New", monospace; font-size: 16px; font-weight: 700;
  color: #ffd700; background: #000; padding: 2px 8px; margin-top: 4px;
  border: 2px solid; border-color: #404040 #fff #fff #404040;
  display: inline-block; letter-spacing: 2px;
}
/* 迷你证件(侧栏左上角显示) - 完整证件正面等比缩放 */
.mini-idcard-wrap {
  width: 170px; height: 255px; margin: 0 auto; overflow: hidden;
  border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.mini-idcard-scale {
  width: 360px; height: 540px;
  transform: scale(0.4722);
  transform-origin: top left;
}
/* 以下为证件正面完整样式(与 id-card.php 一致) */
.mif-card {
  width: 360px; height: 540px; box-sizing: border-box; position: relative;
  overflow: hidden; font-family: Arial, "Helvetica Neue", sans-serif;
  background: linear-gradient(160deg, #0a2472 0%, #0f2e8f 35%, #1539a8 60%, #0d2a7a 100%);
  color: #fff; padding: 32px 20px 20px; display: flex; flex-direction: column;
}
.mif-dots {
  position: absolute; inset: 0;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAXSURBVChTYxjW4P////wgDOUOIcDAAABo8gYZFGLI1gAAAABJRU5ErkJggg==");
  background-size: 10px 10px; pointer-events: none; z-index: 1;
}
.mif-dept { text-align: center; font-size: 14px; letter-spacing: 2px; font-weight: 700; position: relative; z-index: 2; margin-bottom: 10px; }
.mif-title { text-align: center; font-size: 64px; font-weight: 900; letter-spacing: 5px; line-height: 0.9; color: #fff; position: relative; z-index: 2; margin-top: 0; margin-bottom: 8px; }
.mif-name { text-align: center; font-size: 22px; font-weight: 700; position: relative; z-index: 2; margin-top: 4px; }
.mif-rank { text-align: center; font-size: 15px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; position: relative; z-index: 2; margin-top: 2px; }
.mif-serial { text-align: center; font-size: 13px; font-weight: 600; margin-bottom: 8px; position: relative; z-index: 2; }
.mif-middle { display: flex; align-items: center; justify-content: center; gap: 16px; position: relative; z-index: 2; height: 210px; margin-top: 10px; margin-bottom: 6px; }
.mif-stripes { position: absolute; left: 0; right: 0; top: 55%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 1; pointer-events: none; }
.mif-stripes .stripe { width: 100%; height: 3px; background: #fff; }
.mif-badge { width: 120px; height: 189px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); position: relative; z-index: 2; }
.mif-photo { width: 128px; height: 180px; background: #2a2a2a; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; z-index: 2; }
.mif-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.mif-photo svg { width: 50px; height: 50px; opacity: 0.3; }
.mif-motto { text-align: center; font-size: 12px; font-style: italic; font-weight: 600; margin-bottom: 8px; margin-top: auto; position: relative; z-index: 2; }
.mif-barcode-wrap { background: #fff; border-radius: 2px; padding: 4px 10px; position: relative; z-index: 2; overflow: hidden; }
.mif-barcode { display: flex; align-items: stretch; justify-content: center; gap: 1px; height: 34px; width: 100%; overflow: hidden; }
.mif-barcode .bar { background: #000; flex-shrink: 0; }
.mif-barcode .gap { background: transparent; flex-shrink: 0; }
.fk-wrap { display: flex; gap: 4px; align-items: center; }
.fk-wrap .input { flex: 1; }
.fk-toggle { white-space: nowrap; min-width: 48px; font-size: 12px; padding: 3px 8px; }

.side-nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  color: #000; text-decoration: none; padding: 5px 12px; font-size: 14px;
  border: 1px solid transparent;
}
.nav-item:hover { background: #000080; color: #fff; }
.nav-item.active { background: #000080; color: #fff; font-weight: 700; border: 1px dotted #fff; }
.sidebar-foot {
  margin-top: auto; font-size: 11px; color: #404040;
  border-top: 1px solid #808080; padding: 6px 4px 0;
}
.main { flex: 1; min-width: 0; }
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel);
  border: 2px solid; border-color: #404040 #fff #fff #404040;
  padding: 6px 10px; margin-bottom: 6px;
}
.page-head h1 { margin: 0; font-size: 18px; font-weight: 700; }
.page-head .sub-title { font-size: 12px; color: #404040; margin-top: 2px; }
.page-actions { display: flex; gap: 6px; }

/* ---------- 卡片 = 对话框 ---------- */
.card {
  background: var(--panel);
  border: 2px solid; border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px #808080;
  margin-bottom: 8px;
}
.card-sm { margin-bottom: 6px; }
.card-title {
  background: var(--hi-grad); color: #fff; font-weight: 700;
  font-size: 15px; padding: 5px 12px; margin: 0;
}
.card > *:not(.card-title) { padding: 8px; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 6px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- 工具栏 / 输入 ---------- */
.toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mt { margin-top: 8px; }
.mt-sm { margin-top: 4px; }
.muted { color: #404040; }
.input, input, select, textarea {
  background: #fff; color: #000; font-size: 15px; font-family: inherit;
  border: 2px solid; border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px #404040;
  padding: 3px 5px; min-height: 22px; outline: none;
}
.input:focus, input:focus, select:focus, textarea:focus { border-color: #000080; }
.input-lg { width: 100%; font-size: 17px; padding: 7px 9px; }
.input-full { width: 100%; }
.textarea { width: 100%; min-height: 80px; }

/* ---------- 按钮 ---------- */
.btn {
  background: var(--panel); color: #000; font-family: inherit; font-size: 15px;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
  padding: 4px 14px; cursor: pointer; text-decoration: none;
  display: inline-block; text-align: center; line-height: 1.3;
}
.btn:hover { filter: brightness(1.05); }
.btn:active, .btn.pressed { border-color: #404040 #fff #fff #404040; box-shadow: inset 1px 1px #808080; }
.btn-primary { background: #000080; color: #fff; font-weight: 700; }
.btn-primary:active { background: #1084d0; }
.btn-danger { background: #c00000; color: #fff; font-weight: 700; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-lg { padding: 9px 22px; font-size: 16px; font-weight: 700; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 6px; justify-content: flex-end; }
.quick-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- 表格 ---------- */
.table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 2px solid; border-color: #808080 #fff #fff #808080;
}
.table th {
  background: var(--panel); color: #000; font-weight: 700; text-align: left;
  border: 1px solid #808080; padding: 6px 10px; font-size: 13px;
}
.table td { border: 1px solid #c0c0c0; padding: 6px 10px; font-size: 15px; }
.table tr:nth-child(even) td { background: #f0f0f0; }
.table tr:hover td { background: #ffffe0; }

/* ---------- 标签 / 列表 ---------- */
.chip {
  display: inline-block; padding: 4px 10px; font-size: 13px;
  background: #fff; border: 1px solid #808080;
}
.chip-active { background: #000080; color: #fff; font-weight: 700; }
.chip-sm { padding: 1px 6px; font-size: 11px; }
.chip-success { background: #006400; color: #fff; }
.chip-danger { background: #8b0000; color: #fff; }
.chip-warn { background: #b8860b; color: #fff; }
.empty { padding: 20px; text-align: center; color: #404040; }
.task-list { display: flex; flex-direction: column; gap: 4px; }
.task-item {
  background: #fff; border: 1px solid #808080; padding: 6px 8px;
  display: flex; justify-content: space-between; gap: 8px;
}
.unit-list { display: flex; flex-direction: column; gap: 3px; }
.unit-item {
  background: #fff; border: 1px solid #c0c0c0; padding: 4px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.unit-item:hover { background: #ffffe0; }
.unit-name { font-weight: 700; }
.pager { display: flex; gap: 6px; align-items: center; margin-top: 8px; }

/* ---------- 统计块 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.stat-box {
  background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080;
  padding: 8px; text-align: center;
}
.stat-num { font-size: 26px; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 13px; color: #404040; margin-top: 3px; }

/* ---------- 详情 / 表单 ---------- */
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px;
}
.detail-grid label { font-size: 14px; color: #404040; display: block; margin-bottom: 4px; }
.meta-line { font-size: 13px; color: #404040; border-top: 1px solid #808080; padding-top: 6px; margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 700; font-size: 15px; }
.form-group .input, .form-group input, .form-group select, .form-group textarea { width: 100%; font-size: 15px; padding: 6px 8px; }
.duty-form { display: grid; gap: 6px; }
.duty-status { font-weight: 700; padding: 4px 8px; background: #fff; border: 1px solid #808080; }

/* ---------- 时间线 ---------- */
.timeline { border-left: 2px solid #808080; margin-left: 8px; padding-left: 12px; }
.tl-item { margin-bottom: 8px; }
.tl-time { font-size: 12px; color: #404040; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 140;
}
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  min-width: 360px; width: min(680px, 92vw); max-height: 88vh; overflow-y: auto; background: var(--panel);
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: 2px 2px 0 #404040;
  z-index: 141;
}
.modal-lg {
  width: min(1100px, 95vw);
  max-height: 92vh;
}
.modal-title {
  background: var(--hi-grad); color: #fff; font-weight: 700;
  padding: 4px 10px; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.modal-title .mt-text { flex: 1; }
.modal-title .mt-close {
  display: inline-block; width: 18px; height: 18px; line-height: 16px;
  text-align: center; font-size: 16px; font-weight: 700; cursor: pointer;
  background: #c0c0c0; color: #000; border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
}
.modal-title .mt-close:hover { background: #e0e0e0; }
.modal-title .mt-close:active { border-color: #404040 #fff #fff #404040; }
.modal > div:last-child, .modal > p { padding: 12px; }
.modal > form { padding: 12px; }
.modal > .btn-row { padding: 0 12px 12px; }
.modal > .card { margin: 0 12px 12px; }
.toast {
  background: #ffffc0; color: #000; border: 2px solid;
  border-color: #404040 #fff #fff #404040;
  padding: 9px 16px; margin: 6px 0; font-size: 13px;
}
.toast.error { background: #ffc0c0; border-color: #800000; }
.toast.success { background: #c0ffc0; }
#toast-wrap { position: fixed; right: 10px; top: 44px; width: 320px; z-index: 200; }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-body { width: 340px; }
.auth-card {
  background: var(--panel);
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: 3px 3px 0 #404040;
}
.auth-logo { text-align: center; padding: 18px 20px 6px; }
.auth-sub { color: #404040; font-size: 12px; margin-top: 4px; }
.auth-announce { padding: 0 20px; }
.auth-error {
  background: #ffc0c0; border: 2px solid; border-color: #800000 #fff #fff #800000;
  color: #400000; padding: 9px 14px; margin: 0 20px 8px; font-size: 13px;
}
.auth-card form { padding: 10px 20px 18px; display: grid; gap: 8px; }
.auth-card input { width: 100%; padding: 4px 6px; }
.auth-foot {
  text-align: center; font-size: 11px; color: #404040;
  border-top: 1px solid #808080; margin: 0 20px; padding: 8px 0 12px;
}
.auth-back { display: block; text-align: center; margin-top: 10px; color: #000080; }

/* 角色选择 */
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 800px) { .role-cards { grid-template-columns: 1fr; } }
.role-card {
  background: #fff; text-decoration: none; color: #000;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px #dfdfdf;
  padding: 16px; display: block;
}
.role-card:hover { background: #ffffe0; }
.role-card-title { font-size: 16px; font-weight: 700; color: #000080; margin-bottom: 6px; }
.role-card-desc { font-size: 13px; color: #404040; }

/* ---------- 页签 ---------- */
.entity-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.entity-tabs .chip { cursor: pointer; }

/* ---------- 审核 / 状态 ---------- */
.review-item {
  background: #fff; border: 1px solid #808080; padding: 8px; margin-bottom: 6px;
  display: flex; justify-content: space-between; gap: 8px;
}
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.feedback-form { display: grid; gap: 6px; }

/* ---------- 聊天 ---------- */
.chat-box { background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.chat-msg { margin-bottom: 6px; font-size: 14px; }
.chat-msg-own { background: #ffffe0; padding: 2px 4px; }
.chat-sender { color: #000080; font-weight: 700; }
.chat-time { color: #808080; font-size: 11px; margin-left: 6px; }
.channel-list { display: flex; flex-direction: column; gap: 2px; }
.channel-item { text-align: left; background: var(--panel); border: 1px solid #808080; padding: 5px 10px; cursor: pointer; font-family: inherit; font-size: 14px; }
.channel-item:hover { background: #000080; color: #fff; }
.chat-input-row { display: flex; gap: 4px; padding: 6px; }

/* ---------- 地图 ---------- */
.map-wrap {
  background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080;
  padding: 2px;
}
.map-legend { display: flex; gap: 12px; padding: 6px 2px; font-size: 12px; }
.lg-unit, .lg-case, .lg-loc { display: inline-flex; align-items: center; gap: 4px; }
.lg-unit::before { content: ""; width: 10px; height: 10px; background: #0000ff; border: 1px solid #fff; }
.lg-case::before { content: ""; width: 10px; height: 10px; background: #ff0000; border: 1px solid #fff; }
.lg-loc::before { content: ""; width: 10px; height: 10px; background: #808080; border: 1px solid #fff; }

.code-block {
  background: #000; color: #0f0; font-family: "Courier New", monospace;
  padding: 8px; border: 2px solid; border-color: #404040 #fff #fff #404040;
  font-size: 13px; white-space: pre-wrap;
}
select option { color: #000; }

/* 聊天浮窗: 经典直角化 */
#chat-panel > div[style*="border-radius"] { border-radius: 0 !important; box-shadow: 3px 3px 0 #404040 !important; }

/* v4.4 顶栏文字按钮 */
.btn-icon{font-size:14px;padding:4px 10px;background:#c0c0c0;border:2px solid;}

/* BOLO 通报 */
.bolo-list { display: flex; flex-direction: column; gap: 10px; }
.bolo-card { border: 2px solid #808080; background: #fff; padding: 10px 12px; }
.bolo-card.pri-emergency { border-color: #c00000; background: #fff0f0; }
.bolo-card.pri-high { border-color: #ff6600; background: #fff8f0; }
.bolo-card.pri-mid { border-color: #cc9900; background: #fffdf0; }
.bolo-card.pri-low { border-color: #0066cc; background: #f0f6ff; }
.bolo-card.bolo-cleared { opacity: 0.5; }
.bolo-head { display: flex; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.bolo-num { font-weight: 700; font-family: monospace; }
.bolo-pri { font-weight: 700; padding: 1px 6px; background: #000; color: #fff; }
.pri-emergency .bolo-pri { background: #c00000; }
.pri-high .bolo-pri { background: #ff6600; }
.pri-mid .bolo-pri { background: #cc9900; }
.pri-low .bolo-pri { background: #0066cc; }
.bolo-type { color: #606060; }
.bolo-status { margin-left: auto; font-weight: 700; }
.bolo-title { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.bolo-target { font-size: 14px; color: #404040; margin-bottom: 4px; }
.bolo-desc { font-size: 14px; color: #303030; white-space: pre-wrap; margin-bottom: 4px; }
.bolo-foot { display: flex; gap: 12px; align-items: center; font-size: 12px; color: #808080; margin-top: 4px; }
.bolo-foot .btn { margin-left: auto; }
/* ========== 关联系统栏 ========== */
.related-systems-bar {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-bottom: 2px solid #808080;
  padding: 4px 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.related-systems-bar .rsb-label {
  font-size: 13px;
  font-weight: 700;
  color: #000080;
  white-space: nowrap;
  padding-right: 8px;
  border-right: 1px solid #c0c0c0;
}
.related-systems-bar .rsb-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.related-systems-bar .rsb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #fff;
  border: 1px solid #808080;
  border-bottom-width: 2px;
  border-right-width: 2px;
  text-decoration: none;
  color: #000;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s;
}
.related-systems-bar .rsb-link:hover {
  background: #e0e0ff;
  text-decoration: underline;
}
.related-systems-bar .rsb-link .rsb-icon {
  font-size: 14px;
}

/* ========== 标签页 Tabs ========== */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.tab {
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
  padding: 4px 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.tab:hover { filter: brightness(1.05); }
.tab.active {
  background: #fff;
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px #808080;
  font-weight: 700;
  color: #000080;
}
.tab-sm { padding: 2px 10px; font-size: 12px; }

/* 紧急求助动画 */
@keyframes mdtEmBlink { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes mdtEmFlash { 0% { background:rgba(180,0,0,0.92); } 100% { background:rgba(120,0,0,0.95); } }