/* v3.0.92: fixed navigation belongs to the viewport app, not its scroll area.
   Only phone/tablet rules change; the v3.0.91 desktop baseline is unchanged. */
.tke-v391-bottom-nav,.tke-v391-mobile-header{display:none}
@media (max-width:1100px), (min-width:1101px) and (max-width:1400px) and (pointer:coarse){
  html:has(body.tke-op-page){overflow-x:hidden!important}
  html body.tke-op-page{margin:0!important;padding:0!important;max-width:100vw!important;overflow-x:hidden!important;background:#f1f1f8!important}
  /* Neutralise common theme article/page wrappers without touching the app's forms. */
  html body.tke-op-page :is(#page,#content,#primary,#main,.site,.site-content,.content-area,.site-main,.entry-content,.wp-block-post-content,.wp-site-blocks,.wp-block-group,.elementor,.elementor-section,.elementor-container){max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box!important}
  html body.tke-op-page .tke-app.tke-app-root{width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;display:flex!important;flex-direction:column!important;height:100vh!important;max-height:100vh!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important}
  html body.tke-op-page .tke-app.tke-app-root.tke-v391-nav-ready > .tke-sidebar{display:none!important}
  /* Legacy phone CSS uses overflow:visible; the fixed app needs its own scroll area. */
  html body.tke-op-page .tke-app.tke-app-root > .tke-main{overflow-y:auto!important;overflow-x:hidden!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;padding:0 12px calc(82px + env(safe-area-inset-bottom,0px))!important;margin:0!important}
  html body.tke-op-page .tke-app.tke-app-root.tke-v391-nav-ready > .tke-v391-mobile-header{display:flex!important;align-items:center!important;gap:12px!important;flex:0 0 auto!important;height:57px!important;min-height:57px!important;box-sizing:border-box!important;padding:7px 16px!important;background:#120b2c!important;color:white!important;width:100%!important;z-index:3!important}
  .tke-v391-mobile-header .tke-brand-logo{display:block!important;width:75px!important;max-width:75px!important;height:36px!important;object-fit:contain!important}
  .tke-v391-mobile-heading{color:#fff!important;font-size:15px!important;font-weight:750!important;letter-spacing:.15px!important;margin-left:4px!important}
  .tke-v391-mobile-logout{display:flex!important;justify-content:center!important;align-items:center!important;margin-left:auto!important;color:#fff!important;width:37px!important;height:37px!important;border:1px solid #ffffff40!important;border-radius:10px!important}
  .tke-v391-mobile-logout svg{width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  html body.tke-op-page .tke-v391-bottom-nav{position:fixed!important;display:grid!important;grid-template-columns:repeat(var(--ni326-nav-count,5),minmax(0,1fr))!important;gap:3px!important;bottom:0!important;left:0!important;right:0!important;width:100%!important;height:calc(59px + env(safe-area-inset-bottom,0px))!important;padding:4px 6px calc(4px + env(safe-area-inset-bottom,0px))!important;box-sizing:border-box!important;background:linear-gradient(110deg,#100a2c,#1e0e3a)!important;box-shadow:0 -4px 18px #160c3440!important;border-top:1px solid #ffffff23!important;z-index:2147483000!important;isolation:isolate!important}
  html body.tke-op-page .tke-v391-bottom-nav .tke-v391-bottom-link{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;min-width:0!important;min-height:0!important;gap:2px!important;padding:3px 1px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:#eeeafa!important;text-align:center!important;text-decoration:none!important;font-family:inherit!important;line-height:1.05!important;box-sizing:border-box!important}
  html body.tke-op-page .tke-v391-bottom-nav .tke-v391-bottom-link.is-active{background:linear-gradient(115deg,#7021ee,#a328e3)!important;color:#fff!important}
  html body.tke-op-page .tke-v391-bottom-nav .tke-v391-bottom-link.is-disabled{opacity:.38!important;cursor:not-allowed!important}
  .tke-v391-bottom-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:23px!important;height:23px!important;line-height:1!important;color:inherit!important}
  .tke-v391-bottom-icon svg{display:block!important;width:23px!important;height:23px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  .tke-v391-bottom-label{font-size:10px!important;font-weight:650!important;letter-spacing:-.15px!important;white-space:nowrap!important;color:inherit!important}
  .tke-v391-bottom-link:focus-visible{outline:2px solid #ff963b!important;outline-offset:-3px!important}
  /* Project tables retain horizontal scroll instead of compressing columns. */
  html body.tke-op-page .tke-v201-project-table-card{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  html body.tke-op-page .tke-v201-filterbar{max-width:100%!important;box-sizing:border-box!important}
  html body.tke-op-page .tke-v300-hero,html body.tke-op-page .tke-v388-project-hero{margin-left:-12px!important;margin-right:-12px!important;border-radius:0!important}
}
@media (max-width:600px){
  html body.tke-op-page .tke-app.tke-app-root > .tke-main{padding-left:9px!important;padding-right:9px!important}
  html body.tke-op-page .tke-v300-hero,html body.tke-op-page .tke-v388-project-hero{margin-left:-9px!important;margin-right:-9px!important}
  html body.tke-op-page .tke-v391-bottom-nav{padding-left:4px!important;padding-right:4px!important;gap:1px!important}
  .tke-v391-bottom-label{font-size:9.5px!important}
}
@media (orientation:landscape) and (max-height:500px) and (max-width:1100px){
  html body.tke-op-page .tke-v391-bottom-nav{height:calc(57px + env(safe-area-inset-bottom,0px))!important}
  html body.tke-op-page .tke-app.tke-app-root > .tke-main{padding-bottom:calc(77px + env(safe-area-inset-bottom,0px))!important}
}

/* Build 22: one permission-checked menu for both desktop and touch. */
.tke-ni-office-submenu[hidden],.tke-sales-crm-submenu[hidden],.ni326-mobile-overlay[hidden]{display:none!important}
.ni326-mobile-overlay{display:none}
@media (max-width:1100px), (min-width:1101px) and (max-width:1400px) and (pointer:coarse){
 html body.tke-op-page .tke-v391-bottom-link{position:relative;cursor:pointer}
 .ni326-nav-badge{position:absolute;top:3px;right:5px;border-radius:20px;min-width:16px;padding:2px 4px;background:#ff923c;color:#23142f;font-size:10px;font-weight:800;line-height:1.15;text-align:center;box-sizing:border-box}
 .ni326-mobile-overlay:not([hidden]){display:flex!important;position:fixed;inset:0;align-items:flex-end;justify-content:center;padding:12px 10px calc(66px + env(safe-area-inset-bottom,0px));box-sizing:border-box;background:#100b2a69;z-index:2147482999!important}
 .ni326-mobile-panel{background:white;border-radius:18px;box-shadow:0 12px 48px #170e4240;color:#17132d;width:100%;max-width:520px;max-height:calc(100dvh - 100px - env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;overflow:hidden}
 .ni326-mobile-menu-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #eeebf4;flex:none}
 .ni326-mobile-menu-head h2{font-size:20px!important;margin:0!important;color:#17132d!important}
 .ni326-mobile-menu-close{width:40px;height:40px;border:0;border-radius:9px;color:#625775;background:#f3eefb;font-size:24px;cursor:pointer}
 .ni326-mobile-menu-content{padding:8px 12px 12px;overflow:auto;overscroll-behavior:contain}
 .ni326-mobile-menu-content h3{margin:12px 8px 5px;color:#6b5b82;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
 .ni326-mobile-menu-link{position:relative;display:flex;align-items:center;gap:12px;padding:9px 12px;min-height:44px;text-decoration:none!important;border-radius:10px;color:#241840!important;font-size:14px;font-weight:650;box-sizing:border-box}
 .ni326-mobile-menu-link .tke-v391-bottom-icon{background:#f0e8fc;color:#7925ce;border-radius:9px;width:34px!important;height:34px!important;flex:none}
 .ni326-mobile-menu-link .ni326-nav-badge{position:static;margin-left:auto}
 .ni326-mobile-menu-link.is-active,.ni326-mobile-menu-link:hover{background:#efe5fb}
 .ni326-mobile-menu-link:focus-visible,.ni326-mobile-menu-close:focus-visible{outline:2px solid #7925ce;outline-offset:1px}
}
