.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 284px;
  padding: 27px 18px 17px;
  overflow-y: auto;
  border-right: 1px solid #ffffff0b;
  background:
    radial-gradient(ellipse at 4% 0%, #7772e51c, transparent 20rem),
    linear-gradient(180deg, #131b2b 0%, #101725 100%);
  color: #f4f6ff;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; color: #f4f6ff; text-decoration: none; }
.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #aaa6ff55;
  border-radius: 14px;
  background: linear-gradient(145deg, #8b83ff, #514bd1);
  box-shadow: 0 7px 20px #514bd13b;
}
.brand-mark i { position: absolute; width: 6px; height: 6px; border-radius: 2px; background: #171b31; }
.brand-mark i:nth-child(1) { transform: translate(-7px, -6px); }
.brand-mark i:nth-child(2) { transform: translate(2px, -6px); }
.brand-mark i:nth-child(3) { transform: translate(-7px, 4px); }
.brand-mark i:nth-child(4) { width: 6px; height: 16px; transform: translate(2px, 1px); }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 18px; font-weight: 800; letter-spacing: -.045em; }
.brand-copy strong span { color: #9f9aff; }
.brand-copy small { margin-top: 2px; color: #8390a6; font: 10px var(--mono); letter-spacing: .16em; }

.node-card {
  margin: 29px 1px 29px;
  padding: 15px 14px 14px;
  border: 1px solid #ffffff12;
  border-radius: 15px;
  background: linear-gradient(145deg, #1b273b, #172133);
  box-shadow: inset 0 1px #ffffff08;
}
.node-top { display: flex; align-items: center; gap: 8px; color: #93a0b5; font: 10px var(--mono); letter-spacing: .12em; }
.node-pulse, .controller-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #54d6c1; box-shadow: 0 0 0 4px #54d6c119; }
.node-live { margin-left: auto; color: #7ae1d1; font: 10px var(--mono); }
.node-card > strong { display: block; margin-top: 12px; overflow: hidden; color: #f6f8ff; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.node-card > small { display: block; margin-top: 2px; color: #8d9ab0; font-size: 12px; }
.node-select { width: 100%; margin-top: 13px; padding: 8px 9px; border: 1px solid #ffffff1c; border-radius: 8px; outline: none; background: #111c2c; color: #f3f5fc; font: 12px var(--sans); }
.node-select:focus { border-color: #9d99ff; box-shadow: 0 0 0 3px #9d99ff24; }
.node-select option { background: #182338; color: #f3f5fc; }
.nav-label, .sidebar-caption { padding: 0 12px 10px; color: #78859c; font: 10px var(--mono); letter-spacing: .17em; }
.nav { display: grid; gap: 5px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #aab4c5;
  text-align: left;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { border-color: #ffffff0b; background: #ffffff08; color: #fff; }
.nav-item.active { border-color: #9891ff25; background: linear-gradient(100deg, #756df12c, #756df10b); color: #d5d2ff; }
.nav-item.active::before { position: absolute; inset: 10px auto 10px -1px; width: 3px; border-radius: 0 4px 4px 0; background: #9b96ff; content: ''; }
.nav-item > span:nth-child(2) { flex: 1; font-size: 14px; font-weight: 600; }
.nav-icon { display: grid; width: 23px; place-items: center; color: #94a1b7; font-size: 18px; }
.nav-item.active .nav-icon { color: #aaa6ff; }
.nav-item kbd { border: 0; background: transparent; color: #6f7c92; font: 10px var(--mono); }
.nav-count { margin-left: auto; padding: 1px 8px; border: 1px solid #ffffff19; border-radius: 24px; color: #c5c2ff; font: 11px var(--mono); }
.sidebar-bottom { margin-top: auto; padding-top: 25px; }
.sidebar-caption { padding-left: 10px; }
.controller-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 10px;
  border: 1px solid #ffffff14;
  border-radius: 13px;
  background: linear-gradient(140deg, #1b2639, #172133);
  box-shadow: inset 0 1px #ffffff08;
}
.controller-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #a49eff2a; border-radius: 12px; background: #746cf029; color: #b9b6ff; font: 11px var(--mono); }
.controller-card > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.controller-card strong { overflow: hidden; color: #f5f7ff; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.controller-card small { color: #93a0b5; font-size: 12px; }
.controller-dot { width: 7px; height: 7px; flex-basis: 7px; background: #9a94ff; box-shadow: 0 0 0 4px #9a94ff17; }
.logout { width: 100%; margin-top: 9px; padding: 9px 11px; border: 0; border-radius: 10px; background: transparent; color: #9aa6ba; font-size: 13px; text-align: left; transition: background .16s ease, color .16s ease; }
.logout:hover { background: #ffffff0a; color: #fff; }
.logout span { margin-right: 8px; color: #9d98ff; }

.main { width: min(1740px, calc(100% - 284px)); min-height: 100vh; margin-left: 284px; padding: 29px clamp(24px, 4vw, 64px) 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #98a1b1; font: 10px var(--mono); letter-spacing: .13em; }
.breadcrumb b { color: #c5cbd5; font-weight: 400; }
.breadcrumb strong { color: #4e5769; font-weight: 600; letter-spacing: .02em; }
.topbar h1 { margin: 5px 0 0; color: #172033; font-size: 23px; font-weight: 750; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.sync-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #d9e3e8; border-radius: 9px; background: #f3fbfa; color: #087f78; font: 10px var(--mono); letter-spacing: .07em; }
.sync-pill i, .live-indicator i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #24b6a7; box-shadow: 0 0 0 4px #24b6a71c; animation: pulse 1.8s ease-in-out infinite; }
.sync-pill small { color: #758b91; font: 11px var(--sans); letter-spacing: 0; }
@keyframes pulse { 50% { opacity: .48; box-shadow: 0 0 0 2px #24b6a711; } }
.refresh-button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: #344054; font-size: 13px; font-weight: 650; box-shadow: 0 1px 2px #18203308; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.refresh-button:hover { transform: translateY(-1px); border-color: #c5c8f6; background: #fbfbff; }
.refresh-button span:first-child { color: var(--accent); font-size: 16px; }
.page { display: none; animation: appear .2s ease-out; }
.page.active { display: block; }
@keyframes appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
