/* =========================================================
   智星数字员工运行监控与告警管理平台 v1.0
   设计语言：Signal Room / 信号中枢
   ========================================================= */
:root {
  --ink: #0A1220;
  --ink-2: #0E1A2B;
  --ink-3: #16263A;
  --pine: #0B6B5B;
  --pine-2: #0E8571;
  --mint: #12B886;
  --mint-soft: #E7F8F2;
  --amber: #F79009;
  --amber-soft: #FEF4E6;
  --red: #F04438;
  --red-soft: #FEECEB;
  --blue: #2E90FA;
  --blue-soft: #EAF3FE;
  --violet: #7A5AF8;
  --violet-soft: #F0EDFE;
  --paper: #F3F5F4;
  --card: #FFFFFF;
  --line: #E3E8E6;
  --line-2: #EEF2F0;
  --text: #101B2A;
  --muted: #66757D;
  --dim: #98A4AC;
  --shadow-sm: 0 1px 2px rgba(16, 27, 42, .05);
  --shadow: 0 1px 2px rgba(16, 27, 42, .04), 0 14px 34px -22px rgba(16, 27, 42, .22);
  --shadow-lg: 0 30px 60px -18px rgba(8, 18, 30, .35);
  --r-xs: 7px;
  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --rail-w: 256px;
  --top-h: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.app-body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(16, 27, 42, .045) 1px, transparent 0),
    radial-gradient(1000px 500px at 88% -10%, rgba(18, 184, 134, .07), transparent 60%),
    radial-gradient(900px 500px at 5% 105%, rgba(46, 144, 250, .04), transparent 60%);
  background-size: 26px 26px, auto, auto;
  min-height: 100vh;
}
::selection { background: rgba(18, 184, 134, .22); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.flex { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.between { display: flex; align-items: center; justify-content: space-between; }
.right { text-align: right; }
.center { text-align: center; }
.wrap { flex-wrap: wrap; }
.f1 { flex: 1; min-width: 0; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 22px; height: 22px; }
.ico-xl { width: 28px; height: 28px; }

/* ---------------- Layout ---------------- */
.app-layout { display: flex; min-height: 100vh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: 50;
  display: flex; flex-direction: column;
  background:
    radial-gradient(520px 260px at 20% -6%, rgba(18, 184, 134, .22), transparent 65%),
    radial-gradient(400px 300px at 110% 40%, rgba(46, 144, 250, .10), transparent 70%),
    linear-gradient(180deg, #0B1524 0%, #080F1A 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  color: #A9B7C4;
}
.rail::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 40px; height: 40px; overflow: visible; }
.bm-hex { fill: rgba(18, 184, 134, .08); stroke: rgba(18, 184, 134, .55); stroke-width: 1.4; }
.bm-star { fill: none; stroke: #2BD9A6; stroke-width: 1.3; stroke-linejoin: round; }
.bm-dot { fill: #2BD9A6; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt strong { font-size: 19px; letter-spacing: .16em; color: #F2F7F5; font-weight: 600; }
.brand-txt em { font-style: normal; font-family: var(--mono); font-size: 8.5px; letter-spacing: .28em; color: #6D8290; margin-top: 5px; }
.rail-mode {
  position: relative; margin: 0 16px 12px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--r-sm); display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #93A6B4;
  background: rgba(255, 255, 255, .025); letter-spacing: .02em;
}
.rail-mode-tag { margin-left: auto; font-family: var(--mono); font-size: 9px; color: #6E8491; border: 1px solid rgba(255, 255, 255, .1); padding: 1px 5px; border-radius: 4px; }
.rail-nav { position: relative; flex: 1; overflow-y: auto; padding: 2px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .12) transparent; }
.rail-nav::-webkit-scrollbar { width: 4px; }
.rail-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 4px; }
.nav-group { margin-bottom: 10px; }
.nav-group-head { display: flex; align-items: center; gap: 8px; padding: 9px 8px 5px; }
.nav-no { font-family: var(--mono); font-size: 9px; color: #5C7484; border: 1px solid rgba(255, 255, 255, .1); border-radius: 4px; padding: 1px 4px; letter-spacing: .04em; }
.nav-group-name { font-size: 10.5px; color: #6C8290; letter-spacing: .12em; white-space: nowrap; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px;
  border-radius: 8px; color: #9DAEBB; font-size: 12.5px; transition: background .16s, color .16s;
}
.nav-item .ico { width: 16px; height: 16px; color: #6D8695; transition: color .16s; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #EDF5F2; }
.nav-item:hover .ico { color: #9FB8C6; }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(18, 184, 134, .17), rgba(18, 184, 134, .02) 78%, transparent);
  color: #F4FFFB; box-shadow: inset 0 0 0 1px rgba(18, 184, 134, .12);
}
.nav-item.is-active .ico { color: #2BD9A6; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, #2BD9A6, #0E8571); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 14px rgba(43, 217, 166, .55);
}
.nav-badge { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 9px; background: rgba(240, 68, 56, .18); color: #FF928B; border: 1px solid rgba(240, 68, 56, .25); border-radius: 20px; padding: 0 5px; line-height: 15px; }
.rail-foot { position: relative; padding: 12px 16px 16px; }
.rail-health { border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .028); border-radius: 10px; padding: 10px 11px; }
.rail-health-top { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #A9BDC9; }
.rail-health-top .mono { margin-left: auto; color: #2BD9A6; font-size: 10px; }
.rail-health-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin: 8px 0 7px; overflow: hidden; }
.rail-health-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0E8571, #2BD9A6); border-radius: 3px; }
.rail-health-meta { display: flex; justify-content: space-between; font-size: 9.5px; color: #61798A; }
.rail-sign { text-align: center; font-size: 9.5px; color: #4E6675; padding-top: 10px; letter-spacing: .06em; }

.shell { flex: 1; min-width: 0; margin-left: var(--rail-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 14px;
  padding: 0 26px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .84); backdrop-filter: blur(16px) saturate(140%);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.crumb-group { color: var(--muted); }
.crumb-sep { width: 13px; height: 13px; color: #B9C3BE; }
.crumb-current { font-weight: 600; color: var(--text); white-space: nowrap; }
.crumb-code { font-size: 9px; color: var(--dim); border-left: 1px solid var(--line); padding-left: 10px; margin-left: 4px; letter-spacing: .06em; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.cmdbar {
  display: flex; align-items: center; gap: 8px; height: 34px; width: 286px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); background: #F7F9F8; border-radius: 9px; color: var(--dim); cursor: pointer;
  font-size: 11.5px; transition: border-color .16s, background .16s;
}
.cmdbar:hover { border-color: #CFDAD5; background: #fff; }
.cmdbar span { flex: 1; text-align: left; }
.cmdbar kbd { font-family: var(--mono); font-size: 9px; border: 1px solid var(--line); background: #fff; color: var(--dim); border-radius: 3px; padding: 1px 4px; }
.env-pill { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #4C6A5F; background: #F1F8F5; border: 1px solid #DCEBE4; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.icon-btn {
  position: relative; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: #5C6F72; border-radius: 9px; cursor: pointer; transition: .16s;
}
.icon-btn:hover { background: #F1F5F3; color: var(--text); border-color: var(--line); }
.icon-btn .ico { width: 17px; height: 17px; }
.bell-count { position: absolute; top: 3px; right: 2px; min-width: 14px; height: 14px; font-style: normal; font-family: var(--mono); font-size: 8.5px; line-height: 14px; text-align: center; border-radius: 8px; background: var(--red); color: #fff; padding: 0 3px; border: 1.5px solid #fff; }
.user-chip { position: relative; display: flex; align-items: center; gap: 9px; padding: 3px 6px 3px 3px; border-radius: 10px; cursor: pointer; outline: none; transition: background .16s; }
.user-chip:hover, .user-chip:focus-visible { background: #F3F6F4; }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); flex: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 12px; font-weight: 600; }
.user-meta em { font-style: normal; font-size: 9.5px; color: var(--dim); margin-top: 2px; }
.user-chip > .ico { width: 13px; height: 13px; color: #A3AFA9; }
.dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; width: 224px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60;
}
.user-chip.open .dropdown { display: block; animation: drop .18s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown-head { padding: 10px 10px 11px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; display: flex; flex-direction: column; }
.dropdown-head strong { font-size: 12.5px; }
.dropdown-head span { font-size: 10px; color: var(--dim); margin-top: 3px; }
.dropdown button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 9px 10px; border-radius: 7px; font-size: 12px; color: #3C4B52; cursor: pointer; text-align: left; }
.dropdown button:hover { background: #F3F7F5; }
.dropdown button .ico { width: 15px; height: 15px; color: #7C8C90; }
.dropdown button.danger { color: var(--red); }
.dropdown button.danger .ico { color: var(--red); }
.rail-toggle { display: none; }

.page { flex: 1; padding: 26px 30px 40px; }
.page-inner { max-width: 1680px; margin: 0 auto; animation: fadeUp .34s cubic-bezier(.22, .8, .3, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.footer { padding: 14px 30px 22px; display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #A2ADA7; flex-wrap: wrap; }

/* ---------------- Page head ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: #83948C; text-transform: uppercase; margin-bottom: 8px; }
.eyebrow-code { color: var(--pine); border: 1px solid #CFE6DD; background: #F0F9F5; border-radius: 4px; padding: 1px 5px; letter-spacing: .08em; }
.eyebrow .sep { width: 14px; height: 1px; background: #CFDAD5; }
.page-head h1 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; color: #0C1725; }
.page-desc { font-size: 12.5px; color: var(--muted); margin-top: 7px; max-width: 780px; line-height: 1.65; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 2px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.section-title .ico { color: var(--pine); }
.section-sub { font-size: 11px; color: var(--dim); margin-top: 3px; font-weight: 400; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 26px 0 12px; }
.section-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
.section-head h2 .ico { width: 16px; height: 16px; color: var(--pine); }
.section-head p { font-size: 11.5px; color: var(--dim); margin-top: 3px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #34434B; font-size: 12px;
  cursor: pointer; white-space: nowrap; transition: .16s; font-weight: 500;
}
.btn:hover { border-color: #C8D5CF; background: #FBFDFC; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }
.btn .ico { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(180deg, #0E7C69, #0A6355); border-color: #0A6355; color: #fff; box-shadow: 0 6px 16px -10px rgba(11, 107, 91, .65); }
.btn-primary:hover { background: linear-gradient(180deg, #0F8571, #0B6B5B); border-color: #0B6B5B; color: #fff; }
.btn-dark { background: #101B2A; border-color: #101B2A; color: #F2F7F5; }
.btn-dark:hover { background: #17263A; border-color: #17263A; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #F1F5F3; border-color: transparent; }
.btn-danger { color: var(--red); border-color: #F4D2CF; background: #FFF8F7; }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 11px; border-radius: 7px; }
.btn-sm .ico { width: 13px; height: 13px; }
.btn-lg { height: 40px; padding: 0 18px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.btn-group button { height: 32px; padding: 0 11px; border: 0; background: transparent; font-size: 11.5px; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line-2); }
.btn-group button:last-child { border-right: 0; }
.btn-group button.active { background: #EEF7F3; color: var(--pine); font-weight: 600; }
.icon-plain { width: 26px; height: 26px; border: 0; background: transparent; color: #84928B; border-radius: 6px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-plain:hover { background: #EEF3F1; color: var(--text); }
.icon-plain.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-plain .ico { width: 14px; height: 14px; }

/* ---------------- Panels ---------------- */
.panel { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line-2); min-height: 54px; }
.panel-head .ttl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.panel-head .ttl .ico { width: 15px; height: 15px; color: var(--pine); }
.panel-head .sub { font-size: 10.5px; color: var(--dim); font-weight: 400; margin-left: 2px; }
.panel-body { padding: 18px; }
.panel-body.tight { padding: 12px 14px; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel--tick::after {
  content: ""; position: absolute; top: -1px; right: -1px; width: 22px; height: 22px; pointer-events: none;
  border-top: 2px solid rgba(18, 184, 134, .55); border-right: 2px solid rgba(18, 184, 134, .55); border-radius: 0 var(--r) 0 0;
}
.panel-tint { background: linear-gradient(180deg, #FCFDFD, #F7FAF8); }

/* ---------------- KPI ---------------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 17px 14px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: var(--mint); border-radius: 0 3px 3px 0; opacity: .75; }
.kpi::after {
  content: attr(data-index); position: absolute; right: 12px; top: 6px; font-family: var(--mono); font-size: 34px; font-weight: 700;
  color: rgba(16, 27, 42, .035); letter-spacing: -.04em; pointer-events: none;
}
.kpi-top { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; }
.kpi-top .ico { width: 14px; height: 14px; color: #8B9C94; }
.kpi-val { display: flex; align-items: baseline; gap: 5px; margin-top: 9px; }
.kpi-val strong { font-family: var(--mono); font-size: 28px; font-weight: 600; letter-spacing: -.045em; line-height: 1.1; color: #0C1824; }
.kpi-val em { font-style: normal; font-size: 11px; color: var(--dim); }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 10.5px; color: var(--dim); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.delta.up { color: #0B7A5E; background: #EAF8F2; }
.delta.down { color: #C2410C; background: #FEF2E8; }
.delta .ico { width: 11px; height: 11px; }
.kpi-spark { width: 62px; height: 24px; opacity: .9; }
.kpi.amber::before { background: var(--amber); }
.kpi.red::before { background: var(--red); }
.kpi.violet::before { background: var(--violet); }

/* ---------------- Chips / pills ---------------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 20px; font-size: 10.5px; white-space: nowrap; background: #F1F4F3; color: #5C6B70; border: 1px solid transparent; font-weight: 500; }
.pill .dot { width: 5px; height: 5px; }
.pill-ok { background: #EAF8F2; color: #08795C; }
.pill-warn { background: #FEF4E6; color: #B45309; }
.pill-danger { background: #FEECEB; color: #C0281F; }
.pill-info { background: #EAF3FE; color: #1D6FD0; }
.pill-violet { background: #F0EDFE; color: #5B3FD1; }
.pill-muted { background: #F2F4F5; color: #66757D; }
.pill-line { background: #fff; border-color: var(--line); color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #9AA7AE; flex: none; display: inline-block; }
.dot-ok { background: var(--mint); box-shadow: 0 0 0 3px rgba(18, 184, 134, .12); animation: breathe 2.6s infinite; }
.dot-warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(247, 144, 9, .13); }
.dot-danger { background: var(--red); box-shadow: 0 0 0 3px rgba(240, 68, 56, .13); }
.dot-info { background: var(--blue); box-shadow: 0 0 0 3px rgba(46, 144, 250, .12); }
.dot-muted { background: #98A4AC; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 3px rgba(18, 184, 134, .10); } 50% { box-shadow: 0 0 0 5px rgba(18, 184, 134, .04); } }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font-size: 10px; border-radius: 5px; background: #F5F7F6; color: #5E6D72; border: 1px solid var(--line-2); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-mint { background: #F0F9F5; color: #0B6B5B; border-color: #D8EDE4; }
.level { display: inline-grid; place-items: center; min-width: 26px; height: 19px; padding: 0 5px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; border-radius: 4px; letter-spacing: .02em; }
.level-P1 { background: #FEECEB; color: #C0281F; }
.level-P2 { background: #FEF4E6; color: #B45309; }
.level-P3 { background: #EAF3FE; color: #1D6FD0; }
.level-P4 { background: #F2F4F5; color: #66757D; }
.level-P0 { background: #FEECEB; color: #C0281F; }

/* ---------------- Tables ---------------- */
.dt-wrap { width: 100%; overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: 12px; }
table.dt th {
  text-align: left; font-weight: 600; font-size: 10.5px; color: #7C8B91; letter-spacing: .03em; white-space: nowrap;
  padding: 10px 14px; background: #FAFCFB; border-bottom: 1px solid var(--line);
}
table.dt td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: #2C3B44; }
table.dt tbody tr { transition: background .12s; }
table.dt tbody tr:hover { background: #FBFDFC; }
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt .name-cell { font-weight: 600; color: #12202E; cursor: pointer; }
table.dt .name-cell:hover { color: var(--pine); }
table.dt .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.dt .sub { display: block; font-size: 10px; color: var(--dim); margin-top: 2px; font-weight: 400; }
table.dt th.right, table.dt td.right { text-align: right; }
.table-actions { display: flex; align-items: center; gap: 1px; opacity: .55; transition: opacity .14s; }
tr:hover .table-actions { opacity: 1; }
.table-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.table-toolbar .grow { flex: 1; }
.op-cell { display: flex; align-items: center; gap: 6px; }
.link-cell { color: var(--pine); font-weight: 600; cursor: pointer; }
.link-cell:hover { text-decoration: underline; text-underline-offset: 3px; }

/* search & filters */
.search-box { position: relative; display: flex; align-items: center; }
.search-box .ico { position: absolute; left: 10px; width: 14px; height: 14px; color: #9AA8A0; }
.search-box input { height: 32px; width: 220px; padding: 0 10px 0 31px; border: 1px solid var(--line); border-radius: 8px; background: #FBFCFC; font-size: 11.5px; outline: none; transition: .15s; font-family: var(--font); }
.search-box input:focus { border-color: #9ED3C0; background: #fff; box-shadow: 0 0 0 3px rgba(18, 184, 134, .08); }
select.sel, .sel {
  height: 32px; padding: 0 26px 0 10px; border: 1px solid var(--line); border-radius: 8px; background:
    #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A9992' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 9px center; font-size: 11.5px; color: #415049; outline: none; appearance: none; font-family: var(--font); cursor: pointer;
}
select.sel:focus { border-color: #9ED3C0; box-shadow: 0 0 0 3px rgba(18, 184, 134, .08); }
.chip-filter { display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 9px; border-radius: 6px; font-size: 10.5px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.chip-filter.active { border-color: #B7DFD0; background: #F0F9F5; color: var(--pine); font-weight: 600; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--dim); flex-wrap: wrap; }
.pager-btns { display: flex; align-items: center; gap: 4px; }
.pager-btns button { min-width: 27px; height: 27px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 11px; color: var(--muted); cursor: pointer; font-family: var(--mono); padding: 0 6px; }
.pager-btns button.active { background: #0F2A25; border-color: #0F2A25; color: #fff; }
.pager-btns button[disabled] { opacity: .4; pointer-events: none; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 10.5px; color: #61706D; font-weight: 600; letter-spacing: .02em; }
.field > label i { font-style: normal; color: var(--red); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #DDE5E1; background: #FCFDFD; border-radius: 8px; padding: 0 10px; height: 36px;
  font-size: 12px; color: #22313A; outline: none; font-family: var(--font); transition: .15s;
}
.field textarea { height: auto; min-height: 82px; padding: 9px 10px; line-height: 1.6; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8FCDB8; background: #fff; box-shadow: 0 0 0 3px rgba(18, 184, 134, .09); }
.field input::placeholder, .field textarea::placeholder { color: #B2BDB8; }
.field .hint { font-size: 10px; color: #97A39E; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A9992' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 4px 0 -2px; font-size: 11px; font-weight: 700; color: #2B3B44; letter-spacing: .02em; }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.form-section .ico { width: 14px; height: 14px; color: var(--pine); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 11.5px; color: var(--muted); }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 32px; height: 18px; border-radius: 20px; background: #D9E2DE; position: relative; transition: .18s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: .18s; }
.switch input:checked + i { background: var(--pine); }
.switch input:checked + i::after { transform: translateX(14px); }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 11.5px; color: #47575E; }
.check input { appearance: none; width: 15px; height: 15px; border: 1px solid #C9D5CF; border-radius: 4px; background: #fff; cursor: pointer; position: relative; flex: none; }
.check input:checked { background: var(--pine); border-color: var(--pine); }
.check input:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }

/* ---------------- Modal / Drawer ---------------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(7, 15, 24, .52); backdrop-filter: blur(5px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px 4vh; overflow-y: auto; animation: ovIn .18s ease; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
.overlay--center { align-items: center; padding: 4vh 20px; }
.overlay--top { z-index: 120; }
.modal {
  width: 700px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .5); animation: pop .24s cubic-bezier(.2, .9, .3, 1.05); overflow: hidden;
  display: flex; flex-direction: column; max-height: 88vh;
}
.modal--sm { width: 440px; }
.modal--lg { width: 940px; }
.modal--xl { width: 1120px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 22px 15px; border-bottom: 1px solid var(--line-2); display: flex; align-items: flex-start; gap: 14px; background: linear-gradient(180deg, #FCFDFD, #fff); }
.modal-head .mh-txt { flex: 1; min-width: 0; }
.modal-eyebrow { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: #94A39B; text-transform: uppercase; margin-bottom: 5px; }
.modal-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: #0D1926; }
.modal-head p { font-size: 11.5px; color: var(--dim); margin-top: 4px; line-height: 1.5; }
.modal-close { width: 30px; height: 30px; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #7B8A8F; flex: none; }
.modal-close:hover { background: #F3F6F4; color: var(--text); }
.modal-close .ico { width: 15px; height: 15px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-body.tight { padding: 0; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: #FCFDFD; }
.modal-foot .left { margin-right: auto; display: flex; align-items: center; gap: 8px; }
.overlay--top .modal { box-shadow: 0 40px 90px -10px rgba(0, 0, 0, .55); }
.confirm-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); flex: none; }
.confirm-icon.danger { background: var(--red-soft); color: var(--red); }
.confirm-icon .ico { width: 21px; height: 21px; }

.drawer-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(7, 15, 24, .44); backdrop-filter: blur(3px); animation: ovIn .16s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96; width: 780px; max-width: 94vw; background: #FAFBFB;
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, .45); display: flex; flex-direction: column;
  animation: slideIn .26s cubic-bezier(.2, .9, .3, 1);
}
@keyframes slideIn { from { transform: translateX(34px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { background: #fff; border-bottom: 1px solid var(--line); padding: 18px 22px 0; flex: none; }
.drawer-top { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 14px; }
.drawer-title { flex: 1; min-width: 0; }
.drawer-title h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.drawer-title .meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; font-size: 11px; color: var(--dim); }
.tabs { display: flex; gap: 2px; overflow-x: auto; }
.tabs button {
  position: relative; border: 0; background: transparent; padding: 9px 13px 12px; font-size: 12px; color: #75837E;
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 500;
}
.tabs button.active { color: var(--pine); border-bottom-color: var(--pine); font-weight: 600; }
.tabs button .count { font-family: var(--mono); font-size: 9px; margin-left: 4px; background: #F0F4F2; padding: 1px 4px; border-radius: 4px; color: #7C8B85; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; }
.drawer-foot { flex: none; background: #fff; border-top: 1px solid var(--line); padding: 12px 22px; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.drawer-foot .left { margin-right: auto; display: flex; gap: 6px; }

/* ---------------- Detail blocks ---------------- */
.detail-hero { display: flex; align-items: center; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.avatar-lg { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 600; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 8px 18px -10px rgba(0,0,0,.4); }
.detail-hero h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.detail-hero .subline { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; font-size: 11px; color: var(--dim); }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.kv { padding: 13px 16px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.kv:nth-child(2n) { border-right: 0; }
.kv:nth-last-child(-n+2) { border-bottom: 0; }
.kv label { display: block; font-size: 10px; color: var(--dim); margin-bottom: 4px; }
.kv strong { font-size: 12.5px; font-weight: 500; color: #23323B; word-break: break-all; }
.kv.full { grid-column: 1 / -1; border-right: 0; }
.kv.full:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-2); }
.kv.full:last-child { border-bottom: 0; }
.prose { font-size: 12.5px; line-height: 1.9; color: #34444C; white-space: pre-wrap; }
.prose-block { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.block-title { font-size: 11px; font-weight: 700; color: #7B8A83; letter-spacing: .04em; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.block-title .ico { width: 13px; height: 13px; color: var(--pine); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.stat-strip > div { padding: 13px 15px; border-right: 1px solid var(--line-2); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip label { display: block; font-size: 10px; color: var(--dim); margin-bottom: 3px; }
.stat-strip strong { font-family: var(--mono); font-size: 17px; font-weight: 600; }
.sync-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sync-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 11px; color: #4C5B62; cursor: pointer; }
.sync-btn:hover { border-color: #B7D8CB; background: #F6FBF9; color: var(--pine); }
.sync-btn .ico { width: 14px; height: 14px; }
.channel-ico { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; font-size: 8px; font-weight: 700; color: #fff; }

/* ---------------- Entity cards ---------------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.entity { display: flex; flex-direction: column; padding: 16px; gap: 12px; transition: .18s; position: relative; overflow: hidden; }
.entity:hover { border-color: #C4D8CF; box-shadow: 0 16px 34px -24px rgba(11, 70, 56, .35); transform: translateY(-2px); }
.entity-top { display: flex; align-items: flex-start; gap: 11px; }
.entity-avatar { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 600; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.entity-title { flex: 1; min-width: 0; }
.entity-title h3 { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.entity-title h3:hover { color: var(--pine); }
.entity-title .code { font-family: var(--mono); font-size: 9.5px; color: var(--dim); margin-top: 2px; display: block; }
.entity-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: 10.5px; color: var(--dim); }
.entity-meta span { display: inline-flex; align-items: center; gap: 4px; }
.entity-meta .ico { width: 12px; height: 12px; color: #A5B2AB; }
.entity-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px dashed var(--line); }
.health-ring { --score: 90; --ring: #12B886; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--ring) calc(var(--score) * 1%), #EDF1EF 0); display: grid; place-items: center; flex: none; }
.health-ring > span { width: 34px; height: 34px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: #26353D; }
.health-ring.sm { width: 34px; height: 34px; }
.health-ring.sm > span { width: 26px; height: 26px; font-size: 9px; }
.status-line { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; }

/* resource card */
.node-card { padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.node-head { display: flex; align-items: flex-start; gap: 10px; }
.node-badge { width: 36px; height: 36px; border-radius: 9px; background: #F0F6F3; border: 1px solid #DFEAE5; color: var(--pine); display: grid; place-items: center; flex: none; }
.node-badge .ico { width: 17px; height: 17px; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gauge-cell { background: #FAFCFB; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 6px; text-align: center; }
.gauge-cell .g-val { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.gauge-cell .g-label { font-size: 9px; color: var(--dim); margin-top: 1px; }
.mini-bar { height: 4px; border-radius: 3px; background: #EDF1EF; overflow: hidden; margin-top: 6px; }
.mini-bar i { display: block; height: 100%; border-radius: 3px; background: var(--mint); }
.mini-bar.warn i { background: var(--amber); }
.mini-bar.danger i { background: var(--red); }

/* ---------------- Toolbar / filters ---------------- */
.list-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.list-head .grow { flex: 1; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.view-toggle button { width: 32px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: #93A19A; cursor: pointer; }
.view-toggle button.active { background: #F0F7F4; color: var(--pine); }
.view-toggle .ico { width: 15px; height: 15px; }

/* ---------------- Toast ---------------- */
.toast-root { position: fixed; top: 20px; right: 22px; z-index: 300; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 380px; background: #0F1B28; color: #E8F1EE;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: 11px 13px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.55);
  animation: toastIn .26s cubic-bezier(.2, .9, .3, 1.1); pointer-events: auto; font-size: 12px; line-height: 1.55;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px) scale(.98); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast .t-ico { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.toast.ok .t-ico { background: rgba(18,184,134,.18); color: #3FE0B0; }
.toast.err .t-ico { background: rgba(240,68,56,.2); color: #FF9A93; }
.toast.info .t-ico { background: rgba(46,144,250,.18); color: #8CC4FF; }
.toast .t-ico .ico { width: 13px; height: 13px; }
.toast strong { display: block; font-size: 11.5px; font-weight: 600; }
.toast span { color: #A9BBC5; font-size: 10.5px; }

/* ---------------- Empty / loading ---------------- */
.empty { padding: 46px 20px; text-align: center; color: var(--dim); }
.empty .e-ico { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; background: #F2F6F4; display: grid; place-items: center; color: #9CB0A7; }
.empty .e-ico .ico { width: 22px; height: 22px; }
.empty strong { display: block; font-size: 12.5px; color: #5A6A6F; font-weight: 600; margin-bottom: 4px; }
.empty p { font-size: 11px; }
.skeleton { border-radius: 6px; background: linear-gradient(90deg, #F0F3F1 25%, #F8FAF9 37%, #F0F3F1 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.loading-block { padding: 40px; display: flex; flex-direction: column; gap: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid #D9E6E0; border-top-color: var(--pine); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-loading { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-size: 11px; }

/* ---------------- Chart containers ---------------- */
.chart { width: 100%; height: 210px; position: relative; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-sm { height: 140px; }
.chart-lg { height: 280px; }
.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 2px; }
.chart-tip {
  position: absolute; pointer-events: none; background: #101B2A; color: #EAF3EF; border-radius: 7px; padding: 7px 9px;
  font-size: 10px; line-height: 1.5; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); opacity: 0; transition: opacity .12s; z-index: 5; white-space: nowrap;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-family: var(--mono); font-weight: 600; }

/* ---------------- Board (dark cockpit) ---------------- */
.board { position: relative; background: linear-gradient(135deg, #0A1422, #0B1A27 55%, #0A1A1E); border-radius: 16px; padding: 18px; color: #DDEBE6; overflow: hidden; border: 1px solid #152A33; box-shadow: 0 30px 60px -40px rgba(0,0,0,.6); }
.board::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(80% 80% at 50% 0%, #000, transparent);
}
.board::after { content: ""; position: absolute; top: -120px; right: -60px; width: 420px; height: 320px; background: radial-gradient(closest-side, rgba(18,184,134,.22), transparent); pointer-events: none; }
.board > * { position: relative; z-index: 1; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.board-head h2 { font-size: 17px; font-weight: 600; letter-spacing: .02em; color: #F1FBF7; display: flex; align-items: center; gap: 9px; }
.board-head h2 .ico { color: #2BD9A6; }
.board-head .bh-sub { font-size: 10.5px; color: #7D98A1; margin-top: 4px; }
.board-clock { font-family: var(--mono); text-align: right; }
.board-clock strong { display: block; font-size: 22px; color: #EFFFF9; letter-spacing: .02em; }
.board-clock span { font-size: 9.5px; color: #6F8A93; letter-spacing: .12em; }
.board-grid { display: grid; gap: 12px; }
.board-panel { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.075); border-radius: 11px; padding: 13px 14px; }
.bp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: #8FA9B2; margin-bottom: 10px; letter-spacing: .04em; }
.bp-head .ico { width: 13px; height: 13px; color: #4ACFB0; }
.board-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.board-kpi { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 11px 12px; }
.board-kpi label { display: block; font-size: 9.5px; color: #7F99A3; letter-spacing: .05em; }
.board-kpi strong { display: block; font-family: var(--mono); font-size: 23px; font-weight: 600; color: #F4FFFB; letter-spacing: -.03em; margin-top: 2px; }
.board-kpi strong em { font-style: normal; font-size: 10px; color: #6F8C96; margin-left: 3px; }
.board-kpi .bk-trend { font-size: 9px; color: #4ACFB0; font-family: var(--mono); }
.board-kpi.warn strong { color: #FFC36B; }
.board-kpi.danger strong { color: #FF8E86; }
.board .chart { height: 190px; }
.board table.dt { font-size: 11px; }
.board table.dt th { background: transparent; color: #7F99A3; border-bottom-color: rgba(255,255,255,.08); }
.board table.dt td { color: #C6D8D3; border-bottom-color: rgba(255,255,255,.05); }
.board table.dt tbody tr:hover { background: rgba(255,255,255,.03); }
.board .muted, .board .dim { color: #6F8A93; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: #4ACFB0; }
.live-dot i { width: 5px; height: 5px; background: #2BD9A6; border-radius: 50%; box-shadow: 0 0 0 3px rgba(43,217,166,.15); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* robot matrix */
.matrix { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.matrix i { aspect-ratio: 1; border-radius: 3px; background: #12B886; opacity: .85; position: relative; cursor: pointer; transition: .15s; }
.matrix i:hover { transform: scale(1.25); z-index: 2; }
.matrix i.warn { background: #F79009; }
.matrix i.danger { background: #F04438; animation: blink 1.8s infinite; }
.matrix i.idle { background: #2E90FA; opacity: .55; }
.matrix i.off { background: #33414A; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.matrix-legend { display: flex; gap: 12px; font-size: 9px; color: #7F99A3; flex-wrap: wrap; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 4px; }
.matrix-legend b { width: 6px; height: 6px; border-radius: 2px; display: inline-block; }

/* feed */
.feed { display: flex; flex-direction: column; gap: 0; max-height: 300px; overflow-y: auto; }
.feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 11px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .time { font-family: var(--mono); font-size: 9.5px; color: #6F8A93; width: 38px; flex: none; padding-top: 1px; }
.feed-item .ftxt { flex: 1; min-width: 0; }
.feed-item .ftxt strong { font-weight: 500; color: #D5E5E0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .ftxt span { font-size: 9.5px; color: #6F8A93; }
.feed-item .st { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex: none; background: #2BD9A6; }

/* ---------------- Workbench ---------------- */
.workbench-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(120deg, #FFFFFF 0%, #F7FBF9 58%, #EEF8F3 100%); box-shadow: var(--shadow-sm); }
.workbench-hero::after { content: ""; position: absolute; right: -40px; top: -70px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(18,184,134,.18); box-shadow: 0 0 0 40px rgba(18,184,134,.035), 0 0 0 80px rgba(18,184,134,.02); }
.wb-hero-txt { flex: 1; position: relative; z-index: 1; }
.wb-hero-txt .greet { font-family: var(--serif); font-size: 24px; letter-spacing: .02em; color: #0D1B26; }
.wb-hero-txt .greet em { font-style: normal; color: var(--pine); }
.wb-hero-txt p { font-size: 12px; color: var(--muted); margin-top: 7px; }
.wb-hero-stats { display: flex; gap: 24px; position: relative; z-index: 1; }
.wb-hero-stats div { text-align: right; }
.wb-hero-stats label { display: block; font-size: 9.5px; color: var(--dim); }
.wb-hero-stats strong { font-family: var(--mono); font-size: 20px; font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item { display: flex; flex-direction: column; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: .16s; cursor: pointer; }
.quick-item:hover { border-color: #BEDBCE; background: #FBFEFC; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.quick-item .qi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.quick-item .qi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #F0F7F4; color: var(--pine); }
.quick-item .qi-ico .ico { width: 15px; height: 15px; }
.quick-item strong { font-size: 11.5px; font-weight: 600; }
.quick-item span { font-size: 9.5px; color: var(--dim); }
.quick-item .qi-arrow { color: #B3C3BB; }
.todo-list { display: flex; flex-direction: column; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.todo-item:last-child { border-bottom: 0; }
.todo-item:hover .todo-title { color: var(--pine); }
.todo-title { font-size: 11.5px; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-meta { font-size: 9.5px; color: var(--dim); }
.rank-list { display: flex; flex-direction: column; gap: 11px; }
.rank-item { display: flex; align-items: center; gap: 10px; }
.rank-no { font-family: var(--mono); font-size: 9.5px; color: #9AA8A2; width: 16px; }
.rank-name { font-size: 11.5px; width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: 1; height: 5px; border-radius: 4px; background: #F0F3F1; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #12B886, #0B6B5B); }
.rank-val { font-family: var(--mono); font-size: 10px; color: var(--muted); width: 44px; text-align: right; }

/* ---------------- Storm ---------------- */
.storm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.storm-card { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: .16s; }
.storm-card:hover { border-color: #E0BFA9; box-shadow: 0 12px 28px -22px rgba(160, 70, 20, .5); transform: translateY(-1px); }
.storm-card .sc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.storm-card .sc-title { font-size: 12px; font-weight: 600; margin-top: 8px; }
.storm-card .sc-sub { font-size: 9.5px; color: var(--dim); margin-top: 4px; }
.storm-card .sc-num { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.storm-card .sc-num em { font-style: normal; font-size: 9px; color: var(--dim); margin-left: 2px; }
.storm-spark { position: absolute; right: 10px; bottom: 9px; width: 66px; height: 24px; opacity: .6; }

/* ---------------- SLA ---------------- */
.sla-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
.dept-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.dept-tabs button { height: 26px; padding: 0 9px; font-size: 10px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: var(--muted); cursor: pointer; }
.dept-tabs button.active { border-color: #0B6B5B; background: #0B6B5B; color: #fff; }

/* ---------------- Flow canvas ---------------- */
.flow-layout { display: grid; grid-template-columns: 272px 1fr; gap: 14px; align-items: start; }
.flow-list { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; position: sticky; top: calc(var(--top-h) + 16px); }
.flow-list-head { padding: 13px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.flow-list-body { max-height: 640px; overflow-y: auto; padding: 6px; }
.flow-item { padding: 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; margin-bottom: 3px; }
.flow-item:hover { background: #F7FAF8; }
.flow-item.active { background: #F0F9F5; border-color: #D5EBE1; }
.flow-item .fi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.flow-item strong { font-size: 11.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-item .fi-meta { font-size: 9px; color: var(--dim); margin-top: 4px; display: flex; gap: 8px; font-family: var(--mono); }
.canvas-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r); min-height: 620px; display: flex; flex-direction: column; overflow: hidden; }
.canvas-head { padding: 13px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.canvas { position: relative; flex: 1; background-color: #FAFCFB; background-image: radial-gradient(circle at 1px 1px, #DDE6E1 1px, transparent 0); background-size: 18px 18px; padding: 26px; overflow: auto; min-height: 520px; }
.canvas-track { position: relative; display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 760px; margin: 0 auto; }
.canvas-step { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.canvas-step:last-child { margin-bottom: 0; }
.step-index { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1.5px solid #BBD8CB; color: var(--pine); font-family: var(--mono); font-size: 10px; display: grid; place-items: center; flex: none; z-index: 2; box-shadow: 0 0 0 4px #FAFCFB; }
.canvas-step:not(:last-child)::before { content: ""; position: absolute; left: 13.5px; top: 28px; bottom: -26px; width: 1.5px; background: repeating-linear-gradient(180deg, #BBD8CB 0 5px, transparent 5px 9px); }
.step-card { flex: 1; background: #fff; border: 1px solid #DCE7E2; border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 16px -14px rgba(11, 70, 56, .4); cursor: grab; transition: .16s; }
.step-card:hover { border-color: #A9D3C1; box-shadow: 0 10px 24px -18px rgba(11, 70, 56, .5); }
.step-card.dragging { opacity: .45; }
.step-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #F0F7F4; color: var(--pine); flex: none; }
.step-ico .ico { width: 16px; height: 16px; }
.step-main { flex: 1; min-width: 0; }
.step-main strong { font-size: 12px; font-weight: 600; display: block; }
.step-main span { font-size: 9.5px; color: var(--dim); display: block; margin-top: 3px; }
.step-type { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: #F3F6F4; color: #69786F; border: 1px solid var(--line); white-space: nowrap; }
.step-tools { display: flex; gap: 2px; opacity: .4; transition: .14s; }
.step-card:hover .step-tools { opacity: 1; }
.canvas-empty { text-align: center; padding: 70px 20px; color: var(--dim); }
.canvas-empty .ico { width: 34px; height: 34px; margin-bottom: 10px; color: #AFC1B9; }
.flow-stat-row { display: flex; gap: 18px; flex-wrap: wrap; font-size: 10px; color: var(--dim); }
.flow-stat-row b { font-family: var(--mono); color: #38474E; font-weight: 600; }

/* ---------------- Timeline / trace ---------------- */
.trace-list { display: flex; flex-direction: column; }
.trace-item { position: relative; padding: 0 0 20px 26px; }
.trace-item::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -4px; width: 1px; background: #E1EAE5; }
.trace-item:last-child::before { display: none; }
.trace-dot { position: absolute; left: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; background: #12B886; box-shadow: 0 0 0 1px #CBE5DA; }
.trace-dot.fail { background: var(--red); box-shadow: 0 0 0 1px #F5CDC9; }
.trace-dot.wait { background: #CBD5D0; box-shadow: 0 0 0 1px #DFE7E3; }
.trace-dot.run { background: var(--blue); animation: livePulse 1.5s infinite; }
.trace-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; }
.trace-card .tc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trace-card strong { font-size: 11.5px; font-weight: 600; }
.trace-card .tc-meta { display: flex; gap: 12px; font-size: 9.5px; color: var(--dim); margin-top: 5px; flex-wrap: wrap; }
.trace-card .tc-out { font-family: var(--mono); font-size: 9.5px; color: #5B6A72; background: #F8FAF9; border: 1px solid var(--line-2); border-radius: 5px; padding: 6px 8px; margin-top: 7px; word-break: break-all; }
.trace-card .tc-err { color: #B42318; background: #FFF6F5; border-color: #F6D8D5; }
.gantt { display: flex; flex-direction: column; gap: 7px; }
.gantt-row { display: grid; grid-template-columns: 160px 1fr 52px; gap: 10px; align-items: center; font-size: 10.5px; }
.gantt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4C5C63; }
.gantt-track { height: 16px; background: #F4F7F5; border-radius: 4px; position: relative; overflow: hidden; }
.gantt-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #2BD9A6, #0E8571); }
.gantt-bar.fail { background: linear-gradient(90deg, #FF9A93, #F04438); }
.gantt-bar.wait { background: #DCE5E0; }
.gantt-time { font-family: var(--mono); font-size: 9.5px; color: var(--dim); text-align: right; }

/* ---------------- Code / stack ---------------- */
.code-block { background: #0D1721; color: #C7D8D2; border-radius: 9px; padding: 13px 15px; font-family: var(--mono); font-size: 10.5px; line-height: 1.8; overflow-x: auto; white-space: pre; border: 1px solid #1B2A35; }
.code-block .ln { color: #526873; margin-right: 12px; user-select: none; }
.ai-box { border: 1px solid #D9E9E2; background: linear-gradient(140deg, #F8FDFB, #F2FAF6); border-radius: 10px; padding: 14px; }
.ai-box .ai-head { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--pine); margin-bottom: 8px; }
.ai-box .ai-head .ico { width: 14px; height: 14px; }
.ai-box p { font-size: 11.5px; line-height: 1.75; color: #3E5157; }

/* ---------------- Policy / grades ---------------- */
.grade-ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grade-card { position: relative; border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: #fff; overflow: hidden; }
.grade-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gc); }
.grade-card .gc-level { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--gc); }
.grade-card .gc-name { font-size: 14px; font-weight: 600; margin-top: 2px; }
.grade-card .gc-desc { font-size: 10.5px; color: var(--dim); line-height: 1.6; margin-top: 7px; min-height: 48px; }
.grade-card .gc-meta { display: flex; gap: 14px; border-top: 1px solid var(--line-2); padding-top: 9px; margin-top: 9px; font-size: 9.5px; color: var(--muted); }
.grade-card .gc-meta b { font-family: var(--mono); color: #2E3D45; }
.rule-card { padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; }
.rule-card .rc-top { display: flex; align-items: flex-start; gap: 10px; }
.rule-card .rc-ico { width: 34px; height: 34px; border-radius: 9px; background: #F4F7F5; display: grid; place-items: center; color: #6F8279; flex: none; }
.rule-card .rc-ico .ico { width: 16px; height: 16px; }
.rule-card h3 { font-size: 12.5px; font-weight: 600; }
.rule-card .rc-code { font-family: var(--mono); font-size: 9px; color: var(--dim); margin-top: 2px; }
.rule-threshold { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px; border-radius: 8px; background: #FAFCFB; border: 1px solid var(--line-2); }
.rule-threshold strong { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.rule-threshold span { font-size: 10px; color: var(--dim); }
.rule-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rule-toggle { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }

/* ---------------- Knowledge ---------------- */
.pb-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.pb-card:hover h3 { color: var(--pine); }
.pb-card h3 { font-size: 13px; font-weight: 600; }
.pb-card .pb-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: var(--dim); }
.pb-card .pb-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; font-size: 10px; color: var(--dim); }
.steps-list { display: flex; flex-direction: column; gap: 0; counter-reset: step; }
.step-line { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); }
.step-line:last-child { border-bottom: 0; }
.step-line .sn { width: 22px; height: 22px; border-radius: 50%; background: #F0F7F4; color: var(--pine); font-family: var(--mono); font-size: 9.5px; display: grid; place-items: center; flex: none; }
.step-line p { font-size: 12px; line-height: 1.7; color: #3A4A52; }
.doc-layout { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
.doc-side { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; position: sticky; top: calc(var(--top-h) + 16px); }
.doc-side .ds-head { font-size: 10px; color: var(--dim); letter-spacing: .08em; padding: 5px 8px 8px; }
.doc-side button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 9px; border-radius: 6px; font-size: 11.5px; color: #4B5C62; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.doc-side button .ico { width: 14px; height: 14px; color: #8FA096; }
.doc-side button:hover { background: #F5F8F6; }
.doc-side button.active { background: #F0F9F5; color: var(--pine); font-weight: 600; }
.doc-side button.active .ico { color: var(--pine); }
.doc-reader { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px 34px; min-height: 620px; }
.doc-reader h1 { font-family: var(--serif); font-size: 26px; letter-spacing: .01em; margin-bottom: 10px; }
.doc-meta { display: flex; gap: 14px; font-size: 10px; color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.doc-body { font-size: 12.5px; line-height: 2; color: #33444C; white-space: pre-wrap; }
.doc-toc { border-left: 2px solid #E4EDE8; padding-left: 12px; margin: 14px 0 18px; }
.doc-toc div { font-size: 11px; color: var(--muted); padding: 3px 0; }

/* ---------------- Org ---------------- */
.org-layout { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.tree { font-size: 12px; }
.tree .tnode { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 7px; cursor: pointer; color: #3E4E55; }
.tree .tnode:hover { background: #F6F9F7; }
.tree .tnode.active { background: #F0F9F5; color: var(--pine); font-weight: 600; }
.tree .tnode .ico { width: 14px; height: 14px; color: #8FA096; }
.tree .tnode.active .ico { color: var(--pine); }
.tree .tnode .cnt { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--dim); }
.tree .child { padding-left: 18px; }
.org-detail-empty { min-height: 300px; display: grid; place-items: center; color: var(--dim); font-size: 12px; }

/* ---------------- Matrix ---------------- */
.matrix-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.matrix-table th, .matrix-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: center; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.matrix-table thead th { font-size: 10px; color: var(--muted); font-weight: 600; background: #FAFCFB; }
.matrix-table .check input { width: 14px; height: 14px; }
.matrix-role-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.matrix-role-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 11px; font-size: 11px; color: var(--muted); cursor: pointer; }
.matrix-role-tabs button.active { background: #0F2A25; border-color: #0F2A25; color: #fff; }

/* ---------------- Param / dict ---------------- */
.param-group { margin-bottom: 18px; }
.param-group h4 { font-size: 11px; color: #76857E; letter-spacing: .06em; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.param-row { display: grid; grid-template-columns: 1fr 1.1fr 1.5fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 7px; }
.param-row .pn { font-size: 11.5px; font-weight: 500; }
.param-row .pk { font-family: var(--mono); font-size: 9.5px; color: var(--dim); margin-top: 2px; }
.param-row .pv input { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; font-size: 11px; font-family: var(--mono); background: #FBFCFC; }
.param-row .pd { font-size: 10px; color: var(--dim); }
.dict-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line-2); }
.dict-row:last-child { border-bottom: 0; }
.dict-ico { width: 32px; height: 32px; border-radius: 8px; background: #F2F7F4; color: var(--pine); display: grid; place-items: center; }
.dict-ico .ico { width: 15px; height: 15px; }
.dict-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dict-chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--line); font-size: 9.5px; color: #56665F; background: #FBFCFC; }
.dict-chip i { width: 5px; height: 5px; border-radius: 50%; }

/* ---------------- Kanban ---------------- */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.kb-col { background: #F7F9F8; border: 1px solid var(--line); border-radius: 11px; padding: 10px; min-height: 300px; }
.kb-col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; font-size: 11px; font-weight: 600; color: #4C5D64; }
.kb-col-head .cnt { font-family: var(--mono); font-size: 9px; color: var(--dim); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; margin-bottom: 7px; cursor: grab; transition: .14s; }
.kb-card:hover { border-color: #BBD8CB; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kb-card.dragging { opacity: .45; }
.kb-card .kc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kb-card .kc-title { font-size: 11px; font-weight: 600; margin-top: 6px; line-height: 1.45; }
.kb-card .kc-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 9px; color: var(--dim); flex-wrap: wrap; }
.kb-col.dragover { background: #EFF8F4; border-color: #A9D3C1; }

/* ---------------- Audit ---------------- */
.audit-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.audit-detail > div { padding: 11px 13px; border-bottom: 1px solid var(--line-2); }
.audit-detail label { display: block; font-size: 9.5px; color: var(--dim); margin-bottom: 3px; }
.audit-detail strong { font-size: 11.5px; font-weight: 500; }
.audit-detail .full { grid-column: 1 / -1; }

/* ---------------- Palette ---------------- */
.palette-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(7, 15, 24, .5); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; }
.palette { width: 620px; max-width: 92vw; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .2s ease; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input .ico { color: #93A39A; }
.palette-input input { flex: 1; border: 0; outline: none; font-size: 14px; font-family: var(--font); }
.palette-input kbd { font-family: var(--mono); font-size: 9px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; color: var(--dim); }
.palette-list { max-height: 400px; overflow-y: auto; padding: 7px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 12px; }
.palette-item:hover, .palette-item.active { background: #F3F8F5; }
.palette-item .p-ico { width: 27px; height: 27px; border-radius: 6px; background: #F0F5F2; color: var(--pine); display: grid; place-items: center; flex: none; }
.palette-item .p-ico .ico { width: 14px; height: 14px; }
.palette-item .p-meta { flex: 1; min-width: 0; }
.palette-item .p-meta strong { font-size: 11.5px; font-weight: 500; display: block; }
.palette-item .p-meta span { font-size: 9px; color: var(--dim); }
.palette-item .p-group { font-size: 9px; color: var(--dim); }
.palette-foot { border-top: 1px solid var(--line); padding: 8px 14px; display: flex; gap: 12px; font-size: 9px; color: var(--dim); }
.palette-foot b { font-family: var(--mono); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; margin-right: 3px; }

/* ---------------- Auth pages ---------------- */
.auth-body { min-height: 100vh; background: #F4F6F5; overflow-x: hidden; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }
.auth-visual { position: relative; overflow: hidden; background: #071019; color: #EAF5F0; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 46px 34px; }
.auth-visual::before { content: ""; position: absolute; inset: 0; background-image: url('/assets/img/login-visual.svg'); background-size: cover; background-position: center; opacity: .95; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(7,16,25,.92) 0%, rgba(8,26,27,.78) 45%, rgba(5,18,20,.94) 100%), radial-gradient(600px 400px at 70% 10%, rgba(18,184,134,.28), transparent 65%); }
.auth-visual > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-brand strong { font-size: 20px; letter-spacing: .2em; font-weight: 600; }
.auth-brand em { font-style: normal; display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .3em; color: #7D958E; margin-top: 4px; }
.auth-hero { max-width: 560px; }
.auth-hero .a-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: #64D6B4; border: 1px solid rgba(100, 214, 180, .25); background: rgba(18,184,134,.08); padding: 5px 10px; border-radius: 20px; margin-bottom: 22px; }
.auth-hero .a-kicker i { width: 5px; height: 5px; border-radius: 50%; background: #2BD9A6; box-shadow: 0 0 0 4px rgba(43,217,166,.13); }
.auth-hero h1 { font-family: var(--serif); font-size: 42px; line-height: 1.28; letter-spacing: .02em; font-weight: 500; color: #F4FCF8; }
.auth-hero h1 em { font-style: normal; color: #4FE0B5; }
.auth-hero p { font-size: 12.5px; line-height: 1.9; color: #9CB3AF; margin-top: 18px; max-width: 460px; }
.auth-stats { display: flex; gap: 34px; }
.auth-stats div { border-left: 1px solid rgba(255,255,255,.14); padding-left: 14px; }
.auth-stats strong { font-family: var(--mono); font-size: 22px; font-weight: 600; color: #EAFBF4; display: block; letter-spacing: -.02em; }
.auth-stats span { font-size: 9.5px; color: #78928C; letter-spacing: .08em; }
.auth-foot { display: flex; justify-content: space-between; gap: 16px; font-size: 9.5px; color: #5D7871; letter-spacing: .03em; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 54px; background: #F7F9F8; position: relative; }
.auth-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(16,27,42,.05) 1px, transparent 0); background-size: 24px 24px; mask-image: linear-gradient(180deg, #000, transparent 70%); }
.auth-card { position: relative; width: 100%; max-width: 380px; }
.auth-card .ac-eyebrow { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: #93A39A; margin-bottom: 12px; }
.auth-card h2 { font-size: 26px; font-weight: 600; letter-spacing: -.01em; color: #0C1725; }
.auth-card .ac-sub { font-size: 11.5px; color: #7A8A82; margin-top: 7px; line-height: 1.7; }
.auth-form { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.auth-field label { display: block; font-size: 10.5px; color: #5E6E67; font-weight: 600; margin-bottom: 6px; letter-spacing: .02em; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input .ico { position: absolute; left: 12px; width: 15px; height: 15px; color: #9BAAA2; }
.auth-input input { width: 100%; height: 44px; border: 1px solid #DDE6E1; background: #fff; border-radius: 9px; padding: 0 40px 0 37px; font-size: 12.5px; outline: none; transition: .16s; font-family: var(--font); }
.auth-input input:focus { border-color: #8FCDB8; box-shadow: 0 0 0 3px rgba(18,184,134,.09); }
.auth-input .eye { position: absolute; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: #9BAAA2; cursor: pointer; border-radius: 6px; }
.auth-input .eye:hover { color: #51635C; background: #F4F7F5; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10.5px; color: #7C8B84; }
.auth-row a { color: var(--pine); }
.auth-submit { height: 46px; border-radius: 9px; border: 0; background: linear-gradient(180deg, #0E7C69, #0A5F52); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .06em; cursor: pointer; box-shadow: 0 10px 24px -14px rgba(11, 107, 91, .8); transition: .16s; }
.auth-submit:hover { background: linear-gradient(180deg, #0F8873, #0B6B5B); transform: translateY(-1px); }
.auth-submit:active { transform: none; }
.auth-alt { text-align: center; font-size: 11px; color: #7C8B84; margin-top: 18px; }
.auth-alt a { color: var(--pine); font-weight: 600; margin-left: 4px; }
.auth-shield { display: flex; align-items: center; gap: 7px; justify-content: center; font-size: 9.5px; color: #9CAAA3; margin-top: 22px; }
.auth-shield .ico { width: 12px; height: 12px; }
.auth-error { display: none; background: #FFF5F4; border: 1px solid #F5D3D0; color: #B42318; font-size: 11px; border-radius: 7px; padding: 9px 11px; line-height: 1.5; }
.auth-error.show { display: block; animation: fadeUp .2s ease; }
.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-terms { display: flex; align-items: flex-start; gap: 7px; font-size: 10px; color: #7C8B84; line-height: 1.6; }
.auth-terms input { margin-top: 2px; accent-color: var(--pine); }
.auth-strength { display: flex; gap: 4px; margin-top: 6px; }
.auth-strength i { flex: 1; height: 3px; border-radius: 2px; background: #E4ECE8; }
.auth-strength i.on { background: var(--mint); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1380px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .storm-grid { grid-template-columns: repeat(2, 1fr); }
  .board-kpis { grid-template-columns: repeat(3, 1fr); }
  .cmdbar { width: 220px; }
  .matrix { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 1200px) {
  .flow-layout { grid-template-columns: 1fr; }
  .flow-list { position: static; }
  .flow-list-body { max-height: 220px; }
  .sla-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .org-layout { grid-template-columns: 220px 1fr; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  :root { --rail-w: 256px; }
  .rail { transform: translateX(-100%); transition: transform .24s; }
  .rail.open { transform: none; box-shadow: 30px 0 60px -30px rgba(0,0,0,.5); }
  .shell { margin-left: 0; }
  .rail-toggle { display: grid; }
  .page { padding: 20px 18px 32px; }
  .topbar { padding: 0 16px; gap: 8px; }
  .cmdbar { width: 38px; justify-content: center; padding: 0; }
  .cmdbar span, .cmdbar kbd { display: none; }
  .env-pill, .crumb-code { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 34px 24px; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-side { position: static; }
}
@media (max-width: 760px) {
  .kpi-row, .grid-2, .grid-3, .grid-4, .grid-5, .stat-strip, .grade-ladder, .kanban { grid-template-columns: 1fr; }
  .storm-grid { grid-template-columns: 1fr; }
  .sla-layout { grid-template-columns: 1fr; }
  .board-kpis { grid-template-columns: repeat(2, 1fr); }
  .kv-grid { grid-template-columns: 1fr; }
  .kv { border-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .page-head { align-items: flex-start; }
  .user-meta { display: none; }
  .page-head h1 { font-size: 20px; }
  .matrix { grid-template-columns: repeat(7, 1fr); }
  .overlay { padding: 12px; align-items: flex-start; }
  .modal { max-height: 92vh; }
  .drawer { width: 100vw; max-width: 100vw; }
  .org-layout { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .wb-hero-stats { display: none; }
}
