/* ═══════════════════════════════════════════════════════
   App Shell — Navigation Rail + Bottom Tab Bar
   All values via semantic tokens only (no raw hex/px palette values).
   ═══════════════════════════════════════════════════════ */

/* ── App shell wrapper ───────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg);
}

/* ── Desktop nav rail (78px fixed left column) ───────── */
.nav-rail {
  width: 78px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  background: var(--color-nav-bg);
  border-right: 1px solid var(--color-nav-border);
  z-index: 100;
}

.nav-rail__logo {
  width: 40px;
  height: 40px;
  margin-bottom: 24px;
}

.nav-rail__items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  width: 66px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-nav-inactive);
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
}

.nav-rail__item:hover {
  color: var(--color-text-primary);
  background: var(--color-border);
}

.nav-rail__item.nav-active {
  color: var(--color-nav-active);
  background: var(--color-accent-light);
}

.nav-rail__item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-rail__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
}

.nav-rail__avatar {
  margin-top: auto;
  padding-top: 16px;
}

.nav-rail__avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-avatar-bg);
  color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.nav-rail__avatar-btn:hover {
  opacity: 0.85;
}

/* ── Main content area ───────────────────────────────── */
.app-content {
  flex: 1;
  margin-left: 78px;
  padding: 40px 60px;
  max-width: calc(78px + 760px);
  min-height: 100vh;
}

/* ── Mobile bottom tab bar (hidden on desktop) ───────── */
.tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--color-nav-bg);
  border-top: 1px solid var(--color-nav-border);
  z-index: 100;
  align-items: stretch;
  justify-content: space-around;
}

.tab-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--color-nav-inactive);
  transition: color 0.15s;
  cursor: pointer;
}

.tab-bar__item:hover,
.tab-bar__item.nav-active {
  color: var(--color-nav-active);
}

.tab-bar__item svg {
  width: 22px;
  height: 22px;
}

.tab-bar__label {
  font-size: 10px;
  font-weight: 500;
}

/* ── Responsive: switch to bottom tab bar on mobile ──── */
@media (max-width: 768px) {
  .nav-rail {
    display: none;
  }

  .tab-bar {
    display: flex;
  }

  .app-content {
    margin-left: 0;
    padding: 16px 22px;
    padding-bottom: 80px;
    max-width: 100%;
  }
}

/* ── Onboarding shell (no nav, centered) ─────────────── */
.onboarding-shell {
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 24px;
}

.onboarding-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 40px 48px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-card);
}

.onboarding-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 32px;
}

.onboarding-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-track);
}

.onboarding-progress__dot--active {
  background: var(--color-accent);
}

.onboarding-progress__dot--done {
  background: var(--color-accent-muted);
}

.onboarding-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.onboarding-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  gap: 12px;
}

/* ── Shared button styles ────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--color-accent);
  color: var(--color-surface);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: transparent;
  color: var(--color-text-secondary);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-border);
}
