/* Mobile Drawer Menu (right)
   Feste Menü-Version unabhängig vom Seitendesign
*/

:root{
  --m-border: #3867d6;
  --m-card: #ffffff;
  --m-text: #0b1220;
  --m-bg: #f5f7fb;
  --m-muted: #5a667a;
  --m-accent: #ff9800;
  --m-pill: rgba(255,255,255,.55);
  --m-pill-border: rgba(56,103,214,.22);
}

html.dark{
  --m-border: #3867d6;
  --m-card: #111a26;
  --m-text: #e8eef7;
  --m-bg: #081018;
  --m-muted: #9aa6b8;
  --m-accent: #ff9800;
  --m-pill: rgba(255,255,255,.08);
  --m-pill-border: rgba(255,255,255,.18);
}

.mbar{
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9997;
  display: flex;
  justify-content: flex-end;
  padding: 0;
}

.mbar-btn{
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--m-border) !important;
  background: var(--m-card) !important;
  color: var(--m-text) !important;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 46px;
  font: inherit;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

.mbar-btn svg{
  width: 24px;
  height: 24px;
}

.mbar-btn span{
  text-transform: uppercase;
  letter-spacing: .04em;
}

.drawer-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(2px);
  z-index: 9998;
}

.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(68vw, 240px);
  background: var(--m-bg);
  border-left: 1px solid var(--m-border);
  transform: translateX(100%);
  transition: transform .22s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.drawer.open{
  transform: translateX(0);
}

.drawer-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--m-border);
}

.drawer-brand{
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--m-text);
}

.drawer-sub{
  color: var(--m-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.drawer-close{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--m-border);
  background: var(--m-card);
  color: var(--m-text);
  border-radius: 12px;
  cursor: pointer;
}

.drawer-close svg{
  width: 20px;
  height: 20px;
}

.drawer-tools{
  padding: 10px 14px;
  border-bottom: 1px solid var(--m-border);
}

.drawer-tool{
  width: 100%;
  border: 1px solid var(--m-border);
  background: var(--m-card);
  color: var(--m-text);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
}

.drawer-tool:hover{
  border-color: var(--m-accent);
}

.drawer-nav{
  padding: 8px 8px 14px;
  overflow: auto;
}

.drawer-group{
  border: 1px solid var(--m-border);
  background: var(--m-card);
  border-radius: 12px;
  padding: 2px;
  margin: 3px 1px;
}

.drawer-group-title{
  color: var(--m-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 2px 6px 4px;
}

.drawer-link{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 140, 26, 0.10);
  color: var(--m-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.05;
}

.drawer-link span:last-child{
  font-size: 0.9rem;
}

.drawer-link:hover{
  background: rgba(255, 140, 26, 0.18);
}

.drawer-link .ico{
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--m-pill-border);
  background: var(--m-pill);
  border-radius: 6px;
}

.drawer-link .ico svg{
  width: 14px;
  height: 14px;
}

.drawer-link.active{
  background: var(--m-accent) !important;
  color: #1b2430 !important;
  font-weight: 900;
  outline: 2px solid rgba(255,152,0,.55);
}

.drawer-link.active span,
.drawer-link.active .ico,
.drawer-link.active svg{
  color: #1b2430 !important;
  stroke: #1b2430 !important;
}

.drawer-link.active .ico{
  background: rgba(255,255,255,.35) !important;
  border-color: #1b2430 !important;
}

.drawer-link.active::before{
  display: none !important;
  content: none !important;
}

#menu{
  display: none;
}

@media (max-width: 768px){
  .mbar-btn{
    padding: 6px 10px;
    min-height: 36px;
    font-size: 14px;
    gap: 6px;
  }

  .mbar-btn svg{
    width: 18px;
    height: 18px;
  }

  .drawer-link{
    font-size: 11px;
  }

  .drawer-link span:last-child{
    font-size: 11px;
  }
}