
/* My Work — Sidebar */

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100dvh;
  padding: 20px 16px;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border-color);
}

/* Логотип */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--text-color);
  text-decoration: none;
}

.sidebar-brand-text {
  white-space: nowrap;
}

/* Навигация */

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-link:hover:not(:disabled) {
  background: var(--hover-bg);
}

.sidebar-link.active {
  background: var(--hover-bg);
  color: var(--accent);
}

.sidebar-link:disabled {
  cursor: default;
  opacity: 0.7;
}

.nav-icon img {
  display: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.sidebar-owner {
  margin-top: 20px;
}

.sidebar [hidden] {
  display: none !important;
}

/* Нижняя область */

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 20px;
}

/* Аватар и имя */

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;

  text-decoration: none;
  color: var(--text-color);
  cursor: pointer;
}

.sidebar-user-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--hover-bg);
  color: var(--text-color);
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sidebar-user-info strong {
  overflow-wrap: anywhere;
}

.sidebar-user-info small {
  color: var(--text-muted);
}


/* Карточка подписки */

.sidebar-subscription {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
}

.sidebar-subscription small {
  color: var(--text-muted);
}

/* Идеи и предложения */

.sidebar-feedback {
  margin-top: 20px;
}

/* Футер */

.sidebar-footer {
  margin-top: 20px;
  padding: 0;
  color: var(--text-muted);
}

.sidebar-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-version {
  display: block;
  margin-top: 4px;
}

/* Переключатель темы */

.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--hover-bg);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-light {
  display: none;
}

:root[data-theme='dark'] .theme-icon-dark {
  display: none;
}

:root[data-theme='dark'] .theme-icon-light {
  display: block;
}

/* Счётчик непрочитанных уведомлений */

.sidebar-notification-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  margin-left: auto;

  border-radius: 50px;
  background: var(--accent);
  color: var(--button-primary-text);

  line-height: 1;
  font-weight: var(--weight-button);
  font-variant-numeric: tabular-nums;
}

.sidebar-notification-count[hidden] {
  display: none;
}