/* TechBotClub v6 — ONE continuous workspace, overlay navigation drawer.
   On desktop and mobile, the menu covers content only while opened;
   the main workspace always occupies the full viewport width. */
:root { --techbot-drawer-width: 310px; }
.app-shell,
.app-shell.sidebar-hidden,
.app-shell.menu-open {
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
.app-shell > .main {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}
.app-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
}
/* Hidden unless opened with the hamburger button, regardless of viewport width. */
.app-shell > .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  top: 0;
  left: 0;
  width: min(var(--techbot-drawer-width), 88vw);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  z-index: 102;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  background: #15182a;
  transform: translateX(-104%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 12px 0 46px rgba(11, 16, 36, .23);
  transition: transform .24s ease, opacity .20s ease, visibility .24s;
}
.app-shell.menu-open > .sidebar {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.app-shell .sidebar > .brand {flex: 0 0 auto; min-width: 0; padding: 8px 7px 18px; gap: 9px}
.app-shell .brand-identity { min-width: 0; flex: 1; }
.app-shell .sidebar .brand-name {white-space: nowrap}
.app-shell .sidebar .brand-sub {letter-spacing: 1.2px;white-space:nowrap;font-size:9px}
.app-shell .sidebar-collapse-btn {
  display:grid;place-items:center;flex:0 0 34px;height:34px;
  border:1px solid #3e4262;border-radius:10px;background:#262943;color:#ddd9ff;
  cursor:pointer;
}
.app-shell .sidebar-collapse-btn:hover {background:#38345d;color:white}
.app-shell .sidebar-scroll-region {
  flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;
  display:flex;flex-direction:column;padding-right:4px;
  scrollbar-width:thin;scrollbar-color:#6e69a1 #1b1c31;
  overscroll-behavior:contain;
}
.app-shell .sidebar-scroll-region::-webkit-scrollbar{width:7px}
.app-shell .sidebar-scroll-region::-webkit-scrollbar-track{background:#1b1c31;border-radius:10px}
.app-shell .sidebar-scroll-region::-webkit-scrollbar-thumb{background:#7670a3;border-radius:10px}
.app-shell .sidebar-scroll-region > .nav-head,
.app-shell .sidebar-scroll-region > .nav-list,
.app-shell .sidebar-scroll-region > .sidebar-bottom{flex-shrink:0}
.app-shell .sidebar-scroll-region > .sidebar-bottom{margin-top:auto;padding-top:18px}
.app-shell .sidebar-scroll-region .club-university{padding:0 12px 12px}
.app-shell .sidebar-scroll-region .sidebar-note{margin:0 2px 12px}
.app-shell .sidebar > .user-block{
  flex:0 0 auto;margin:0;padding:12px 6px 2px;min-height:62px;
  background:#15182a;border-top:1px solid #383a56;
}
/* The dimmed backdrop is inside the SAME application window. */
.app-shell > .mobile-overlay {
  display:block;position:fixed;inset:0;width:100%;height:100%;
  border:0;padding:0;border-radius:0;
  background:rgba(14,17,36,.54);
  z-index:101;
  opacity:0;visibility:hidden;pointer-events:none;
  cursor:default;
  transition:opacity .2s ease,visibility .2s ease;
}
.app-shell.menu-open > .mobile-overlay {
  display:block;opacity:1;visibility:visible;pointer-events:auto;
}
body.techbot-drawer-open{overflow:hidden}
.app-shell .sidebar-top-toggle{
  display:grid;place-items:center;min-width:40px;height:40px;
  border:1px solid #e5e4f3;border-radius:11px;
  background:#f6f5ff;color:#5c53bd;cursor:pointer;
  transition:background .18s,transform .18s;
}
.app-shell .sidebar-top-toggle:hover{background:#eae6ff;transform:scale(1.03)}
.app-shell .sidebar-top-toggle:focus-visible,
.app-shell .sidebar-collapse-btn:focus-visible{outline:3px solid #a698ff;outline-offset:2px}
.app-shell .sidebar-top-toggle .icon svg{width:19px;height:19px}
@media(max-width:860px){
  .app-shell,.app-shell.menu-open{display:block;grid-template-columns:none}
  .app-shell>.sidebar{width:min(310px,88vw);transform:translateX(-104%)}
  .app-shell.menu-open>.sidebar{transform:translateX(0)}
  .app-shell>.main{width:100%}
}
@media(max-height:650px){
 .app-shell .sidebar-scroll-region .sidebar-note{padding:10px}
 .app-shell .sidebar-scroll-region .sidebar-note p{margin:4px 0}
 .app-shell .sidebar > .brand{padding-bottom:8px}
}
@media(prefers-reduced-motion:reduce){
 .app-shell>.sidebar,.app-shell>.mobile-overlay,.app-shell .sidebar-top-toggle{transition:none}
}
