/* layout.css — mobile-first layout: header, bottom-nav (mobile), sidebar (desktop), main */

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

/* ── Header ── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.app-header .wordmark {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.app-header .user-name {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
}

/* ── Main content area ── */
.app-content {
  flex: 1;
  margin-top: 52px;
  margin-bottom: var(--bottom-nav-height);
  padding: 24px 16px;
}

.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ── Bottom nav (mobile only) ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--color-text-dim);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--color-accent);
}

.bottom-nav a svg {
  width: 20px;
  height: 20px;
}

/* ── Sidebar (desktop) ── */
.app-sidebar {
  display: none;
}

/* ── Desktop breakpoint (768px+) ── */
@media (min-width: 768px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 16px 0;
    z-index: 90;
  }

  .app-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--color-text-dim);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
  }

  .app-sidebar a.active,
  .app-sidebar a:hover {
    color: var(--color-accent);
    background: var(--color-accent-dim);
  }

  .app-sidebar a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .app-content {
    margin-left: var(--sidebar-width);
    margin-bottom: 0;
    padding: 32px 24px;
  }

  .bottom-nav {
    display: none;
  }
}
