.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 44px;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 0 32px;
  color: #fffdf8;
}

.topbar--compact {
  background: rgba(15, 15, 16, 0.94);
  border-bottom: 1px solid #2f2f2f;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 900;
}

.brand__mark,
.profile-chip {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  font-weight: 900;
}

.topbar__nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar__nav a {
  border-radius: var(--radius);
  padding: 8px 12px;
  color: rgba(255, 253, 248, 0.84);
  text-decoration: none;
  font-weight: 800;
}

.topbar__nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav-logout {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0 12px;
  font-weight: 800;
}

.profile-chip {
  color: white;
  text-decoration: none;
}

.sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  min-height: calc(100vh - 76px);
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid #2f2f2f;
  background: #171717;
  padding: 24px 18px;
  color: #ececf1;
}

.sidebar__toggle {
  width: 38px;
  min-height: 38px;
  border: 1px solid #343434;
  border-radius: var(--radius);
  background: #212121;
  color: #ececf1;
  font-weight: 900;
}

.sidebar__content {
  display: contents;
}

.dashboard-layout.is-sidebar-collapsed {
  grid-template-columns: 74px minmax(0, 1fr);
}

.dashboard-layout.is-sidebar-collapsed .sidebar {
  align-items: center;
  padding-inline: 18px;
}

.dashboard-layout.is-sidebar-collapsed .sidebar__content {
  display: none;
}

.sidebar__new {
  width: 100%;
}

.search-field input {
  height: 42px;
  border-color: #343434;
  background: #212121;
  color: #ececf1;
  padding: 0 12px;
}

.sidebar__latest {
  margin-top: 64px;
}

.sidebar__latest h2 {
  margin: 0 0 12px;
  color: #b4b4b4;
  font-size: 1.3rem;
}

.latest-list {
  display: grid;
  gap: 8px;
}

.latest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 8px;
  align-items: center;
}

.latest-item,
.latest-edit,
.latest-delete {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #ececf1;
}

.latest-item {
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
}

.latest-item:hover,
.latest-edit:hover,
.latest-delete:hover {
  background: #2f2f2f;
}

.latest-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-edit,
.latest-delete {
  color: #b4b4b4;
  font-size: 1.05rem;
}

.sidebar__footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.sidebar__footer a {
  min-height: 40px;
  border: 1px solid #343434;
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #212121;
  color: #ececf1;
  text-decoration: none;
}

.sidebar__logout {
  min-height: 40px;
  border: 1px solid #343434;
  border-radius: var(--radius);
  background: #212121;
  color: #ffb4b4;
  padding: 8px 10px;
  text-align: left;
  font-weight: 900;
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr 44px;
    padding: 0 16px;
  }

  .topbar__nav {
    display: none;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar__latest {
    margin-top: 8px;
  }
}
