/* App layout, page containers, mobile header */
body { overflow: hidden; }

/* Sidebar nav icons */
.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0; opacity: 0.55;
  transition: opacity 0.15s ease;
}
.nav-icon svg { width: 16px; height: 16px; }
.nav-cat-item .nav-icon { width: 16px; height: 16px; }
.nav-cat-item .nav-icon svg { width: 14px; height: 14px; }
.nav-item:hover .nav-icon, .nav-item.active .nav-icon { opacity: 1; }

.page { padding: 56px 64px; display: none; max-width: 920px; }
.page.active { display: block; }
#page-capabilities { max-width: 1200px; padding: 40px 48px; }

/* Page titles */
.page-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 2.5vw, 2rem); margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  color: var(--n400); margin-bottom: 40px; line-height: 1.6;
}

/* Section titles */
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 11px; margin-bottom: 14px; color: var(--n400);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Mobile */
.mobile-header {
  display: none; padding: 14px 20px; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,248,240,0.92); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); z-index: 10;
}
.mobile-menu-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.6);
  color: var(--night); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all 0.15s ease;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.9); }
.mobile-brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.1rem; letter-spacing: 0.05em;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(6,8,15,0.4);
  backdrop-filter: blur(4px); z-index: 49;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: -300px; top: 0; bottom: 0; z-index: 50;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1); width: 280px;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .mobile-header { display: flex; }
  .app-layout { flex-direction: column; }
  .page { padding: 28px 20px; }
  .recs-row { grid-template-columns: 1fr; }
  .sunrise-stats { flex-wrap: wrap; }
  .lib-layout { flex-direction: column; height: auto; }
  .lib-list-panel {
    width: 100%; max-height: 40vh; border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 12px; margin-bottom: 12px;
  }
  .lib-detail-panel { padding: 0; }
  .lib-detail-columns { grid-template-columns: 1fr; }
  .lib-filter-row { padding-right: 0; }
  .profile-fields-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.page.active > * {
  animation: fadeUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.page.active > *:nth-child(2) { animation-delay: 0.06s; }
.page.active > *:nth-child(3) { animation-delay: 0.12s; }
.page.active > *:nth-child(4) { animation-delay: 0.18s; }
.page.active > *:nth-child(5) { animation-delay: 0.24s; }
.page.active > *:nth-child(6) { animation-delay: 0.30s; }

/* Empty state */
.empty-state {
  color: var(--n400); font-size: 13px; padding: 16px; text-align: center;
}

/* Hidden file input */
.hidden-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
