:root {
  --bg-0: #040b12;
  --bg-1: #06111b;
  --bg-2: #081722;
  --bg-3: #0b1d2a;
  --panel: rgba(8, 20, 31, 0.84);
  --panel-strong: rgba(9, 23, 35, 0.96);
  --panel-soft: rgba(11, 28, 41, 0.62);
  --line: rgba(92, 149, 164, 0.16);
  --line-strong: rgba(102, 183, 194, 0.28);
  --text: #e9f5f7;
  --text-soft: #b9d0d8;
  --muted: #7e9aa7;
  --dim: #526d7a;
  --cyan: #2bd8cc;
  --cyan-soft: #74f5ea;
  --blue: #4aa8ff;
  --violet: #8b8cff;
  --orange: #ffb45e;
  --red: #ff6278;
  --green: #4ed6a3;
  --yellow: #f5cd63;
  --radius: 14px;
  --sidebar-w: 238px;
  --font: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
svg { display: inline-block; width: 20px; height: 20px; vertical-align: middle; }
/* Stroke only sprite icons. Chart and flow SVGs contain text and must not inherit a text stroke. */
svg:has(use) { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(43, 216, 204, 0.24); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(95, 151, 164, 0.28); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(95, 151, 164, 0.46); }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Boot ---------- */
.boot-screen {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(20, 91, 100, 0.24), transparent 45%),
    radial-gradient(ellipse at 16% 82%, rgba(25, 69, 121, 0.11), transparent 38%),
    #040a11;
  transition: opacity .7s ease, visibility .7s ease;
}
.boot-screen::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(59, 136, 150, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 136, 150, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black, transparent 74%);
}
.boot-screen.hidden { opacity: 0; visibility: hidden; }
.boot-mark { position: relative; width: 98px; height: 98px; display: grid; place-items: center; margin-bottom: 24px; }
.boot-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(43, 216, 204, 0.24); animation: ringPulse 2.6s linear infinite; }
.boot-ring.ring-2 { inset: 12px; animation-delay: -1.3s; border-color: rgba(74, 168, 255, 0.22); }
.boot-core {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  color: #041317; font-size: 34px; font-weight: 800; font-style: italic;
  background: linear-gradient(135deg, var(--cyan-soft), var(--cyan) 55%, #27a9bf);
  box-shadow: 0 0 34px rgba(43, 216, 204, 0.36), inset 0 1px rgba(255,255,255,.6);
}
.boot-word { font-size: 22px; letter-spacing: .12em; font-weight: 700; }
.boot-word em { font-style: normal; color: var(--cyan); font-weight: 600; margin-left: 6px; letter-spacing: .04em; }
.boot-status { margin-top: 18px; font-size: 14px; color: var(--muted); letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.boot-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: dotPulse 1.6s infinite; }
.boot-dots { animation: dots 1.5s steps(4, end) infinite; overflow: hidden; width: 16px; display: inline-block; }
.boot-progress { width: 214px; height: 2px; background: rgba(88, 136, 148, 0.16); margin-top: 22px; overflow: hidden; border-radius: 2px; }
.boot-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, transparent, var(--cyan)); animation: bootBar 1.8s ease forwards; }
@keyframes bootBar { 0% { width: 0; } 65% { width: 72%; } 100% { width: 100%; } }
@keyframes ringPulse { 0% { transform: scale(.82); opacity: .15; } 50% { opacity: .7; } 100% { transform: scale(1.16); opacity: 0; } }
@keyframes dotPulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes dots { 0% { width: 0; } 100% { width: 18px; } }

/* ---------- Global layout ---------- */
.app { display: flex; width: 100%; height: 100%; position: relative; }
.ambient-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg-0); pointer-events: none; }
.ambient-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 60% 40%, black, transparent 78%);
}
.ambient-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; }
.glow-a { width: 48vw; height: 44vw; left: 12%; top: -24%; background: rgba(17, 109, 122, .19); }
.glow-b { width: 42vw; height: 38vw; right: -12%; bottom: -20%; background: rgba(33, 77, 129, .15); }
.ambient-grid { position: absolute; inset: 0; background: radial-gradient(circle at 50% 10%, rgba(40, 126, 142, .06), transparent 55%); }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  height: 100%; position: relative; z-index: 30;
  display: flex; flex-direction: column;
  padding: 0 13px 14px;
  background:
    linear-gradient(180deg, rgba(9, 21, 32, 0.97), rgba(5, 13, 21, 0.985)),
    radial-gradient(ellipse at top, rgba(37, 131, 136, 0.18), transparent 52%);
  border-right: 1px solid rgba(82, 146, 158, 0.14);
  transition: width .28s ease, flex-basis .28s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar::after {
  content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 82px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  opacity: .55;
}
.brand { height: 72px; display: flex; align-items: center; gap: 11px; padding: 0 2px; flex: 0 0 auto; position: relative; }
.brand-mark {
  position: relative; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px;
  display: grid; place-items: center; background: linear-gradient(145deg, #1ae0d1, #148c9f);
  box-shadow: 0 8px 26px rgba(31, 205, 198, .22), inset 0 1px rgba(255,255,255,.58);
  color: #041318; font-weight: 900; font-size: 24px; font-style: italic;
  transform: skew(-4deg);
}
.brand-mark span { transform: skew(4deg); }
.brand-mark i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #bffef7; right: 5px; top: 5px; box-shadow: 0 0 9px #bffef7; }
.brand-word { display: flex; flex-direction: column; min-width: 0; }
.brand-word strong { font-size: 17px; letter-spacing: .1em; font-weight: 700; white-space: nowrap; }
.brand-word small { font-size: 12px; color: var(--muted); letter-spacing: .16em; margin-top: 2px; white-space: nowrap; }
.sidebar-toggle {
  margin-left: auto; width: 24px; height: 24px; color: var(--dim); flex: 0 0 auto;
  border-radius: 6px; display: grid; place-items: center; transition: color .2s, background .2s, transform .2s;
}
.sidebar-toggle svg { width: 14px; height: 14px; transform: rotate(180deg); transition: transform .25s; }
.sidebar-toggle:hover { color: var(--cyan); background: rgba(43, 216, 204, .08); }
.sidebar-toggle:active { transform: scale(.94); }
.sidebar-toggle:focus-visible { outline: 1px solid rgba(43, 216, 204, .55); outline-offset: 1px; }

.site-chip {
  height: 58px; flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  padding: 11px 10px; margin: 2px 0 14px; text-align: left;
  border-radius: 10px; border: 1px solid rgba(77, 151, 161, 0.17);
  background: linear-gradient(135deg, rgba(20, 55, 66, .46), rgba(11, 28, 40, .32));
  transition: .2s;
}
.site-chip:hover { border-color: rgba(43, 216, 204, .34); background: rgba(22, 65, 73, .46); }
.site-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(43, 216, 204, .1); color: var(--cyan); }
.site-icon svg { width: 15px; height: 15px; }
.site-copy { display: flex; flex-direction: column; min-width: 0; }
.site-copy small { font-size: 12px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-copy strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.site-live { margin-left: auto; font-size: 12px; color: var(--cyan); display: flex; align-items: center; gap: 3px; letter-spacing: .06em; }
.site-live i { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.site-arrow { width: 13px; height: 13px; color: var(--dim); flex: 0 0 auto; }

.nav-label { padding: 7px 11px 7px; font-size: 12px; color: #4d6774; letter-spacing: .18em; font-weight: 600; }
.main-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; height: 41px; display: flex; align-items: center; gap: 11px;
  padding: 0 11px; border-radius: 8px; color: #c0d6dd; text-align: left;
  transition: background .2s, color .2s;
}
.nav-item.nav-virtual { color: #7d97a2; }
.nav-item.nav-virtual .nav-text { font-weight: 400; }
.nav-item.nav-virtual:hover { color: #a9c2cb; }
.nav-item::before {
  content: ""; position: absolute; left: -13px; top: 11px; bottom: 11px; width: 2px;
  border-radius: 0 3px 3px 0; background: var(--cyan); opacity: 0;
  box-shadow: 0 0 12px rgba(43, 216, 204, .7); transition: opacity .2s;
}
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; }
.nav-icon svg { width: 17px; height: 17px; stroke-width: 1.55; }
.nav-text { font-size: 14.5px; letter-spacing: .02em; font-weight: 500; white-space: nowrap; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 17px; border-radius: 4px; display: grid; place-items: center;
  padding: 0 5px; background: rgba(80, 121, 135, .16); color: #76929e; font-size: 12px; font-style: normal;
  font-family: var(--font-mono); letter-spacing: .02em;
}
.nav-badge.live { background: rgba(43, 216, 204, .1); color: var(--cyan); border: 1px solid rgba(43, 216, 204, .17); }
.nav-badge.warn { background: rgba(255, 180, 94, .1); color: var(--orange); }
.nav-item:hover { color: #e4f4f7; background: rgba(95, 151, 162, .075); }
.nav-item.active { color: #f3ffff; background: linear-gradient(90deg, rgba(43, 216, 204, .13), rgba(43, 216, 204, .03)); }
.nav-item.active::before { opacity: 1; }
.nav-item.active .nav-icon { color: var(--cyan); filter: drop-shadow(0 0 7px rgba(43,216,204,.28)); }
.sub-nav .nav-item { height: 38px; color: #c0d6dd; }
.main-nav .nav-text { font-weight: 550; }
.sub-nav .nav-item.nav-virtual { color: #7d97a2; }
.sidebar-spacer { flex: 1; min-height: 14px; }

.system-health {
  border: 1px solid rgba(78, 135, 147, .13); border-radius: 9px;
  background: rgba(9, 25, 35, .4); padding: 10px 10px 9px; margin-bottom: 10px;
}
.health-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.health-head em { font-style: normal; font-size: 12px; color: var(--green); display: flex; align-items: center; gap: 4px; }
.health-head em i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.integration-list { display: flex; justify-content: space-between; gap: 5px; margin-top: 9px; }
.integration-list span { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #77909a; font-family: var(--font-mono); }
.integration-list i { width: 4px; height: 4px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 5px var(--dot); }
.health-meta { display: flex; gap: 5px; align-items: center; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(88, 134, 146, .1); font-size: 12px; color: #506a77; }
.health-meta strong { color: #83a3ae; font-family: var(--font-mono); font-weight: 500; margin-right: 4px; }
.health-meta span:nth-of-type(2) { margin-left: auto; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 9px 4px 0; border-top: 1px solid rgba(87, 136, 148, .13); }
.avatar {
  width: 31px; height: 31px; flex: 0 0 31px; border-radius: 9px;
  display: grid; place-items: center; background: linear-gradient(140deg, #29515d, #162c3a);
  border: 1px solid rgba(86, 182, 185, .26); color: #a5f4eb; font-size: 14px; font-weight: 600;
}
.user-copy { display: flex; flex-direction: column; min-width: 0; }
.user-copy strong { font-size: 12.5px; font-weight: 600; }
.user-copy small { font-size: 12px; color: var(--dim); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-more { margin-left: auto; color: var(--dim); }
.user-more svg { width: 16px; height: 16px; }

/* collapsed sidebar */
body.sidebar-collapsed .sidebar { width: 72px; flex-basis: 72px; padding-left: 9px; padding-right: 9px; }
body.sidebar-collapsed .brand {
  height: auto; flex-direction: column; justify-content: center;
  gap: 6px; padding: 10px 0 4px;
}
body.sidebar-collapsed .brand-word,
body.sidebar-collapsed .site-copy,
body.sidebar-collapsed .site-live,
body.sidebar-collapsed .site-arrow,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .system-health,
body.sidebar-collapsed .user-copy,
body.sidebar-collapsed .user-more { display: none; }
body.sidebar-collapsed .site-chip { justify-content: center; padding: 10px 0; }
body.sidebar-collapsed .site-icon { width: 30px; height: 30px; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }
body.sidebar-collapsed .nav-item::before { left: -9px; }
body.sidebar-collapsed .sidebar-user { justify-content: center; padding-top: 10px; }
body.sidebar-collapsed .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
body.sidebar-collapsed .sidebar-toggle {
  margin: 0 auto; width: 36px; height: 22px; color: #8fc3cd;
  border: 1px solid rgba(43, 216, 204, .24); border-radius: 6px;
  background: linear-gradient(180deg, rgba(33, 92, 102, .5), rgba(15, 46, 57, .55));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}
body.sidebar-collapsed .sidebar-toggle:hover {
  color: var(--cyan); border-color: rgba(43, 216, 204, .5);
  background: rgba(43, 216, 204, .14); box-shadow: 0 0 12px rgba(43, 216, 204, .2);
}
body.sidebar-collapsed .sidebar-toggle svg { transform: rotate(0deg); }

/* ---------- Topbar ---------- */
.shell { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; position: relative; z-index: 2; }
.topbar {
  height: 66px; flex: 0 0 66px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; border-bottom: 1px solid rgba(79, 135, 146, .13);
  background: linear-gradient(180deg, rgba(7, 18, 27, .84), rgba(6, 15, 23, .68));
  backdrop-filter: blur(18px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; }
.topbar-left { gap: 11px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.crumb svg { width: 12px; height: 12px; color: #3e5865; }
.crumb strong { color: var(--text-soft); font-weight: 500; }
.topbar-divider { width: 1px; height: 17px; background: rgba(99, 143, 154, .14); }
.shift { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; cursor: help; }
.shift[hidden], .topbar-divider[hidden] { display: none; }
.shift i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.topbar-right { gap: 7px; }
.global-search {
  height: 32px; width: 248px; display: flex; align-items: center; gap: 8px; padding: 0 9px 0 11px;
  border-radius: 7px; border: 1px solid rgba(89, 142, 154, .16); background: rgba(13, 31, 43, .55);
  color: #63808b; text-align: left; transition: .2s;
}
.global-search:hover { border-color: rgba(43, 216, 204, .3); background: rgba(15, 42, 52, .6); }
.global-search svg { width: 14px; height: 14px; color: #80a2ad; }
.global-search span { font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd {
  font-family: var(--font-mono); font-size: 12px; color: #6c8995; background: rgba(88, 137, 150, .12);
  padding: 2px 5px; border-radius: 3px; border: 1px solid rgba(100, 160, 170, .12);
}
.icon-btn {
  width: 31px; height: 31px; border-radius: 7px; display: grid; place-items: center;
  color: #7894a0; border: 1px solid transparent; transition: .2s; position: relative;
}
.icon-btn:hover { color: var(--cyan); background: rgba(43, 216, 204, .08); border-color: rgba(43, 216, 204, .18); }
.icon-btn svg { width: 16px; height: 16px; }
.notify-count { position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; display: grid; place-items: center; background: var(--orange); color: #041214; font-family: var(--font-mono); font-size: 11px; font-weight: 700; border: 1px solid rgba(4, 18, 20, .9); box-shadow: 0 0 8px rgba(255, 180, 94, .35); }
.site-select-wrap { position: relative; }
.site-menu { display: none !important; }
.site-select { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 7px; border-radius: 7px; transition: .2s; }
.site-select:hover { background: rgba(94, 147, 158, .08); }
.site-select-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.site-select span:nth-child(2) { display: flex; flex-direction: column; align-items: flex-start; }
.site-select small { color: var(--dim); font-size: 12px; line-height: 1; letter-spacing: .08em; }
.site-select strong { color: #bfd4d9; font-size: 12px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .03em; }
.site-select svg { width: 11px; height: 11px; color: #59727d; }
.top-clock { display: flex; flex-direction: column; align-items: flex-end; width: 108px; padding-left: 5px; }
.top-clock strong { font-family: var(--font-mono); font-size: 15px; letter-spacing: .05em; color: #d7eff1; font-weight: 500; }
.top-clock small { font-size: 12px; color: var(--dim); letter-spacing: .03em; white-space: nowrap; }
.mobile-menu { display: none; width: 30px; height: 30px; flex-direction: column; gap: 4px; justify-content: center; }
.mobile-menu span { display: block; width: 17px; height: 1px; background: #8aa6b1; }

/* ---------- Main / page base ---------- */
.main { flex: 1; min-height: 0; position: relative; }
.page { display: none; height: 100%; }
.page.active { display: flex; }
.page-dashboard { flex-direction: column; padding: 12px 18px 16px; gap: 12px; overflow: hidden; }
.page-scroll { overflow-y: auto; overflow-x: hidden; padding: 18px 20px 30px; }
.page-scroll.active { display: block; }
.page-inner { max-width: 1780px; margin: 0 auto; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex: 0 0 auto; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #54808d; font-size: 12px; letter-spacing: .18em; font-family: var(--font-mono); text-transform: uppercase; }
.live-pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); animation: dotPulse 1.7s infinite; }
.page-heading h1 { margin-top: 6px; font-size: 27px; line-height: 1.15; font-weight: 650; letter-spacing: .015em; }
.page-heading h1 span { color: var(--cyan-soft); }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.page-heading p i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: #506b75; margin: 0 7px 2px; }
.heading-side { display: flex; align-items: center; gap: 15px; padding-bottom: 2px; }
.sync-state { display: flex; align-items: center; gap: 9px; }
.sync-orbit { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(43, 216, 204, .18); position: relative; }
.sync-orbit::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid rgba(43, 216, 204, .35); animation: ringPulse 2s infinite; }
.sync-orbit::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); left: 11px; top: 11px; box-shadow: 0 0 7px var(--cyan); }
.sync-state div { display: flex; flex-direction: column; }
.sync-state small { font-size: 12px; color: var(--dim); letter-spacing: .08em; }
.sync-state strong { font-family: var(--font-mono); font-size: 12px; color: #9fb8c0; font-weight: 500; }
.btn {
  height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 6px;
  font-size: 12px; letter-spacing: .02em; color: #a9c1c9; border: 1px solid rgba(95, 150, 161, .2);
  background: rgba(13, 33, 44, .55); transition: .2s; white-space: nowrap;
}
.btn svg { width: 13px; height: 13px; }
.btn:hover { color: var(--text); border-color: rgba(43, 216, 204, .38); background: rgba(43, 216, 204, .075); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  color: #062022; border-color: rgba(43, 216, 204, .5);
  background: linear-gradient(135deg, #4ce6da, #1db8b0);
  box-shadow: 0 4px 18px rgba(43, 216, 204, .18);
}
.btn-primary:hover { color: #041214; background: linear-gradient(135deg, #65f2e6, #28c9be); border-color: rgba(94, 255, 241, .7); }
.btn-ghost { background: transparent; }
.btn-sm { height: 27px; font-size: 12px; padding: 0 9px; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; flex: 0 0 auto; }
.kpi-card {
  position: relative; min-width: 0; height: 105px; padding: 12px 13px 8px; overflow: hidden;
  border-radius: 10px; border: 1px solid rgba(84, 142, 155, .14);
  background:
    linear-gradient(145deg, rgba(14, 34, 46, .78), rgba(6, 17, 26, .73));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.kpi-card::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .65;
}
.kpi-card::after {
  content: ""; position: absolute; right: -20px; top: -25px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%); opacity: .055; filter: blur(4px);
}
.kpi-card:hover { transform: translateY(-2px); border-color: rgba(111, 180, 190, .3); background: linear-gradient(145deg, rgba(17, 42, 54, .86), rgba(7, 20, 30, .8)); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi-label { display: flex; align-items: center; gap: 7px; color: #8faab3; font-size: 12px; letter-spacing: .03em; white-space: nowrap; }
.kpi-icon { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); }
.kpi-icon svg { width: 12px; height: 12px; }
.kpi-trend { display: flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; color: var(--green); }
.kpi-trend.down { color: var(--orange); }
.kpi-trend::before { content: "↗"; font-size: 12px; }
.kpi-trend.down::before { content: "↘"; }
.kpi-value { display: flex; align-items: baseline; gap: 4px; margin-top: 7px; }
.kpi-value strong { font-family: var(--font-mono); font-size: 25px; line-height: 1; letter-spacing: -.04em; font-weight: 520; color: #e9fbfd; }
.kpi-value span { font-size: 12px; color: #6f8c97; }
.kpi-sub { margin-top: 4px; font-size: 12px; color: #5b7580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-foot { position: absolute; left: 13px; right: 48px; bottom: 7px; font-size: 12px; color: #5f7a85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-spark { position: absolute; right: 8px; bottom: 5px; width: 66px; height: 25px; opacity: .9; }
.kpi-spark .sparkline { width: 100%; height: 100%; }

/* ---------- Dashboard body ---------- */
.dashboard-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 11px; }
.scene-stage {
  position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: var(--radius);
  border: 1px solid rgba(75, 145, 155, .2);
  background:
    radial-gradient(ellipse at 52% 30%, rgba(21, 70, 84, .28), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(24, 58, 92, .16), transparent 45%),
    #040c14;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .45), 0 10px 38px rgba(0,0,0,.15);
}
.scene-stage::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: linear-gradient(rgba(72, 152, 164, .042) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 152, 164, .042) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, transparent 35%, black 100%);
  opacity: .8;
}
.scene-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(137, 231, 230, .035), inset 0 0 70px rgba(0, 0, 0, .42);
}
.scene-canvas { position: absolute; inset: 0; z-index: 1; }
.scene-canvas .webgl-canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #6f929d; font-size: 12px; }
.scene-error strong { color: #d9edf0; font-size: 16px; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene-labels { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.scene-label {
  position: absolute; top: 0; left: 0; display: flex; align-items: center; gap: 7px;
  pointer-events: auto; cursor: pointer; padding: 5px 8px 5px 6px;
  border: 1px solid rgba(90, 170, 180, .24); border-radius: 5px;
  background: rgba(5, 17, 26, .82); backdrop-filter: blur(9px);
  box-shadow: 0 5px 16px rgba(0,0,0,.25); transition: border-color .2s, background .2s;
  white-space: nowrap; will-change: transform, opacity;
}
.scene-label:hover { border-color: rgba(43, 216, 204, .6); background: rgba(8, 28, 38, .95); }
.scene-label-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lab); box-shadow: 0 0 9px var(--lab); }
.scene-label-copy { display: flex; align-items: baseline; gap: 6px; }
.scene-label-copy b { font-size: 12px; color: #c4dde2; font-weight: 500; }
.scene-label-copy em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--lab); }
.scene-label.label-cyan { --lab: #2bd8cc; }
.scene-label.label-blue { --lab: #4aa8ff; }
.scene-label.label-violet { --lab: #8b8cff; }
.scene-label.label-amber { --lab: #ffb45e; }
.scene-label.label-rose { --lab: #ff7f92; }
.scene-label.label-green { --lab: #62dcb0; }
.scene-label.business { border-style: dashed; background: rgba(7, 21, 30, .88); }
.scene-label.business:hover { background: rgba(8, 31, 35, .97); }
.scene-label.business .scene-label-copy b { font-weight: 600; }
.stage-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 10, 16, .5) 0%, transparent 18%, transparent 72%, rgba(3, 9, 15, .55) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(2, 8, 12, .28) 100%);
}
.stage-scanline {
  position: absolute; left: 0; right: 0; top: -10%; height: 18%; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(77, 225, 214, .024), transparent);
  animation: scanline 9s linear infinite;
}
@keyframes scanline { 0% { transform: translateY(-20%); } 100% { transform: translateY(700%); } }

.stage-status {
  position: absolute; top: 14px; left: 16px; z-index: 7; display: flex; align-items: center; gap: 9px;
  height: 29px; padding: 0 10px; border-radius: 5px;
  border: 1px solid rgba(94, 160, 172, .18); background: rgba(5, 17, 26, .72);
  backdrop-filter: blur(10px); color: #9bb5bd;
}
.stage-kicker { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: .1em; }
.stage-title { font-size: 12px; color: #b5ced5; padding-left: 8px; border-left: 1px solid rgba(95, 150, 162, .18); letter-spacing: .02em; }
.stage-live { font-size: 12px; color: var(--cyan); display: flex; align-items: center; gap: 4px; margin-left: 3px; }
.stage-live i { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: dotPulse 1.7s infinite; }

.stage-views {
  position: absolute; top: 14px; right: 14px; z-index: 8; display: flex; gap: 1px;
  padding: 3px; border-radius: 6px; border: 1px solid rgba(91, 150, 161, .18); background: rgba(5, 16, 25, .72);
  backdrop-filter: blur(10px);
}
.view-btn {
  height: 24px; padding: 0 9px; border-radius: 4px; font-size: 12px; color: #6f8b96;
  display: flex; align-items: center; gap: 3px; transition: .18s; white-space: nowrap;
}
.view-btn svg { width: 9px; height: 9px; }
.view-btn:hover { color: #d1e8eb; background: rgba(90, 164, 174, .1); }
.view-btn.active { color: #042021; background: linear-gradient(135deg, #4ce6da, #20b4ae); font-weight: 600; }

.stage-mode-actions {
  position: absolute; top: 49px; right: 14px; z-index: 8; display: flex; align-items: center; gap: 6px;
}
.pan-mode-btn {
  display: flex; align-items: center; gap: 5px;
  height: 31px; padding: 0 9px; border-radius: 6px; border: 1px solid rgba(83, 161, 169, .3);
  background: rgba(5, 21, 29, .74); color: #9ec3c8; backdrop-filter: blur(10px);
  font-size: 12px; transition: .2s;
}
.pan-mode-btn svg { width: 13px; height: 13px; color: #68dcd4; }
.pan-mode-btn:hover { color: #e7fffb; border-color: rgba(43,216,204,.55); background: rgba(12, 45, 49, .86); }
.pan-mode-btn.active { color: #052725; border-color: rgba(43,216,204,.8); background: #64e7dc; }
.pan-mode-btn.active svg { color: #052725; }
.scene-stage.day-mode .pan-mode-btn { color: #456a6f; background: rgba(249,254,251,.78); border-color: rgba(45,95,100,.24); }
.scene-stage.day-mode .pan-mode-btn.active { color: #053531; background: #62d8cf; }

.day-start-btn {
  position: relative; display: flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 5px; border-radius: 6px; border: 1px solid rgba(255, 180, 94, .36);
  background: rgba(33, 24, 13, .72); color: #f6d39b; backdrop-filter: blur(10px);
  box-shadow: 0 5px 16px rgba(0,0,0,.16); transition: .24s;
}
.day-start-btn:hover { border-color: rgba(255, 205, 132, .72); background: rgba(70, 46, 16, .83); transform: translateY(-1px); }
.day-start-btn .day-start-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #351f06; background: #ffbf58; box-shadow: 0 0 13px rgba(255,180,94,.35); }
.day-start-btn .day-start-icon svg { width: 14px; height: 14px; }
.day-start-copy { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.day-start-copy strong { font-size: 12px; font-weight: 600; color: currentColor; }
.day-start-copy small { font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; color: rgba(245, 213, 164, .67); }
.day-start-btn.active { color: #d9f1ee; border-color: rgba(43, 216, 204, .37); background: rgba(7, 31, 36, .8); }
.day-start-btn.active .day-start-icon { color: #032320; background: #6ef0e2; box-shadow: 0 0 13px rgba(43,216,204,.4); }
.day-start-btn.active .day-start-copy small { color: rgba(123, 233, 220, .66); }

.shift-splash { position: absolute; inset: 0; z-index: 12; display: flex; align-items: center; justify-content: center; pointer-events: none; visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility .3s ease; }
.shift-splash.show { visibility: visible; opacity: 1; }
.shift-splash::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255,239,177,.38), rgba(255,239,177,0) 68%); filter: blur(3px); }
.splash-orbit { position: absolute; width: 226px; height: 226px; border-radius: 50%; border: 1px solid rgba(255,226,159,.42); animation: splashPulse 1.4s ease-in-out infinite; }
.splash-orbit::before, .splash-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,226,159,.22); }
.splash-orbit::before { inset: 13px; }
.splash-orbit::after { inset: -17px; }
.shift-splash > div { position: relative; min-width: 270px; padding: 17px 28px 16px; border-radius: 9px; border: 1px solid rgba(255,238,186,.62); background: rgba(255, 249, 231, .92); box-shadow: 0 16px 48px rgba(46, 50, 37, .18), inset 0 1px rgba(255,255,255,.7); text-align: center; transform: translateY(8px) scale(.97); transition: transform .35s ease; }
.shift-splash.show > div { transform: none; }
.shift-splash small { display: block; color: #ab8350; font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; }
.shift-splash strong { display: block; margin-top: 6px; color: #28474a; font-size: 25px; line-height: 1.2; font-weight: 650; letter-spacing: .08em; }
.shift-splash em { display: block; margin-top: 6px; color: #72837e; font-style: normal; font-size: 12px; letter-spacing: .04em; }
@keyframes splashPulse { 0%, 100% { transform: scale(.94); opacity: .4; } 50% { transform: scale(1.1); opacity: .85; } }

.scene-stage.day-mode {
  border-color: rgba(45, 100, 104, .3);
  background:
    radial-gradient(ellipse at 50% 12%, rgba(255, 243, 189, .22), transparent 34%),
    linear-gradient(180deg, #527a8e 0%, #93afb4 42%, #aab8b1 62%, #71837e 100%);
  box-shadow: inset 0 0 60px rgba(33, 65, 66, .18), 0 10px 38px rgba(30, 52, 55, .16);
}
.scene-stage.day-mode .scene-canvas { filter: saturate(1.22) contrast(1.12) brightness(.9); }
.scene-stage.day-mode::before { opacity: .42; background-image: linear-gradient(rgba(26, 74, 79, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 74, 79, .055) 1px, transparent 1px); }
.scene-stage.day-mode::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), inset 0 0 70px rgba(255,255,255,.12); }
.scene-stage.day-mode .stage-vignette { background:
  radial-gradient(circle at 72% 7%, rgba(255, 246, 194, .74) 0, rgba(255, 239, 170, .22) 7%, transparent 20%),
  linear-gradient(180deg, rgba(255,255,255,.16), transparent 22%, transparent 68%, rgba(238, 246, 242, .36)); }
.scene-stage.day-mode .stage-scanline { opacity: 0; }
.scene-stage.day-mode .stage-status { background: rgba(249, 254, 251, .8); border-color: rgba(45, 95, 100, .22); color: #446970; }
.scene-stage.day-mode .stage-kicker { color: #0b8279; }
.scene-stage.day-mode .stage-title { color: #304f55; border-left-color: rgba(48, 99, 104, .2); }
.scene-stage.day-mode .stage-live { color: #09887d; }
.scene-stage.day-mode .stage-views { background: rgba(249, 254, 251, .8); border-color: rgba(45, 95, 100, .2); }
.scene-stage.day-mode .view-btn { color: #55747a; }
.scene-stage.day-mode .view-btn:hover { color: #173f45; background: rgba(93, 144, 146, .1); }
.scene-stage.day-mode .view-btn.active { color: #f3fffc; background: linear-gradient(135deg, #168f89, #0e6e6b); }
.scene-stage.day-mode .stage-layers .layer-btn { color: #52757b; background: rgba(249,254,251,.7); border-color: rgba(56,104,109,.2); }
.scene-stage.day-mode .stage-layers .layer-btn.active { color: #087a76; background: rgba(183, 228, 220, .66); border-color: rgba(33, 132, 127, .35); }
.scene-stage.day-mode .scene-legend { color: #3e6268; background: rgba(249,254,251,.72); border-color: rgba(64,112,116,.18); }
.scene-stage.day-mode .scene-legend .legend-sep { background: rgba(57, 107, 112, .3); }
.scene-stage.day-mode .scene-label { background: rgba(249,254,251,.88); border-color: rgba(43, 111, 114, .28); box-shadow: 0 5px 16px rgba(43, 68, 66, .12); }
.scene-stage.day-mode .scene-label-copy b { color: #31575d; }
.scene-stage.day-mode .process-flow { background: rgba(249, 254, 251, .9); border-color: rgba(48, 103, 108, .2); box-shadow: 0 8px 28px rgba(41, 70, 68, .1); }
.scene-stage.day-mode .process-head span { color: #4e6e73; }
.scene-stage.day-mode .process-head em { color: #789395; }
.scene-stage.day-mode .process-step > span { border-color: rgba(52, 115, 118, .32); color: #567b80; }
.scene-stage.day-mode .process-step strong { color: #536f74; }
.scene-stage.day-mode .process-step small { color: #678184; }
.scene-stage.day-mode .process-step.done > span { background: rgba(19, 139, 131, .1); border-color: rgba(19, 139, 131, .35); color: #0d7772; }
.scene-stage.day-mode .process-step.done strong { color: #355e61; }
.scene-stage.day-mode .process-step.active > span { background: #078e86; border-color: #078e86; color: #eafffd; }
.scene-stage.day-mode .process-step.active strong { color: #173f42; }
.scene-stage.day-mode .process-step.active small { color: #078e86; }
.scene-stage.day-mode .process-line { background: linear-gradient(90deg, rgba(77, 126, 129, .3), rgba(77, 126, 129, .1)); }
.scene-stage.day-mode .scene-hint { color: #567276; }
.scene-stage.day-mode .scene-footer { color: #5d777a; }
.scene-stage.day-mode .scene-footer strong { color: #315b5e; }
.scene-stage.day-mode .mouse-icon { border-color: #668083; }
.scene-stage.day-mode .mouse-icon::after { background: #668083; }

.stage-layers {
  position: absolute; left: 14px; top: 57px; z-index: 8; display: flex; flex-direction: column; gap: 4px;
}
.layer-btn {
  width: 28px; height: 28px; border-radius: 5px; display: grid; place-items: center;
  border: 1px solid rgba(92, 154, 164, .16); background: rgba(5, 17, 26, .6); color: #5c7b86;
  backdrop-filter: blur(8px); transition: .2s;
}
.layer-btn svg { width: 13px; height: 13px; }
.layer-btn:hover { color: #cbebee; border-color: rgba(43, 216, 204, .35); }
.layer-btn.active { color: var(--cyan); border-color: rgba(43, 216, 204, .28); background: rgba(20, 72, 77, .55); box-shadow: inset 0 0 10px rgba(43,216,204,.06); }

.scene-legend {
  position: absolute; left: 16px; bottom: 95px; z-index: 7; display: flex; align-items: center; gap: 10px;
  padding: 5px 9px; border-radius: 4px; background: rgba(5, 16, 24, .58); border: 1px solid rgba(88, 146, 158, .12);
  backdrop-filter: blur(8px); font-size: 12px; color: #89a4ad;
}
.scene-legend span { display: flex; align-items: center; gap: 4px; }
.scene-legend i { width: 5px; height: 5px; border-radius: 1px; background: var(--legend); box-shadow: 0 0 7px var(--legend); }
.scene-legend .legend-sep { width: 1px; height: 9px; background: rgba(105, 153, 163, .2); }
.scene-legend .legend-agv { border-radius: 50%; background: var(--orange); }
.scene-legend .legend-warn { background: var(--red); transform: rotate(45deg); }

.process-flow {
  position: absolute; left: 16px; right: 16px; bottom: 27px; z-index: 7;
  padding: 8px 12px 9px; border-radius: 7px;
  background: linear-gradient(90deg, rgba(5, 17, 26, .87), rgba(6, 20, 30, .78));
  border: 1px solid rgba(87, 150, 162, .17); backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
}
.process-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.process-head span { font-size: 12px; color: #6d8a95; letter-spacing: .1em; }
.process-head em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: #4f6d78; letter-spacing: .1em; }
.process-steps { display: flex; align-items: center; gap: 5px; }
.process-step { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.process-step > span {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(86, 142, 154, .35); color: #5d7b87; font-size: 12px; font-family: var(--font-mono);
}
.process-step strong { font-size: 12px; font-weight: 500; color: #8faab3; white-space: nowrap; }
.process-step small { font-size: 12px; color: #506d78; white-space: nowrap; }
.process-step.done > span { background: rgba(43, 216, 204, .12); border-color: rgba(43, 216, 204, .48); color: var(--cyan); }
.process-step.done strong { color: #b8d8dc; }
.process-step.active > span { background: var(--cyan); border-color: var(--cyan); color: #041718; box-shadow: 0 0 13px rgba(43, 216, 204, .42); }
.process-step.active strong { color: #e9fffd; }
.process-step.active small { color: var(--cyan); }
.process-line { width: 10px; flex: 0 0 10px; height: 1px; background: linear-gradient(90deg, rgba(100, 159, 169, .3), rgba(100, 159, 169, .08)); }
.process-step small { display: none; }
.process-flow:hover .process-step small { display: inline; }
.scene-hint {
  position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 5px; color: #4f707b; font-size: 12px; white-space: nowrap;
}
.mouse-icon { width: 7px; height: 10px; border: 1px solid #4b6871; border-radius: 4px; position: relative; }
.mouse-icon::after { content: ""; width: 1px; height: 3px; background: #4b6871; position: absolute; top: 2px; left: 2px; }
.scene-footer {
  position: absolute; right: 16px; bottom: 7px; z-index: 6; display: flex; gap: 10px; align-items: center;
  font-size: 12px; color: #4b6873; font-family: var(--font-mono); letter-spacing: .02em;
}
.scene-footer span { display: flex; align-items: center; gap: 4px; }
.scene-footer strong { color: #6f929d; font-weight: 500; }
.footer-signal { width: 4px; height: 4px; background: var(--green); border-radius: 50%; box-shadow: 0 0 6px var(--green); }

/* Selection card */
.selection-card {
  position: absolute; right: 16px; bottom: 27px; z-index: 9; width: 286px; padding: 13px 13px 11px;
  border-radius: 8px; border: 1px solid rgba(54, 187, 188, .34);
  background: linear-gradient(145deg, rgba(11, 36, 46, .96), rgba(5, 19, 29, .97));
  backdrop-filter: blur(16px); box-shadow: 0 16px 45px rgba(0,0,0,.42), inset 0 1px rgba(117, 247, 236, .08);
  animation: cardIn .28s ease;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.selection-close { position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 4px; color: #63828d; display: grid; place-items: center; }
.selection-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.selection-close svg { width: 12px; height: 12px; }
.selection-top { display: flex; align-items: center; gap: 9px; padding-right: 18px; }
.selection-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--cyan); background: rgba(43, 216, 204, .09); border: 1px solid rgba(43, 216, 204, .17); }
.selection-icon svg { width: 17px; height: 17px; }
.selection-top small { font-family: var(--font-mono); font-size: 12px; color: #53818b; letter-spacing: .13em; }
.selection-top h3 { font-size: 16px; margin-top: 1px; font-weight: 600; color: #eafcfd; }
.selection-top p { font-size: 12px; color: #6c8e98; margin-top: 1px; }
.selection-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 11px; }
.selection-stat { padding: 7px 6px; border-radius: 5px; background: rgba(71, 122, 135, .09); border: 1px solid rgba(84, 145, 157, .1); }
.selection-stat span { display: block; font-size: 12px; color: #65828c; }
.selection-stat strong { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: #cce7e9; }
.selection-stat strong em { font-style: normal; font-size: 12px; color: #6a8b95; }
.selection-bar { height: 3px; border-radius: 3px; background: rgba(84, 136, 148, .15); margin-top: 9px; overflow: hidden; }
.selection-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #25b9b5, var(--cyan)); box-shadow: 0 0 8px rgba(43,216,204,.35); transition: width .5s ease; }
.selection-skus { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.selection-sku { display: flex; justify-content: space-between; gap: 7px; align-items: center; padding: 3px 0; border-bottom: 1px dashed rgba(83, 132, 143, .12); font-size: 12px; color: #89a5ad; }
.selection-sku:last-child { border-bottom: 0; }
.selection-sku span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-sku strong { font-family: var(--font-mono); color: #bddadd; font-weight: 500; white-space: nowrap; }
.selection-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; margin-top: 4px; border-top: 1px solid rgba(79, 133, 145, .13); }
.selection-footer > span { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #62818b; }
.selection-footer > span i { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.selection-footer strong { font-family: var(--font-mono); color: #9bd5db; font-weight: 500; }
.text-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--cyan); font-size: 12px; }
.text-btn svg { width: 10px; height: 10px; }
.text-btn:hover { color: #bdfff8; }

.business-index {
  position: absolute; top: 96px; right: 14px; z-index: 9; width: 132px; padding: 8px 7px 7px;
  border: 1px solid rgba(86, 164, 169, .3); border-radius: 7px;
  background: rgba(5, 20, 28, .82); backdrop-filter: blur(12px); box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.business-index-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 0 3px 7px; border-bottom: 1px solid rgba(87, 151, 156, .16); }
.business-index-head span { display: flex; align-items: center; gap: 4px; color: #b7dadd; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.business-index-head svg { width: 12px; height: 12px; color: var(--cyan); }
.business-index-head em { font-style: normal; font-family: var(--font-mono); color: #6aa4a4; font-size: 12px; }
.business-index-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 290px; overflow-y: auto; padding-right: 1px; }
.business-index-list button {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 26px; padding: 0 5px;
  border-radius: 4px; color: #a1bdc2; text-align: left; transition: background .18s, color .18s, border-color .18s;
  border: 1px solid transparent;
}
.business-index-list button span { font-family: var(--font-mono); color: #54858b; font-size: 12px; }
.business-index-list button strong { color: inherit; font-size: 12px; font-weight: 500; white-space: nowrap; }
.business-index-list button:hover { color: #e3faf7; background: rgba(43, 216, 204, .1); border-color: rgba(43, 216, 204, .18); }
.business-index-list button.active { color: #eafffb; background: rgba(43, 216, 204, .17); border-color: rgba(43, 216, 204, .38); }
.business-index-list button.active span { color: var(--cyan); }
.business-index-list button.active::after { content: "→"; margin-left: auto; color: var(--cyan); font-size: 12px; }
.scene-stage.day-mode .business-index { background: rgba(249, 254, 251, .8); border-color: rgba(45, 95, 100, .2); }
.scene-stage.day-mode .business-index-head { border-color: rgba(48, 103, 108, .18); }
.scene-stage.day-mode .business-index-head span { color: #335b62; }
.scene-stage.day-mode .business-index-head em { color: #6a8d91; }
.scene-stage.day-mode .business-index-list button { color: #55767b; }
.scene-stage.day-mode .business-index-list button span { color: #6f969a; }
.scene-stage.day-mode .business-index-list button:hover { color: #173f45; background: rgba(43, 150, 147, .1); }
.scene-stage.day-mode .business-index-list button.active { color: #0b5f60; background: rgba(43, 150, 147, .16); border-color: rgba(21, 123, 119, .3); }

.business-term-card {
  position: absolute; right: 160px; top: 96px; z-index: 10; width: 300px; padding: 14px 14px 12px;
  border-radius: 8px; border: 1px solid rgba(73, 195, 188, .42);
  background: linear-gradient(145deg, rgba(9, 37, 43, .97), rgba(4, 20, 29, .98));
  backdrop-filter: blur(16px); box-shadow: 0 16px 42px rgba(0,0,0,.4), inset 0 1px rgba(117,247,236,.09);
  animation: cardIn .28s ease;
}
.business-term-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 20px; }
.business-term-kicker span { font-family: var(--font-mono); font-size: 12px; color: #5b9899; letter-spacing: .08em; }
.business-term-kicker em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: #8fe2d8; white-space: nowrap; }
.business-term-card h3 { margin-top: 7px; font-size: 19px; color: #ecfffb; font-weight: 620; }
.business-term-card p { margin-top: 7px; min-height: 42px; color: #a8c8cc; font-size: 12.5px; line-height: 1.7; }
.business-term-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(82, 143, 150, .16); }
.business-term-foot > span { display: flex; align-items: center; gap: 5px; color: #62828a; font-size: 12px; }
.business-term-foot > span i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.business-term-card .text-btn { font-size: 12px; }

/* ---------- Right rail ---------- */
.insight-rail { min-height: 0; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding-right: 2px; }
.rail-card {
  position: relative; flex: 0 0 auto; padding: 13px 13px 12px; border-radius: 10px;
  border: 1px solid rgba(84, 142, 155, .14);
  background: linear-gradient(150deg, rgba(10, 27, 39, .82), rgba(6, 17, 26, .84));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.rail-card::before { content: ""; position: absolute; top: 0; left: 13px; right: 13px; height: 1px; background: linear-gradient(90deg, transparent, rgba(102, 189, 190, .26), transparent); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.panel-head > div { display: flex; flex-direction: column; gap: 2px; }
.panel-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .15em; color: #4f7681; }
.panel-head h3 { font-size: 14px; font-weight: 550; color: #d9edf0; letter-spacing: .03em; }
.panel-more { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; color: #57747f; transition: .2s; }
.panel-more:hover { color: var(--cyan); background: rgba(43, 216, 204, .07); }
.panel-more svg { width: 13px; height: 13px; }
.occupancy-main { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
#occupancyDonut { width: 120px; height: 120px; flex: 0 0 120px; }
#occupancyDonut .donut-gauge { width: 100% !important; height: 100% !important; }
.donut-gauge { position: relative; width: var(--gauge-size); height: var(--gauge-size); }
.donut-gauge svg { width: 100%; height: 100%; }
.donut-gauge .donut-value { filter: drop-shadow(0 0 5px rgba(43,216,204,.25)); transition: stroke-dasharray .8s ease; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-family: var(--font-mono); font-size: 22px; font-weight: 500; line-height: 1; color: #e5fbfa; letter-spacing: -.03em; }
.donut-center strong em { font-style: normal; font-size: 12px; color: #7fa0a8; margin-left: 1px; }
.donut-center span { margin-top: 5px; font-size: 12px; color: #72909a; }
.donut-center small { margin-top: 2px; font-size: 12px; color: #526e78; }
.occupancy-copy { min-width: 0; flex: 1; }
.occupancy-total { display: flex; align-items: baseline; gap: 5px; }
.occupancy-total strong { font-family: var(--font-mono); font-size: 19px; color: #e1f3f4; font-weight: 500; }
.occupancy-total span { font-size: 12px; color: #6d8b95; }
.occupancy-copy p { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: #617f89; }
.occupancy-copy p .up { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 4px solid var(--green); }
.occupancy-copy p b { color: var(--green); font-family: var(--font-mono); font-weight: 500; }
.occupancy-note { display: block; margin-top: 7px; font-size: 12px; color: #506e79; }
.zone-bars { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.zone-row { display: grid; grid-template-columns: 60px 1fr 34px; align-items: center; gap: 7px; }
.zone-name { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #8ba6ae; white-space: nowrap; overflow: hidden; }
.zone-name i { width: 4px; height: 4px; border-radius: 1px; background: var(--z); }
.zone-track { height: 3px; background: rgba(96, 145, 156, .13); border-radius: 5px; overflow: hidden; }
.zone-track span { display: block; height: 100%; border-radius: 5px; background: var(--z); box-shadow: 0 0 6px color-mix(in srgb, var(--z) 45%, transparent); }
.zone-value { text-align: right; font-family: var(--font-mono); font-size: 12px; color: #9eb7be; }

.task-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.task-total strong { display: block; font-family: var(--font-mono); font-size: 25px; line-height: 1; color: #e3f7f9; font-weight: 500; letter-spacing: -.03em; }
.task-total > span { display: block; margin-top: 3px; font-size: 12px; color: #64818b; }
.task-total em { display: block; margin-top: 7px; font-style: normal; font-size: 12px; color: #56747f; }
.task-total em b { color: var(--cyan); font-family: var(--font-mono); font-weight: 500; }
.task-ring { width: 58px; height: 58px; flex: 0 0 58px; position: relative; }
.task-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.task-ring .ring-bg { fill: none; stroke: rgba(80, 133, 145, .15); stroke-width: 4; }
.task-ring .ring-fg { fill: none; stroke: var(--cyan); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(43,216,204,.25)); }
.task-ring .ring-text { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; color: #d9f2f2; }
.task-progress-list { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.task-progress-row { display: grid; grid-template-columns: 59px 1fr 42px; align-items: center; gap: 7px; }
.task-progress-row > span { font-size: 12px; color: #7c99a2; }
.task-progress-row > em { font-style: normal; text-align: right; font-family: var(--font-mono); font-size: 12px; color: #90aab2; }
.task-progress-track { height: 3px; background: rgba(91, 142, 153, .13); border-radius: 3px; overflow: hidden; }
.task-progress-track i { display: block; height: 100%; border-radius: 3px; background: var(--tc); box-shadow: 0 0 6px color-mix(in srgb, var(--tc) 30%, transparent); }
.task-legend { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(83, 134, 145, .11); font-size: 12px; color: #5f7c86; }
.task-legend span { display: flex; align-items: center; gap: 3px; }
.task-legend i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.task-legend i.doing { background: var(--cyan); }
.task-legend i.waiting { background: var(--orange); }

.alert-count { height: 17px; min-width: 22px; padding: 0 5px; border-radius: 4px; display: grid; place-items: center; background: rgba(255, 98, 120, .1); color: #ff8091; font-family: var(--font-mono); font-size: 12px; border: 1px solid rgba(255,98,120,.16); }
.alert-count.zero { background: rgba(83, 142, 154, .08); color: #6d8b94; border-color: rgba(83, 142, 154, .15); }
.alert-list { display: flex; flex-direction: column; gap: 2px; margin-top: 7px; }
.alert-item { display: flex; gap: 8px; padding: 7px 5px; border-radius: 5px; cursor: pointer; transition: background .2s; }
.alert-item:hover { background: rgba(86, 144, 155, .06); }
.alert-level { width: 15px; height: 15px; flex: 0 0 15px; border-radius: 4px; display: grid; place-items: center; margin-top: 1px; font-size: 12px; font-weight: 700; }
.alert-level.high { color: #ff8394; background: rgba(255, 98, 120, .12); border: 1px solid rgba(255,98,120,.2); }
.alert-level.mid { color: var(--orange); background: rgba(255, 180, 94, .1); border: 1px solid rgba(255,180,94,.18); }
.alert-level.low { color: var(--blue); background: rgba(74, 168, 255, .1); border: 1px solid rgba(74,168,255,.16); }
.alert-copy { min-width: 0; flex: 1; }
.alert-copy strong { display: block; font-size: 12px; font-weight: 500; color: #b5cdd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-copy span { display: block; margin-top: 2px; font-size: 12px; color: #58747e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-time { font-family: var(--font-mono); font-size: 12px; color: #4f6c77; flex: 0 0 auto; }
.alert-item.read .alert-copy strong { color: #7b969f; }
.alert-item.read .alert-copy span { color: #4f6a74; }
.alert-item.read .alert-level { opacity: .55; }
.alert-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.alert-read-state { font-size: 11px; letter-spacing: .04em; color: #54717b; }
.alert-read-state.unread { color: var(--orange); }
.rail-link { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 5px; padding-top: 8px; border-top: 1px solid rgba(82, 132, 143, .11); color: #64828c; font-size: 12px; transition: .2s; }
.rail-link:hover { color: var(--cyan); }
.rail-link svg { width: 10px; height: 10px; }
.live-feed-tag { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--cyan); }
.live-feed-tag i { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); animation: dotPulse 1.6s infinite; }
.activity-list { display: flex; flex-direction: column; gap: 0; margin-top: 5px; }
.activity-item { position: relative; display: flex; gap: 7px; padding: 5px 0 5px 12px; }
.activity-item::before { content: ""; position: absolute; left: 2px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 6px color-mix(in srgb, var(--ac) 45%, transparent); }
.activity-item::after { content: ""; position: absolute; left: 3.5px; top: 17px; bottom: -2px; width: 1px; background: rgba(91, 140, 152, .12); }
.activity-item:last-child::after { display: none; }
.activity-time { flex: 0 0 38px; font-family: var(--font-mono); font-size: 12px; color: #4e6c77; padding-top: 1px; }
.activity-text { font-size: 12px; color: #76909a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-text b { color: #9bb5bd; font-weight: 500; }
.activity-type { color: var(--ac); margin-right: 3px; }

/* ---------- Generic inner pages ---------- */
.inner-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; gap: 16px; }
.inner-head .eyebrow { color: #507985; }
.inner-head h2 { font-size: 24px; margin-top: 5px; font-weight: 620; letter-spacing: .015em; }
.inner-head p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.inner-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.metric-card {
  position: relative; padding: 12px 13px; min-height: 74px; border-radius: 9px;
  border: 1px solid rgba(84, 142, 155, .14);
  background: linear-gradient(135deg, rgba(12, 31, 43, .74), rgba(7, 19, 29, .7));
}
.metric-card::after { content: ""; position: absolute; left: 13px; right: 13px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--mc, var(--cyan)), transparent); opacity: .55; }
.metric-card small { display: block; color: #68858f; font-size: 12px; letter-spacing: .03em; }
.metric-value { display: flex; align-items: baseline; gap: 4px; margin-top: 5px; }
.metric-value strong { font-family: var(--font-mono); font-size: 22px; line-height: 1; font-weight: 520; color: #e4f8fa; }
.metric-value em { font-style: normal; font-size: 12px; color: #647f8a; }
.metric-foot { margin-top: 5px; font-size: 12px; color: #54717c; }
.metric-foot b { color: var(--mc, var(--cyan)); font-weight: 500; }
.metric-spark { position: absolute; right: 10px; bottom: 9px; width: 72px; height: 24px; opacity: .8; }

.panel {
  position: relative; border-radius: 10px; border: 1px solid rgba(84, 142, 155, .14);
  background: linear-gradient(150deg, rgba(10, 27, 39, .75), rgba(6, 17, 26, .83));
  box-shadow: inset 0 1px rgba(255,255,255,.022);
}
.panel::before { content: ""; position: absolute; top: 0; left: 13px; right: 13px; height: 1px; background: linear-gradient(90deg, transparent, rgba(102, 189, 190, .22), transparent); }
.panel-head-lg { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid rgba(77, 127, 139, .12); }
.panel-head-lg h3 { font-size: 14px; font-weight: 550; color: #d8edf0; }
.panel-head-lg p { font-size: 12px; color: #56717c; margin-top: 2px; }
.panel-body { padding: 12px 14px; }
.panel-body.no-pad { padding: 0; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 10px; margin-bottom: 10px; }
.split-grid.equal { grid-template-columns: 1fr 1fr; }
.table-panel { margin-top: 10px; }

/* filters */
.filter-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid rgba(77, 127, 139, .1); flex-wrap: wrap; }
.filter-input {
  height: 28px; min-width: 180px; flex: 1; max-width: 260px; padding: 0 9px; border-radius: 5px;
  border: 1px solid rgba(91, 146, 157, .17); background: rgba(5, 17, 26, .5); color: #bfdadd; outline: none; font-size: 12px;
}
.filter-input::placeholder { color: #4f6c77; }
.filter-input:focus { border-color: rgba(43, 216, 204, .44); }
.filter-select {
  height: 28px; min-width: 98px; padding: 0 25px 0 9px; border-radius: 5px; border: 1px solid rgba(91, 146, 157, .17);
  background: rgba(5, 17, 26, .5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%235f7b86' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: #a7c0c7; outline: none; font-size: 12px; appearance: none;
}
.filter-select:focus { border-color: rgba(43, 216, 204, .44); }
.filter-chips { display: flex; gap: 4px; }
.chip {
  height: 24px; padding: 0 8px; border-radius: 4px; border: 1px solid rgba(90, 146, 158, .14);
  color: #6c8994; font-size: 12px; display: flex; align-items: center; transition: .2s;
}
.chip:hover { border-color: rgba(43, 216, 204, .3); color: #b6d8db; }
.chip.active { color: var(--cyan); border-color: rgba(43, 216, 204, .36); background: rgba(43, 216, 204, .08); }
.filter-spacer { flex: 1; }

/* tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th {
  height: 34px; text-align: left; padding: 0 11px; font-size: 12px; font-weight: 500;
  color: #5e7b86; background: rgba(6, 18, 27, .48); border-bottom: 1px solid rgba(79, 130, 142, .11);
  letter-spacing: .02em;
}
.data-table td { height: 42px; padding: 0 11px; border-bottom: 1px solid rgba(76, 126, 138, .075); font-size: 12px; color: #94aeb6; }
.data-table tbody tr { transition: background .16s; }
.data-table tbody tr:hover { background: rgba(43, 216, 204, .035); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { font-family: var(--font-mono); font-size: 12px; color: #c1dce0; }
.data-table .id { font-family: var(--font-mono); font-size: 12px; color: #7fc5cc; }
.data-table .strong { color: #c7e0e3; font-weight: 500; }
.data-table .muted { color: #55737e; }
.data-table .action { color: var(--cyan); cursor: pointer; font-size: 12px; }
.data-table .action:hover { color: #b5fff8; text-decoration: underline; }
.data-table .row-arrow { width: 22px; height: 22px; border-radius: 4px; display: inline-grid; place-items: center; color: #51717c; }
.data-table .row-arrow:hover { color: var(--cyan); background: rgba(43,216,204,.08); }
.data-table .row-arrow svg { width: 12px; height: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 12px; border: 1px solid transparent; white-space: nowrap; flex-shrink: 0; }
.pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pill.green { color: #62dcb0; background: rgba(78, 214, 163, .08); border-color: rgba(78,214,163,.13); }
.pill.cyan { color: #4fe1d4; background: rgba(43, 216, 204, .08); border-color: rgba(43,216,204,.14); }
.pill.yellow { color: #f5cd63; background: rgba(245, 205, 99, .08); border-color: rgba(245,205,99,.16); }
.pill.blue { color: #74c1ff; background: rgba(74, 168, 255, .08); border-color: rgba(74,168,255,.14); }
.pill.orange { color: #ffc27b; background: rgba(255, 180, 94, .08); border-color: rgba(255,180,94,.14); }
.pill.red { color: #ff8b9a; background: rgba(255, 98, 120, .08); border-color: rgba(255,98,120,.14); }
.pill.violet { color: #b1b1ff; background: rgba(139, 140, 255, .08); border-color: rgba(139,140,255,.14); }
.pill.gray { color: #7e99a3; background: rgba(100, 127, 138, .08); border-color: rgba(100,127,138,.12); }
.temp-tag { font-family: var(--font-mono); font-size: 12px; color: var(--tc); }
.temp-tag::before { content: "■"; font-size: 12px; vertical-align: 2px; margin-right: 4px; }
.priority { font-size: 12px; }
.priority.high { color: #ff8091; }
.priority.mid { color: var(--orange); }
.priority.low { color: #77949e; }
.progress-cell { display: flex; align-items: center; gap: 7px; }
.progress-cell .p-track { width: 58px; height: 3px; border-radius: 3px; background: rgba(91, 142, 153, .14); overflow: hidden; }
.progress-cell .p-track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1eaba8, var(--cyan)); }
.progress-cell span { font-family: var(--font-mono); font-size: 12px; color: #9bb7bd; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-top: 1px solid rgba(77, 127, 139, .09); color: #526f79; font-size: 12px; }
.pager { display: flex; gap: 3px; }
.pager button { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(89, 143, 155, .14); color: #6f8b95; font-size: 12px; }
.pager button.active { background: rgba(43, 216, 204, .11); border-color: rgba(43, 216, 204, .3); color: var(--cyan); }

/* dock board */
.dock-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dock-card { padding: 10px 11px; border-radius: 7px; border: 1px solid rgba(86, 144, 156, .12); background: rgba(8, 23, 34, .48); }
.dock-top { display: flex; justify-content: space-between; align-items: center; }
.dock-id { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: #c9e4e7; }
.dock-id i { width: 6px; height: 6px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 7px var(--dc); }
.dock-status { font-size: 12px; padding: 2px 5px; border-radius: 3px; background: color-mix(in srgb, var(--dc) 9%, transparent); color: var(--dc); border: 1px solid color-mix(in srgb, var(--dc) 15%, transparent); }
.dock-info { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 8px; gap: 5px; }
.dock-supplier { font-size: 12px; color: #b3cdd3; }
.dock-plate { font-family: var(--font-mono); font-size: 12px; color: #55737e; margin-top: 2px; }
.dock-eta { font-family: var(--font-mono); font-size: 12px; color: #9db8be; }
.dock-progress { margin-top: 8px; height: 3px; background: rgba(86, 135, 146, .14); border-radius: 3px; overflow: hidden; }
.dock-progress span { display: block; height: 100%; background: var(--dc); border-radius: 3px; }
.dock-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: #5a7781; }

/* task process rail */
.inbound-progress { display: flex; flex-direction: column; gap: 9px; }
.ip-row { display: flex; flex-direction: column; gap: 5px; }
.ip-label { display: flex; justify-content: space-between; font-size: 12px; color: #8aa5ad; }
.ip-label b { color: #c6e0e3; font-family: var(--font-mono); font-weight: 500; }
.ip-track { height: 4px; background: rgba(91, 142, 153, .13); border-radius: 4px; overflow: hidden; }
.ip-track span { display: block; height: 100%; background: var(--ipc, var(--cyan)); border-radius: 4px; }
.ip-note { font-size: 12px; color: #526f79; }

/* chart cards */
.chart-card .chart-wrap { min-height: 120px; }
.chart-wrap { position: relative; padding: 0 4px 2px; }
.chart-legend { display: flex; gap: 11px; padding: 8px 0 3px; flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #728f99; }
.chart-legend i { width: 5px; height: 5px; border-radius: 50%; }
.area-chart, .bar-chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: rgba(97, 144, 156, .12); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-axis { fill: #5e7b86; font-size: 12px; font-family: var(--font-mono); }
.chart-line { filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.chart-last-dot { filter: drop-shadow(0 0 4px currentColor); }
.bar-rect { opacity: .9; transition: opacity .2s; }
.bar-rect:hover { opacity: 1; }

/* mini map */
.warehouse-minimap { position: relative; height: 240px; border-radius: 7px; overflow: hidden; border: 1px solid rgba(84, 142, 154, .12); background: radial-gradient(ellipse at center, rgba(17, 57, 68, .2), rgba(4, 13, 21, .8)); }
.warehouse-minimap::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(72, 152, 164, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 152, 164, .06) 1px, transparent 1px); background-size: 22px 22px; }
.mini-zone { position: absolute; border: 1px solid rgba(99, 174, 184, .16); border-radius: 3px; background: rgba(36, 91, 106, .1); font-size: 12px; color: #5e7e88; padding: 3px 5px; }
.mini-zone.zone-a { left: 18%; top: 17%; width: 36%; height: 66%; border-color: rgba(43,216,204,.2); background: rgba(43,216,204,.035); }
.mini-zone.zone-b { left: 58%; top: 17%; width: 22%; height: 31%; border-color: rgba(74,168,255,.2); background: rgba(74,168,255,.035); }
.mini-zone.zone-c { left: 58%; top: 52%; width: 22%; height: 31%; border-color: rgba(139,140,255,.2); background: rgba(139,140,255,.035); }
.mini-zone.zone-in { left: 4%; top: 17%; width: 10%; height: 66%; border-color: rgba(255,180,94,.2); background: rgba(255,180,94,.035); }
.mini-zone.zone-out { left: 84%; top: 17%; width: 12%; height: 66%; border-color: rgba(255,180,94,.2); background: rgba(255,180,94,.035); }
.mini-rack { position: absolute; height: 6px; border-radius: 2px; background: var(--mc); opacity: .68; cursor: pointer; transition: .2s; box-shadow: 0 0 6px color-mix(in srgb, var(--mc) 25%, transparent); }
.mini-rack:hover { opacity: 1; transform: scaleY(1.8); }
.mini-legend { position: absolute; left: 8px; bottom: 7px; display: flex; gap: 8px; font-size: 12px; color: #55737e; }
.mini-legend span { display: flex; align-items: center; gap: 3px; }
.mini-legend i { width: 4px; height: 4px; border-radius: 50%; background: var(--lc); }

/* task kanban */
.kanban-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kanban-toolbar .filter-chips { flex-wrap: wrap; }
.kanban-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.kanban-column { min-height: 300px; border-radius: 9px; border: 1px solid rgba(84, 142, 155, .12); background: rgba(7, 20, 30, .44); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-bottom: 1px solid rgba(77, 127, 139, .1); }
.kanban-title { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b7d2d6; }
.kanban-title i { width: 5px; height: 5px; border-radius: 50%; background: var(--kc); box-shadow: 0 0 7px var(--kc); }
.kanban-count { font-family: var(--font-mono); font-size: 12px; color: #698590; background: rgba(84, 135, 147, .1); border-radius: 3px; padding: 2px 5px; }
.kanban-list { display: flex; flex-direction: column; gap: 6px; padding: 8px; max-height: 570px; overflow-y: auto; }
.task-card {
  position: relative; padding: 9px 10px; border-radius: 6px; border: 1px solid rgba(86, 144, 156, .12);
  background: linear-gradient(135deg, rgba(13, 34, 46, .77), rgba(8, 23, 33, .66)); cursor: pointer; transition: .2s;
}
.task-card:hover { border-color: rgba(43, 216, 204, .26); transform: translateY(-1px); }
.task-card.priority-high::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 0 2px 2px 0; background: var(--red); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.task-id { font-family: var(--font-mono); font-size: 12px; color: #68a7ae; }
.task-priority { font-size: 12px; padding: 1px 4px; border-radius: 2px; color: var(--pc); background: color-mix(in srgb, var(--pc) 9%, transparent); }
.task-card h4 { margin-top: 6px; font-size: 12px; font-weight: 500; color: #bcd6da; line-height: 1.3; }
.task-card-meta { display: flex; justify-content: space-between; gap: 5px; margin-top: 7px; font-size: 12px; color: #58757f; }
.task-card-meta span { display: flex; align-items: center; gap: 3px; }
.task-card-meta svg { width: 9px; height: 9px; }
.task-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding-top: 6px; border-top: 1px dashed rgba(82, 132, 143, .11); font-size: 12px; color: #5c7a84; }
.task-card-foot b { color: #94b1b8; font-weight: 500; }
.task-card-row { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.task-type-tag { font-size: 12px; padding: 2px 5px; border-radius: 3px; background: rgba(74,168,255,.08); color: #8dcaff; }
.task-progress-inline { flex: 1; height: 3px; border-radius: 3px; background: rgba(88, 138, 150, .14); overflow: hidden; }
.task-progress-inline i { display: block; height: 100%; background: linear-gradient(90deg,#1ca8a3,var(--cyan)); }
.task-progress-inline + span { font-family: var(--font-mono); font-size: 12px; color: #74909a; }

/* devices */
.device-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.device-card { position: relative; padding: 12px; border-radius: 8px; border: 1px solid rgba(84, 142, 155, .13); background: linear-gradient(145deg, rgba(12, 31, 43, .68), rgba(7, 20, 30, .76)); transition: .2s; overflow: hidden; }
.device-card:hover { border-color: rgba(43, 216, 204, .25); }
.device-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--dc), transparent); opacity: .5; }
.device-top { display: flex; justify-content: space-between; align-items: center; }
.device-type { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #5f7e88; letter-spacing: .06em; }
.device-type svg { width: 12px; height: 12px; }
.device-status { font-size: 12px; color: var(--dc); display: flex; align-items: center; gap: 3px; }
.device-status i { width: 4px; height: 4px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 6px var(--dc); }
.device-name { margin-top: 7px; font-family: var(--font-mono); font-size: 15px; color: #d5ebee; font-weight: 500; }
.device-model { margin-top: 1px; font-size: 12px; color: #506e79; }
.device-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 10px; }
.device-stat { padding: 6px; border-radius: 4px; background: rgba(79, 129, 141, .07); }
.device-stat small { display: block; font-size: 12px; color: #55727d; }
.device-stat strong { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; color: #a9c2c8; font-weight: 500; }
.battery-row { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.battery-label { font-size: 12px; color: #5c7781; width: 30px; }
.battery-track { flex: 1; height: 3px; background: rgba(93, 142, 153, .13); border-radius: 3px; overflow: hidden; }
.battery-track i { display: block; height: 100%; background: var(--bc); border-radius: 3px; }
.battery-value { font-family: var(--font-mono); font-size: 12px; color: #8ca8b0; }
.device-task { margin-top: 8px; font-size: 12px; color: #587680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-task b { color: #7e9da5; font-weight: 500; }
.device-map-panel { margin-top: 10px; }
.device-map { position: relative; height: 250px; border-radius: 7px; border: 1px solid rgba(84, 142, 154, .12); background: radial-gradient(ellipse at center, rgba(18, 65, 76, .22), rgba(4, 13, 21, .82)); overflow: hidden; }
.device-map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(72, 152, 164, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 152, 164, .06) 1px, transparent 1px); background-size: 22px 22px; }
.device-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-node { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--nc); box-shadow: 0 0 10px var(--nc); }
.map-node::after { content: ""; position: absolute; inset: -5px; border: 1px solid color-mix(in srgb, var(--nc) 45%, transparent); border-radius: 50%; animation: ringPulse 2.3s infinite; }
.map-node.alert { --nc: var(--red); }
.map-label { position: absolute; font-family: var(--font-mono); font-size: 12px; color: #7b9aa3; white-space: nowrap; }
.map-zone-label { position: absolute; font-family: var(--font-mono); font-size: 12px; color: #54747e; letter-spacing: .04em; white-space: nowrap; pointer-events: none; }
.map-legend { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 10px; font-size: 12px; color: #58747e; }
.map-legend span { display: flex; align-items: center; gap: 3px; }
.map-legend i { width: 5px; height: 5px; border-radius: 50%; background: var(--mc); }

/* analytics */
.analytics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.analytics-grid .span-2 { grid-column: span 2; }
.analytics-grid .span-3 { grid-column: span 3; }
.analytics-card { padding: 13px 14px; }
.analytics-card .panel-head-lg { padding: 0 0 8px; border-bottom: 0; }
.analytics-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-bottom: 10px; }
.small-stat { border-radius: 6px; background: rgba(78, 130, 142, .07); padding: 8px 9px; border: 1px solid rgba(85, 142, 154, .08); }
.small-stat small { display: block; font-size: 12px; color: #5a7782; }
.small-stat strong { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 16px; color: #cde6e9; font-weight: 500; }
.small-stat em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--green); }
.h-bars { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.h-bar-row { display: flex; flex-direction: column; gap: 4px; }
.h-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: #849fa7; }
.h-bar-label strong { font-family: var(--font-mono); color: #b5cfd5; font-weight: 500; }
.h-bar-track { height: 4px; background: rgba(93, 142, 153, .12); border-radius: 4px; overflow: hidden; }
.h-bar-track i { display: block; height: 100%; border-radius: 4px; }
.h-bar-row small { font-size: 12px; color: #4f6c76; }
.stacked-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; gap: 2px; }
.stacked-bar i { height: 100%; }
.stacked-legend { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.stacked-legend span { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #6e8a94; }
.stacked-legend i { width: 5px; height: 5px; border-radius: 1px; }
.top-list { display: flex; flex-direction: column; gap: 0; }
.top-list-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed rgba(82, 132, 143, .1); }
.top-list-row:last-child { border-bottom: 0; }
.top-rank { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--rk); background: color-mix(in srgb, var(--rk) 9%, transparent); }
.top-name { flex: 1; font-size: 12px; color: #95afb6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-qty { font-family: var(--font-mono); font-size: 12px; color: #7e9ba4; }
.top-rate { font-family: var(--font-mono); font-size: 12px; color: var(--green); width: 34px; text-align: right; }

/* settings */
.settings-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.settings-list { display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(82, 132, 143, .1); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; font-size: 12px; color: #aec7cd; font-weight: 500; }
.setting-copy small { display: block; font-size: 12px; color: #587581; margin-top: 3px; }
.switch { position: relative; width: 31px; height: 17px; border-radius: 10px; background: rgba(96, 141, 153, .18); border: 1px solid rgba(100, 153, 164, .16); transition: .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; left: 2px; top: 2px; background: #79919a; transition: .2s; }
.switch.on { background: rgba(43, 216, 204, .18); border-color: rgba(43, 216, 204, .34); }
.switch.on::after { left: 16px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.integration-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.integration-card { padding: 10px; border-radius: 6px; border: 1px solid rgba(86, 144, 156, .12); background: rgba(8, 22, 33, .46); }
.integration-card-top { display: flex; justify-content: space-between; align-items: center; }
.integration-name { font-family: var(--font-mono); font-size: 12px; color: #b8d3d7; }
.integration-state { font-size: 12px; color: var(--green); display: flex; gap: 3px; align-items: center; }
.integration-state i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.integration-desc { font-size: 12px; color: #55727c; margin-top: 6px; }
.integration-latency { display: flex; justify-content: space-between; margin-top: 7px; padding-top: 6px; border-top: 1px dashed rgba(82, 132, 143, .1); font-size: 12px; color: #58747e; }
.integration-latency b { font-family: var(--font-mono); color: #93b0b8; font-weight: 500; }

/* ---------- Modal / command ---------- */
.modal-layer, .drawer-layer { position: fixed; inset: 0; z-index: 100; }
.modal-layer { display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 13, .68); backdrop-filter: blur(5px); }
.command-modal {
  position: relative; width: min(680px, calc(100vw - 32px)); max-height: 64vh; display: flex; flex-direction: column;
  border-radius: 12px; border: 1px solid rgba(91, 184, 184, .3); background: rgba(7, 21, 31, .96);
  box-shadow: 0 28px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.025) inset; overflow: hidden;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.command-head { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border-bottom: 1px solid rgba(83, 136, 147, .14); }
.command-head svg { width: 17px; height: 17px; color: var(--cyan); }
.command-head input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; color: #dcf2f4; }
.command-head input::placeholder { color: #526f7a; }
.command-head kbd { font-size: 12px; }
.command-body { overflow-y: auto; padding: 8px; }
.command-group { margin-bottom: 8px; }
.command-group-title { padding: 6px 8px 4px; font-size: 12px; letter-spacing: .1em; color: #4f6d78; font-family: var(--font-mono); }
.command-item { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 6px; cursor: pointer; transition: .16s; }
.command-item:hover, .command-item.active { background: rgba(43, 216, 204, .075); }
.command-icon { width: 27px; height: 27px; border-radius: 5px; display: grid; place-items: center; background: rgba(60, 124, 136, .13); color: #76cbd0; flex: 0 0 27px; }
.command-icon svg { width: 13px; height: 13px; }
.command-copy { min-width: 0; flex: 1; }
.command-copy strong { display: block; font-size: 12px; color: #c7dfe2; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.command-copy small { display: block; font-size: 12px; color: #58747f; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.command-tag { font-size: 12px; padding: 2px 5px; border-radius: 3px; color: #75929b; background: rgba(85, 134, 146, .1); flex: 0 0 auto; }
.command-empty { padding: 36px 20px; text-align: center; color: #58747f; font-size: 12px; }
.command-empty svg { width: 26px; height: 26px; color: #32525e; display: block; margin: 0 auto 10px; }
.command-foot { display: flex; align-items: center; gap: 12px; padding: 9px 15px; border-top: 1px solid rgba(83, 136, 147, .12); font-size: 12px; color: #506d77; }
.command-foot span { display: flex; align-items: center; gap: 3px; }
.command-tip { margin-left: auto; color: #46626d; }

/* drawer */
.drawer-layer { display: flex; justify-content: flex-end; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 13, .55); backdrop-filter: blur(3px); }
.detail-drawer {
  position: relative; width: min(480px, 92vw); height: 100%; display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(9, 25, 36, .99), rgba(4, 14, 22, .995));
  border-left: 1px solid rgba(82, 163, 164, .26); box-shadow: -24px 0 70px rgba(0,0,0,.38);
  animation: drawerIn .25s ease;
}
@keyframes drawerIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: flex-start; align-items: flex-start; gap: 10px; padding: 20px 20px 16px; border-bottom: 1px solid rgba(82, 132, 143, .12); }
.drawer-head-copy { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 19px; margin-top: 4px; font-weight: 600; }
.drawer-head p { font-size: 12px; color: #66828c; margin-top: 4px; }
.drawer-back { flex: 0 0 auto; margin-top: 2px; }
.drawer-close { flex: 0 0 auto; margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid rgba(82, 132, 143, .13); display: flex; gap: 8px; justify-content: flex-end; background: rgba(4, 14, 21, .8); }
.drawer-section { margin-bottom: 18px; }
.drawer-section-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; letter-spacing: .08em; color: #5a7782; margin-bottom: 8px; }
.drawer-section-title strong { color: #9bb7bd; font-weight: 500; letter-spacing: .02em; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-item { padding: 9px 10px; border-radius: 5px; background: rgba(75, 126, 139, .075); border: 1px solid rgba(84, 142, 154, .08); }
.detail-item span { display: block; font-size: 12px; color: #5b7782; }
.detail-item strong { display: block; margin-top: 4px; font-size: 12px; color: #c2dade; font-weight: 500; word-break: break-all; }
.detail-steps { display: flex; flex-direction: column; }
.detail-step { position: relative; display: flex; gap: 10px; padding: 7px 0 7px 4px; }
.detail-step::before { content: ""; position: absolute; left: 10px; top: 30px; bottom: -2px; width: 1px; background: rgba(87, 139, 151, .13); }
.detail-step:last-child::before { display: none; }
.step-dot { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; border: 1px solid rgba(91, 146, 157, .26); margin-top: 2px; position: relative; z-index: 1; background: #0a1b27; }
.detail-step.done .step-dot { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px rgba(43,216,204,.3); }
.detail-step.active .step-dot { border-color: var(--cyan); background: rgba(43,216,204,.13); animation: dotPulse 1.8s infinite; }
.detail-step div strong { display: block; font-size: 12px; color: #aac5ca; font-weight: 500; }
.detail-step div small { display: block; font-size: 12px; color: #58747f; margin-top: 2px; }

/* tooltip */
.tooltip {
  position: fixed; z-index: 80; pointer-events: none; opacity: 0; transform: translate(-50%, -100%);
  padding: 6px 9px; border-radius: 5px; background: rgba(4, 18, 27, .96); border: 1px solid rgba(43, 216, 204, .25);
  box-shadow: 0 8px 22px rgba(0,0,0,.32); font-size: 12px; color: #b7d5d9; white-space: nowrap;
  transition: opacity .12s ease;
}
.tooltip.visible { opacity: 1; }
.tooltip strong { color: var(--cyan); font-family: var(--font-mono); font-weight: 500; }
.tooltip small { display: block; color: #5e7b85; font-size: 12px; margin-top: 2px; }

/* toasts */
.toast-stack { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 9px; min-width: 240px; max-width: 360px; padding: 10px 12px;
  border-radius: 7px; border: 1px solid rgba(74, 168, 255, .23); background: rgba(7, 21, 31, .97);
  box-shadow: 0 14px 38px rgba(0,0,0,.32); animation: toastIn .28s ease; font-size: 12px; color: #b7d0d5;
}
.toast.success { border-color: rgba(43, 216, 204, .3); }
.toast.warn { border-color: rgba(255, 180, 94, .3); }
.toast-icon { width: 23px; height: 23px; border-radius: 5px; display: grid; place-items: center; background: rgba(43,216,204,.1); color: var(--cyan); }
.toast-icon svg { width: 12px; height: 12px; }
.toast-copy strong { display: block; font-size: 12px; color: #d2eaed; font-weight: 500; }
.toast-copy small { display: block; margin-top: 2px; font-size: 12px; color: #617e88; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.out { opacity: 0; transform: translateX(10px); transition: .3s; }

/* site dropdown */
.site-dropdown {
  position: fixed; z-index: 70; min-width: 230px; padding: 7px; border-radius: 8px;
  border: 1px solid rgba(80, 150, 160, .25); background: rgba(6, 19, 28, .98);
  box-shadow: 0 16px 44px rgba(0,0,0,.4); opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: .18s ease; backdrop-filter: blur(14px);
}
.site-dropdown.visible { opacity: 1; visibility: visible; transform: none; }
.site-option { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 5px; width: 100%; text-align: left; color: #8fa9b1; }
.site-option:hover { background: rgba(43, 216, 204, .07); color: #d6ecef; }
.site-option.active { background: rgba(43, 216, 204, .09); }
.site-option-dot { width: 5px; height: 5px; border-radius: 50%; background: #4f707b; }
.site-option.active .site-option-dot { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.site-option-copy { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.site-option-copy strong { font-size: 12px; font-weight: 500; }
.site-option-copy small { font-family: var(--font-mono); font-size: 12px; color: #5b7883; }
.site-option span:last-child { font-size: 12px; color: #4f6c77; }

/* mini ring */
.mini-ring { width: 48px; height: 48px; }

/* ---------- WMS Academy / 涓氬姟瀛︿範 ---------- */
.nav-badge.learn { color: #90caff; background: rgba(74, 168, 255, .11); border: 1px solid rgba(74, 168, 255, .17); }
.learn-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.learn-principle {
  position: relative; min-height: 218px; padding: 17px 18px 14px; overflow: hidden; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 6%, rgba(10, 27, 39, .8)), rgba(5, 16, 25, .83));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.learn-principle::before { content: ""; position: absolute; left: 17px; right: 17px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55; }
.learn-principle::after { content: ""; position: absolute; right: -50px; top: -55px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, var(--accent), transparent 68%); opacity: .06; }
.principle-top { display: flex; align-items: center; gap: 8px; }
.principle-no { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .08em; }
.principle-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .28; }
.principle-tag { font-size: 12px; color: #688894; border: 1px solid rgba(92, 148, 158, .16); border-radius: 3px; padding: 2px 5px; }
.learn-principle h3 { margin-top: 13px; font-size: 15px; font-weight: 560; color: #e3f7f8; }
.learn-principle p { margin-top: 9px; color: #90a9b2; font-size: 12.2px; line-height: 1.75; }
.learn-principle footer { position: absolute; left: 18px; right: 18px; bottom: 13px; padding-top: 9px; border-top: 1px solid rgba(88, 140, 151, .12); color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; }
.learn-section { margin-top: 10px; padding: 15px 16px; }
.learn-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.learn-section-head h3 { margin-top: 4px; font-size: 15px; font-weight: 560; color: #dff2f4; }
.learn-section-head p { margin-top: 4px; font-size: 12px; color: #67838d; }
.learn-note { font-family: var(--font-mono); font-size: 12px; color: #557580; padding: 4px 7px; border: 1px solid rgba(82, 143, 154, .14); border-radius: 3px; white-space: nowrap; }
.learn-process-panel { background: radial-gradient(ellipse at 20% 0%, rgba(34, 131, 139, .11), transparent 48%), linear-gradient(150deg, rgba(10, 27, 39, .8), rgba(5, 16, 25, .86)); }
.learn-flow-scroll { overflow-x: auto; padding-bottom: 4px; }
.flow-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 10px; align-items: stretch; margin-bottom: 7px; }
.flow-row-label { padding-top: 9px; }
.flow-row-label span { display: block; font-size: 12px; color: #b8d5d8; }
.flow-row-label small { display: block; margin-top: 3px; font-size: 12px; color: #557680; }
.flow-row-label::after { content: ""; display: block; width: 18px; height: 1px; margin-top: 9px; background: rgba(84, 169, 174, .4); }
.flow-track { display: flex; align-items: stretch; min-width: 980px; }
.flow-node { flex: 1; min-width: 100px; padding: 9px 9px 8px; border-radius: 5px; border: 1px solid rgba(85, 145, 155, .13); background: rgba(8, 24, 35, .58); }
.physical .flow-node { border-top-color: rgba(43, 216, 204, .35); }
.information .flow-node { border-top-color: rgba(74, 168, 255, .35); background: rgba(8, 22, 35, .5); }
.flow-index { display: block; font-family: var(--font-mono); font-size: 12px; color: #4caeb2; letter-spacing: .08em; }
.information .flow-index { color: #579bd6; }
.flow-node strong { display: block; margin-top: 4px; font-size: 12px; color: #c3dde0; font-weight: 500; white-space: nowrap; }
.flow-node small { display: block; margin-top: 3px; color: #587780; font-size: 12px; line-height: 1.45; }
.flow-arrow { display: grid; place-items: center; flex: 0 0 14px; color: #3d6771; font-size: 12px; }
.learn-callout { display: flex; align-items: flex-start; gap: 8px; margin-top: 9px; padding: 9px 11px; border-radius: 5px; border: 1px solid rgba(43, 216, 204, .15); background: rgba(43, 216, 204, .045); color: #86a8af; font-size: 12px; line-height: 1.65; }
.learn-callout b { color: #b9e3e3; font-weight: 500; }
.callout-icon { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; display: grid; place-items: center; color: #6ff5e8; border: 1px solid rgba(43, 216, 204, .4); font-family: var(--font-mono); font-size: 12px; }
.learn-callout.small { margin-top: 13px; border-color: rgba(74, 168, 255, .14); background: rgba(74, 168, 255, .04); }
.learn-callout.small .callout-icon { color: #8dcaff; border-color: rgba(74, 168, 255, .36); }

.learn-story-grid { display: grid; grid-template-columns: minmax(0, 1.52fr) 326px; gap: 10px; margin-top: 10px; }
.learn-story-panel { margin-top: 0; }
.story-timeline { display: flex; flex-direction: column; padding-left: 3px; }
.story-item { display: grid; grid-template-columns: 39px 22px minmax(0, 1fr); gap: 8px; padding-bottom: 3px; }
.story-time { padding-top: 4px; font-family: var(--font-mono); font-size: 12px; color: #61828b; }
.story-node { position: relative; display: flex; justify-content: center; }
.story-node::after { content: ""; position: absolute; left: 10px; top: 25px; bottom: -2px; width: 1px; background: rgba(89, 144, 154, .16); }
.story-item:last-child .story-node::after { display: none; }
.story-node i { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(43, 216, 204, .35); background: #0a1b27; color: #6cded7; font-family: var(--font-mono); font-size: 12px; font-style: normal; position: relative; z-index: 1; }
.story-copy { min-width: 0; padding: 0 0 11px; border-bottom: 1px dashed rgba(84, 134, 145, .12); }
.story-item:last-child .story-copy { border-bottom: 0; }
.story-title { display: flex; align-items: center; gap: 7px; }
.story-title strong { font-size: 12px; color: #c5dfe2; font-weight: 520; }
.story-copy p { margin-top: 3px; color: #6c8892; font-size: 12px; line-height: 1.55; }
.story-copy code { display: inline-block; margin-top: 4px; padding: 2px 5px; border-radius: 2px; background: rgba(66, 124, 137, .11); color: #74aeb5; font-family: var(--font-mono); font-size: 12px; }
.learn-object-card { position: relative; align-self: start; padding: 15px 15px 13px; overflow: hidden; background: linear-gradient(160deg, rgba(14, 38, 48, .78), rgba(5, 16, 25, .9)); }
.learn-object-card::after { content: ""; position: absolute; right: -30px; top: 70px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(43, 216, 204, .08); box-shadow: 0 0 0 20px rgba(43,216,204,.025), 0 0 0 40px rgba(43,216,204,.018); pointer-events: none; }
.object-top { display: flex; justify-content: space-between; align-items: center; }
.object-code { margin-top: 15px; color: #5b9da5; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.object-code span { color: #355b65; margin: 0 4px; }
.learn-object-card h3 { margin-top: 4px; font-size: 17px; font-weight: 560; color: #e3f8f8; }
.object-sub { margin-top: 3px; font-size: 12px; color: #688690; }
.object-batch { display: flex; flex-direction: column; gap: 2px; margin-top: 13px; padding: 9px 10px; border-left: 2px solid var(--cyan); background: rgba(43, 216, 204, .055); }
.object-batch span { font-size: 12px; color: #5c858e; }
.object-batch strong { font-family: var(--font-mono); font-size: 12px; color: #a4e7e5; font-weight: 500; }
.object-batch small { font-size: 12px; color: #5c7b85; }
.object-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 13px 0 0; padding: 0; }
.object-grid div { padding-bottom: 7px; border-bottom: 1px solid rgba(78, 130, 141, .1); }
.object-grid dt { font-size: 12px; color: #577680; }
.object-grid dd { margin: 3px 0 0; color: #b3d3d8; font-family: var(--font-mono); font-size: 12px; }
.object-location { margin-top: 13px; padding-top: 10px; border-top: 1px solid rgba(82, 132, 143, .13); }
.object-location span { display: block; font-size: 12px; color: #577680; }
.object-location strong { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 16px; color: #6ff5e8; letter-spacing: .05em; font-weight: 500; }
.object-location small { display: block; margin-top: 2px; font-size: 12px; color: #52717c; }
.object-lesson { margin-top: 13px; padding: 8px 9px; border: 1px dashed rgba(84, 147, 158, .17); border-radius: 4px; font-size: 12px; line-height: 1.55; color: #6b8993; }
.concept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.concept-card { position: relative; min-height: 89px; padding: 10px 10px 9px 13px; border-radius: 5px; border: 1px solid rgba(85, 143, 155, .12); background: rgba(8, 23, 34, .48); overflow: hidden; }
.concept-card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--cc); opacity: .65; }
.concept-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 6px var(--cc); display: block; }
.concept-card h4 { margin-top: 5px; font-size: 12px; color: #c1dbe0; font-weight: 520; }
.concept-card p { margin-top: 3px; font-size: 12px; line-height: 1.65; color: #64808a; }
.learn-two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10px; margin-top: 10px; }
.learn-two-col .learn-section { margin-top: 0; }
.learn-two-wide { grid-template-columns: 1.15fr .85fr; }
.doc-groups { display: flex; flex-direction: column; gap: 10px; }
.doc-group-head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 5px; }
.doc-group-name { font-size: 12px; color: var(--dc); border-left: 2px solid var(--dc); padding-left: 6px; }
.doc-group-head small { font-size: 12px; color: #54727c; }
.doc-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.doc-chip { padding: 4px 6px; border-radius: 3px; border: 1px solid rgba(88, 143, 154, .14); background: rgba(7, 20, 30, .45); color: #7d9aa3; font-size: 12px; }
.doc-flow i { color: #42636d; font-size: 12px; font-style: normal; padding: 0 1px; }
.dayline { display: flex; flex-direction: column; }
.day-item { display: grid; grid-template-columns: 40px 12px minmax(0, 1fr); gap: 7px; padding: 7px 0; border-bottom: 1px dashed rgba(82, 132, 143, .1); }
.day-item:last-child { border-bottom: 0; }
.day-time { font-family: var(--font-mono); font-size: 12px; color: #6b8d96; padding-top: 2px; }
.day-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dt); box-shadow: 0 0 7px var(--dt); margin-top: 4px; }
.day-item strong { font-size: 12px; color: #b4d2d7; font-weight: 500; }
.day-item p { margin-top: 2px; font-size: 12px; line-height: 1.5; color: #5c7983; }
.site-checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 13px; }
.site-checklist li { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed rgba(82, 132, 143, .1); }
.site-checklist li > span { font-family: var(--font-mono); font-size: 12px; color: #487a82; flex: 0 0 17px; }
.site-checklist strong { display: block; font-size: 12px; color: #b7d2d7; font-weight: 500; }
.site-checklist p { margin-top: 2px; font-size: 12px; line-height: 1.5; color: #5e7b85; }
.pitfall-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.pitfall-item { display: flex; gap: 8px; padding: 8px; border: 1px solid rgba(255, 180, 94, .1); border-radius: 4px; background: rgba(255, 180, 94, .025); }
.pitfall-item > span { width: 15px; height: 15px; flex: 0 0 15px; border-radius: 50%; display: grid; place-items: center; color: var(--orange); border: 1px solid rgba(255, 180, 94, .3); font-family: var(--font-mono); font-size: 12px; }
.pitfall-item strong { display: block; font-size: 12px; color: #c6dadd; font-weight: 500; }
.pitfall-item p { margin-top: 2px; font-size: 12px; line-height: 1.5; color: #5c7882; }
.learn-kpi-panel { background: radial-gradient(ellipse at 0% 0%, rgba(74, 168, 255, .06), transparent 50%), linear-gradient(150deg, rgba(10, 27, 39, .78), rgba(5, 16, 25, .84)); }
.learn-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.learn-kpi { padding: 10px 11px; border-radius: 5px; border: 1px solid rgba(84, 142, 155, .11); background: rgba(11, 29, 41, .42); }
.learn-kpi > span { font-family: var(--font-mono); font-size: 12px; color: #4b7c85; }
.learn-kpi strong { display: block; margin-top: 3px; font-size: 12px; color: #c5dde1; font-weight: 520; }
.learn-kpi code { display: block; margin-top: 4px; color: #70aab1; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; }
.learn-kpi p { margin-top: 3px; font-size: 12px; color: #56747e; }
.glossary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.glossary-item { padding: 8px 9px; border-left: 2px solid rgba(99, 175, 182, .28); background: rgba(8, 23, 34, .4); }
.glossary-item strong { font-size: 12px; color: #a7cbd0; font-weight: 500; }
.glossary-item p { margin-top: 2px; font-size: 12px; line-height: 1.55; color: #5c7882; }
.learn-finish { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 17px 18px; border-radius: 10px; border: 1px solid rgba(43, 216, 204, .22); background: linear-gradient(110deg, rgba(15, 52, 55, .78), rgba(7, 24, 34, .9)); }
.finish-copy { flex: 1; }
.finish-copy h3 { margin-top: 4px; font-size: 16px; color: #e1fbf8; font-weight: 560; }
.finish-copy p { margin-top: 4px; font-size: 12px; color: #73949b; }
.finish-steps { display: flex; flex-direction: column; gap: 3px; }
.finish-steps span { color: #71b3b3; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.finish-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.learn-source { margin-top: 10px; padding-bottom: 4px; text-align: center; color: #405c66; font-size: 12px; letter-spacing: .02em; }
@keyframes learnIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page[data-page="learn"].active .learn-principle { animation: learnIn .45s both; }
.page[data-page="learn"].active .learn-principle:nth-child(2) { animation-delay: .06s; }
.page[data-page="learn"].active .learn-principle:nth-child(3) { animation-delay: .12s; }

/* responsive */
@media (max-width: 1640px) {
  :root { --sidebar-w: 220px; }
  .kpi-value strong { font-size: 23px; }
  .dashboard-body { grid-template-columns: minmax(0, 1fr) 305px; }
  .selection-card { width: 270px; }
}
@media (max-width: 1400px) {
  .sidebar { --sidebar-w: 208px; }
  .kpi-grid { gap: 7px; }
  .kpi-card { padding-left: 10px; padding-right: 10px; }
  .kpi-value strong { font-size: 21px; }
  .kpi-foot { left: 10px; right: 38px; }
  .kpi-spark { width: 52px; right: 4px; }
  .dashboard-body { grid-template-columns: minmax(0, 1fr) 292px; }
  .occupancy-main { gap: 7px; }
  #occupancyDonut { width: 105px; height: 105px; flex-basis: 105px; }
  .donut-center strong { font-size: 19px; }
  .process-step small { display: none !important; }
}
@media (max-width: 1200px) {
  .global-search { width: 170px; }
  .global-search span { font-size: 12px; }
  .top-clock { display: none; }
  .dashboard-body { grid-template-columns: minmax(0, 1fr) 276px; }
  .rail-card { padding: 11px; }
  .stage-views .view-btn { padding: 0 6px; }
  .process-step strong { font-size: 12px; }
}
@media (max-width: 1020px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 238px; flex-basis: 238px; transform: translateX(-100%); transition: transform .26s ease; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  body.nav-open .sidebar { transform: none; }
  body.sidebar-collapsed .sidebar { width: 238px; flex-basis: 238px; padding-left: 13px; padding-right: 13px; }
  body.sidebar-collapsed .sidebar .brand-word,
  body.sidebar-collapsed .sidebar .site-copy,
  body.sidebar-collapsed .sidebar .site-live,
  body.sidebar-collapsed .sidebar .site-arrow,
  body.sidebar-collapsed .sidebar .nav-label,
  body.sidebar-collapsed .sidebar .nav-text,
  body.sidebar-collapsed .sidebar .nav-badge,
  body.sidebar-collapsed .sidebar .system-health,
  body.sidebar-collapsed .sidebar .user-copy,
  body.sidebar-collapsed .sidebar .user-more { display: initial; }
  body.sidebar-collapsed .sidebar .brand { flex-direction: row; height: 72px; justify-content: flex-start; gap: 11px; padding: 0 2px; }
  body.sidebar-collapsed .sidebar .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  body.sidebar-collapsed .sidebar .site-chip { justify-content: flex-start; padding: 11px 10px; }
  body.sidebar-collapsed .sidebar .nav-item { justify-content: flex-start; padding: 0 11px; }
  body.sidebar-collapsed .sidebar .sidebar-toggle {
    display: grid; margin-left: auto; margin-right: 0;
    width: 24px; height: 24px; border-color: transparent; background: transparent; box-shadow: none;
    color: var(--dim);
  }
  body.sidebar-collapsed .sidebar .sidebar-toggle:hover {
    color: var(--cyan); border-color: rgba(43, 216, 204, .18); background: rgba(43, 216, 204, .08); box-shadow: none;
  }
  body.sidebar-collapsed .sidebar .sidebar-toggle svg { transform: rotate(180deg); }
  body.sidebar-collapsed .sidebar .nav-label { display: block; }
  body.sidebar-collapsed .sidebar .system-health { display: block; }
  .mobile-menu { display: flex; }
  .topbar { padding: 0 14px; }
  .crumb { display: none; }
  .topbar-divider:first-of-type { display: none; }
  .global-search { width: 140px; }
  .dashboard-body { grid-template-columns: 1fr; overflow-y: auto; }
  .scene-stage { min-height: 500px; }
  .insight-rail { overflow: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-card { height: auto; }
  .scene-stage { order: 0; }
  .insight-rail { order: 1; }
  .page-dashboard { overflow-y: auto; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid .span-3 { grid-column: span 2; }
  .device-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .global-search { width: 34px; padding: 0; justify-content: center; }
  .global-search span, .global-search kbd { display: none; }
  .topbar-right { gap: 4px; }
  .site-select span:nth-child(2), .site-select svg { display: none; }
  .page-dashboard { padding: 10px; }
  .page-heading h1 { font-size: 22px; }
  .heading-side .sync-state { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { height: 99px; }
  .dashboard-body { display: block; overflow: visible; }
  .scene-stage { min-height: 430px; margin-bottom: 10px; }
  .insight-rail { display: flex; flex-direction: column; }
  .stage-views { top: 52px; right: 10px; }
  .stage-mode-actions { top: 88px; right: 10px; gap: 4px; }
  .day-start-btn { padding-right: 7px; }
  .pan-mode-btn { height: 31px; padding: 0 8px; }
  .business-index { top: 132px; right: 10px; width: 112px; padding: 7px 5px 6px; }
  .business-index-head { padding-bottom: 5px; }
  .business-index-head span { font-size: 12px; }
  .business-index-list { max-height: 228px; gap: 1px; margin-top: 4px; }
  .business-index-list button { min-height: 24px; gap: 4px; padding: 0 3px; }
  .business-index-list button strong { font-size: 12px; }
  .business-term-card { top: 132px; right: 130px; left: 10px; width: auto; }
  .day-start-copy small { display: none; }
  .shift-splash > div { min-width: 0; width: min(280px, calc(100vw - 50px)); padding: 15px 18px; }
  .shift-splash strong { font-size: 22px; }
  .stage-status { left: 10px; right: 10px; width: max-content; max-width: calc(100% - 20px); }
  .stage-title { max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .process-flow { left: 10px; right: 10px; bottom: 24px; overflow-x: auto; }
  .process-steps { min-width: 450px; }
  .scene-legend { left: 10px; bottom: 93px; }
  .selection-card { left: 10px; right: 10px; width: auto; bottom: 95px; }
  .scene-footer, .scene-hint { display: none; }
  .page-scroll { padding: 12px 10px 25px; }
  .setup-anchor-row { top: -12px; }
  .inner-head { align-items: flex-start; flex-direction: column; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .split-grid, .split-grid.equal, .settings-grid { grid-template-columns: 1fr; }
  .kanban-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-grid .span-2, .analytics-grid .span-3 { grid-column: auto; }
  .analytics-kpis { grid-template-columns: 1fr 1fr; }
  .device-grid { grid-template-columns: 1fr; }
  .modal-layer { padding-top: 8vh; }
  .toast-stack { right: 10px; bottom: 10px; left: 10px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (max-height: 820px) and (min-width: 1021px) {
  .topbar { height: 58px; flex-basis: 58px; }
  .brand { height: 62px; }
  .site-chip { height: 52px; margin-bottom: 9px; }
  .nav-item { height: 36px; }
  .sub-nav .nav-item { height: 34px; }
  .nav-label { padding-top: 5px; padding-bottom: 5px; }
  .system-health { padding-top: 8px; padding-bottom: 8px; margin-bottom: 8px; }
  .sidebar-user { padding-top: 7px; }
  .page-dashboard { padding-top: 9px; gap: 9px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { margin-top: 3px; }
  .kpi-card { height: 92px; padding-top: 9px; }
  .kpi-value { margin-top: 5px; }
  .kpi-value strong { font-size: 22px; }
  .kpi-foot { display: none; }
  .kpi-spark { bottom: 6px; width: 58px; }
  .scene-legend { bottom: 89px; }
  .process-flow { bottom: 24px; padding-top: 6px; padding-bottom: 6px; }
  .process-head { margin-bottom: 5px; }
  .selection-card { bottom: 24px; }
}

/* ---------- Getting started / 涓婃墜鍑嗗 ---------- */
.setup-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; padding: 15px; margin-top: 0; overflow: hidden; background: radial-gradient(ellipse at 12% 20%, rgba(255,180,94,.09), transparent 42%), linear-gradient(145deg, rgba(12, 29, 40, .92), rgba(5, 16, 25, .9)); }
.setup-map-root { position: relative; min-height: 218px; padding: 18px 15px; display: flex; flex-direction: column; justify-content: center; border-radius: 8px; border: 1px solid rgba(255,180,94,.36); background: linear-gradient(150deg, rgba(94, 57, 28, .44), rgba(36, 29, 22, .55)); overflow: hidden; }
.setup-map-root::before { content: ""; position: absolute; left: 15px; right: 15px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); }
.setup-map-root::after { content: ""; position: absolute; right: -55px; bottom: -70px; width: 180px; height: 180px; border: 1px solid rgba(255,180,94,.13); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,180,94,.035), 0 0 0 36px rgba(255,180,94,.018); }
.setup-root-kicker { font-family: var(--font-mono); font-size: 12px; color: #aa7e50; letter-spacing: .12em; }
.setup-map-root h3 { margin-top: 8px; font-size: 25px; line-height: 1.18; color: #fff2de; font-weight: 600; letter-spacing: .02em; }
.setup-map-root p { margin-top: 7px; color: #aa8c6d; font-size: 12px; line-height: 1.6; }
.setup-root-badge { align-self: flex-start; margin-top: 16px; padding: 4px 7px; border-radius: 3px; border: 1px solid rgba(255,180,94,.26); color: #e0b679; font-family: var(--font-mono); font-size: 12px; }
.setup-branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.setup-branch { position: relative; padding: 11px 12px 10px; border-radius: 6px; border: 1px solid rgba(83, 142, 154, .13); background: rgba(8, 23, 34, .48); border-top: 2px solid var(--setup-ac); }
.setup-branch.tone-amber, .setup-env.tone-amber { --setup-ac: #ffb45e; }
.setup-branch.tone-yellow, .setup-env.tone-yellow { --setup-ac: #f5cd63; }
.setup-branch.tone-cyan, .setup-env.tone-cyan { --setup-ac: #2bd8cc; }
.setup-branch.tone-green, .setup-env.tone-green { --setup-ac: #4ed6a3; }
.setup-branch.tone-blue, .setup-env.tone-blue { --setup-ac: #4aa8ff; }
.setup-branch.tone-violet, .setup-env.tone-violet { --setup-ac: #8b8cff; }
.setup-branch-head { display: flex; align-items: center; gap: 6px; }
.setup-branch-head > span { font-family: var(--font-mono); font-size: 12px; color: var(--setup-ac); }
.setup-branch-head strong { font-size: 12px; color: #c6dfe2; font-weight: 520; }
.setup-branch-head em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: #55747e; }
.setup-branch-summary { margin-top: 4px; font-size: 12px; color: var(--setup-ac); opacity: .9; }
.setup-branch ul { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.setup-branch li { position: relative; padding-left: 9px; color: #66838c; font-size: 12px; line-height: 1.5; }
.setup-branch li::before { content: ""; position: absolute; left: 0; top: 6px; width: 3px; height: 3px; border-radius: 50%; background: var(--setup-ac); opacity: .7; }
.setup-anchor-row {
  position: sticky; top: -18px; z-index: 20;
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px;
  margin: 0 -6px; padding: 9px 8px 8px;
  color: #4c6f79; font-family: var(--font-mono); font-size: 12px;
  background: linear-gradient(180deg, rgba(6, 18, 27, .97), rgba(6, 18, 27, .9));
  border-bottom: 1px solid rgba(83, 142, 154, .14);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, .8);
}
.setup-anchor-row > span { color: #395c66; letter-spacing: .08em; }
.setup-anchor-row a { color: #658d96; padding: 2px 0; border-bottom: 1px dotted rgba(102, 158, 165, .28); }
.setup-anchor-row a:hover { color: var(--cyan); border-color: var(--cyan); }
.setup-layout { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.setup-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.setup-section { padding: 15px 16px; margin: 0; scroll-margin-top: 56px; }
.setup-afterword { margin-top: 10px; padding: 9px 10px 9px 12px; border-radius: 4px; border: 1px dashed rgba(139,140,255,.3); border-left: 3px solid rgba(139,140,255,.62); background: rgba(139,140,255,.05); color: #8f93b4; font-size: 12px; line-height: 1.65; }
.setup-afterword b { color: #c3c5f2; font-weight: 500; }
.setup-afterword a { color: #b9bbff; text-decoration: underline; text-underline-offset: 2px; }
.setup-afterword a:hover { color: #dcddff; }
.setup-afterword-sub { margin-top: 6px; }
.setup-afterword-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.setup-afterword-list li { line-height: 1.6; }
.setup-afterword code { font-family: var(--font-mono); font-size: 11.5px; color: #9aa0e0; }
.setup-section.edge-yellow { border-left: 3px solid rgba(245,205,99,.72); }
.setup-section.edge-green { border-left: 3px solid rgba(78,214,163,.72); }
#setup-env, #setup-maven, #setup-backend, #setup-frontend, #setup-android { border-bottom: 4px #0e5052 solid; }
#packaging-pitfalls, #release-backend, #release-frontend, #release-android { border-bottom: 6px #169599 solid; }
.setup-ready-grid { display: grid; grid-template-columns: minmax(0, 1fr) 305px; gap: 10px; }
.setup-env-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.setup-env { min-height: 112px; padding: 10px 10px 9px; border-radius: 5px; border: 1px solid rgba(83, 142, 154, .12); border-top: 2px solid var(--setup-ac); background: rgba(8, 23, 34, .48); }
.setup-env-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.setup-env-top span { color: var(--setup-ac); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; }
.setup-env-top em { font-style: normal; font-size: 12px; color: #5e7a84; }
.setup-env h4 { margin-top: 7px; font-size: 12px; color: #c2dde1; font-weight: 520; }
.setup-env p { margin-top: 4px; font-size: 12px; line-height: 1.55; color: #5e7a84; }
.setup-env code { display: inline-block; margin-top: 7px; padding: 2px 4px; border-radius: 2px; background: rgba(80, 136, 147, .1); color: #78aeb4; font-family: var(--font-mono); font-size: 12px; }
.setup-mini-callout { margin-top: 10px; padding: 8px 10px; border-left: 2px solid rgba(43,216,204,.4); background: rgba(43,216,204,.035); color: #78979f; font-size: 12px; line-height: 1.6; border-radius: 0 3px 3px 0; }
.setup-mini-callout b { color: #bce5e2; font-weight: 500; }
.setup-flow { display: flex; align-items: stretch; overflow-x: auto; margin-top: 9px; padding-bottom: 3px; }
.setup-flow-step { position: relative; flex: 1; min-width: 156px; display: flex; gap: 8px; padding: 10px 10px 9px; margin-right: 16px; border-radius: 5px; border: 1px solid rgba(83, 142, 154, .13); background: rgba(8, 23, 34, .46); }
.setup-flow-step > div { min-width: 0; }
.setup-flow-step > span { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(43,216,204,.32); color: #66dcd5; font-family: var(--font-mono); font-size: 12px; }
.setup-flow-step strong { display: block; font-size: 12px; color: #c0dade; font-weight: 520; }
.setup-flow-step p { margin-top: 3px; color: #5d7983; font-size: 12px; line-height: 1.5; }
.setup-flow-step code { display: inline-block; max-width: 100%; margin-top: 5px; color: #6c9ca3; font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.setup-flow-step > i { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: #416a74; font-style: normal; font-size: 13px; }
.setup-code-block { margin-top: 10px; border-radius: 5px; border: 1px solid rgba(81, 142, 154, .12); background: rgba(3, 13, 20, .66); overflow: hidden; }
.setup-code-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; border-bottom: 1px solid rgba(81, 142, 154, .1); color: #557780; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.setup-code-head button { color: #65b9bc; border: 1px solid rgba(43,216,204,.18); border-radius: 3px; padding: 2px 5px; font-size: 12px; background: rgba(43,216,204,.06); }
.setup-code-head button:hover { color: #b2fff8; border-color: rgba(43,216,204,.4); }
.setup-code-block pre { margin: 0; padding: 10px 11px; color: #7eb0b7; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.setup-download { margin-top: 10px; border-radius: 5px; border: 1px solid rgba(81, 142, 154, .12); background: rgba(8, 23, 34, .34); overflow: hidden; }
.setup-download-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(81, 142, 154, .1); color: #557780; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.setup-download-head a { color: #7fb8bf; border-bottom: 1px dotted rgba(102, 158, 165, .45); }
.setup-download-head a:hover { color: var(--cyan); border-color: var(--cyan); }
.setup-download-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(81, 142, 154, .06); }
.setup-download-row:last-child { border-bottom: 0; }
.setup-download-row b { flex: 0 0 150px; color: #a9c8cc; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.setup-download-row span { flex: 1; min-width: 0; color: #5e7a84; font-size: 12px; line-height: 1.55; }
.setup-download-row .btn { flex: 0 0 auto; text-decoration: none; }
@media (max-width: 720px) {
  .setup-download-row { flex-wrap: wrap; }
  .setup-download-row b { flex-basis: 100%; }
}
.setup-maven-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.setup-maven-steps > div { padding: 10px; border-radius: 5px; border: 1px solid rgba(83, 142, 154, .11); background: rgba(8, 23, 34, .4); }
.setup-maven-steps > div > span { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }
.setup-maven-steps strong { display: block; margin-top: 4px; color: #bdd7db; font-size: 12px; font-weight: 500; }
.setup-maven-steps p { margin-top: 3px; color: #5e7a84; font-size: 12px; line-height: 1.55; }
.setup-maven-steps code { color: #73a5ac; font-family: var(--font-mono); font-size: 12px; }
.setup-maven-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 9px; align-items: stretch; }
.setup-maven-notes { display: flex; flex-direction: column; gap: 7px; }
.setup-repo-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 2px 0 10px; }
.setup-repo-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(83, 142, 154, .14); }
.setup-repo-block .setup-maven-steps > div > span { color: var(--yellow); }
.setup-repo-block .text-btn { color: var(--yellow); }
.setup-repo-block .text-btn:hover { color: #ffe9ad; }
.setup-note-line { display: flex; justify-content: space-between; gap: 7px; padding: 8px 9px; border-radius: 4px; border: 1px solid rgba(83,142,154,.11); background: rgba(8,23,34,.43); }
.setup-note-line b { font-size: 12px; color: #a3bfc4; font-weight: 500; }
.setup-note-line code { font-family: var(--font-mono); font-size: 12px; color: #6eaeb4; }
.setup-warning { padding: 9px 10px; border: 1px dashed rgba(255,180,94,.28); border-radius: 4px; color: #9a8568; font-size: 12px; line-height: 1.65; background: rgba(255,180,94,.025); }
.setup-mini-callout.note-strong { border-left: 3px solid #ffb45e; background: rgba(255,180,94,.09); color: #c3a078; }
.setup-mini-callout.note-strong b { color: #ffd7a4; }
.setup-hl { color: #ffd479; font-weight: 600; background: rgba(255,180,94,.16); border-bottom: 1px solid rgba(255,180,94,.4); border-radius: 2px; padding: 0 3px; }
.setup-code-head .setup-hl { margin-left: 2px; padding: 1px 6px; font-size: 13px; letter-spacing: 0; border-bottom: 0; border-radius: 3px; color: #1a1305; background: #ffc06a; }
.copy-chip {
  display: inline; margin: 0 1px; padding: 0 4px; border: 1px solid rgba(255, 180, 94, .34); border-radius: 3px;
  background: rgba(255, 180, 94, .12); color: #ffd479; font: inherit; font-family: var(--font-mono); font-size: .94em;
  line-height: 1.3; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.copy-chip:hover { background: rgba(255, 180, 94, .22); border-color: rgba(255, 180, 94, .62); }
.copy-chip:active { background: rgba(255, 180, 94, .3); }
.copy-chip.copied { color: #8fe3c7; border-color: rgba(96, 211, 168, .55); background: rgba(96, 211, 168, .16); }
.copy-chip:focus-visible { outline: 1px solid rgba(255, 180, 94, .7); outline-offset: 2px; }
.setup-warning.note-strong { border-style: solid; border-color: rgba(78,214,163,.35); border-left: 3px solid #4ed6a3; background: rgba(78,214,163,.09); color: #9dbfb1; }
.setup-warning.note-strong b { color: #b9f0d8; }
.setup-android-card { display: flex; gap: 14px; align-items: center; margin-top: 9px; padding: 13px; border-radius: 6px; border: 1px solid rgba(78,214,163,.2); background: linear-gradient(120deg, rgba(26, 77, 59, .34), rgba(8, 23, 34, .42)); }
.setup-android-badge { width: 83px; height: 83px; flex: 0 0 83px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(78,214,163,.3); background: rgba(78,214,163,.06); }
.setup-android-badge strong { font-family: var(--font-mono); font-size: 33px; line-height: 1; color: #8ef1c7; font-weight: 500; }
.setup-android-badge span { margin-top: 5px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: #6faa96; }
.setup-android-card h4 { color: #b9d8d4; font-size: 12px; line-height: 1.5; font-weight: 500; }
.setup-android-card p { margin-top: 5px; color: #65837e; font-size: 12px; line-height: 1.6; }
.setup-inline-code { margin-top: 8px; padding: 7px 9px; border-radius: 3px; background: rgba(78,214,163,.055); color: #7cc5ac; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; }

/* ---------- Permission / init-data page ---------- */
.config-hero { background: radial-gradient(ellipse at 85% 20%, rgba(139,140,255,.12), transparent 48%), linear-gradient(145deg, rgba(10, 28, 40, .9), rgba(5, 16, 25, .9)); }
.config-section { scroll-margin-top: 12px; }
.config-chain { display: flex; align-items: stretch; gap: 0; margin-top: 12px; }
.config-chain-node { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 6px; border: 1px solid rgba(83,142,154,.13); border-top: 2px solid var(--cc); background: linear-gradient(140deg, rgba(13,33,46,.65), rgba(7,21,31,.54)); }
.config-chain-node.root { --cc: #ffb45e; }
.config-chain-node.mid { --cc: #8b8cff; }
.config-chain-node.end { --cc: #4ed6a3; }
.config-chain-node > span { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--cc); letter-spacing: .06em; }
.config-chain-node strong { display: block; margin-top: 5px; color: #cfe7e9; font-size: 14px; font-weight: 550; }
.config-chain-node p { margin-top: 4px; color: #62808a; font-size: 12px; line-height: 1.6; }
.config-chain-node code { display: block; margin-top: 7px; color: #74aeb4; font-family: var(--font-mono); font-size: 12px; }
.config-chain-arrow { flex: 0 0 34px; display: flex; align-items: center; justify-content: center; color: #456d77; font-size: 15px; }
.config-file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.config-file { display: flex; gap: 9px; align-items: baseline; padding: 8px 10px; border-radius: 4px; border: 1px solid rgba(83,142,154,.11); background: rgba(8,23,34,.4); }
.config-file > b { flex: 0 0 84px; color: #a9c8cc; font-size: 12px; font-weight: 500; }
.config-file code { min-width: 0; color: #6eaeb4; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; word-break: break-all; }
.config-file span { color: #587681; font-size: 12px; }
.config-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-items: start; }
.config-code-grid .setup-code-block { margin-top: 0; }
.config-code-grid .setup-code-block pre { max-height: 280px; overflow: auto; }
.config-code-grid .setup-code-head { align-items: flex-start; gap: 8px; }
.config-code-grid .setup-code-head span { line-height: 1.55; color: #7fa5ad; }
.config-code-grid .setup-code-head button { flex: 0 0 auto; }
#page-config .arch-step-top { justify-content: flex-start; gap: 8px; }
#page-config .arch-step-layer { color: #d9eef1; background: rgba(83, 142, 154, .16); border-color: rgba(96, 160, 172, .34); font-weight: 550; letter-spacing: .03em; }
#page-config .arch-step-no { font-weight: 650; }
.config-chain-node.role { --cc: #f5cd63; }
.config-grant-tips { margin-top: 10px; padding: 3px 10px; border: 1px solid rgba(83, 142, 154, .12); border-radius: 5px; background: rgba(8, 23, 34, .34); }
.config-grant-tips > div > span { flex: 0 0 17px; color: #64d8d1; font-family: var(--font-mono); font-size: 12px; }
.config-grant-tips strong { color: #cfe6e9; }
.config-grant-tips p { color: #78939c; }
.config-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
@media (max-width: 1100px) {
  .config-code-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .config-chain { flex-direction: column; }
  .config-chain-arrow { flex-basis: 24px; transform: rotate(90deg); }
  .config-check-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .config-file { flex-direction: column; gap: 3px; }
  .config-file > b { flex-basis: auto; }
}
.setup-trouble-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.setup-trouble { display: flex; gap: 8px; padding: 9px; border-radius: 5px; border: 1px solid rgba(83,142,154,.11); background: rgba(8,23,34,.4); }
.setup-trouble > span { font-family: var(--font-mono); font-size: 12px; color: #4f9aa0; flex: 0 0 17px; }
.setup-trouble strong { color: #b8d2d7; font-size: 12px; font-weight: 500; }
.setup-trouble p { margin-top: 3px; color: #5c7882; font-size: 12px; line-height: 1.55; }
.setup-progress-card { padding: 13px; }
.setup-progress-top { display: flex; align-items: center; gap: 11px; }
.setup-progress-ring { position: relative; width: 78px; height: 78px; flex: 0 0 78px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--cyan) var(--progress, 0%), rgba(81, 139, 150, .15) 0); transition: background .3s; }
.setup-progress-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #091923; }
.setup-progress-ring strong { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 16px; color: #d9f5f1; font-weight: 500; }
.setup-progress-top h3 { font-size: 15px; color: #d6edef; font-weight: 550; }
.setup-progress-top p { margin-top: 4px; color: #66848e; font-size: 12px; }
.setup-progress-top p b { color: var(--cyan); font-family: var(--font-mono); font-weight: 500; }
.setup-checklist { display: flex; flex-direction: column; gap: 3px; margin-top: 11px; max-height: 570px; overflow-y: auto; padding-right: 2px; }
.setup-ready-grid .setup-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; max-height: none; overflow: visible; }
.setup-check { display: flex; align-items: flex-start; gap: 7px; width: 100%; padding: 7px 5px; border-radius: 4px; text-align: left; border-bottom: 1px dashed rgba(82,132,143,.09); }
.setup-check:hover { background: rgba(43,216,204,.04); }
.setup-check > i { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 1px; border-radius: 3px; border: 1px solid rgba(92, 149, 160, .3); position: relative; transition: .2s; }
.setup-check.done > i { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 7px rgba(43,216,204,.25); }
.setup-check.done > i::after { content: "✓"; position: absolute; left: 2px; top: -2px; font-size: 12px; color: #04201e; }
.setup-check span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.setup-check strong { font-size: 12px; color: #aec8cd; font-weight: 500; line-height: 1.35; }
.setup-check small { margin-top: 1px; font-size: 12px; color: #566f79; line-height: 1.35; }
.setup-check em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: #4e747d; }
.setup-check.done strong { color: #668d92; text-decoration: line-through; text-decoration-color: rgba(43,216,204,.4); }
.setup-progress-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 9px; margin-top: 7px; border-top: 1px solid rgba(82,132,143,.1); color: #506e78; font-size: 12px; }
.setup-progress-foot button { color: #6c9ba3; font-size: 12px; border: 1px solid rgba(86,145,156,.16); border-radius: 3px; padding: 2px 5px; }
.setup-progress-foot button:hover { color: var(--orange); border-color: rgba(255,180,94,.3); }
.setup-side-note { padding: 13px; }
.setup-side-note h3 { margin-top: 4px; font-size: 15px; color: #d6edef; font-weight: 550; }
.setup-side-note ol { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 5px; counter-reset: step; }
.setup-side-note li { display: flex; justify-content: space-between; gap: 7px; align-items: baseline; padding: 6px 7px; border-radius: 3px; background: rgba(8,23,34,.4); counter-increment: step; }
.setup-side-note li::before { content: "0" counter(step); font-family: var(--font-mono); font-size: 12px; color: #4f9aa0; margin-right: 4px; }
.setup-side-note li b { font-size: 12px; color: #aec9cd; font-weight: 500; margin-right: auto; }
.setup-side-note li span { font-family: var(--font-mono); font-size: 12px; color: #5f7d86; }
.setup-side-tip { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(82,132,143,.12); color: #5b7882; font-size: 12px; line-height: 1.6; }

/* ---------- System architecture / 璇锋眰閾捐矾 ---------- */
.arch-hero { display: grid; grid-template-columns: minmax(0, 1fr) 322px; align-items: stretch; gap: 16px; padding: 18px; overflow: hidden; background: radial-gradient(ellipse at 85% 20%, rgba(74,168,255,.1), transparent 48%), linear-gradient(145deg, rgba(10, 28, 40, .9), rgba(5, 16, 25, .9)); }
.arch-hero-copy h3 { margin-top: 7px; max-width: 930px; font-size: 19px; line-height: 1.45; font-weight: 560; color: #e1f7f8; }
.arch-hero-copy p { margin-top: 9px; max-width: 1050px; color: #829fa8; font-size: 12px; line-height: 1.85; }
.arch-hero-copy p b { color: #b7e7e3; font-weight: 500; }
.arch-hero-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.arch-hero-tags span { padding: 3px 7px; border-radius: 3px; border: 1px solid rgba(87, 160, 169, .19); background: rgba(43, 216, 204, .035); color: #73a1a7; font-family: var(--font-mono); font-size: 12px; }
.arch-hero-side { position: relative; padding: 14px 15px; border-radius: 7px; border: 1px solid rgba(76, 156, 167, .2); background: rgba(5, 19, 28, .64); overflow: hidden; }
.arch-hero-side::after { content: ""; position: absolute; right: -40px; bottom: -50px; width: 150px; height: 150px; border-radius: 50%; border: 1px solid rgba(43,216,204,.08); box-shadow: 0 0 0 18px rgba(43,216,204,.02), 0 0 0 36px rgba(43,216,204,.012); }
.arch-side-label { display: block; font-family: var(--font-mono); font-size: 12px; color: #4f7c86; letter-spacing: .12em; }
.arch-hero-side strong { display: block; margin-top: 7px; color: #e1faf7; font-size: 15px; font-weight: 560; }
.arch-hero-side code { display: block; margin-top: 8px; color: #75cbd0; font-family: var(--font-mono); font-size: 12px; }
.arch-section { padding: 15px 16px; margin-top: 10px; scroll-margin-top: 56px; }
.arch-map { display: grid; grid-template-columns: minmax(150px, 1fr) 36px minmax(150px, .9fr) 36px minmax(165px, 1fr) 36px minmax(170px, 1.1fr); align-items: stretch; gap: 3px; margin-top: 15px; }
.arch-map-col { padding: 10px; border: 1px solid rgba(82, 142, 154, .13); border-radius: 6px; background: rgba(8, 23, 34, .48); }
.arch-map-col.clients { border-top-color: rgba(43,216,204,.38); }
.arch-map-col.gateway { border-top-color: rgba(255,180,94,.38); }
.arch-map-col.services { border-top-color: rgba(139,140,255,.4); }
.arch-map-col.infra { border-top-color: rgba(78,214,163,.35); }
.arch-map-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: #537681; margin-bottom: 7px; }
.arch-map-item { padding: 8px 8px 7px; margin-bottom: 5px; border-radius: 4px; background: rgba(74, 128, 141, .055); border: 1px solid rgba(82, 142, 154, .08); }
.arch-map-item:last-child { margin-bottom: 0; }
.arch-map-item.major { background: rgba(139,140,255,.065); border-color: rgba(139,140,255,.18); }
.arch-map-item strong { display: block; color: #bdd8dc; font-size: 12px; font-weight: 500; white-space: nowrap; }
.arch-map-item small { display: block; margin-top: 2px; color: #5d7b85; font-size: 12px; line-height: 1.4; }
.arch-map-item span { display: block; margin-top: 4px; color: #6daeb3; font-family: var(--font-mono); font-size: 12px; }
.arch-map-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #456d77; font-size: 15px; }
.arch-map-arrow small { margin-top: 3px; font-size: 12px; letter-spacing: .04em; }
.arch-callout { margin-top: 13px; padding: 9px 11px; border-left: 2px solid rgba(43, 216, 204, .45); background: rgba(43,216,204,.04); color: #7f9fa7; font-size: 12px; line-height: 1.65; border-radius: 0 4px 4px 0; }
.arch-callout b { color: #bce4e2; font-weight: 500; }
.arch-pipeline { display: flex; align-items: stretch; overflow-x: auto; gap: 0; padding-bottom: 4px; }
.arch-pipeline.vertical { flex-direction: column; overflow: visible; }
.arch-pipeline.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; }
.arch-pipeline.grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.arch-pipeline.grid .arch-arrow { display: none; }
.arch-step { flex: 1; min-width: 148px; padding: 10px 10px 9px; border: 1px solid rgba(83, 142, 154, .13); border-top: 2px solid var(--ac); border-radius: 5px; background: linear-gradient(140deg, rgba(13, 33, 46, .65), rgba(7, 21, 31, .54)); }
.arch-step-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.arch-step-no { font-family: var(--font-mono); color: var(--ac); font-size: 12px; }
.arch-step-layer { font-size: 12px; color: #5f7c86; padding: 2px 4px; border: 1px solid rgba(91, 145, 156, .13); border-radius: 2px; white-space: nowrap; }
.arch-step h4 { margin-top: 6px; font-size: 12px; color: #c7e0e4; font-weight: 520; line-height: 1.35; }
.arch-step p { margin-top: 4px; font-size: 12px; line-height: 1.58; color: #64808a; }
.arch-step code { display: inline-block; margin-top: 7px; max-width: 100%; white-space: normal; color: #649ea5; font-family: var(--font-mono); font-size: 12px; line-height: 1.4; }
.arch-arrow { flex: 0 0 17px; width: 17px; display: flex; align-items: center; justify-content: center; color: #466b75; font-size: 13px; }
.arch-pipeline.vertical .arch-arrow { flex: 0 0 14px; height: 14px; width: auto; transform: rotate(90deg); }
.arch-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 11px; padding-top: 9px; border-top: 1px dashed rgba(82, 132, 143, .11); }
.arch-evidence > span { font-family: var(--font-mono); font-size: 12px; color: #4c707a; letter-spacing: .06em; margin-right: 3px; }
.arch-evidence code { padding: 2px 5px; border-radius: 2px; background: rgba(84, 142, 154, .07); color: #729da5; font-family: var(--font-mono); font-size: 12px; }
.arch-code-sample { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8px; margin-top: 12px; }
.arch-code-sample > div, .arch-sample-result { padding: 10px 11px; border-radius: 5px; border: 1px solid rgba(81, 142, 154, .12); background: rgba(4, 15, 23, .66); }
.arch-code-sample pre, .arch-sample-result pre { margin: 7px 0 0; color: #78adb4; font-family: var(--font-mono); font-size: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.arch-sample-result pre { color: #86c7ad; }
.arch-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.arch-two-col .arch-section { margin-top: 0; }
.arch-dataflow { display: flex; flex-direction: column; gap: 7px; }
.dataflow-item { padding: 10px 11px; border-radius: 5px; border: 1px solid rgba(83, 142, 154, .11); background: rgba(8, 23, 34, .45); }
.df-tag { display: inline-block; font-family: var(--font-mono); font-size: 12px; color: #65b1b7; }
.dataflow-item strong { display: block; margin-top: 3px; font-size: 12px; color: #bdd9dd; font-weight: 500; }
.dataflow-item p { margin-top: 3px; font-size: 12px; line-height: 1.55; color: #5d7b85; }
.arch-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.arch-module { padding: 9px 10px; border-radius: 4px; border: 1px solid rgba(83, 142, 154, .11); background: rgba(8, 23, 34, .4); }
.arch-module strong { display: block; color: #a9d5d7; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.arch-module p { margin-top: 3px; color: #5e7a84; font-size: 12px; line-height: 1.5; }
.arch-module code { display: block; margin-top: 4px; color: #5d969d; font-family: var(--font-mono); font-size: 12px; }
.arch-auth-list { display: flex; flex-direction: column; gap: 8px; }
.arch-auth-list > div { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px dashed rgba(82, 132, 143, .1); }
.arch-auth-list > div:last-child { border-bottom: 0; }
.auth-no { width: 17px; height: 17px; flex: 0 0 17px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(43,216,204,.28); color: #64d8d1; font-family: var(--font-mono); font-size: 12px; }
.arch-auth-list strong { display: block; color: #bdd7db; font-size: 12px; font-weight: 500; }
.arch-auth-list p { margin-top: 3px; color: #5e7b85; font-size: 12px; line-height: 1.55; }
.arch-auth-list code { color: #78a9af; font-family: var(--font-mono); font-size: 12px; }
.arch-port-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.arch-port-card { padding: 10px; border-radius: 5px; border: 1px solid rgba(84, 142, 154, .12); background: rgba(8, 23, 34, .43); }
.arch-port-card.hot { border-color: rgba(43, 216, 204, .25); background: rgba(43,216,204,.045); }
.arch-port-card > span { display: block; font-size: 12px; color: #5d7b85; }
.arch-port-card strong { display: block; margin-top: 4px; color: #c7e3e5; font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.arch-port-card p { margin-top: 2px; color: #6b929a; font-family: var(--font-mono); font-size: 12px; }
.arch-port-card code { display: block; margin-top: 6px; padding-top: 5px; border-top: 1px dashed rgba(82,132,143,.1); color: #55757f; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; }
.arch-table-wrap { overflow-x: auto; }
.arch-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.arch-table th { height: 31px; padding: 0 9px; text-align: left; border-bottom: 1px solid rgba(79, 130, 142, .12); color: #5d7a85; font-size: 12px; font-weight: 500; background: rgba(5, 17, 26, .4); }
.arch-table td { min-height: 38px; padding: 8px 9px; border-bottom: 1px solid rgba(76, 126, 138, .07); color: #849fa7; font-size: 12px; line-height: 1.5; }
.arch-table td strong { color: #b6d1d6; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.arch-table td code { font-family: var(--font-mono); color: #6baab0; font-size: 12px; }
.arch-prefix { display: block; color: #5a7b85; font-family: var(--font-mono); font-size: 12px; }
.arch-evidence-cell { max-width: 215px; white-space: normal !important; color: #55727c !important; font-family: var(--font-mono); font-size: 12px !important; }
.arch-source-grid { display: flex; flex-direction: column; gap: 5px; }
.arch-source-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 10px; padding: 7px 9px; border-radius: 4px; background: rgba(79, 131, 143, .04); border-left: 2px solid rgba(84, 160, 167, .25); }
.arch-source-row span { color: #78969f; font-size: 12px; }
.arch-source-row code { color: #5f9198; font-family: var(--font-mono); font-size: 12px; white-space: normal; word-break: break-word; }
.arch-caveat { margin-top: 13px; padding: 9px 11px; border: 1px dashed rgba(255, 180, 94, .25); border-radius: 4px; color: #8c7f6b; font-size: 12px; line-height: 1.7; background: rgba(255,180,94,.025); }
.arch-caveat b { color: #d4b181; font-weight: 500; }

/* ---------- WMS Academy responsive ---------- */
@media (max-width: 1100px) {
  .learn-story-grid { grid-template-columns: 1fr; }
  .learn-object-card { max-width: none; }
  .glossary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .learn-finish { flex-wrap: wrap; }
  .finish-actions { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .learn-principles { grid-template-columns: 1fr; }
  .learn-principle { min-height: 0; padding-bottom: 42px; }
  .learn-two-col, .learn-two-wide { grid-template-columns: 1fr; }
  .concept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .learn-section { padding: 12px 11px; }
  .learn-section-head { flex-direction: column; gap: 5px; }
  .flow-row { grid-template-columns: 1fr; }
  .flow-row-label::after { display: none; }
  .flow-row-label { display: flex; align-items: baseline; gap: 7px; padding-top: 0; }
  .flow-row-label small { margin-top: 0; }
  .concept-grid, .glossary-grid { grid-template-columns: 1fr 1fr; }
  .learn-kpi-grid { grid-template-columns: 1fr 1fr; }
  .site-checklist, .pitfall-list { grid-template-columns: 1fr; }
  .story-item { grid-template-columns: 36px 20px minmax(0, 1fr); gap: 5px; }
  .learn-finish { padding: 14px; }
  .finish-steps { display: none; }
  .learn-finish { flex-direction: column; align-items: flex-start; }
  .learn-source { font-size: 12px; }
}

/* ---------- System architecture responsive ---------- */
@media (max-width: 1300px) {
  .arch-hero { grid-template-columns: minmax(0, 1fr) 280px; }
  .arch-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .arch-map-arrow { display: none; }
  .arch-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .arch-hero { grid-template-columns: 1fr; }
  .arch-two-col { grid-template-columns: 1fr; }
  .arch-code-sample { grid-template-columns: 1fr; }
  .arch-pipeline.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch-map { grid-template-columns: 1fr 1fr; }
  .arch-source-row { grid-template-columns: 1fr; gap: 3px; }
}
@media (max-width: 620px) {
  .arch-hero { padding: 13px; }
  .arch-hero-copy h3 { font-size: 16px; }
  .arch-map, .arch-port-grid, .arch-module-grid, .arch-pipeline.grid { grid-template-columns: 1fr; }
  .arch-section { padding: 12px 11px; }
  .arch-step { min-width: 205px; }
}

/* ---------- Getting started responsive ---------- */
@media (max-width: 1300px) {
  .setup-hero { grid-template-columns: 1fr; }
  .setup-map-root { min-height: 150px; }
  .setup-env-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-ready-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .setup-branch-grid { grid-template-columns: 1fr 1fr; }
  .setup-maven-steps { grid-template-columns: 1fr; }
  .setup-maven-grid { grid-template-columns: 1fr; }
  .setup-trouble-grid { grid-template-columns: 1fr; }
  .setup-ready-grid .setup-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .setup-branch-grid, .setup-env-grid { grid-template-columns: 1fr; }
  .setup-android-card { align-items: flex-start; flex-direction: column; }
  .setup-flow-step { min-width: 225px; }
  .setup-anchor-row { font-size: 12px; }
  .setup-progress-ring { width: 68px; height: 68px; flex-basis: 68px; }
}

/* ============================================================
   Readability pass
   缁熶竴鐨勫瓧鍙锋彁鍗囷細鎶婅繃瀵嗙殑鎺у埗鍙板皬瀛楁彁鍗囧埌鍙鍖洪棿
   ============================================================ */
body { font-size: 16px; }
.nav-label { font-size: 12px; }
.nav-text { font-size: 15.5px; }
.nav-badge { font-size: 12px; height: 18px; }
.crumb { font-size: 13.5px; }
.shift { font-size: 12.5px; }
.global-search span { font-size: 13px; }
.top-clock strong { font-size: 16px; }
.top-clock small { font-size: 12px; }
.site-copy strong { font-size: 14px; }
.site-copy small { font-size: 12px; }
.site-select strong { font-size: 12px; }
.site-select small { font-size: 12px; }
.health-head { font-size: 12px; }
.health-head em { font-size: 12px; }
.integration-list span { font-size: 12px; }
.health-meta { font-size: 12px; }
.user-copy strong { font-size: 13.5px; }
.user-copy small { font-size: 12px; }

.page-heading h1 { font-size: 29px; }
.page-heading p { font-size: 13.5px; line-height: 1.6; }
.eyebrow { font-size: 12px; }
.sync-state small { font-size: 12px; }
.sync-state strong { font-size: 12px; }
.btn { height: 33px; padding: 0 12px; font-size: 13px; }
.btn svg { width: 14px; height: 14px; }
.btn-sm { height: 29px; font-size: 12px; padding: 0 10px; }
.inner-head h2 { font-size: 25px; }
.inner-head p { font-size: 13.5px; line-height: 1.6; }

.kpi-label { font-size: 13px; gap: 8px; }
.kpi-icon { width: 24px; height: 24px; }
.kpi-icon svg { width: 13px; height: 13px; }
.kpi-trend { font-size: 12px; }
.kpi-value strong { font-size: 26px; }
.kpi-value span { font-size: 12px; }
.kpi-sub { font-size: 12px; }
.kpi-foot { font-size: 12px; }
.panel-head h3 { font-size: 15px; }
.panel-eyebrow { font-size: 12px; }
.occupancy-total strong { font-size: 20px; }
.occupancy-total span { font-size: 12px; }
.occupancy-copy p, .occupancy-note { font-size: 12px; }
.donut-center strong { font-size: 24px; }
.donut-center strong em { font-size: 13px; }
.donut-center span { font-size: 12px; }
.donut-center small { font-size: 12px; }
.zone-name, .zone-value { font-size: 12px; }
.zone-row { grid-template-columns: 66px 1fr 36px; }
.task-total strong { font-size: 26px; }
.task-total > span, .task-total em { font-size: 12px; }
.task-progress-row { grid-template-columns: 66px 1fr 48px; }
.task-progress-row > span, .task-progress-row > em { font-size: 12px; }
.task-legend { font-size: 12px; gap: 7px; }
.alert-copy strong { font-size: 12px; }
.alert-copy span { font-size: 12px; }
.alert-time { font-size: 12px; }
.alert-level { width: 17px; height: 17px; flex-basis: 17px; font-size: 12px; }
.activity-time { flex-basis: 42px; font-size: 12px; }
.activity-text { font-size: 12px; }

.stage-kicker { font-size: 12px; }
.stage-title { font-size: 12.5px; }
.stage-live { font-size: 12px; }
.view-btn { height: 26px; font-size: 12px; padding: 0 9px; }
.day-start-copy strong { font-size: 12px; }
.day-start-copy small { font-size: 12px; }
.scene-label-copy b, .scene-label-copy em { font-size: 12px; }
.scene-label { padding: 5px 8px; }
.scene-legend { font-size: 12px; gap: 9px; }
.process-head span { font-size: 12px; }
.process-head em { font-size: 12px; }
.process-step strong { font-size: 12px; }
.process-step small { font-size: 12px; }
.scene-hint { font-size: 12px; }
.scene-footer { font-size: 12px; }
.selection-top small { font-size: 12px; }
.selection-top h3 { font-size: 15px; }
.selection-top p { font-size: 12px; }
.selection-stat span { font-size: 12px; }
.selection-stat strong { font-size: 16px; }
.selection-sku { font-size: 12px; }
.selection-footer > span, .text-btn { font-size: 12px; }

.metric-card small { font-size: 12px; }
.metric-value strong { font-size: 24px; }
.metric-value em { font-size: 12px; }
.metric-foot { font-size: 12px; line-height: 1.45; }
.panel-head-lg h3 { font-size: 15.5px; }
.panel-head-lg p { font-size: 12px; line-height: 1.5; }
.filter-input, .filter-select { height: 30px; font-size: 12.5px; }
.chip { height: 26px; font-size: 12px; padding: 0 9px; }
.data-table th { height: 36px; font-size: 12px; }
.data-table td { height: 44px; font-size: 13px; line-height: 1.5; }
.data-table .num { font-size: 12.5px; }
.data-table .id { font-size: 12px; }
.pill { height: 20px; font-size: 12px; padding: 0 7px; }
.progress-cell .p-track { width: 66px; height: 4px; }
.progress-cell span { font-size: 12px; }
.table-footer { font-size: 12px; padding: 10px 12px; }
.pager button { width: 24px; height: 24px; font-size: 12px; }
.dock-supplier { font-size: 12px; }
.dock-plate { font-size: 12px; }
.dock-eta { font-size: 12px; }
.dock-meta { font-size: 12px; }
.dock-status { font-size: 12px; padding: 2px 6px; }
.ip-label { font-size: 12px; }
.ip-note { font-size: 12px; }
.kanban-title { font-size: 13px; }
.task-card h4 { font-size: 13px; }
.task-id { font-size: 12px; }
.task-priority { font-size: 12px; }
.task-card-meta { font-size: 12px; }
.task-card-foot { font-size: 12px; }
.task-type-tag { font-size: 12px; }
.chart-legend span { font-size: 12px; }
.chart-axis { font-size: 12px; }
.device-name { font-size: 16px; }
.device-model { font-size: 12px; }
.device-type { font-size: 12px; }
.device-status { font-size: 12px; }
.device-stat small { font-size: 12px; }
.device-stat strong { font-size: 12px; }
.device-task { font-size: 12px; }
.alert-copy strong { font-size: 12px; }
.alert-copy span { font-size: 12px; }
.top-list-row .top-name { font-size: 12px; }
.top-qty, .top-rate { font-size: 12px; }
.small-stat small { font-size: 12px; }
.small-stat strong { font-size: 17px; }
.small-stat em { font-size: 12px; }
.setting-copy strong { font-size: 12px; }
.setting-copy small { font-size: 12px; }
.integration-name { font-size: 13px; }
.integration-desc { font-size: 12px; }
.integration-latency { font-size: 12px; }

.learn-principle h3 { font-size: 16px; }
.learn-principle p { font-size: 13.2px; line-height: 1.75; }
.learn-principle footer { font-size: 12px; }
.learn-section-head h3 { font-size: 16.5px; }
.learn-section-head p { font-size: 12px; line-height: 1.55; }
.learn-note { font-size: 12px; }
.flow-row-label span { font-size: 12px; }
.flow-row-label small { font-size: 12px; }
.flow-node strong { font-size: 12px; }
.flow-node small { font-size: 12px; }
.flow-index { font-size: 12px; }
.learn-callout { font-size: 12px; }
.story-title strong { font-size: 13px; }
.story-copy p { font-size: 12px; }
.story-copy code { font-size: 12px; }
.story-time { font-size: 12px; }
.object-sub { font-size: 12px; }
.object-grid dt { font-size: 12px; }
.object-grid dd { font-size: 12px; }
.object-batch strong { font-size: 13px; }
.object-batch small, .object-lesson { font-size: 12px; }
.concept-card h4 { font-size: 13.5px; }
.concept-card p { font-size: 12px; line-height: 1.6; }
.doc-chip { font-size: 12px; }
.doc-group-head small { font-size: 12px; }
.day-item strong { font-size: 12px; }
.day-item p { font-size: 12px; }
.site-checklist strong { font-size: 12px; }
.site-checklist p { font-size: 12px; }
.pitfall-item strong { font-size: 12px; }
.pitfall-item p { font-size: 12px; }
.learn-kpi strong { font-size: 12px; }
.learn-kpi code { font-size: 12px; }
.learn-kpi p { font-size: 12px; }
.glossary-item strong { font-size: 12px; }
.glossary-item p { font-size: 12px; }

.arch-step { min-width: 166px; }
.arch-step h4 { font-size: 12.2px; }
.arch-step p { font-size: 12px; line-height: 1.6; }
.arch-step code { font-size: 12px; }
.arch-step-layer { font-size: 12px; }
.arch-step-no { font-size: 12px; }
.arch-map-item strong { font-size: 12.5px; }
.arch-map-item small { font-size: 12px; }
.arch-map-item span { font-size: 12px; }
.arch-map-title { font-size: 12px; }
.arch-hero-copy p { font-size: 12.5px; }
.arch-code-sample pre, .arch-sample-result pre { font-size: 12px; }
.arch-evidence > span { font-size: 12px; }
.arch-evidence code { font-size: 12px; }
.arch-table th { font-size: 12px; }
.arch-table td { font-size: 12px; }
.arch-table td strong { font-size: 12px; }
.arch-table td code { font-size: 12px; }
.arch-evidence-cell { font-size: 12px !important; }
.arch-source-row span { font-size: 12px; }
.arch-source-row code { font-size: 12px; }
.arch-caveat { font-size: 12px; }
.arch-auth-list strong { font-size: 12px; }
.arch-auth-list p { font-size: 12px; }
.arch-port-card > span { font-size: 12px; }
.arch-port-card p { font-size: 12px; }
.arch-port-card code { font-size: 12px; }
.arch-module strong { font-size: 12px; }
.arch-module p { font-size: 12px; }
.arch-module code { font-size: 12px; }

.setup-root-kicker { font-size: 12px; }
.setup-map-root p { font-size: 12.2px; }
.setup-root-badge { font-size: 12px; }
.setup-branch-head strong { font-size: 14px; }
.setup-branch-head em { font-size: 12px; }
.setup-branch-summary { font-size: 12px; }
.setup-branch li { font-size: 12px; line-height: 1.55; }
.setup-anchor-row { font-size: 12px; gap: 6px 12px; }
.setup-env-top span { font-size: 12px; }
.setup-env-top em { font-size: 12px; }
.setup-env h4 { font-size: 15px; }
.setup-env p { font-size: 12px; line-height: 1.6; }
.setup-env code { font-size: 12px; padding: 3px 5px; }
.setup-mini-callout { font-size: 12px; }
.setup-flow-step strong { font-size: 12.5px; }
.setup-flow-step p { font-size: 12px; line-height: 1.55; }
.setup-flow-step code { font-size: 12px; }
.setup-code-head { font-size: 12px; }
.setup-code-block pre { font-size: 12px; line-height: 1.75; }
.setup-maven-steps strong { font-size: 12.5px; }
.setup-maven-steps p { font-size: 12px; line-height: 1.6; }
.setup-maven-steps code { font-size: 12px; }
.setup-note-line b { font-size: 12px; }
.setup-note-line code { font-size: 12px; }
.setup-warning { font-size: 12px; }
.setup-android-card h4 { font-size: 13px; }
.setup-android-card p { font-size: 12px; line-height: 1.65; }
.setup-inline-code { font-size: 12px; }
.setup-trouble strong { font-size: 12px; }
.setup-trouble p { font-size: 12px; line-height: 1.6; }
.setup-progress-top h3 { font-size: 15px; }
.setup-progress-top p { font-size: 12px; }
.setup-check strong { font-size: 12px; }
.setup-check small { font-size: 12px; line-height: 1.4; }
.setup-check em { font-size: 12px; }
.setup-progress-foot { font-size: 12px; }
.setup-side-note li b { font-size: 12px; }
.setup-side-note li span { font-size: 12px; }
.setup-side-tip { font-size: 12px; }
.setup-android-card { gap: 18px; }

@media (max-width: 780px) {
  .kpi-value strong { font-size: 23px; }
  .kpi-label { font-size: 12.5px; }
  .kpi-foot { font-size: 12px; }
  .page-heading h1 { font-size: 24px; }
  .inner-head h2 { font-size: 22px; }
  .data-table td { font-size: 12px; }
  .data-table th { font-size: 12px; }
  .arch-step { min-width: 220px; }
  .setup-env h4 { font-size: 14px; }
}

/* Readability pass 2: long-form content should read like a document, not micro UI */
.setup-branch-head strong { font-size: 15px; }
.setup-branch-head em { font-size: 12px; }
.setup-branch-summary { font-size: 12.5px; }
.setup-branch li { font-size: 12.2px; line-height: 1.6; }
.setup-env h4 { font-size: 16px; }
.setup-env p { font-size: 12.4px; line-height: 1.65; }
.setup-env code { font-size: 12px; }
.setup-flow-step strong { font-size: 13.5px; }
.setup-flow-step p { font-size: 12px; line-height: 1.65; }
.setup-flow-step code { font-size: 12px; }
.setup-code-block pre { font-size: 12px; line-height: 1.8; }
.setup-maven-steps strong { font-size: 13.5px; }
.setup-maven-steps p { font-size: 12px; line-height: 1.65; }
.setup-maven-steps code { font-size: 12px; }
.setup-android-card h4 { font-size: 14px; line-height: 1.55; }
.setup-android-card p { font-size: 12px; line-height: 1.7; }
.setup-inline-code { font-size: 12px; }
.setup-trouble strong { font-size: 12.8px; }
.setup-trouble p { font-size: 12px; line-height: 1.65; }
.setup-check strong { font-size: 13px; }
.setup-check small { font-size: 12px; }
.setup-check em { font-size: 12px; }
.setup-progress-top p { font-size: 12.5px; }
.setup-progress-foot { font-size: 12px; }
.setup-side-note li b { font-size: 12.5px; }
.setup-side-note li span { font-size: 12px; }
.setup-side-tip { font-size: 12px; }
.learn-principle p { font-size: 14px; line-height: 1.8; }
.learn-section-head p { font-size: 12.8px; }
.flow-node small { font-size: 12px; }
.story-copy p { font-size: 12px; }
.concept-card p { font-size: 12px; line-height: 1.7; }
.glossary-item p { font-size: 12px; line-height: 1.65; }
.arch-step h4 { font-size: 13px; }
.arch-step p { font-size: 12px; line-height: 1.65; }
.arch-step code { font-size: 12px; }
.arch-map-item strong { font-size: 13px; }
.arch-map-item small { font-size: 12px; line-height: 1.5; }
.arch-code-sample pre, .arch-sample-result pre { font-size: 12px; }
.arch-auth-list strong { font-size: 12.2px; }
.arch-auth-list p { font-size: 12px; }
.arch-table td { font-size: 12px; }
.arch-table td strong { font-size: 12px; }
.arch-table td code { font-size: 12px; }
.arch-module p { font-size: 12px; }
.arch-module code { font-size: 12px; }
.data-table td { font-size: 13.4px; }
.data-table th { font-size: 12.2px; }
.data-table .num { font-size: 13px; }
.data-table .id { font-size: 12.5px; }
.panel-head-lg p { font-size: 12px; }
.metric-foot { font-size: 12px; }
 .selection-sku { font-size: 12px; }

@media (max-width: 780px) {
  .setup-branch li { font-size: 12.5px; }
  .setup-env p { font-size: 12.2px; }
  .arch-step { min-width: 230px; }
}

/* Minimum 10px typography: give fixed-height controls room to breathe */
.kpi-card { height: 116px; }
.kpi-foot { bottom: 6px; line-height: 1.25; }
.kpi-sub { line-height: 1.25; }
.pill { height: 22px; padding: 0 8px; }
.nav-badge { height: 20px; padding: 0 6px; }
.alert-level { width: 19px; height: 19px; flex-basis: 19px; }
.top-rank { width: 19px; height: 19px; }
.pitfall-item > span { width: 19px; height: 19px; flex-basis: 19px; }
.story-node i { width: 23px; height: 23px; }
@media (max-height: 820px) and (min-width: 1021px) {
  .kpi-card { height: 98px; }
  .kpi-sub { line-height: 1.2; }
  .kpi-foot { display: none; }
}

/* Minimum 10px typography: mobile card fit */
@media (max-width: 780px) {
  .kpi-card { height: 110px; padding-top: 12px; }
  .kpi-spark { display: none; }
  .kpi-foot { display: none; }
  .kpi-sub { font-size: 12px; }
  .metric-card { height: auto; min-height: 94px; }
}

/* Keep the 10px-minimum layout from creating a 1px mobile scrollbar */
html, body { overflow-x: hidden; }

/* ---------- Process flow / 业务流程图 ---------- */
.flow-source-panel { padding: 15px 16px; margin-top: 10px; }
.flow-source-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.flow-source-head h3 { margin-top: 4px; font-size: 16px; line-height: 1.4; color: #dff2f4; font-weight: 560; }
.flow-source-tag { flex: 0 0 auto; padding: 4px 7px; border: 1px solid rgba(43,216,204,.22); border-radius: 4px; color: var(--cyan); font-family: var(--font-mono); font-size: 12px; }
.flow-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.source-card { padding: 11px 12px; border: 1px solid rgba(83,142,154,.14); border-radius: 6px; background: rgba(7,22,32,.46); border-top: 2px solid var(--source-ac, var(--cyan)); }
.source-card:nth-child(1) { --source-ac: #ffb45e; }
.source-card:nth-child(2) { --source-ac: #4aa8ff; }
.source-card:nth-child(3) { --source-ac: #8b8cff; }
.source-card-tag { color: var(--source-ac); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.source-card strong { display: block; margin-top: 5px; color: #c9e2e5; font-size: 13px; line-height: 1.5; font-weight: 550; }
.source-card p { margin-top: 4px; color: #69858e; font-size: 12px; line-height: 1.6; }
.source-doc { margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(83,142,154,.14); color: #78aeb2; font-family: var(--font-mono); font-size: 12px; }
.flow-source-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 4px; background: rgba(43,216,204,.045); color: #75939a; font-size: 12px; }
.flow-source-foot strong { color: #9ee8df; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.flow-source-foot span:last-child { margin-left: auto; color: #5b7a83; }

.flow-panel { padding: 14px 16px 12px; margin-top: 10px; }
.flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.flow-filters { display: flex; align-items: center; gap: 4px; }
.flow-filter { height: 28px; padding: 0 10px; border: 1px solid rgba(81,142,153,.17); border-radius: 4px; color: #77949d; font-size: 12px; transition: .18s; }
.flow-filter:hover { color: #d6f1f1; border-color: rgba(43,216,204,.4); }
.flow-filter.active { color: #062421; background: var(--cyan); border-color: var(--cyan); font-weight: 600; }
.flow-legend { display: flex; align-items: center; gap: 10px; color: #735f4a; font-size: 12px; }
.flow-legend span { display: flex; align-items: center; gap: 4px; }
.flow-dot { width: 6px; height: 6px; border-radius: 2px; display: inline-block; }
.flow-dot.in { background: #f2ad50; }
.flow-dot.out { background: #55c5e6; }
.flow-dot.reverse { background: #e67b91; }
.flow-dot.branch { background: #91a8b0; border-radius: 50%; }
.flow-canvas { overflow: auto; border: 1px solid rgba(76,137,148,.16); border-radius: 7px; background: linear-gradient(145deg, rgba(4,15,23,.72), rgba(8,24,33,.52)); padding: 7px; }
.flow-canvas svg { display: block; width: 100%; min-width: 1480px; height: auto; }
.flow-lane-bg { fill: rgba(8,23,33,.46); stroke: rgba(81,143,154,.18); stroke-width: 1; }
.flow-lane.lane-in .flow-lane-bg { fill: rgba(73, 47, 24, .26); stroke: rgba(255,180,94,.22); }
.flow-lane.lane-out .flow-lane-bg { fill: rgba(14, 41, 55, .34); stroke: rgba(74,168,255,.2); }
.flow-lane.lane-reverse .flow-lane-bg { fill: rgba(53, 23, 34, .28); stroke: rgba(230,123,145,.22); }
.flow-lane-label { fill: #b8d6d9; font-family: var(--font-mono); font-size: 15px; font-weight: 600; letter-spacing: .05em; }
.flow-lane-label tspan { fill: #5c8791; font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.flow-lane.lane-in .flow-lane-label { fill: #f3c27c; }
.flow-lane.lane-out .flow-lane-label { fill: #8fd8ef; }
.flow-lane.lane-reverse .flow-lane-label { fill: #f1a1b0; }
.flow-node { cursor: pointer; outline: none; }
.flow-node-box { fill: rgba(8, 25, 35, .9); stroke-width: 1.5; transition: fill .18s, stroke .18s, filter .18s; }
.flow-node.lane-in .flow-node-box { stroke: rgba(242,173,80,.48); }
.flow-node.lane-out .flow-node-box { stroke: rgba(85,197,230,.48); }
.flow-node.lane-reverse .flow-node-box { stroke: rgba(230,123,145,.5); }
.flow-node:hover .flow-node-box { fill: rgba(17, 50, 58, .98); filter: drop-shadow(0 0 7px rgba(43,216,204,.18)); }
.flow-node.active .flow-node-box { fill: rgba(25, 74, 77, .96); stroke: var(--cyan); stroke-width: 2.2; filter: drop-shadow(0 0 9px rgba(43,216,204,.3)); }
.flow-node-no { fill: #7ba3aa; font-family: var(--font-mono); font-size: 12px; }
.flow-node-title { fill: #d5eaec; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 15px; font-weight: 600; }
.flow-node-sub { fill: #62858e; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.flow-node.lane-in .flow-node-title { fill: #f7d39a; }
.flow-node.lane-out .flow-node-title { fill: #b6e9f5; }
.flow-node.lane-reverse .flow-node-title { fill: #f5c1cb; }
.flow-arrow { fill: none; stroke: #5f8e98; stroke-width: 1.8; }
.flow-cross { stroke-dasharray: 5 5; stroke: #70b8b4; }
.flow-cross-label { fill: #6c9ca2; font-family: var(--font-mono); font-size: 12px; }
.flow-branch-label { fill: #a77d8b; font-family: var(--font-mono); font-size: 12px; }
.flow-lane-note { fill: #6f858e; font-size: 12px; }
.flow-canvas[data-filter="in"] .flow-lane:not(.lane-in),
.flow-canvas[data-filter="out"] .flow-lane:not(.lane-out),
.flow-canvas[data-filter="reverse"] .flow-lane:not(.lane-reverse) { opacity: .14; pointer-events: none; }
.flow-canvas[data-filter="in"] .flow-cross,
.flow-canvas[data-filter="in"] .flow-cross-label,
.flow-canvas[data-filter="out"] .flow-cross { opacity: .15; }
.flow-inspector { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(76,137,148,.14); border-radius: 6px; background: rgba(7,21,31,.5); }
.flow-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-inspector-head em { color: var(--cyan); font-family: var(--font-mono); font-size: 12px; font-style: normal; }
.flow-inspector h3 { margin-top: 5px; color: #d8eff0; font-size: 15px; font-weight: 560; }
.flow-inspector p { margin-top: 4px; color: #7f9ba3; font-size: 12px; line-height: 1.6; }
.flow-inspector-meta { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; padding-top: 7px; border-top: 1px dashed rgba(81,142,153,.14); font-size: 12px; }
.flow-inspector-meta span { color: #5e7d86; flex: 0 0 auto; }
.flow-inspector-meta strong { color: #8fc5c9; font-family: var(--font-mono); font-size: 12px; font-weight: 500; }

@media (max-width: 900px) {
  .flow-source-grid { grid-template-columns: 1fr; }
  .flow-source-foot { flex-wrap: wrap; }
  .flow-source-foot span:last-child { margin-left: 0; }
  .flow-toolbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 780px) {
  .flow-source-panel, .flow-panel { padding: 12px 11px; }
  .flow-source-head { flex-direction: column; gap: 5px; }
  .flow-filters { flex-wrap: wrap; }
  .flow-canvas { margin-top: 2px; }
  .flow-inspector-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* ---------- Typography weight normalization ----------
   Small Chinese text at 500+ often synthesizes into blurry bold glyphs. */
body {
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
strong, b { font-weight: 500 !important; }
h1, h2, h3, h4, h5, h6 { font-weight: 500; }
.page-heading h1, .inner-head h2 { font-weight: 600 !important; }
.brand-word strong { font-weight: 600 !important; }
.btn, .view-btn, .flow-filter { font-weight: 500; }
.view-btn.active, .flow-filter.active { font-weight: 500 !important; }
.panel-head h3, .panel-head-lg h3, .selection-top h3, .business-term-card h3, .flow-inspector h3 { font-weight: 500 !important; }
.flow-node-title { font-weight: 300 !important; }
.flow-lane-label { font-weight: 500 !important; }
.flow-node-sub { fill: #a5c5c9 !important; }
.source-card p { color: #a9c1c6; }
.source-card strong { color: #e0f3f4; }
.flow-inspector p { color: #b3cdd0; }
.flow-lane-note { fill: #9ab0b6; }
.flow-source-foot { color: #94aeb3; }

/* Chart labels: use the normal sans stack instead of dense monospace; keep them light */
.chart-axis {
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .015em;
  fill: #96b4bb;
  font-synthesis: none;
}
.chart-legend span { color: #9bb5bb; font-weight: 400; }
.h-bar-label span, .h-bar-label strong { font-family: var(--font); font-weight: 400 !important; }
.h-bar-label strong { color: #c0dfe3; }

/* Chart text: slightly larger but lighter, so it reads as data rather than bold copy */
.chart-axis {
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 300;
  letter-spacing: .025em;
  fill: #a2bdc3;
}
.chart-legend span { font-size: 12.5px; font-weight: 400; color: #a5bec4; }
.h-bar-label span, .h-bar-label strong { font-size: 12.5px; font-weight: 400 !important; }

/* Keep semantic labels readable; reserve true weight for primary numbers and page titles */
strong, b { font-weight: 400 !important; }
.kpi-value strong, .metric-value strong, .donut-center strong, .task-total strong,
.small-stat strong, .selection-stat strong, .detail-item strong, .device-name,
.business-term-card h3 { font-weight: 500 !important; }

/* Final chart readability: default UI sans, normal weight, slightly larger */
.chart-axis {
  font-family: "Microsoft YaHei", "PingFang SC", "HarmonyOS Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .04em;
  fill: #b4cbd0;
}

/* Setup page: run-mode tabs */
.setup-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  border-bottom: 1px solid rgba(83, 142, 154, .16);
}
.setup-mode-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 8px 10px;
  color: #69868f;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.setup-mode-tab:hover { color: #b8e7e2; }
.setup-mode-tab.active {
  color: #bce5e2;
  border-bottom-color: #2bd8cc;
  background: rgba(43, 216, 204, .05);
}
.setup-mode-panel { display: none; padding-top: 10px; }
.setup-mode-panel.active { display: block; }


/* Logs page: example screenshot gallery + lightbox */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 12px; }
.shot-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 23, 35, .72);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.shot-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 0, 0, .38); }
.shot-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0b1420; border-bottom: 1px solid var(--line); }
.shot-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot-meta { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px 10px; }
.shot-title { font-size: 13.5px; color: #cfe4e6; letter-spacing: .02em; }
.shot-meta small { font-size: 12px; color: var(--muted); line-height: 1.55; }

body.shot-lock { overflow: hidden; }
.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px 76px 58px;
  background: rgba(3, 8, 14, .93);
  backdrop-filter: blur(4px);
}
.shot-lightbox.open { display: flex; }
.shot-lb-figure { margin: 0; max-width: min(1500px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.shot-lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 8px;
  border: 1px solid rgba(120, 180, 190, .25);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
  background: #fff;
}
.shot-lb-figure figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: center; text-align: center; }
.shot-lb-title { color: #e6f3f4; font-size: 14.5px; }
.shot-lb-desc { color: #8fb0b6; font-size: 13px; }
.shot-lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 13px; letter-spacing: .18em; color: #8fb0b6; }
.shot-lb-nav, .shot-lb-close {
  appearance: none;
  position: absolute;
  border: 1px solid rgba(120, 180, 190, .3);
  background: rgba(9, 23, 35, .78);
  color: #d9f1f2;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.shot-lb-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 66px; border-radius: 10px; font-size: 30px; line-height: 1; padding-bottom: 4px; }
.shot-lb-nav.prev { left: 14px; }
.shot-lb-nav.next { right: 14px; }
.shot-lb-close { top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1; }
.shot-lb-nav:hover, .shot-lb-close:hover { background: rgba(43, 216, 204, .16); border-color: rgba(43, 216, 204, .5); color: #fff; }
@media (max-width: 720px) {
  .shot-lightbox { padding: 20px 10px 52px; }
  .shot-lb-nav { top: auto; bottom: 12px; transform: none; width: 38px; height: 54px; font-size: 24px; }
  .shot-lb-nav.prev { left: 12px; }
  .shot-lb-nav.next { right: 12px; }
  .shot-lb-count { bottom: 30px; }
  .shot-lb-figure img { max-height: calc(100vh - 190px); }
  .shot-lb-figure figcaption { padding: 0 12px; }
}

/* Sidebar stays compact: the reading-size bump applies to content, not nav chrome */
.brand-word small,
.site-copy small,
.site-live,
.nav-label,
.nav-badge,
.health-head,
.health-head em,
.integration-list span,
.health-meta,
.user-copy small { font-size: 10px; }
.site-copy strong { font-size: 12px; }
.nav-text { font-size: 13.5px; }
.user-copy strong { font-size: 11.5px; }
