/* UZMED Clinical Workspace · Pinterest-inspired navigation/spacing
 * 2026-10-09. Layout-only; never changes patient/AI/clinical calculation logic.
 * Narrow selectors intentionally override historical cross-cutting legacy CSS.
 */
body#uzmedMobile{
  --uz2026-med:#23b8ac;
  --uz2026-line:rgba(118,170,187,.2);
  --uz2026-surface:#111e2b;
  --uz2026-muted:#aec1cd;
}
body#uzmedMobile,
body#uzmedMobile .phone-shell{overflow-x:hidden!important}
body#uzmedMobile .phone-shell{
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overscroll-behavior:none;
}
/* Screens have an independent scroll area that ends ABOVE fixed bottom tabs.
   Legacy stylesheet let the screen grow all the way to the device bottom. */
body#uzmedMobile .phone-shell > .screens{
  min-width:0!important;
  flex:1 1 0!important;
  min-height:0!important;
  height:auto!important;
  margin-bottom:calc(var(--um-nav-size,66px) + env(safe-area-inset-bottom,0px))!important;
  overflow:hidden!important;
}
body#uzmedMobile .phone-shell > .bottom-nav{
  position:absolute!important;
  top:auto!important;left:0!important;right:0!important;bottom:0!important;
  transform:none!important;
  translate:none!important;
  margin:0!important;
  z-index:140!important;
  width:100%!important;
  background:rgba(10,23,35,.96)!important;
  border:1px solid rgba(126,187,203,.24)!important;
  border-bottom:0!important;
  box-shadow:0 -10px 32px rgba(0,0,0,.18)!important;
  backdrop-filter:blur(15px);
}
body#uzmedMobile .phone-shell > .bottom-nav .nav-item{
  min-width:0!important;min-height:50px!important;
  padding:3px 2px!important;gap:3px!important;
}
body#uzmedMobile .bottom-nav .nav-item.active{
  border-radius:12px!important;
  background:rgba(35,184,172,.12)!important;
}
body#uzmedMobile .bottom-nav .nav-item.active .nav-label{color:#72e5d4!important}
body#uzmedMobile .bottom-nav .nav-label{
  font-size:10px!important;line-height:1.1!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  max-width:100%!important;
}
body#uzmedMobile .bottom-nav .nav-icon{
  max-height:30px!important;min-height:26px!important;
}
body#uzmedMobile .screen{
  overflow-x:hidden!important;overflow-y:auto!important;
  min-width:0!important;
  scroll-padding-top:12px;
  padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;
  overscroll-behavior-y:contain;
}
body#uzmedMobile .screen > *{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
body#uzmedMobile .app-header{
  box-shadow:none!important;
  border-bottom:1px solid var(--uz2026-line)!important;
  background:linear-gradient(120deg,rgba(16,31,44,.98),rgba(15,31,40,.96))!important;
}
body#uzmedMobile .app-header :is(.hamburger,.hicon){
  min-width:40px!important;min-height:40px!important;
  border-radius:12px!important;
}
body#uzmedMobile :is(input,select,textarea){
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
body#uzmedMobile :is(.screen,.uz-menu-body) :is(button,a,input,select){
  -webkit-tap-highlight-color:rgba(45,212,191,.12);
}
body#uzmedMobile :is(.screen,.uz-menu-body) :is(button,a):focus-visible{
  outline:2px solid #53d9cc!important;
  outline-offset:2px!important;
}
/* Dense, clinical navigation drawer: accessible, all existing routes retained. */
body#uzmedMobile #uzSideMenu{
  width:min(88vw,356px)!important;
  max-width:356px!important;
  border-radius:0 18px 18px 0!important;
  background:#0b1621!important;
  box-shadow:12px 0 44px rgba(0,0,0,.35)!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-head{
  flex:0 0 auto!important;
  padding:14px 15px 11px!important;
  min-height:0!important;
  background:linear-gradient(145deg,#172a38,#13222f)!important;
  border-bottom:1px solid var(--uz2026-line)!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-brand{font-size:19px!important;letter-spacing:-.5px!important}
body#uzmedMobile #uzSideMenu .uz-menu-sub{
  font-size:11px!important;line-height:1.35!important;
  display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden!important;
  margin:6px 0 0!important;
  color:var(--uz2026-muted)!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-body{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:5px 11px 12px!important;
  overflow:auto!important;
  background:#0b1621!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-section{
  margin:0!important;
  padding:13px 6px 7px!important;
  font-size:10px!important;font-weight:800!important;
  letter-spacing:.1em!important;
  color:#8fb6c1!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-item{
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-height:54px!important;
  height:auto!important;
  margin:0 0 5px!important;
  padding:7px 9px!important;
  gap:9px!important;
  border-radius:13px!important;
  border:1px solid rgba(130,181,196,.14)!important;
  background:linear-gradient(135deg,rgba(34,52,65,.86),rgba(18,35,47,.9))!important;
  color:#edf8fb!important;
  box-shadow:none!important;
  text-align:left!important;
  white-space:normal!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-item:active{
  background:rgba(26,98,99,.36)!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-ico{
  flex:0 0 36px!important;
  width:36px!important;height:36px!important;
  min-width:36px!important;
  display:grid!important;place-items:center!important;
  border-radius:11px!important;
  background:rgba(32,169,156,.13)!important;
  color:#87ecdc!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-txt{flex:1 1 0!important;min-width:0!important}
body#uzmedMobile #uzSideMenu .uz-menu-title{
  font-size:13px!important;font-weight:750!important;
  line-height:1.25!important;margin:0!important;
  color:#f2fafc!important;
  overflow-wrap:anywhere;
}
body#uzmedMobile #uzSideMenu .uz-menu-desc{
  font-size:10px!important;line-height:1.3!important;
  color:#aac2cd!important;
  margin-top:3px!important;
  display:-webkit-box!important;
  -webkit-line-clamp:1;-webkit-box-orient:vertical;
  overflow:hidden!important;
  overflow-wrap:anywhere;
}
body#uzmedMobile #uzSideMenu .uz-menu-arrow{
  color:#6cd7c9!important;font-size:18px!important;
  margin-left:auto!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-foot{
  flex:0 0 auto!important;
  padding:8px 13px calc(8px + env(safe-area-inset-bottom,0px))!important;
  font-size:10px!important;line-height:1.35!important;
  max-height:80px;overflow:auto;
  color:#a7c0cb!important;
  background:#152332!important;
  border-top:1px solid var(--uz2026-line)!important;
}
body#uzmedMobile #uzSideMenu #uzmedMenuSearch20261009{
  width:100%;height:38px;min-height:38px;
  margin-top:10px;padding:0 12px;
  border:1px solid rgba(110,183,190,.3)!important;
  border-radius:11px;
  font:500 13px/1 system-ui,-apple-system,sans-serif;
  background:#0a1622!important;
  color:#ecf7fa!important;
  outline:none!important;
}
body#uzmedMobile #uzSideMenu #uzmedMenuSearch20261009::placeholder{color:#95aebc}
body#uzmedMobile #uzSideMenu #uzmedMenuSearch20261009:focus{
  border-color:#59dbce!important;
  box-shadow:0 0 0 2px rgba(48,193,177,.16)!important;
}
body#uzmedMobile #uzSideMenu .uzmed-filter-hidden{display:none!important}
/* The original protocol search remains. The additional AI panel is ONE
   collapsible action directly after it, not a duplicate form 4,000px below. */
body#uzmedMobile #assosi-screen .uzmed-protocol-ai-details{
  display:block!important;margin:10px 0 12px!important;
  border:1px solid rgba(83,168,179,.3)!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,rgba(17,59,67,.45),rgba(14,34,47,.82))!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body#uzmedMobile #assosi-screen .uzmed-protocol-ai-details > summary{
  cursor:pointer;
  padding:12px 14px;
  min-height:44px;
  color:#a1f1e6!important;
  font-weight:750;font-size:13px;
  outline-offset:-4px;
  list-style:none;
}
body#uzmedMobile #assosi-screen .uzmed-protocol-ai-details > summary::-webkit-details-marker{display:none}
body#uzmedMobile #assosi-screen .uzmed-protocol-ai-details > summary:after{
  content:"⌄";float:right;font-size:17px;line-height:1.1;
  color:#7cdccf;
}
body#uzmedMobile #assosi-screen .uzmed-protocol-ai-details[open] > summary:after{content:"⌃"}
body#uzmedMobile #assosi-screen #uzmedProtoAi784{
  margin:0!important;padding:8px 12px 12px!important;
  background:transparent!important;border:0!important;
  box-shadow:none!important;
}
body#uzmedMobile #assosi-screen #uzmedProtoAi784 .v784hint{
  line-height:1.4;font-size:11px;overflow-wrap:anywhere;
}
body#uzmedMobile #assosi-screen .proto-wrap{min-width:0!important;max-width:100%!important;}
body#uzmedMobile #assosi-screen .proto-search-box{
  min-width:0!important;
  min-height:48px!important;
  border-radius:13px!important;
}
body#uzmedMobile #assosi-screen .proto-search-box input{min-width:0!important;font-size:14px!important;}
body#uzmedMobile #assosi-screen :is(.cat-item,.doktor-item,.mkb-item){
  border-radius:13px!important;
  padding:12px!important;
  min-height:58px!important;
  margin-bottom:6px!important;
  box-shadow:none!important;
  border:1px solid rgba(112,157,177,.2)!important;
}
body#uzmedMobile #assosi-screen :is(.cat-name,.cat-title){
  font-size:14px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
/* Medicine results should not overflow or compete with clinical action buttons. */
body#uzmedMobile #dorilar-screen{max-width:100%!important;}
body#uzmedMobile #dorilar-screen :is(.drug-card,.fdm-sec,.search-bar,.drug-filter-row){
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
body#uzmedMobile #dorilar-screen :is(.drug-card,.fdm-sec){
  border-radius:14px!important;
  box-shadow:none!important;
}
body#uzmedMobile #dorilar-screen .drug-filter-row{
  overflow-x:auto!important;overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  gap:7px!important;
}
body#uzmedMobile #dorilar-screen .drug-filter-row::-webkit-scrollbar{display:none}
body#uzmedMobile #dorilar-screen .drug-filter-row > *{flex-shrink:0;white-space:nowrap}
/* Admin dashboard: same clinical hierarchy, instead of unrelated red theme. */
body#uzmedMobile #uaApp :is(.ua-sb,.ua-main){
  background:linear-gradient(180deg,#101c29,#0c1621)!important;
}
body#uzmedMobile #uaApp .ua-sb-title{color:#6be0d1!important}
body#uzmedMobile #uaApp :is(.ua-sc,.ua-card,.ua-panel){
  border-radius:15px!important;
  border-color:rgba(104,180,189,.18)!important;
  box-shadow:none!important;
}
body#uzmedMobile #uaApp .ua-content{min-width:0!important;max-width:100vw!important}
body#uzmedMobile #uaApp :is(.ua-sc-num,.ua-ph-title){overflow-wrap:anywhere}
@media(max-width:390px){
  body#uzmedMobile #uzSideMenu{width:min(91vw,342px)!important;}
  body#uzmedMobile #uzSideMenu .uz-menu-item{min-height:50px!important;padding:6px 9px!important;}
  body#uzmedMobile .screen{padding-left:11px!important;padding-right:11px!important}
}
@media(prefers-reduced-motion:reduce){
  body#uzmedMobile #uzSideMenu .uz-menu-item,
  body#uzmedMobile .bottom-nav .nav-item{transition:none!important;animation:none!important}
}

/* Surgical cleanup: keep embedded clinical modes accessible in 2 compact rows,
   not as oversized duplicated navigation cards. */
body#uzmedMobile #uzSideMenu .ug-clinical-tabs{
 width:100%!important;
 min-width:0!important;
 padding:6px 0!important;
 margin:1px 0 8px!important;
 max-width:100%!important;
 overflow:hidden!important;
 background:transparent!important;
 border:0!important;
}
body#uzmedMobile #uzSideMenu .ug-clinical-tabs .ai-mode-tabs{
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:5px!important;
 width:100%!important;
 padding:0!important;
 margin:0!important;
 overflow:visible!important;
 background:transparent!important;
}
body#uzmedMobile #uzSideMenu .ug-clinical-tabs .ai-mode-btn{
 display:flex!important;
 flex:initial!important;
 align-items:center!important;
 justify-content:center!important;
 min-width:0!important;
 min-height:37px!important;
 height:auto!important;
 padding:5px 4px!important;
 font:700 10px/1.25 system-ui,-apple-system,sans-serif!important;
 text-overflow:ellipsis!important;
 white-space:normal!important;
 text-align:center!important;
 border-radius:9px!important;
 border:1px solid rgba(122,184,191,.19)!important;
 background:rgba(24,52,62,.77)!important;
 color:#d3eaf1!important;
}
body#uzmedMobile #uzSideMenu .ug-clinical-tabs .ai-mode-btn.active{
 color:#adfff0!important;
 background:rgba(23,119,108,.32)!important;
 border-color:rgba(75,217,199,.55)!important;
}
body#uzmedMobile #uzSideMenu .uz-menu-body > button:not(.uz-menu-item),
body#uzmedMobile #uzSideMenu .uz-menu-body > a{
 width:100%!important;
 display:flex!important;
 align-items:center!important;
 min-height:42px!important;
 margin:3px 0 6px!important;
 padding:9px 12px!important;
 gap:9px!important;
 text-align:left!important;
 white-space:normal!important;
 font:700 12px/1.35 system-ui,-apple-system,sans-serif!important;
 color:#bfeae6!important;
 background:#142938!important;
 border:1px solid rgba(107,183,193,.21)!important;
 border-radius:11px!important;
 box-shadow:none!important;
 box-sizing:border-box!important;
}
