.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 84px;
  border-right: 1px solid var(--line);
  background: white;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px 12px;
  z-index: 20;
}
.brand {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  background: transparent;
  color: #fff;
  border-radius: 8px;
}
.brand img {
  width: 40px;
  height: 40px;
  display: block;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rail-item,
.rail-new {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 2px 9px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}
.rail-item:hover {
  background: var(--surface-2);
}
.rail-item.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.rail-new {
  margin: 2px 0 10px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px #1018280a;
}
.rail-new:hover {
  background: var(--accent-strong);
}
.rail-foot {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding-top: 20px;
}
.app-shell {
  margin-left: 84px;
  min-height: 100dvh;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 38px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.topbar strong {
  font-size: 17px;
  font-weight: 600;
}
.header-divider {
  height: 16px;
  width: 1px;
  background: var(--line-strong);
}
#page-title {
  color: var(--muted);
  font-size: 13px;
}
.header-status {
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
}
.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7a9f89;
}
.header-status button {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 13px;
}
.feature-tabs {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 30px;
  padding: 0 38px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.feature-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 14px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.feature-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--highlight);
  font-weight: 700;
}
.feature-tabs .icon {
  width: 18px;
  height: 18px;
}
.feature-tabs button:hover {
  color: var(--accent);
}

.topbar-brand-icon { display: none; flex: 0 0 auto; }
@media (max-width:550px) { .topbar-brand-icon { display:block; width:28px; height:28px; border-radius:6px; } }
