/* Каркас страницы: левая панель. Файлы стилей подключаются в templates/base.html по порядку. */

/* ===== Левая панель (вместо верхней) ===== */
body.with-sidebar { padding-left: 240px; }
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.sidebar .logo { padding: 0 8px 14px; }
.side-nav, .side-projects { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-projects a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 500;
}
.side-nav a:hover, .side-projects a:hover { background: var(--grey-soft); color: var(--text); }
.side-nav a.active, .side-projects a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side-title {
  margin: 18px 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.side-projects { overflow-y: auto; min-height: 0; flex: 1; }
.side-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-mark.small { width: 22px; height: 22px; border-radius: 6px; font-size: 11.5px; }
.side-me {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 0;
  border-top: 1px solid var(--border);
}
.side-me-name { flex: 1; min-width: 0; font-weight: 550; line-height: 1.3; }
.side-me-name > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me form { margin: 0; }
.side-me-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: 8px; }
.side-me-link:hover .side-me-name > div:first-child { text-decoration: underline; }

/* Число новых уведомлений в левой панели */
.unread-count { margin-left: auto; background: var(--danger); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11.5px; font-weight: 700; line-height: 18px; }

/* «Посмотреть как…»: заметная плашка, чтобы не забыть вернуться к себе */
.impersonate-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-size: 14px;
}
.impersonate-bar button { margin-left: auto; }

/* ===== Раздел «Команда»: строка под вкладками и формы внизу ===== */
.tab-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: -8px 0 14px; }
.tab-toolbar .hint { margin: 0; max-width: 680px; }
.team-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.team-forms .card { margin: 0; max-width: none; }

/* ===== Оформление в духе Notion (27.10.2026) — уточняет правила выше ===== */
/* ===== Боковая панель: серая, пункты-строки с серой подсветкой ===== */
body.with-sidebar { padding-left: 232px; }
.sidebar { width: 232px; padding: 12px 8px 8px; background: var(--sidebar); border-right: 1px solid var(--border); gap: 1px; }
.sidebar .logo { padding: 4px 10px 12px; font-size: 14px; font-weight: 600; gap: 8px; color: var(--text); }
.sidebar .logo-img { width: 18px; height: 22px; }
.side-nav, .side-projects { gap: 1px; }
.side-nav a, .side-projects a { padding: 4px 10px; min-height: 30px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 14px; gap: 8px; }
.side-nav a .icon, .side-projects a .icon { width: 18px; height: 18px; color: #91918e; }
.side-nav a:hover, .side-projects a:hover { background: var(--hover-strong); color: var(--text); text-decoration: none; }
.side-nav a.active, .side-projects a.active { background: var(--hover-strong); color: var(--text); font-weight: 600; }
.side-title { margin: 18px 10px 4px; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: #91918e; }

.side-me { padding: 8px 4px 0; border-top: 1px solid var(--border); }
.unread-count { background: #eb5757; }
