/* górny pasek: po lewej powrót (tylko w ustawieniach) i logo, po prawej użytkownik, ustawienia, wylogowanie */
#topbar { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px; height:56px; padding:0 18px; background:var(--card); border-bottom:1px solid var(--line); box-shadow:0 1px 6px rgba(0,0,0,.08); position:relative; z-index:5; }
.tb-left, .tb-right { display:flex; align-items:center; gap:10px; min-width:0; }
#topbar svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:0 0 auto; }

.brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:1.1rem; letter-spacing:.01em; }
.logo { width:32px; height:32px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#0c66e4,#8f5cf7); color:#fff; box-shadow:0 2px 8px rgba(12,102,228,.4); }
.logo svg { width:20px; height:20px; fill:#fff; stroke:none; }

.tb-back { display:inline-flex; align-items:center; gap:4px; padding:6px 14px 6px 8px; border-radius:20px; background:var(--col); color:var(--text); font-weight:600; }
.tb-back:hover { background:var(--line); }
.tb-back svg { stroke-width:2.6; }

.who { display:flex; align-items:center; gap:10px; padding:4px 14px 4px 4px; border-radius:22px; background:var(--col); font-weight:600; font-size:.92rem; min-width:0; cursor:pointer; transition:background .12s; }
.who:hover { background:var(--line); }
.who #uname { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px; }
.avatar { width:30px; height:30px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#0c66e4,#8f5cf7); color:#fff; font-size:.78rem; font-weight:700; letter-spacing:.02em; flex:0 0 auto; }

.tb-icon { width:36px; height:36px; padding:0; border-radius:50%; background:transparent; color:var(--muted); display:inline-flex; align-items:center; justify-content:center; transition:background .15s, color .15s; }
.tb-icon svg { width:20px; height:20px; transition:transform .35s; }
.tb-icon:hover { background:var(--col); color:var(--text); }
.tb-icon:hover svg { transform:rotate(60deg); }
.tb-icon.on { background:var(--accent); color:#fff; }

.tb-logout:hover { color:var(--danger); }
.tb-logout:hover svg { transform:none; }

@media (max-width: 700px) {
  #topbar { padding:0 10px; }
  .who #uname, .tb-back span { display:none; }
  .tb-back { padding:6px 8px; }
  .who { padding:4px; }
}
