.mobile-bottom-nav{display:none}
.mobile-modules-dialog{padding:16px;border:1px solid var(--line);color:var(--text-primary)}
.mobile-modules-dialog:not([open]){display:none}
@media(max-width:700px){
 body.in-workspace main{padding-bottom:calc(20px + var(--mobile-nav-height,0px))}
 body.in-workspace .mobile-bottom-nav:not([hidden]){position:fixed;z-index:80;inset:auto 0 0;display:flex;align-items:stretch;justify-content:space-around;gap:8px;min-height:64px;padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));background:var(--surface-field);border-top:1px solid var(--line);box-shadow:0 -4px 24px #00000008;backdrop-filter:blur(24px);box-sizing:border-box}
 .mobile-bottom-nav>a,.mobile-bottom-nav>button{display:flex;flex:1;min-width:44px;min-height:52px;max-width:100px;align-items:center;justify-content:center;flex-direction:column;gap:4px;margin:0;padding:4px 2px;border:0;border-radius:12px;background:transparent;color:var(--text-secondary);font:inherit;font-size:10px;line-height:1.15;text-align:center;text-decoration:none;cursor:pointer;box-sizing:border-box;transform:none}
 .mobile-bottom-nav .icon{width:21px;height:21px}
 .mobile-bottom-nav>a>span{max-width:100%;overflow-wrap:normal}
 .mobile-bottom-nav>a[aria-current=page]{color:var(--text-link);background:var(--accent-soft);font-weight:600}
 .mobile-bottom-nav>.mobile-nav-menu:is([aria-expanded=true],.is-current){background:var(--accent-soft);color:var(--text-link);font-weight:600}
 .mobile-bottom-nav>a:hover,.mobile-bottom-nav>button:hover{background:var(--surface-hover)}
 .mobile-bottom-nav>a:active,.mobile-bottom-nav>button:active{background:var(--surface-pressed)}
 .mobile-bottom-nav>button.mobile-nav-create{--nav-create-hover:color-mix(in srgb,var(--accent) 92%,var(--on-accent,#fff));--nav-create-pressed:color-mix(in srgb,var(--accent) 84%,var(--on-accent,#fff));flex:0 0 60px;width:60px;min-width:60px;max-width:60px;height:60px;min-height:60px;align-self:center;margin-top:-14px;padding:0;border:1px solid var(--accent);border-radius:50%;background:var(--accent);color:var(--on-accent,#fff);opacity:1;box-shadow:0 4px 14px var(--accent-ring);transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
 .mobile-bottom-nav>button.mobile-nav-create .icon{width:27px;height:27px;stroke-width:2;transition:transform .16s ease}
 /* The shared text-action hover must not recolor an icon over a solid accent. */
 body.in-workspace #mobile-new-order{color:var(--on-accent,#fff)}
 body.in-workspace #mobile-new-order .icon{color:inherit;stroke:currentColor}
 body.in-workspace #mobile-new-order:not(:disabled):hover{background:linear-gradient(var(--surface-hover),var(--surface-hover)),var(--nav-create-hover);box-shadow:0 6px 18px var(--accent-ring)}
 body.in-workspace #mobile-new-order:not(:disabled):active{background:linear-gradient(var(--surface-pressed),var(--surface-pressed)),var(--nav-create-pressed);box-shadow:0 2px 8px var(--accent-ring)}
 .mobile-bottom-nav>button.mobile-nav-create:disabled{cursor:wait}
 .mobile-bottom-nav>:focus-visible{outline:2px solid var(--text-link);outline-offset:-2px}
 .mobile-modules-dialog{inset:auto 0 0;margin:0 auto;width:100%;max-width:700px;max-height:calc(100dvh - 16px);height:min(540px,84dvh);border-radius:20px 20px 0 0;padding:12px 12px max(12px,env(safe-area-inset-bottom));overflow:hidden;background:var(--surface-page);box-shadow:0 -12px 36px #00000018}
 .mobile-modules-dialog[open]{display:flex;flex-direction:column;gap:8px;animation:mobile-menu-enter .2s cubic-bezier(.2,.8,.2,1) both}
 .mobile-modules-dialog[open].is-dragging,.mobile-modules-dialog[open].is-settling{animation:none;transform:translateY(var(--menu-drag-y,0px))}
 .mobile-modules-dialog[open].is-settling:not(.is-closing){transition:transform .18s ease-out}
 .mobile-modules-dialog[open].is-closing{animation:mobile-menu-exit .16s ease-in both;transition:none}
 :root:not([data-theme=dark]) .mobile-modules-dialog{background:color-mix(in srgb,var(--accent) 4%,var(--surface-field))}
 .mobile-modules-dialog::backdrop{background:#0005;backdrop-filter:blur(4px);opacity:var(--menu-backdrop-opacity,1);animation:mobile-backdrop-enter .2s ease-out both}
 .mobile-modules-dialog.is-dragging::backdrop,.mobile-modules-dialog.is-settling::backdrop{animation:none}
 .mobile-modules-dialog.is-settling:not(.is-closing)::backdrop{transition:opacity .18s ease-out}
 .mobile-modules-dialog.is-closing::backdrop{animation:mobile-backdrop-exit .16s ease-in both;transition:none}
 .mobile-modules-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding-top:10px;touch-action:none;user-select:none;cursor:grab}
 .mobile-modules-dialog.is-dragging .mobile-modules-header{cursor:grabbing}
 .mobile-modules-handle{position:absolute;top:0;left:50%;width:32px;height:4px;border-radius:4px;background:var(--scroll-thumb);transform:translateX(-50%);pointer-events:none}
 .mobile-modules-close{touch-action:manipulation}
 .mobile-modules-header h2{margin:0;font-size:17px;line-height:1.3}
 .mobile-modules-close{width:44px;height:44px;padding:0;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface-field);color:var(--text-secondary);cursor:pointer}
 .mobile-modules-close .icon{width:18px;height:18px}
 body.in-workspace .mobile-modules-dialog>.sidebar{display:flex;flex-direction:column;align-items:stretch;align-self:stretch;position:static;flex:1;width:100%;max-width:none;min-height:0;height:auto;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;overflow:hidden;gap:0}
 body.in-workspace .mobile-modules-dialog .mobile-menu{display:none}
 body.in-workspace .mobile-modules-dialog .company-badge{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:8px;padding:4px 4px 10px;margin-bottom:8px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;cursor:default}
 body.in-workspace .mobile-modules-dialog .company-badge>.icon{width:22px;height:22px;padding:0;border-radius:0;background:transparent;color:var(--text-secondary)}
 body.in-workspace .mobile-modules-dialog .company-badge strong{font-size:12px;line-height:1.4}
 body.in-workspace .mobile-modules-dialog #module-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:2px 8px;flex:1;min-height:0;overflow:auto;max-height:none;margin:0;padding:2px 4px 8px 0;border:0}
 body.in-workspace .mobile-modules-dialog #module-navigation .nav-group{display:flex;align-items:center;gap:10px;grid-column:1/-1;margin:8px 8px 2px;font-size:9px;font-weight:600;line-height:1.3;letter-spacing:1px;color:var(--text-secondary)}
 body.in-workspace .mobile-modules-dialog #module-navigation .nav-group::after{content:'';height:1px;flex:1;background:var(--line);opacity:.55}
 body.in-workspace .mobile-modules-dialog #module-navigation a{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;min-height:44px;min-width:0;margin:0;padding:7px 10px;gap:8px;border:0;border-radius:10px;background:transparent;color:var(--text-primary);font-size:12px;line-height:1.3;box-shadow:none}
 body.in-workspace .mobile-modules-dialog #module-navigation a>.icon{width:18px;height:18px;color:var(--text-secondary)}
 body.in-workspace .mobile-modules-dialog #module-navigation a[aria-current=page]{background:var(--accent-soft);box-shadow:inset 3px 0 var(--text-link);color:var(--text-link);font-weight:600}
 body.in-workspace .mobile-modules-dialog #module-navigation a[aria-current=page]>.icon{color:inherit}
 body.in-workspace .mobile-modules-dialog #module-navigation a:hover{background:var(--surface-hover)}
 body.in-workspace .mobile-modules-dialog #module-navigation a:active{background:var(--surface-pressed)}
 body.in-workspace .mobile-modules-dialog .account{display:flex;align-items:center;grid-column:auto;gap:8px;padding:8px 2px 0;margin:0;flex:none;width:100%;justify-content:flex-start}
 body.in-workspace .mobile-modules-dialog .account-exit{display:grid;place-items:center;min-width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface-field)}
 body.in-workspace .mobile-modules-dialog .account-exit>.icon{width:18px;height:18px}
 body.in-workspace .mobile-modules-dialog #user-avatar{min-width:44px;min-height:44px}
 .mobile-modules-close:hover{background:var(--surface-hover)}
 .mobile-modules-close:active{background:var(--surface-pressed)}
 .mobile-modules-close:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}
 body.in-workspace .chat-float-panel{bottom:calc(16px + var(--mobile-nav-height,0px) + var(--chat-keyboard-offset,0px));max-height:calc(var(--chat-visible-height,100dvh) - var(--mobile-nav-height,0px) - 32px)}
 body.in-workspace .chat-float-launcher{bottom:calc(16px + var(--mobile-nav-height,0px) + var(--chat-keyboard-offset,0px))}
}
@keyframes mobile-menu-enter{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@keyframes mobile-menu-exit{from{opacity:1;transform:translateY(var(--menu-drag-y,0px))}to{opacity:0;transform:translateY(var(--menu-exit-y,18px))}}
@keyframes mobile-backdrop-enter{from{opacity:0}to{opacity:1}}
@keyframes mobile-backdrop-exit{from{opacity:var(--menu-backdrop-opacity,1)}to{opacity:0}}
@media(max-width:700px) and (hover:hover) and (pointer:fine){
 body.in-workspace #mobile-new-order:not(:disabled):hover{transform:translateY(-3px)}
 body.in-workspace #mobile-new-order:not(:disabled):hover .icon{transform:scale(1.08)}
 body.in-workspace #mobile-new-order:not(:disabled):active{transform:translateY(-1px) scale(.97)}
}
@media(prefers-reduced-motion:reduce){
 .mobile-bottom-nav>button.mobile-nav-create,.mobile-bottom-nav>button.mobile-nav-create .icon{transition:none}
 body.in-workspace #mobile-new-order:not(:disabled):is(:hover,:active),body.in-workspace #mobile-new-order:not(:disabled):hover .icon{transform:none}
 .mobile-modules-dialog[open],.mobile-modules-dialog[open].is-closing{animation:none}
 .mobile-modules-dialog[open].is-settling{transition:none}
 .mobile-modules-dialog::backdrop,.mobile-modules-dialog.is-closing::backdrop{animation:none}
 .mobile-modules-dialog.is-settling::backdrop{transition:none}
}
