.app {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-section {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.sidebar-section.sidebar-actions {
  flex: 0 0 auto;
  min-height: auto;
  padding: 16px 12px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-actions .btn-secondary {
  min-height: 40px;
  padding: 10px 14px;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.chat-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.chat-header h1 {
  margin: 0;
  font-size: 18px;
}

.chat-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.settings-panel {
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.settings-panel h2 {
  margin: 0 0 16px;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 220px 1fr;
  }
  .settings-panel {
    display: none;
  }
}

@media (max-width: 720px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}
