/* layout.css — Grid layout: sidebar + top bar + main content */

body {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 31, 56, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 31, 56, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#sidebar {
  grid-area: sidebar;
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-dim);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  height: 64px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-dim);
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

#main {
  grid-area: main;
  position: relative;
  z-index: 1;
  padding: 24px;
  overflow-y: auto;
  min-height: calc(100vh - 64px);
}
