/* Workspace shell: dark sidebar, sticky header, main column. */
.shell { min-height: 100vh; display: flex; }
.sidebar { width: 232px; background: var(--navy); display: flex; flex-direction: column; flex-shrink: 0; padding: 22px 14px; gap: 24px; position: sticky; top: 0; left: 0; height: 100vh; overflow-y: auto; transition: transform 0.2s ease; }
.sidebar .brand { padding: 0 10px; }
.sidebar .brand .amp { font-size: 20px; color: var(--sky); }
.sidebar .brand-word { font-size: 18px; color: #fff; }
.ws-card { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(125, 184, 255, 0.25); background: rgba(125, 184, 255, 0.08); border-radius: 9px; padding: 9px 11px; }
.ws-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ws-name { font-size: 12.5px; font-weight: 600; color: #fff; }
.ws-meta { font-family: var(--mono); font-size: 10px; color: var(--sky-text); }
.nav-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 14px; }
.nav-title { font-family: var(--mono); font-size: 10px; color: #5872a8; letter-spacing: 0.14em; padding: 0 10px; margin: 2px 0 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; padding: 7px 10px; border-radius: 7px; color: var(--sky-text); text-decoration: none; }
.nav-item:hover { background: rgba(125, 184, 255, 0.1); color: #fff; }
.nav-item.is-active { background: rgba(125, 184, 255, 0.16); color: #fff; }
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-badge { margin-left: auto; font-family: var(--mono); font-size: 10px; background: rgba(255, 196, 92, 0.2); color: #ffd08a; padding: 2px 7px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding: 12px 10px; border-top: 1px solid rgba(125, 184, 255, 0.15); display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 11px; color: #6d86b8; line-height: 1.6; }
.sidebar-foot .ok { display: flex; align-items: center; gap: 7px; color: #6ee7a0; }
.sidebar-foot .ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6ee7a0; }
.sidebar-foot .signout { color: var(--sky-text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.sidebar-foot .signout:hover { color: #fff; }

.shell-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.shell-header { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--divider); position: sticky; top: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); z-index: 5; }
.shell-header .search { flex: 1; max-width: 420px; padding: 9px 14px; }
.shell-header .menu-btn, .shell-header .mobile-brand { display: none; }
.menu-btn { width: 40px; height: 40px; flex: none; border: 1px solid var(--border); background: #fff; border-radius: 9px; align-items: center; justify-content: center; color: var(--ink); }
.me { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(150deg, var(--accent), var(--primary-hover)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.shell-content { padding: 36px 44px 96px; display: flex; flex-direction: column; gap: 28px; max-width: 1200px; width: 100%; }
/* Pages that list a lot side by side use the whole width of the screen. */
.shell-content.is-wide { max-width: none; }
.nav-scrim { position: fixed; inset: 0; background: rgba(10, 31, 77, 0.45); z-index: 44; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 680px; }
.page-meta { font-family: var(--mono); font-size: 12.5px; color: var(--subtle); }
.section-title { font-size: 17px; font-weight: 600; }
.breadcrumb { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; }

/* Two-column page grids that collapse on narrow screens */
.cols-home { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.cols-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.cols-side { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.cols-db { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }

@media (max-width: 899px) {
  .sidebar { position: fixed; z-index: 45; transform: translateX(-100%); }
  .shell.nav-open .sidebar { transform: none; }
  .shell-header .menu-btn { display: flex; }
  .shell-header .mobile-brand { display: inline-flex; }
  .shell-header .mobile-brand .amp { font-size: 19px; }
  .shell-header .mobile-brand .brand-word { font-size: 17px; }
  .shell-content { padding: 28px 24px 96px; }
  .cols-home, .cols-setup, .cols-side, .cols-db { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .shell-header { padding: 10px 14px; }
  .shell-header .search { display: none; }
  .shell-content { padding: 20px 14px 96px; }
}
