/* ============================================================
   Oversight Grid · 监管中枢 设计系统
   惠州仲恺高新区 国有资产事务中心 · AI 智能化办公系统平台
   ============================================================ */

@font-face { font-family: 'BigShoulders'; src: url('../fonts/BigShoulders-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'BigShoulders'; src: url('../fonts/BigShoulders-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'GeistMono'; src: url('../fonts/GeistMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'GeistMono'; src: url('../fonts/GeistMono-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'InstrumentSans'; src: url('../fonts/InstrumentSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'InstrumentSans'; src: url('../fonts/InstrumentSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  /* ---- ink scale ---- */
  --ink-950: #060A11;
  --ink-900: #090F1A;
  --ink-850: #0C1420;
  --ink-800: #101A29;
  --ink-750: #131F31;
  --ink-700: #17263B;
  --ink-650: #1C2E47;
  --ink-600: #223757;

  --line: rgba(146, 178, 224, 0.13);
  --line-2: rgba(146, 178, 224, 0.24);
  --line-gold: rgba(233, 184, 75, 0.35);

  /* ---- text ---- */
  --text: #E8EEF9;
  --text-2: #A6B4CB;
  --text-3: #6C7C97;
  --text-4: #4C5A72;

  /* ---- accents ---- */
  --gold: #E9B84B;
  --gold-2: #F5CE72;
  --gold-soft: rgba(233, 184, 75, 0.12);
  --gold-line: rgba(233, 184, 75, 0.4);

  --cyan: #37D6C7;
  --cyan-soft: rgba(55, 214, 199, 0.12);
  --violet: #8E7CF3;
  --coral: #FF7A6B;

  /* ---- semantic ---- */
  --high: #FF5C57;
  --high-soft: rgba(255, 92, 87, 0.13);
  --mid: #F0A93B;
  --mid-soft: rgba(240, 169, 59, 0.13);
  --low: #43C98A;
  --low-soft: rgba(67, 201, 138, 0.13);

  /* ---- chart series ---- */
  --s1: #E9B84B;
  --s2: #37D6C7;
  --s3: #8E7CF3;
  --s4: #FF7A6B;
  --s-other: #3A4A66;

  /* ---- type ---- */
  --font-display: 'BigShoulders', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-sans: 'InstrumentSans', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-mono: 'GeistMono', 'SFMono-Regular', Consolas, monospace;

  /* ---- geometry ---- */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --sidebar-w: 252px;
  --topbar-h: 62px;
  --pad: 26px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--ink-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* blueprint grid atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(146, 178, 224, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 178, 224, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 20%, transparent 78%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }

strong, b { font-weight: 700; }

::selection { background: rgba(233, 184, 75, 0.28); color: #fff; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #24344f; border-radius: 20px; border: 3px solid var(--ink-900); }
::-webkit-scrollbar-thumb:hover { background: #31486c; }

/* ============================================================
   SHELL
   ============================================================ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0B1322 0%, #080E18 100%);
  border-right: 1px solid var(--line);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1), width .32s cubic-bezier(.4, 0, .2, 1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.brand__mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  background: var(--gold-soft);
  color: var(--gold);
  position: relative;
}
.brand__mark svg { width: 19px; height: 19px; }
.brand__text { min-width: 0; }
.brand__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  color: var(--text-4);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav { flex: 1; overflow-y: auto; padding: 16px 12px 20px; }
.nav__group { margin-bottom: 20px; }
.nav__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--text-4);
  text-transform: uppercase;
  padding: 0 10px 8px;
}
.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13.5px;
  position: relative;
  cursor: pointer;
  transition: background .16s, color .16s;
  white-space: nowrap;
}
.nav__item svg { width: 17px; height: 17px; flex: none; opacity: .82; }
.nav__item:hover { background: rgba(146, 178, 224, 0.07); color: var(--text); }
.nav__item.is-active { background: var(--gold-soft); color: var(--gold-2); }
.nav__item.is-active svg { opacity: 1; color: var(--gold); }
.nav__item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--gold); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--gold);
}
.nav__tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--high-soft);
  color: var(--high);
  border: 1px solid rgba(255, 92, 87, 0.28);
}

/* ---- 二级导航 ---- */
.nav__block { margin-bottom: 2px; }
.nav__chev { margin-left: auto; display: flex; color: var(--text-4); transition: transform .22s; }
.nav__chev svg { width: 14px; height: 14px; opacity: 1; }
.nav__block.is-open > .nav__item .nav__chev { transform: rotate(180deg); color: var(--gold); }
.nav__item.is-parent { color: var(--gold-2); background: rgba(233, 184, 75, 0.07); }
.nav__item.is-parent svg { color: var(--gold); opacity: 1; }
.nav__kids {
  display: none;
  margin: 2px 0 4px 14px;
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}
.nav__block.is-open > .nav__kids { display: block; animation: fadeUp .24s cubic-bezier(.22,.7,.3,1) both; }
.nav__kid {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 9px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  font-size: 12.5px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav__kid i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; flex: none; transition: .15s; }
.nav__kid:hover { color: var(--text); background: rgba(146, 178, 224, 0.06); }
.nav__kid.is-active { color: var(--gold); background: var(--gold-soft); font-weight: 700; }
.nav__kid.is-active i { opacity: 1; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---- 模块内二级功能页签 ---- */
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.subtab {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 20px;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: rgba(9, 15, 26, 0.5);
  transition: .16s;
  white-space: nowrap;
}
.subtab:hover { border-color: var(--line-2); color: var(--text); }
.subtab.is-active { border-color: var(--gold-line); color: var(--gold); background: var(--gold-soft); font-weight: 700; }

.sidebar__foot {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 33px; height: 33px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  color: var(--ink-900);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}
.sidebar__user { min-width: 0; }
.sidebar__user b { display: block; font-size: 13px; color: var(--text); }
.sidebar__user span { font-size: 11px; color: var(--text-3); }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  transition: margin-left .32s cubic-bezier(.4, 0, .2, 1);
}

.topbar {
  height: var(--topbar-h);
  flex: none;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--pad);
  background: rgba(9, 15, 26, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__toggle {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: .16s;
}
.topbar__toggle:hover { border-color: var(--line-2); color: var(--text); background: rgba(146,178,224,.06); }
.topbar__toggle svg { width: 16px; height: 16px; }

.crumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.crumb__sep { color: var(--text-4); }
.crumb__leaf { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb__root { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.crumb__mid { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.topbar__spacer { flex: 1; }

.topsearch {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(16, 26, 41, 0.7);
  color: var(--text-3);
  font-size: 12.5px;
  cursor: pointer;
  transition: .16s;
  min-width: 190px;
}
.topsearch:hover { border-color: var(--line-2); color: var(--text-2); }
.topsearch svg { width: 14px; height: 14px; }
.topsearch kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--text-4);
}

.clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: .06em;
  white-space: nowrap;
  padding: 0 4px;
}
.clock b { color: var(--gold); font-weight: 400; }

.iconbtn {
  position: relative;
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: .16s;
}
.iconbtn:hover { border-color: var(--line-2); color: var(--text); background: rgba(146,178,224,.06); }
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn__dot {
  position: absolute; top: 7px; right: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--high);
  box-shadow: 0 0 0 2px var(--ink-900), 0 0 8px var(--high);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* popover */
.pop {
  position: absolute;
  top: calc(var(--topbar-h) - 8px);
  right: var(--pad);
  width: 340px;
  z-index: 60;
  background: var(--ink-800);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: .2s;
  overflow: hidden;
}
.pop.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.pop__head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; font-weight: 700;
}
.pop__head span { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.pop__body { max-height: 320px; overflow-y: auto; }
.pop__item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 11px; cursor: pointer; transition: background .16s; }
.pop__item:hover { background: rgba(146,178,224,.05); }
.pop__item:last-child { border-bottom: none; }
.pop__item i { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-top: 7px; }
.pop__item b { display: block; font-size: 12.5px; font-weight: 400; color: var(--text); margin-bottom: 2px; }
.pop__item span { font-size: 11px; color: var(--text-3); }

/* ============================================================
   MODAL · 通用弹窗
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 260;
  background: rgba(4, 8, 14, .68);
  backdrop-filter: blur(5px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 22px 40px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .22s, visibility .22s;
}
.modal-mask.is-open { opacity: 1; visibility: visible; }
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 12vh - 40px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0C1420, #090F1A);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .72);
  transform: translateY(16px) scale(.985); opacity: 0;
  transition: transform .26s cubic-bezier(.22,.7,.3,1), opacity .26s;
}
.modal-mask.is-open .modal { transform: none; opacity: 1; }
.modal__head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal__ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line); }
.modal__ico svg { width: 18px; height: 18px; }
.modal__titles { flex: 1; min-width: 0; }
.modal__titles h3 { font-size: 15px; color: #fff; line-height: 1.45; }
.modal__titles .panel__sub { display: block; margin-top: 2px; }
.modal__x { width: 30px; height: 30px; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { flex: none; padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.modal__foot .panel__sub { margin-right: auto; }

/* modal 内表单 */
.form-grid { display: grid; gap: 14px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row > label { font-size: 12px; color: var(--text-3); }
.form-row .field { height: 38px; }
.field--area { height: auto; padding: 9px 12px; align-items: flex-start; }
.field--area textarea { resize: vertical; line-height: 1.6; font-family: var(--font-sans); }
.modal-note { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--text-3); background: rgba(233,184,75,.06); border: 1px solid var(--gold-line); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.6; }
.modal-note svg { flex: none; margin-top: 2px; color: var(--gold); }

/* 选项卡片 */
.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(9,15,26,.5); cursor: pointer; transition: .16s; }
.opt:hover { border-color: var(--line-2); }
.opt.is-on { border-color: var(--gold-line); background: var(--gold-soft); }
.opt i { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); margin-top: 2px; display: grid; place-items: center; color: transparent; }
.opt.is-on i { border-color: var(--gold); background: var(--gold); color: #1A1405; }
.opt i svg { width: 10px; height: 10px; }
.opt b { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 2px; }
.opt span { font-size: 11px; color: var(--text-4); line-height: 1.5; }

/* 弹窗内列表 */
.lib-item { display: flex; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(9,15,26,.45); margin-bottom: 10px; transition: .16s; }
.lib-item:last-child { margin-bottom: 0; }
.lib-item:hover { border-color: var(--line-2); background: rgba(146,178,224,.05); }
.lib-item__ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--gold); }
.lib-item__ico svg { width: 16px; height: 16px; }
.lib-item__main { flex: 1; min-width: 0; }
.lib-item b { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 3px; }
.lib-item p { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

/* 颜色选择 */
.chip-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: .16s; }
.chip-pick button.is-on { border-color: #fff; transform: scale(1.08); }

@media (max-width: 560px) {
  .form-2, .opt-grid { grid-template-columns: 1fr; }
  .modal-mask { padding: 4vh 12px 30px; }
}

.content {
  flex: 1;
  padding: var(--pad);
  max-width: 1680px;
  width: 100%;
}

/* ============================================================
   PRIMITIVES
   ============================================================ */
.page-head { margin-bottom: 22px; }
.page-head__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
  color: #fff;
}
.page-head__desc { margin-top: 7px; color: var(--text-3); font-size: 13px; max-width: 76ch; }
.page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 31, 49, .92) 0%, rgba(14, 23, 37, .92) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.panel__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.panel__title { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 9px; }
.panel__title svg { width: 15px; height: 15px; color: var(--gold); }
.panel__sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-4); letter-spacing: .06em; }
.panel__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }
.panel__foot { padding: 12px 18px; border-top: 1px solid var(--line); }

/* corner brackets */
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border-color: var(--gold-line); border-style: solid; border-width: 0;
}
.bracket::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.bracket::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

/* grid helpers */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.g-3-2 { grid-template-columns: 3fr 2fr; }

.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }

/* ---- metric ---- */
.metric {
  position: relative;
  padding: 17px 18px;
  background: linear-gradient(180deg, rgba(23, 38, 59, .85), rgba(15, 25, 40, .85));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.metric:hover { border-color: var(--line-2); transform: translateY(-2px); }
.metric__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.metric__label { font-size: 12px; color: var(--text-3); }
.metric__icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--gold); flex: none; }
.metric__icon svg { width: 15px; height: 15px; }
.metric__value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 5px;
}
.metric__value .unit { font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: var(--text-3); }
.metric__value.is-gold { color: var(--gold); }
.metric__value.is-high { color: var(--high); }
.metric__value.is-mid { color: var(--mid); }
.metric__value.is-low { color: var(--low); }
.metric__value.is-cyan { color: var(--cyan); }
.metric__foot { margin-top: 11px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.delta { font-family: var(--font-mono); font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: var(--low); }
.delta.down { color: var(--high); }
.delta.flat { color: var(--text-3); }
.metric__spark { position: absolute; right: 0; bottom: 0; left: 0; height: 34px; opacity: .5; pointer-events: none; }

/* ---- badge / tag ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; line-height: 1.5;
  padding: 1px 8px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  background: rgba(146,178,224,.06);
  white-space: nowrap;
}
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge--high { color: var(--high); border-color: rgba(255,92,87,.32); background: var(--high-soft); }
.badge--mid { color: var(--mid); border-color: rgba(240,169,59,.32); background: var(--mid-soft); }
.badge--low { color: var(--low); border-color: rgba(67,201,138,.32); background: var(--low-soft); }
.badge--gold { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.badge--cyan { color: var(--cyan); border-color: rgba(55,214,199,.32); background: var(--cyan-soft); }
.badge--mono { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: rgba(146,178,224,.06);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: .16s;
  white-space: nowrap;
}
.btn:hover { border-color: rgba(146,178,224,.4); background: rgba(146,178,224,.12); }
.btn svg { width: 14px; height: 14px; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #1A1405; font-weight: 700; }
.btn--gold:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: rgba(146,178,224,.08); color: var(--text); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 11.5px; }
.btn--sm svg { width: 12px; height: 12px; }
.btn--block { width: 100%; justify-content: center; }

/* ---- inputs ---- */
.field {
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(9,15,26,.6);
  transition: .16s;
}
.field:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.field svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.field input, .field select, .field textarea {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font-sans); font-size: 13px;
}
.field input::placeholder { color: var(--text-4); }
.field select { cursor: pointer; }
.field select option { background: var(--ink-800); }

/* ---- segmented ---- */
.seg { display: inline-flex; padding: 3px; gap: 3px; background: rgba(9,15,26,.6); border: 1px solid var(--line); border-radius: var(--r-sm); }
.seg button {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 12px;
  color: var(--text-3); padding: 5px 12px; border-radius: var(--r-xs);
  transition: .16s;
}
.seg button:hover { color: var(--text-2); }
.seg button.is-active { background: var(--gold-soft); color: var(--gold); font-weight: 700; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative;
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px;
  color: var(--text-3); padding: 10px 15px;
  transition: .16s;
}
.tab:hover { color: var(--text-2); }
.tab.is-active { color: var(--gold); font-weight: 700; }
.tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.tabpane { display: none; }
.tabpane.is-active { display: block; animation: fadeUp .34s ease both; }

/* ---- table ---- */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th, table.tbl td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.tbl thead th {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-4); font-weight: 400;
  background: rgba(9,15,26,.5);
  white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl tbody tr { transition: background .14s; }
table.tbl tbody tr:hover { background: rgba(146,178,224,.05); }
table.tbl tbody tr.is-clickable { cursor: pointer; }
table.tbl td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
table.tbl td.name { font-weight: 700; color: var(--text); }
table.tbl .row-sub { font-size: 11px; color: var(--text-4); margin-top: 2px; }

/* ---- progress ---- */
.bar { height: 6px; border-radius: 20px; background: rgba(146,178,224,.12); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 20px; background: var(--gold); width: 0; transition: width 1.1s cubic-bezier(.4,0,.2,1); }
.bar--cyan > i { background: var(--cyan); }
.bar--high > i { background: var(--high); }
.bar--mid > i { background: var(--mid); }
.bar--low > i { background: var(--low); }
.bar--sm { height: 4px; }

/* ---- list rows ---- */
.rows { display: flex; flex-direction: column; }
.row-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  transition: background .14s;
  cursor: pointer;
}
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: rgba(146,178,224,.05); }
.row-item__main { min-width: 0; flex: 1; }
.row-item__title { font-size: 13px; color: var(--text); margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.row-item__meta { font-size: 11.5px; color: var(--text-4); font-family: var(--font-mono); }

/* ---- misc ---- */
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.dim { color: var(--text-4); }
.hr { height: 1px; background: var(--line); border: none; margin: 16px 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-4); font-size: 12.5px; }
.scroll-y { overflow-y: auto; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: none; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); font-family: var(--font-mono); text-align: right; }

/* ---- chart host ---- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.legend i { width: 9px; height: 9px; border-radius: 2px; flex: none; }

/* ---- shared: 图标徽标 / 时间轴节点 / 标签选择器 ---- */
.alert-item__ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); }
.alert-item__ico svg { width: 15px; height: 15px; }
.node { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.node:last-child { border-bottom: none; }
.node__d { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.node__d svg { width: 11px; height: 11px; }
.node b { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 3px; }
.node span { font-size: 11px; color: var(--text-4); font-family: var(--font-mono); }
.chipsel { display: flex; flex-wrap: wrap; gap: 8px; }
.chipsel button { font-size: 12px; padding: 6px 13px; border-radius: 8px; border: 1px solid var(--line); background: rgba(6,10,17,.5); color: var(--text-2); cursor: pointer; transition: .15s; }
.chipsel button:hover { border-color: var(--line-2); color: var(--text); }
.chipsel button.is-on { border-color: var(--line-gold); background: var(--gold-soft); color: var(--gold); font-weight: 700; }

#tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: #0A121F; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 8px 11px;
  font-size: 11.5px; color: var(--text);
  box-shadow: 0 12px 32px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .12s;
  max-width: 260px;
}
#tip.is-on { opacity: 1; }
#tip b { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; margin-bottom: 5px; }
#tip .tr { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
#tip .tr i { width: 8px; height: 8px; border-radius: 2px; }
#tip .tr span { font-family: var(--font-mono); }

/* ---- animations ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; }
.reveal.is-in { animation: fadeUp .5s cubic-bezier(.22,.7,.3,1) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { to { transform: scaleY(1); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(220%); } }
.scanline { position: relative; overflow: hidden; }
.scanline::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(233,184,75,.10), transparent);
  animation: sweep 3.4s ease-in-out infinite;
  pointer-events: none;
}
.typing::after { content: "▋"; color: var(--gold); animation: pulse 1s steps(2) infinite; margin-left: 1px; }

/* ---- responsive ---- */
.sidebar.is-collapsed { width: 74px; }
.sidebar.is-collapsed .brand__text,
.sidebar.is-collapsed .nav__label,
.sidebar.is-collapsed .nav__item span,
.sidebar.is-collapsed .nav__tag,
.sidebar.is-collapsed .nav__kids,
.sidebar.is-collapsed .sidebar__user { display: none; }
.sidebar.is-collapsed .nav__item { justify-content: center; padding: 10px; }
.sidebar.is-collapsed ~ .main { margin-left: 74px; }

@media (max-width: 1180px) {
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-3-2, .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --pad: 16px; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.is-open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .main { margin-left: 0 !important; }
  .topsearch { display: none; }
  .clock { display: none; }
  .crumb__root { display: none; }
  .crumb__mid { display: none; }
}
@media (max-width: 560px) {
  .g-4, .g-5 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}