.dashboard-shell {
  --toolbar-top-offset: 140px;
  --toolbar-width: 52px;
  --toolbar-gap: 14px;
  --toolbar-layout-space: calc(var(--toolbar-width) + var(--toolbar-gap));
}

.dashboard-shell {
  display: grid;
  grid-template-columns: var(--toolbar-width) minmax(0, 1fr);
  gap: var(--toolbar-gap);
  align-items: start;
  overflow: visible;
}

.toolbar-main-column {
  min-width: 0;
}

.dashboard-shell > .toolbar-main-column,
.dashboard-shell > .side-toolbar {
  min-width: 0;
}

.side-toolbar {
  position: sticky;
  top: var(--toolbar-top-offset);
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 12px 10px;
  width: var(--toolbar-width);
  max-height: calc(100vh - var(--toolbar-top-offset) - 20px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(18, 30, 51, 0.82), rgba(11, 21, 38, 0.76)),
    rgba(18, 30, 51, 0.55);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    width 0.26s ease,
    border-radius 0.26s ease,
    box-shadow 0.26s ease;
  z-index: 30;
  scrollbar-width: none;
}

.side-toolbar::-webkit-scrollbar {
  display: none;
}

.side-toolbar:hover,
.side-toolbar:focus-within {
  width: 152px;
  border-radius: 18px;
  box-shadow:
    0 24px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.toolbar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  color: #dce7f9;
  text-decoration: none;
  padding: 0;
  transition:
    transform 0.25s,
    background 0.25s,
    border-color 0.25s,
    box-shadow 0.25s,
    color 0.25s;
}

.side-toolbar:hover .toolbar-link,
.side-toolbar:focus-within .toolbar-link {
  justify-content: flex-start;
  gap: 9px;
  padding: 0 8px;
}

.toolbar-icon {
  display: grid;
  place-items: center;
  width: 16px;
  min-width: 16px;
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
}

.toolbar-text {
  overflow: hidden;
  white-space: nowrap;
  color: #f4f7ff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0;
  max-width: 0;
  transition:
    opacity 0.22s,
    max-width 0.22s;
}

.toolbar-link:hover,
.toolbar-link.active {
  color: #0a1425;
  background: linear-gradient(135deg, #ffb15f, #ff7e28);
  border-color: rgba(255, 177, 95, 0.38);
  box-shadow: 0 12px 24px rgba(255, 126, 40, 0.22);
  transform: none;
}

.side-toolbar:hover .toolbar-text,
.side-toolbar:focus-within .toolbar-text {
  opacity: 1;
  max-width: 92px;
}

.side-toolbar:hover .toolbar-link:hover,
.side-toolbar:hover .toolbar-link.active,
.side-toolbar:focus-within .toolbar-link:hover,
.side-toolbar:focus-within .toolbar-link.active {
  transform: translateX(3px);
}

.side-toolbar:hover .toolbar-link.active .toolbar-text,
.side-toolbar:focus-within .toolbar-link.active .toolbar-text {
  color: #0a1425;
}

@media (max-width: 1280px) {
  .dashboard-shell {
    --toolbar-top-offset: 16px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .side-toolbar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-height: none;
    border-radius: 22px;
    padding: 14px;
    gap: 10px;
    overflow: visible;
  }

  .side-toolbar:hover,
  .side-toolbar:focus-within {
    width: 100%;
    border-radius: 24px;
  }

  .toolbar-link {
    width: 100%;
    min-height: 54px;
    height: auto;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .toolbar-text {
    display: block;
    opacity: 1;
    max-width: none;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .side-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-shell {
    gap: 12px;
  }

  .side-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .toolbar-link {
    width: 100%;
    min-height: 52px;
  }

  .toolbar-text {
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  .dashboard-shell {
    gap: 10px;
  }

  .side-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
    gap: 8px;
    border-radius: 18px;
  }

  .toolbar-link {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .toolbar-icon {
    width: 16px;
    min-width: 16px;
    font-size: 14px;
  }

  .toolbar-text {
    font-size: 10px;
    line-height: 1.2;
    white-space: normal;
  }
}
