/* Header-triggered right drawer. Desktop navigation is untouched. */
.navigation-drawer:not([open]){display:none}
.navigation-drawer{position:fixed;inset-block:0;inset-inline-start:0;inset-inline-end:auto;margin:0;width:min(316px,calc(100vw - 48px));max-width:none;height:100dvh;max-height:100dvh;padding:0;border:0;border-inline-end:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-fg);box-shadow:-12px 0 48px #1f202444;overflow:hidden;direction:rtl}
.navigation-drawer[open]{display:flex;flex-direction:column;animation:drawer-enter .18s ease-out}
.navigation-drawer::backdrop{background:#006ffd99}
.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding:calc(12px + env(safe-area-inset-top)) 16px 12px;border-bottom:1px solid var(--ui-line)}
.drawer-heading h2{font-size:19px;line-height:1.8;font-weight:750;margin:0;color:var(--ui-fg)}
:root[data-theme] body .drawer-dismiss{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;width:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-raised)!important;color:var(--ui-fg)!important;box-shadow:none;transform:none}
.drawer-dismiss svg,.drawer-header-toggle svg{display:block;width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round}
.drawer-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 10px calc(16px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
:root[data-theme] body .navigation-drawer :is(.sidebar,nav){display:flex!important;flex-direction:column!important;gap:4px;position:static!important;margin:0!important;padding:0!important;max-height:none!important;overflow:visible!important;border:0!important;border-radius:0;box-shadow:none!important;background:transparent!important;width:100%;min-width:0}
:root[data-theme] body .navigation-drawer .sidebar h3{display:none}
:root[data-theme] body .navigation-drawer a{display:flex;align-items:center;gap:12px;min-height:48px;flex:0 0 auto;padding:11px 12px;margin:0!important;border-radius:12px;font-size:16px;line-height:1.8;color:var(--ui-fg)!important;white-space:normal;overflow-wrap:anywhere;box-shadow:none}
:root[data-theme] body .navigation-drawer a[aria-current=page]{background:var(--ui-soft)!important;color:var(--ui-accent)!important;box-shadow:inset -3px 0 var(--ui-accent)}
:root[data-theme] body .navigation-drawer .nav-icon{width:22px;height:22px;flex:0 0 22px}
:root[data-theme] body .navigation-drawer .mobile-logout{display:block;width:100%;min-height:48px;text-align:start;padding:11px 12px;margin-top:12px;border:1px solid var(--ui-line);background:var(--ui-raised)!important;color:var(--ui-negative)!important;font-size:15px}
:root[data-theme] body .navigation-drawer :is(a,button):focus-visible,:root[data-theme] body .drawer-header-toggle:focus-visible{outline:3px solid var(--ui-accent);outline-offset:2px}
@keyframes drawer-enter{from{transform:translateX(100%);opacity:.6}to{transform:translateX(0);opacity:1}}
@media(max-width:1023px){
 body.drawer-open{overflow:hidden}
 :root[data-theme] body:not(.gateway-view)>header{direction:rtl}
 :root[data-theme] body>header nav{direction:rtl}
 :root[data-theme] body>header .brand{direction:rtl;order:0!important;margin-inline-start:0!important;margin-inline-end:auto!important}
 :root[data-theme] body>header .display-preference{order:1!important}
 :root[data-theme] body>header .header-account-actions>.button{order:2!important}
 :root[data-theme] body>header .header-mobile-toggle{order:3!important}
 :root[data-theme] body>header .drawer-header-toggle{border:1px solid var(--ui-line);border-radius:12px;height:44px;padding:10px;background:var(--ui-soft)!important;color:var(--ui-accent)!important;cursor:pointer}
}
@media(prefers-reduced-motion:reduce){.navigation-drawer[open]{animation:none}}
@media print{.navigation-drawer{display:none!important}}
