.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* Splash screen: full logo with name, shown once per session.
   Fixed light background on purpose: the logo text is dark. */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #fbfbf9;
  user-select: none;
  transition: opacity 300ms ease;
  /* Safety net: never block the app if JavaScript fails */
  animation: splash-failsafe 0.01s linear 5s forwards;
}

.splash img {
  width: min(62vw, 300px);
  max-height: 70vh;
  height: auto;
  object-fit: contain;
}

.splash.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.no-splash .splash {
  display: none;
}

@keyframes splash-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transition: background-color var(--transition), border-color var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

/* Logo: icon only (assets/favicon1.png) */
.brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  object-fit: contain;
}

.brand-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 0 10px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Main */
.main {
  min-width: 0;
}

.content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile-only elements hidden on desktop */
.mobile-header,
.bottom-nav,
.fab {
  display: none;
}