/* Header */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; padding: 0 var(--space-6);
  gap: var(--space-4);
}
#nav .logo { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); }
#nav .logo span { color: var(--accent); }
#nav .nav-spacer { flex: 1; }
#nav .nav-auth { display: flex; align-items: center; gap: var(--space-3); }
#nav .nav-auth .btn-login {
  background: var(--accent); color: var(--text-inverse); border: none;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 500;
}
#nav .nav-auth .btn-login:hover { background: var(--accent-hover); }
#nav .nav-auth .user-handle { color: var(--text-secondary); font-size: var(--text-sm); }
#nav .nav-auth .btn-logout {
  background: none; border: 1px solid var(--border-default); color: var(--text-secondary);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); font-size: var(--text-xs);
}

/* Layout — messaging two-panel */
#layout {
  display: flex; margin-top: var(--header-height); height: calc(100vh - var(--header-height));
}
#sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: var(--bg-surface); border-right: 1px solid var(--border-default);
  overflow-y: auto; display: flex; flex-direction: column;
}
#content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
}

/* Mobile */
@media (max-width: 768px) {
  #layout { position: relative; }

  #sidebar {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: 100%; z-index: 10;
    transform: translateX(0);
    transition: transform 0.2s ease;
  }
  #sidebar.hidden { transform: translateX(-100%); }

  #content {
    width: 100%;
  }
}
