/* Каркас приложения: верхняя навигация и рабочая область. */
.app-shell {
  display: block;
  min-height: 100vh;
  background: var(--bg-canvas);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 40px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: 0 1px 0 var(--border-subtle), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 8px 0 0;
  flex-shrink: 0;
}

.brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

.brand span {
  display: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.ws-switcher {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ws-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-overlay);
  color: var(--text-secondary);
  font-size: 13px;
}

.ws-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0d9488, #6366f1);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav button {
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--text-muted);
  padding: 6px 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 450;
  transition: all 0.1s;
  white-space: nowrap;
}

.nav button:hover {
  background: var(--bg-overlay);
  color: var(--text-secondary);
}

.nav button.active {
  background: var(--bg-overlay);
  color: var(--text-primary);
  font-weight: 550;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-hamburger {
  width: 32px;
  height: 32px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  padding: 4px;
  order: 10;
}

.nav-hamburger:hover {
  background: var(--bg-overlay);
}

.nav-hamburger span {
  width: 18px;
  height: 1.5px;
  display: block;
  border-radius: 1px;
  background: var(--text-muted);
  transition: all 0.2s;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  position: sticky;
  top: 60px;
  z-index: 99;
  display: none;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mobile-nav button {
  width: 100%;
  display: block;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: all 0.1s;
}

.mobile-nav button:hover {
  background: var(--bg-overlay);
  color: var(--text-secondary);
}

.mobile-nav button.active {
  background: var(--bg-overlay);
  color: var(--text-primary);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #0d9488, #6366f1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.content {
  width: min(1180px, calc(100% - 80px));
  max-width: none;
  margin: 0 auto;
  padding: 36px 0 60px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.topbar > div {
  flex: 1;
}

.topbar h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.primary,
.btn-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.4);
  transition: all 0.15s;
  white-space: nowrap;
}

.button-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 15px;
  font-weight: 700;
}

.primary:hover,
.btn-new:hover {
  background: var(--accent-dim);
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.5);
  transform: translateY(-1px);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-overlay);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}

.secondary:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.compact-button {
  min-height: 34px;
  padding: 7px 12px;
}
