/* BIRUN Stage 42.1 — corrected professional mobile drawer */
html{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none;touch-action:pan-y;background:#fff}
body.mobile-nav-open{overflow:hidden;touch-action:none}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%}
.site-header,.modern-header{width:100%;max-width:100%}
.mobile-menu-btn{display:none;align-items:center;justify-content:center;width:42px;height:42px;padding:0;border:1px solid #e4ebe6;border-radius:13px;background:#fff;color:#1f2937;font-size:22px;line-height:1;cursor:pointer;transition:.2s ease}
.mobile-menu-btn:hover{border-color:#cfe3d5;box-shadow:0 8px 20px rgba(15,23,42,.08)}
.mobile-nav-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.43);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;visibility:hidden;transition:.24s ease;z-index:1998}
body.mobile-nav-open .mobile-nav-backdrop{opacity:1;visibility:visible}
.mobile-nav-head,.mobile-nav-footer{display:none}
.pwa-install-btn{display:none;align-items:center;justify-content:center;gap:7px;border:1px solid #d9e8de;background:#f5fbf7;color:var(--primary,#0f9d58);border-radius:12px;padding:9px 13px;font:inherit;font-weight:700;cursor:pointer}
.pwa-install-btn.is-visible{display:inline-flex}

/* Keep desktop navigation completely untouched and hide mobile-only blocks. */
@media(min-width:901px){
  .main-nav{position:static!important;display:flex!important;align-items:center!important;gap:28px!important;width:auto!important;height:auto!important;padding:0!important;background:transparent!important;box-shadow:none!important;transform:none!important;overflow:visible!important;border-radius:0!important}
  .mobile-nav-head,.mobile-nav-footer{display:none!important}
  .mobile-nav-links{display:flex!important;align-items:center!important;gap:28px!important}
  .mobile-nav-links>a{display:inline-block!important;padding:0!important;border:0!important;background:transparent!important;border-radius:0!important;min-height:0!important;color:inherit!important;box-shadow:none!important}
  .mobile-nav-links>a::before{display:none!important}
}

@media(max-width:900px){
  body{padding-bottom:env(safe-area-inset-bottom)}
  .site-header,.modern-header{height:64px!important;min-height:64px;position:sticky!important;top:0;z-index:2000;padding-right:max(14px,env(safe-area-inset-right))!important;padding-left:max(14px,env(safe-area-inset-left))!important;background:rgba(255,255,255,.97)!important;backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px)}
  .header-inner{width:100%!important;height:100%;display:flex;align-items:center;justify-content:space-between;gap:10px}
  .brand img{max-height:42px;width:auto}.brand{font-size:21px!important;flex:0 0 auto}
  .mobile-menu-btn{display:inline-flex!important;order:-1}
  .header-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
  .header-actions>.btn:not(.mobile-menu-btn),.header-actions>.text-link,.header-actions>form{display:none!important}

  .main-nav{position:fixed!important;top:0!important;right:0!important;bottom:0!important;width:min(88vw,350px)!important;height:100dvh!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;padding:0!important;background:#fff!important;box-shadow:-18px 0 55px rgba(15,23,42,.18)!important;transform:translateX(108%)!important;transition:transform .28s cubic-bezier(.22,.75,.24,1)!important;z-index:1999!important;overflow-y:auto!important;border-radius:26px 0 0 26px!important}
  body.mobile-nav-open .main-nav{transform:translateX(0)!important}

  .mobile-nav-head{position:sticky;top:0;z-index:2;display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:16px;background:linear-gradient(180deg,#fff 0%,#f7fbf8 100%);border-bottom:1px solid #edf2ee}
  .mobile-nav-brand{display:flex;align-items:center;gap:11px;min-width:0}
  .mobile-nav-brand-link{display:flex!important;align-items:center!important;justify-content:center!important;width:48px!important;height:48px!important;min-height:48px!important;padding:0!important;border-radius:15px!important;background:#fff!important;border:1px solid #e7efe9!important;box-shadow:0 6px 18px rgba(15,23,42,.06)!important;flex:0 0 auto!important}
  .mobile-nav-brand-link::before,.mobile-nav-brand-link::after{display:none!important}
  .mobile-nav-brand-link img{display:block!important;max-width:39px!important;max-height:39px!important;width:auto!important;height:auto!important;object-fit:contain!important}
  .mobile-nav-logo-fallback{font-weight:900;color:var(--primary,#0f9d58);font-size:20px}
  .mobile-nav-brand-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
  .mobile-nav-brand-copy strong{font-size:15px;color:#10261a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-nav-brand-copy span{font-size:11.5px;color:#6f7d75;white-space:nowrap}
  .mobile-nav-close{display:inline-flex!important;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid #e4eae6;border-radius:12px;background:#fff;color:#203228;font-size:27px;line-height:1;cursor:pointer;flex:0 0 auto;-webkit-tap-highlight-color:transparent}

  .mobile-nav-links{display:grid!important;gap:7px!important;padding:13px 14px 16px!important}
  .main-nav .mobile-nav-links>a{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:50px!important;padding:11px 14px!important;border-radius:14px!important;font-size:15px!important;font-weight:700!important;white-space:nowrap!important;color:#26372e!important;background:#fff!important;border:1px solid transparent!important;transition:.2s ease!important;position:relative!important;box-shadow:none!important}
  .main-nav .mobile-nav-links>a span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .main-nav .mobile-nav-links>a::before{content:""!important;display:block!important;width:7px!important;height:7px!important;border-radius:50%!important;background:#d8e5dd!important;flex:0 0 auto!important;order:2!important;transition:.2s ease!important}
  .main-nav .mobile-nav-links>a::after{display:none!important;content:none!important}
  .main-nav .mobile-nav-links>a:hover{background:#f7fbf8!important;border-color:#e1ece4!important}
  .main-nav .mobile-nav-links>a.active{background:linear-gradient(180deg,#eefaf2 0%,#e8f7ee 100%)!important;color:var(--primary,#0f9d58)!important;border-color:#d9ecdf!important;box-shadow:0 7px 18px rgba(15,157,88,.08)!important}
  .main-nav .mobile-nav-links>a.active::before{background:var(--primary,#0f9d58)!important;box-shadow:0 0 0 5px rgba(15,157,88,.12)!important}

  .mobile-nav-footer{display:block!important;margin-top:auto;padding:15px 16px calc(15px + env(safe-area-inset-bottom));border-top:1px solid #edf2ee;background:#fbfdfb}
  .mobile-nav-user-note{font-size:12px;line-height:1.9;color:#6c7b73;margin-bottom:11px}
  .mobile-nav-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
  .mobile-nav-actions .btn,.mobile-nav-actions form,.mobile-nav-actions a{width:100%!important}
  .mobile-nav-actions .btn{display:flex!important;align-items:center;justify-content:center;text-align:center;padding:10px 13px!important;border-radius:13px!important;font-weight:800!important;min-height:44px!important}
  .mobile-nav-primary{background:var(--primary,#0f9d58)!important;border-color:var(--primary,#0f9d58)!important;color:#fff!important}
  .mobile-nav-logout button{width:100%!important}

  .container{width:calc(100% - 28px)!important;max-width:100%!important}
  input,select,textarea{font-size:16px!important}
  .dashboard-content{padding:16px!important;max-width:100%;overflow-x:hidden}
  table{display:block;width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
}

@media(max-width:480px){
  .main-nav{width:min(90vw,340px)!important}
  .mobile-nav-actions{grid-template-columns:1fr}
  .mobile-nav-brand-copy span{font-size:11px}
}

@media(display-mode:standalone){body{padding-top:env(safe-area-inset-top)}.site-header,.modern-header{top:env(safe-area-inset-top)}}
@media(prefers-reduced-motion:reduce){.main-nav,.mobile-nav-backdrop,.mobile-menu-btn{transition:none!important}}
