/* Каркас: боковая навигация + рабочая область. */

#app { display: grid; grid-template-columns: 216px 1fr; min-height: 100%; }

aside {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 16px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

aside nav { display: flex; flex-direction: column; gap: 2px; }
aside nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--muted);
  font-weight: 550;
}
aside nav a:hover { background: var(--surface-2); color: var(--ink); }
aside nav a.active { background: var(--accent-soft); color: var(--accent-ink); }

aside nav .badge {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
aside nav a.active .badge { background: var(--accent-ink); }

aside .spacer { flex: 1; }
aside .foot {
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
aside .foot button {
  background: none; border: 0; color: var(--muted);
  cursor: pointer; padding: 0; text-decoration: underline;
}

main { padding: 24px 28px 64px; max-width: 1180px; width: 100%; }

.row { display: flex; gap: 12px; align-items: flex-start; }
.row.between { justify-content: space-between; align-items: center; }
.row.center { align-items: center; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
#login .box { width: 320px; }

@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  aside { position: static; height: auto; }
  aside nav { flex-direction: row; flex-wrap: wrap; }
  aside .spacer, aside .foot { display: none; }
  main { padding: 18px 16px 48px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
