/* Shared chrome: left sidebar. Keep identical on bot and board pages. */
html, body { height: 100%; }
body { display: flex; min-height: 100%; overflow: hidden; }
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
.appside,
.appside *,
.brand,
.sidenav,
.sidenav a,
.navscrim,
.mobar,
.appmain {
  box-sizing: border-box;
}
.appside {
  width: 220px;
  flex: 0 0 220px;
  min-width: 220px;
  max-width: 220px;
  background: #1c1c22;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 20;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 12px;
  border-bottom: 1px solid #333;
  color: #eee;
  font-weight: bold;
  font-size: 15px;
  text-decoration: none;
  flex: 0 0 64px;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  background: #0b0c10;
  flex: 0 0 36px;
  border: 1px solid #3a3a42;
}
.brand:hover { background: rgba(255,255,255,0.03); }
.brand.is-on { background: rgba(79,195,247,0.10); }
.sidenav {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 6px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.sidenav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #2e2e36;
  border-radius: 8px;
  background: #16161c;
  color: #9a9aa3;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
}
.sidenav a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}
.sidenav a:hover {
  color: #ddd;
  border-color: #444;
  background: #1a1a22;
}
.sidenav a.is-on, .sidenav a.on {
  color: #eee;
  border-color: #4fc3f7;
  background: rgba(79,195,247,0.12);
}
.navgrp {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.navsub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height .2s ease, opacity .15s ease;
}
.navgrp.open .navsub,
.navgrp:has(a.is-on) .navsub {
  max-height: 96px;
  opacity: 1;
  pointer-events: auto;
}
.sidefoot {
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid #333;
}
.sidefoot button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #2e2e36;
  border-radius: 8px;
  background: #16161c;
  color: #9a9aa3;
  font: inherit;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.sidefoot button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}
.sidefoot button:hover {
  color: #ddd;
  border-color: #444;
  background: #1a1a22;
}
.sidefoot button:disabled { opacity: .55; cursor: default; }
.navscrim { display: none; }
.navbtn { display: none; }
button.icon.navbtn { display: none; }
.appmain { flex: 1; min-width: 0; height: 100%; overflow: auto; }
.mobar {
  display: none;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 12px;
  border-bottom: 1px solid #333;
  background: #1c1c22;
  flex: 0 0 52px;
}
.mobar .icon {
  width: 36px; height: 36px; padding: 0; flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  background: #16161c; color: #ddd; border: 1px solid #333; border-radius: 8px; cursor: pointer;
}
.mobar .icon svg { width: 22px; height: 22px; display: block; }
@media (max-width: 720px) {
  .appside {
    position: fixed; left: 0; top: 0; height: 100%;
    transform: translateX(-110%);
    transition: transform .2s ease;
  }
  body.nav-open .appside { transform: none; }
  .navscrim {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 15;
  }
  body.nav-open .navscrim { display: block; }
  .navbtn, button.icon.navbtn { display: flex; }
  .mobar { display: flex; }
}
