/* Шапка и боковое меню */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  height: calc(48px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  background: var(--graphite); color: #fff; }
.brand { display: flex; flex: none; height: 48px; background: var(--orange); }
.brand-logo { width: 48px; height: 48px; display: block; }
.topbar-title { flex: 1; min-width: 0; margin: 0; font-size: 22px; line-height: 48px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.avatar-btn { width: 40px; height: 40px; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #E4E4E0; background: #5a5553; color: #fff; font-size: 15px; object-fit: cover; overflow: hidden; }
.topbar.no-nav .icon-btn.menu, .topbar.no-nav .topbar-actions { display: none; }
.topbar.no-nav .topbar-title { padding-left: 0; }

.drawer-overlay { position: fixed; z-index: 40; inset: calc(48px + env(safe-area-inset-top, 0px)) 0 0 0;
  background: rgba(0, 0, 0, .65); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; z-index: 50; top: calc(48px + env(safe-area-inset-top, 0px)); bottom: 0; left: 0;
  width: clamp(240px, 68vw, 320px); overflow-y: auto; background: #EFEFEE; padding: 8px 0 24px;
  transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; }
.drawer.open { transform: translateX(0); visibility: visible; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-overlay { transition: none; } }

.drawer-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px 8px 12px; border: 0; border-left: 4px solid transparent;
  background: none; color: var(--blue); font-size: 18px; line-height: 1.35; text-align: left; cursor: pointer; }
.drawer-item.home { font-size: 20px; padding-top: 14px; padding-bottom: 14px; }
.drawer-item.active { background: #E7E7E6; border-left-color: var(--blue); color: var(--text); }
.drawer-section { margin-top: 12px; }
.drawer-section-title { margin: 0; padding: 8px 16px; font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.drawer-section .drawer-item { margin-top: 4px; }
