/* App shell, top bar, two-pane layout, scrollbars, responsive. */

/* Centered "app sheet": white surface on the grey canvas, framed on wide screens. */
.app {
  max-width: var(--app-max);
  margin-inline: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-inline: 1px solid var(--border);
}

.topbar {
  flex: none;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 14.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px 1fr;
}
.pane { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); overflow: hidden; }
.pane-detail { border-right: 0; }
.pane-body { flex: 1; overflow-y: auto; }

/* Scrollbars */
.pane-body { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.pane-body::-webkit-scrollbar { width: 10px; height: 10px; }
.pane-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid var(--surface); }
.pane-body::-webkit-scrollbar-thumb:hover { background: #c2c5cf; }

/* Responsive */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 320px 1fr; }
}
@media (max-width: 860px) {
  .app { height: auto; }
  .layout { grid-template-columns: 1fr; }
  .pane { border-right: 0; border-bottom: 1px solid var(--border); }
  #sidebar .pane-body { max-height: 46vh; }
}
