/* ── App shell ───────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-icon { width: 26px; height: 26px; flex-shrink: 0; }
.sidebar-logo-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.sidebar-logo-sub  { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 10px 6px;
}
.nav-label:first-child { padding-top: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.55; transition: opacity 0.12s; }
.nav-item:hover               { background: var(--surface2); color: var(--text-1); }
.nav-item:hover svg           { opacity: 0.75; }
/* Full tinted pill (not just a left accent bar) — color-mix keeps this on-brand
 * under white-label overrides of --accent without a separate --accent-rgb token. */
.nav-item.active {
  color: var(--text-1); font-weight: 600;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-item--disabled { opacity: 0.4; cursor: default; }
.nav-item--disabled:hover { background: none; color: var(--text-2); }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Main ────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* ── Topbar ──────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 16px;
}
.topbar-left  { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-title { font-size: 14px; font-weight: 700; color: var(--text-1); white-space: nowrap; }
.topbar-crumb { font-size: 13px; color: var(--text-4); }
.topbar-sub   { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }

/* ── Progress bar ────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: var(--topbar-h);
  left: var(--sidebar-w);
  right: 0;
  height: 2px;
  z-index: 150;
  pointer-events: none;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue-glow);
  transition: width 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
  border-radius: 0 1px 1px 0;
}

/* ── Content ─────────────────────────────────────── */
.content { flex: 1; overflow-y: auto; padding: 28px 28px 56px; }
#page { transition: opacity 0.1s; }
#page.fading { opacity: 0; }

/* ── Chat animations ─────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); opacity: .4; }
  40%           { transform: scale(1); opacity: 1; }
}
