/* V27 mobile-first corrections, layered after all earlier styles */
@media (max-width: 767px){
 html,body,#appView,.site-shell{width:100%;max-width:100%;overflow-x:clip!important}
 .nav{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;padding:10px 12px!important;min-height:68px!important}
 .nav .brand{grid-column:1!important;max-width:100%!important;min-width:0!important}
 .nav .brand-name{font-size:clamp(13px,3.5vw,18px)!important;white-space:nowrap!important}
 .nav-actions{grid-column:2!important;display:flex!important;gap:5px!important;flex-wrap:nowrap!important;justify-content:flex-end!important;max-width:100%!important}
 .nav-actions .account-btn{max-width:85px!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}
 .nav-actions :is(.site-theme-toggle,.language-toggle,.header-notifications>button){min-height:32px!important;padding:5px 6px!important;font-size:10px!important}
 .nav-links{grid-column:1/-1!important;order:3!important;width:100%!important;margin:0!important;justify-content:center!important;gap:12px!important;flex-wrap:wrap!important}
 .nav-links a{min-height:30px!important;font-size:12px!important}
 .hero{display:flex!important;flex-direction:column!important;gap:4px!important;padding:30px 16px 34px!important;overflow:hidden!important}
 .hero-copy{width:100%!important;min-width:0!important;max-width:100%!important}
 .hero h1{font-size:clamp(33px,8.2vw,48px)!important;letter-spacing:-1.4px!important;line-height:1.14!important;margin:16px 0!important}
 .hero-actions{display:flex!important;flex-direction:row!important;align-items:stretch!important;gap:9px!important}
 .hero-actions .btn{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:50%!important;min-height:43px!important;padding:9px 8px!important;font-size:12px!important;line-height:1.25!important;border-radius:10px!important;white-space:normal!important}
 .hero .dev-showcase,.urdu-home .dev-showcase{position:relative!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;order:2!important;display:flex!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:235px!important;aspect-ratio:1.34!important;opacity:1!important;filter:none!important;overflow:visible!important;margin:4px 0 0!important;transform:translate3d(var(--motion-x,0px),var(--motion-y,0px),0) rotateX(var(--motion-rx,0deg)) rotateY(var(--motion-ry,0deg))!important;transform-style:preserve-3d}
 .dev-showcase>*{max-width:100%!important}.dev-showcase .dev-window{width:100%!important;max-width:100%!important;min-width:0!important}
 .dev-showcase .dev-floating-card{font-size:9px!important;max-width:40%!important}
 .hero-bottom,.scroll-to-explore{display:none!important}
 .workspace-shell{display:block!important;position:relative!important;width:100%!important;max-width:100%!important;margin:8px 0 30px!important;border-radius:16px!important;overflow:visible!important;min-height:50vh!important}
 #appView:has(.workspace-shell){padding:0 10px!important}
 .workspace-content{width:100%!important;min-width:0!important;padding:15px 13px 22px!important;overflow:visible!important}
 .workspace-sidebar{position:fixed!important;top:0!important;bottom:0!important;left:0!important;width:min(82vw,295px)!important;height:100dvh!important;max-height:100dvh!important;z-index:10010!important;overflow-y:auto!important;display:block!important;transform:translateX(-110%)!important;transition:transform .25s ease!important;background:#141b38!important;border-radius:0 18px 18px 0!important;box-shadow:0 20px 75px #0008!important;padding:22px 14px!important;visibility:hidden!important}
 .workspace-shell.ws-menu-open .workspace-sidebar{transform:translateX(0)!important;visibility:visible!important}
 .workspace-shell[dir=rtl] .workspace-sidebar{left:auto!important;right:0!important;transform:translateX(110%)!important;border-radius:18px 0 0 18px!important}
 .workspace-shell[dir=rtl].ws-menu-open .workspace-sidebar{transform:translateX(0)!important}
 .workspace-sidebar nav{display:flex!important;flex-direction:column!important;overflow:visible!important;gap:5px!important;max-width:none!important}
 .workspace-sidebar .ws-nav{display:flex!important;align-items:center!important;min-height:44px!important;width:100%!important;white-space:normal!important;padding:10px 14px!important;font-size:14px!important;text-align:start!important}
 .ws-mobile-header{display:flex!important;align-items:center;gap:10px;margin-bottom:15px}
 .ws-mobile-menu-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;min-height:40px!important;border:1px solid #6674a4!important;border-radius:11px!important;background:#222c51!important;color:white!important;padding:8px 12px!important;font-size:14px!important;font-weight:700!important}
 .ws-mobile-menu-btn svg{width:20px;height:20px}
 .ws-mobile-shade{display:none;position:fixed;inset:0;z-index:10009;background:rgba(3,5,17,.75)}
 .ws-menu-open .ws-mobile-shade{display:block}
 .ws-mobile-close{display:flex!important;align-items:center;justify-content:center;position:sticky;top:0;margin:0 0 14px auto;background:#242e52;color:white;border:1px solid #56618a;width:40px;height:40px;border-radius:11px;font-size:24px;z-index:1}
 .ws-top{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:flex-start!important}
 .ws-top h1{font-size:clamp(21px,6vw,29px)!important;line-height:1.23!important}
 .ws-top-controls{display:none!important}
 .ws-mobile-logout{display:flex!important;margin:18px 0 0;width:100%;min-height:43px;padding:9px 12px;align-items:center;justify-content:center;border:1px solid #5c638c;background:#242b4d;color:#fff;border-radius:10px;font-weight:600}
 .workspace-content :is(.ws-card,.portal-card,.ws-order){padding:13px!important;max-width:100%!important;min-width:0!important}
 .ws-stats,.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .ws-stats>*,.metric-grid>*{min-width:0!important}
 .workspace-content :is(button,.btn,.mini-action){max-width:100%;min-height:36px;font-size:12px;line-height:1.3;padding:8px 11px;white-space:normal}
 .workspace-content :is(input,textarea,select){max-width:100%!important;min-width:0!important;font-size:16px!important}
 .workspace-content :is(table,.data-table){display:block;max-width:100%;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
 .ws-order{flex-direction:column!important;align-items:stretch!important}.ws-pagination{flex-wrap:wrap!important}
 .theme-light .workspace-sidebar{background:#f4f6ff!important}.theme-light .ws-mobile-menu-btn,.theme-light .ws-mobile-logout,.theme-light .ws-mobile-close{background:#e9eeff!important;color:#1c2850!important;border-color:#b7c8e8!important}
}
@media(max-width:390px){.nav .brand-name{font-size:12px!important}.hero h1{font-size:32px!important}.hero-actions .btn{font-size:11px!important}.ws-stats,.metric-grid{grid-template-columns:1fr!important}}
@media(min-width:768px){.ws-mobile-header,.ws-mobile-close,.ws-mobile-logout,.ws-mobile-shade{display:none!important}}
