.app-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: var(--s-4) var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.sidebar-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text-primary);
}

.sidebar-logo span { color: var(--accent); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-2);
}

.nav-section { margin-bottom: var(--s-4); }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--s-2) var(--s-2) var(--s-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 450;
  transition: all var(--t-fast);
  user-select: none;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }

.nav-item-icon {
  width: 16px;
  height: 16px;
  opacity: .7;
  flex-shrink: 0;
}

.nav-item.active .nav-item-icon { opacity: 1; }

.nav-item-count {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-raised);
  padding: 1px 6px;
  border-radius: var(--r-full);
}

.sidebar-footer {
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* ── Main area ── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

.main-header {
  padding: var(--s-3) var(--s-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--bg-surface);
  min-height: 52px;
}

.main-header-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-6);
}

/* ── Split view (list + editor) ── */
.split-view {
  display: flex;
  gap: var(--s-4);
  height: 100%;
  overflow: hidden;
}

.split-list {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  overflow-y: auto;
}

.split-editor {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

/* ── Panel ── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.panel-body { padding: var(--s-4) var(--s-5); }
