.topbar {
  display: flex;
  align-items: center;
  gap: var(--space-row);
  height: var(--topbar);
  padding: 0 var(--space-m);
  background: var(--surface);
  border-bottom: 0.5px solid var(--line);
  flex-shrink: 0;
}

.topbar h1 {
  font-size: var(--fs-title);
  font-weight: 600;
}

.iconbtn {
  display: grid;
  place-items: center;
  width: var(--icon-hit);
  height: var(--icon-hit);
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  transition: background var(--ease);
}

.iconbtn:hover {
  background: var(--hover);
}

.body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar {
  width: var(--sidebar);
  background: var(--surface);
  border-right: 0.5px solid var(--line);
  padding: var(--space-s);
  overflow: hidden;
  transition: width var(--panel), padding var(--panel);
  flex-shrink: 0;
}

.sidebar.closed {
  width: 0;
  padding: var(--space-s) 0;
  border-right: none;
}

.navitem {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--space-row);
  width: 100%;
  padding: var(--nav-pad);
  margin-bottom: 2px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-body);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}

.navitem:hover {
  background: var(--hover);
}

.navitem.active {
  background: var(--selected);
  color: var(--primary);
  font-weight: 600;
}

.navitem.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--space-s);
  bottom: var(--space-s);
  width: var(--nav-mark);
  border-radius: 0 2px 2px 0;
  background: var(--primary);
}

.config {
  width: var(--config);
  padding: var(--space-m);
  overflow-y: auto;
  flex-shrink: 0;
  background: var(--base);
  border-right: 0.5px solid var(--line);
}

.card {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-m);
}

.card h2 {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--space-row);
}

.rightcol {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.logs {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-m);
  position: relative;
}

@media (max-width: 720px) {
  .config {
    width: auto;
    border-right: none;
    border-bottom: 0.5px solid var(--line);
  }
  .body {
    flex-direction: column;
  }
}
