/* ══════════════════════════════════════
   TOP NAV
══════════════════════════════════════ */
.topnav{
  height:var(--nav-h);flex-shrink:0;
  background:var(--ink);
  display:flex;align-items:center;
  padding:0 16px;gap:0;
  position:relative;z-index:300;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.topnav-logo{
  font-family:'Syne',sans-serif;font-weight:800;font-size:14px;
  letter-spacing:.5px;color:var(--bg);
  display:flex;align-items:center;gap:9px;
  text-decoration:none;flex-shrink:0;
}
.logo-dot{
  width:7px;height:7px;border-radius:50%;background:var(--amber);
  animation:pdot 2.5s ease-in-out infinite;flex-shrink:0;
}
@keyframes pdot{0%,100%{transform:scale(1);opacity:1;}50%{transform:scale(1.5);opacity:.5;}}

/* breadcrumb — desktop only */
.nav-bread{
  display:flex;align-items:center;gap:0;margin-left:24px;
}
.nav-bread-sep{color:rgba(247,246,242,.2);margin:0 8px;font-size:12px;}
.nav-bread-dim{font-family:'Syne',sans-serif;font-weight:700;font-size:12px;color:rgba(247,246,242,.4);}
.nav-bread-cur{font-family:'Syne',sans-serif;font-weight:700;font-size:12px;color:var(--bg);}

.topnav-right{margin-left:auto;display:flex;align-items:center;gap:10px;}

/* ── User menu ── */
.user-menu{ position:relative; }
.user-chip{
  display:flex;align-items:center;gap:8px;
  padding:4px 12px 4px 4px;
  background:rgba(247,246,242,.05);border:1px solid rgba(247,246,242,.08);
  border-radius:100px;cursor:pointer;transition:border-color .2s;
}
.user-chip:hover{ border-color:rgba(247,246,242,.18); }
.user-chip span{
  font-family:'Syne',sans-serif;font-size:11px;font-weight:700;
  color:rgba(247,246,242,.55);letter-spacing:.5px;
}
.user-dropdown{
  display:none;position:absolute;top:calc(100% + 8px);right:0;
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:0 8px 32px rgba(14,14,12,.15);
  min-width:200px;z-index:999;overflow:hidden;
}
.user-dropdown.open{ display:block; }
.ud-header{ padding:14px 16px; }
.ud-name{ font-family:'Syne',sans-serif;font-size:13px;font-weight:700;color:var(--ink); }
.ud-role{ font-family:'Syne',sans-serif;font-size:10px;font-weight:600;color:var(--muted);letter-spacing:1px;text-transform:uppercase;margin-top:2px; }
.ud-divider{ height:1px;background:var(--line); }
.ud-item{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:12px 16px;border:none;background:none;
  font-family:'Syne',sans-serif;font-size:12px;font-weight:600;
  color:var(--red);cursor:pointer;transition:background .15s;
}
.ud-item:hover{ background:rgba(184,60,43,.05); }

/* ── Notification bell ── */
.notif-wrap{ position:relative; }
.notif-btn{
  position:relative;width:36px;height:36px;border-radius:var(--r);
  background:rgba(247,246,242,.05);border:1px solid rgba(247,246,242,.08);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  transition:background .2s;-webkit-appearance:none;
}
.notif-btn:hover{ border-color:rgba(247,246,242,.18); }
.notif-btn svg{width:16px;height:16px;stroke:rgba(247,246,242,.5);}
.notif-badge{
  position:absolute;top:-3px;right:-3px;
  min-width:14px;height:14px;border-radius:50%;padding:0 3px;
  background:var(--amber);border:2px solid var(--ink);
  font-family:'Syne',sans-serif;font-size:8px;font-weight:800;
  color:var(--white);display:flex;align-items:center;justify-content:center;
}
.notif-panel{
  display:none;position:absolute;top:calc(100% + 8px);right:0;
  width:360px;max-height:480px;
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:0 12px 40px rgba(14,14,12,.18);z-index:999;
  overflow:hidden;flex-direction:column;
}
.notif-panel.open{ display:flex; }
.notif-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;border-bottom:1px solid var(--line);
}
.notif-title{
  font-family:'Syne',sans-serif;font-size:12px;font-weight:700;
  letter-spacing:1px;text-transform:uppercase;color:var(--ink);
}
.notif-close{
  background:none;border:none;font-size:18px;color:var(--muted);
  cursor:pointer;line-height:1;padding:0 4px;
}
.notif-list{ overflow-y:auto;max-height:400px; }
.notif-item{
  display:flex;gap:12px;padding:12px 16px;
  border-bottom:1px solid var(--line);transition:background .15s;
}
.notif-item:last-child{ border-bottom:none; }
.notif-item:hover{ background:rgba(14,14,12,.02); }
.notif-icon{
  width:32px;height:32px;border-radius:8px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;
}
.notif-icon.comment{ background:rgba(58,122,82,.1);color:#3a7a52; }
.notif-icon.vote{ background:rgba(217,123,43,.1);color:var(--amber); }
.notif-icon.card{ background:rgba(14,14,12,.06);color:var(--ink); }
.notif-text{
  font-size:12px;color:var(--ink);line-height:1.5;flex:1;
}
.notif-text strong{ font-weight:600; }
.notif-text .notif-card-name{ color:var(--amber);font-weight:500; }
.notif-time{
  font-family:'Syne',sans-serif;font-size:9px;color:var(--muted);
  letter-spacing:.5px;margin-top:3px;
}
.notif-empty{
  padding:40px 16px;text-align:center;
  font-size:13px;color:var(--muted);
}

/* ── Nudge panel (admin) ── */
#nudge-panel{
  display:none;position:absolute;top:calc(100% + 8px);right:0;
  width:360px;max-height:480px;
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:0 12px 40px rgba(14,14,12,.18);z-index:999;
  overflow:hidden;flex-direction:column;
}
#nudge-panel .notif-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;border-bottom:1px solid var(--line);
}
#nudge-panel .notif-list{ overflow-y:auto;max-height:400px; }

/* ── Hamburger (mobile only) ── */
.hamburger{
  display:none;width:36px;height:36px;border-radius:var(--r);
  background:rgba(247,246,242,.05);border:1px solid rgba(247,246,242,.08);
  align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
  margin-right:8px;
}
.hamburger svg{width:18px;height:18px;stroke:rgba(247,246,242,.6);}

/* ══════════════════════════════════════
   SIDEBAR (desktop)
══════════════════════════════════════ */
.sidebar{
  width:220px;flex-shrink:0;
  background:var(--ink2);
  display:flex;flex-direction:column;
  border-right:1px solid rgba(255,255,255,.05);
  overflow:hidden;position:relative;
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar::before{
  content:'';position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.02) 1px,transparent 1px);
  background-size:40px 40px;pointer-events:none;
}
.sidebar-section{
  padding:20px 16px 8px;
  font-family:'Syne',sans-serif;font-size:9px;font-weight:700;
  letter-spacing:2.5px;text-transform:uppercase;color:rgba(247,246,242,.22);
  position:relative;
}
.nav-item{
  display:flex;align-items:center;gap:10px;
  padding:11px 16px;cursor:pointer;position:relative;
  transition:background .2s;min-height:44px;
}
.nav-item::before{
  content:'';position:absolute;left:0;top:0;bottom:0;width:2px;
  background:var(--amber);transform:scaleY(0);transition:transform .25s;
  border-radius:0 2px 2px 0;
}
.nav-item.active::before{transform:scaleY(1);}
.nav-item.active{background:rgba(247,246,242,.05);}
.nav-item:hover{background:rgba(247,246,242,.04);}
.nav-accent{width:8px;height:8px;border-radius:2px;flex-shrink:0;}
.nav-label{
  font-family:'Syne',sans-serif;font-size:12px;font-weight:700;
  color:rgba(247,246,242,.4);letter-spacing:.3px;
  transition:color .2s;flex:1;
}
.nav-item.active .nav-label,.nav-item:hover .nav-label{color:var(--bg);}
.nav-count{
  font-family:'Syne',sans-serif;font-size:10px;font-weight:700;
  color:rgba(247,246,242,.25);background:rgba(247,246,242,.05);
  padding:2px 7px;border-radius:100px;
  transition:color .2s,background .2s;
}
.nav-item.active .nav-count{color:var(--amber-lt);background:rgba(217,123,43,.12);}
.sidebar-bottom{
  margin-top:auto;padding:16px;
  border-top:1px solid rgba(255,255,255,.05);position:relative;
}
.role-chip{
  display:flex;align-items:center;gap:9px;padding:10px 12px;
  background:rgba(247,246,242,.03);border:1px solid rgba(247,246,242,.07);
  border-radius:var(--r);
}
.role-name{font-family:'Syne',sans-serif;font-size:12px;font-weight:700;color:rgba(247,246,242,.7);}
.role-label{font-size:10px;color:rgba(247,246,242,.3);letter-spacing:1px;text-transform:uppercase;font-family:'Syne',sans-serif;font-weight:700;}

/* ══════════════════════════════════════
   BOTTOM NAV (mobile only)
══════════════════════════════════════ */
.bottom-nav{
  display:none;height:var(--bot-h);flex-shrink:0;
  background:var(--ink);border-top:1px solid rgba(255,255,255,.07);
  padding:0 8px;padding-bottom:var(--safe-b);
  overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.bottom-nav::-webkit-scrollbar{display:none;}
.bottom-nav-inner{display:flex;height:100%;align-items:center;gap:2px;min-width:max-content;padding:0 4px;}
.bot-item{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:6px 14px;border-radius:var(--r);cursor:pointer;
  transition:background .2s;flex-shrink:0;min-width:64px;position:relative;
}
.bot-item::before{
  content:'';position:absolute;top:0;left:12px;right:12px;height:2px;
  background:var(--amber);border-radius:0 0 2px 2px;
  transform:scaleX(0);transition:transform .25s;
}
.bot-item.active::before{transform:scaleX(1);}
.bot-item.active{background:rgba(247,246,242,.05);}
.bot-accent{width:8px;height:8px;border-radius:2px;flex-shrink:0;}
.bot-label{
  font-family:'Syne',sans-serif;font-size:9px;font-weight:700;
  color:rgba(247,246,242,.3);letter-spacing:.3px;
  transition:color .2s;white-space:nowrap;
}
.bot-item.active .bot-label{color:var(--bg);}
.bot-count{
  font-family:'Syne',sans-serif;font-size:8px;font-weight:700;
  color:rgba(247,246,242,.2);background:rgba(247,246,242,.05);
  padding:1px 5px;border-radius:100px;
}
.bot-item.active .bot-count{color:var(--amber-lt);background:rgba(217,123,43,.15);}

/* ══════════════════════════════════════
   SIDEBAR DRAWER (mobile)
══════════════════════════════════════ */
.sidebar-overlay{
  position:fixed;inset:0;z-index:400;display:none;
}
.sidebar-overlay.open{display:block;}
.sidebar-overlay-bg{position:absolute;inset:0;background:rgba(14,14,12,.5);}
.sidebar-drawer{
  position:absolute;left:0;top:0;bottom:0;width:260px;
  animation:slideInL .28s cubic-bezier(.4,0,.2,1);
  overflow:hidden;
}
@keyframes slideInL{from{transform:translateX(-100%);}to{transform:translateX(0);}}

/* ══════════════════════════════════════
   SIDEBAR PROJECTS
══════════════════════════════════════ */
.sidebar-divider { height:1px; background:var(--lined); margin:12px 16px; }
.sidebar-project {
  display:flex; align-items:center; gap:10px;
  padding:8px 16px; cursor:pointer; transition:background .15s;
  text-decoration:none; color:inherit;
}
.sidebar-project:hover { background:rgba(247,246,242,.04); }
.sidebar-project-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.sidebar-project-name {
  font-size:12px; font-weight:400; color:rgba(247,246,242,.7);
  flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.sidebar-project-status {
  font-family:'Syne',sans-serif; font-size:9px; font-weight:700;
  letter-spacing:.5px; color:rgba(247,246,242,.35); flex-shrink:0;
}

/* Project page inline sidebar strip */
.proj-sidebar-strip {
  background:var(--ink2);
  border-bottom:1px solid rgba(255,255,255,.05);
  padding:4px 0 8px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.proj-sidebar-strip::-webkit-scrollbar { display:none; }
.proj-sidebar-strip .sidebar-project {
  display:inline-flex; padding:6px 14px;
}
.proj-sidebar-strip .sidebar-section {
  padding:12px 16px 6px;
}

/* ══ USER MANAGER ══ */
.user-manager-panel {
  background:var(--white);border-radius:8px;width:100%;max-width:560px;
  max-height:90vh;overflow-y:auto;padding:24px;margin:16px;
}
.um-header {
  display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;
}
.um-divider {
  height:1px;background:var(--line);margin:16px 0;
}
.um-user {
  display:flex;align-items:center;gap:12px;padding:10px 0;
  border-bottom:1px solid var(--line);
}
.um-user:last-child { border-bottom:none; }
.um-user-info { flex:1;min-width:0; }
.um-user-name {
  font-family:'Syne',sans-serif;font-size:12px;font-weight:700;color:var(--ink);
}
.um-user-username {
  font-size:11px;color:var(--muted);font-weight:300;
}
.um-role-select {
  padding:5px 10px;border-radius:var(--r);border:1px solid var(--line);
  background:var(--bg2);font-family:'Syne',sans-serif;font-size:10px;
  font-weight:700;color:var(--ink2);cursor:pointer;outline:none;
  transition:border-color .2s;appearance:auto;
}
.um-role-select:focus { border-color:var(--amber); }
.um-role-select:disabled { opacity:.5;cursor:not-allowed; }
