
.mobile-topbar,.mobile-nav-backdrop{display:none}
@media(max-width:800px){
html,body{width:100%;min-width:0;margin:0}html[data-theme] .shell,.shell{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:12px!important;margin:0!important;box-sizing:border-box}
.shell>.workspace{width:100%;min-width:0;max-width:100%}.workspace>*{min-width:0;max-width:100%;box-sizing:border-box}
.mobile-topbar{display:flex;position:sticky;top:0;z-index:90;align-items:center;gap:12px;padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top));background:var(--panel,#fff);border-bottom:1px solid var(--line,#ddd);color:var(--text,#1d1d1f)}
.mobile-topbar button{width:44px;height:44px;min-width:44px;border:1px solid var(--line,#ddd);border-radius:10px;background:var(--panel,#fff);color:var(--text,#1d1d1f);font-size:22px}.mobile-topbar strong{display:block;font-size:16px}.mobile-topbar small{display:block;font-size:12px;color:var(--muted,#777)}
html[data-theme] .shell>aside,.shell>aside{position:fixed!important;top:0!important;left:0!important;bottom:0!important;z-index:200!important;width:min(300px,85vw)!important;max-width:85vw!important;min-height:100dvh!important;height:100dvh!important;overflow-y:auto!important;transform:translateX(-110%);visibility:hidden;transition:transform .2s ease,visibility .2s ease;display:flex!important;flex-direction:column!important;border-radius:0 18px 18px 0!important;padding:18px!important;background:var(--panel,#fff)!important}
html[data-theme] body.mobile-nav-open .shell>aside,body.mobile-nav-open .shell>aside{transform:translateX(0);visibility:visible}.mobile-nav-open{overflow:hidden}.mobile-nav-backdrop{position:fixed;inset:0;z-index:180;background:#0007;border:0}.mobile-nav-open .mobile-nav-backdrop{display:block}.shell>aside nav a{min-height:44px;display:flex;align-items:center;gap:8px}.shell>aside .mobile-close-menu{min-height:44px;align-self:flex-end;padding:7px 12px;margin-bottom:12px}.shell>aside footer{margin-top:auto;padding-top:20px}
html[data-theme] .workspace>header,.workspace>header{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important}.workspace header .tools{display:flex!important;flex-wrap:wrap!important;gap:8px!important}.workspace header .tools input{min-width:0;flex:1;width:100%;font-size:16px!important}html[data-theme] h1{font-size:26px!important;line-height:1.2!important;overflow-wrap:anywhere}.workspace header p{font-size:13px!important}
.metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.metric{min-width:0;padding:12px!important}.metric strong{font-size:25px!important}.metric span,.metric p{font-size:12px!important}
.manual-add{padding:14px!important}.manual-add form,#manual-order-form{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}.manual-add input{width:100%!important;min-width:0!important;font-size:16px!important}.manual-add button{min-height:44px}
.toolbar,.filters,#quick-filters{display:flex!important;flex-wrap:wrap!important;gap:8px!important;min-width:0}.toolbar input,.toolbar select{min-width:0!important;max-width:100%;font-size:16px}.toolbar button,.filters button,#quick-filters button{min-height:40px;padding:8px 12px!important}.table-wrap{min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}.table-wrap>table{min-width:1050px;max-width:none}.table-wrap button{min-height:38px}
.inline-order-detail #detail{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}.inline-order-detail article{min-width:0!important;overflow-wrap:anywhere}.proof-viewer,.proof-modal,[role=dialog]{max-width:calc(100vw - 24px)}
#reconcile-root{width:100%!important;min-width:0!important;max-width:100%!important}#reconcile-root main>div{min-width:0!important;padding:0!important}#reconcile-root header{gap:10px!important;padding-bottom:16px!important;margin-bottom:16px!important;align-items:center!important;flex-wrap:wrap!important}#reconcile-root header>div:first-child{min-width:0;flex:1 1 100%}#reconcile-root header>div:first-child>div:first-child{flex-shrink:0}#reconcile-root header h1{font-size:24px!important}#reconcile-root header p{font-size:12px!important}#reconcile-root header a,#reconcile-root header button{min-height:40px!important}
#reconcile-root main>div>section{min-width:0!important}#reconcile-root main>div>section>aside{width:100%!important;position:static!important;min-width:0!important}#reconcile-root main>div>section>section{min-width:0!important;width:100%!important}#reconcile-root textarea{min-height:140px!important;height:160px!important;font-size:16px!important}#reconcile-root [data-slot=table-container]{width:100%;max-width:100%;overflow-x:auto!important;overscroll-behavior-x:contain;max-height:65dvh!important}
#reconcile-root main>div>section>div.sheet-input-panels{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}#reconcile-root main>div>section>div.sheet-input-panels>div{width:100%;min-width:0;padding:12px!important}#reconcile-root .sheet-input-panels>div>div:first-child{min-height:0!important}#reconcile-root .sheet-input-panels .space-y-2{margin-top:12px!important}#reconcile-root [role=grid]{max-width:100%!important;min-width:0!important;height:280px!important;max-height:280px!important;overflow:auto!important;overscroll-behavior:contain}#reconcile-root [role=grid] table{max-width:none!important}#reconcile-root [role=grid] th,#reconcile-root [role=grid] td{font-size:12px}#reconcile-root .sheet-column-options{display:flex!important;flex-wrap:wrap!important;gap:12px!important}#reconcile-root .sheet-main-actions{display:flex!important;flex-direction:column!important;align-items:stretch!important}#reconcile-root .sheet-main-actions button{min-height:44px!important}
#sheet-toolbar{padding:10px!important;margin-bottom:14px!important;min-width:0!important;max-width:100%!important}#sheet-toolbar .sheet-tools{gap:6px!important;justify-content:flex-start!important;flex-wrap:wrap!important}#sheet-toolbar .tool-sep{display:none}#sheet-toolbar button,#sheet-toolbar select{min-height:40px!important}#sheet-toolbar input[type=number]{min-height:40px!important;font-size:16px!important}#sheet-toolbar .sheet-active{text-align:left;line-height:1.5}#sheet-toolbar .sheet-filter{justify-content:flex-start}#sheet-toolbar .sheet-filter input{width:100%;font-size:16px!important}#sheet-toolbar .sheet-color-pop{position:fixed!important;top:max(104px,calc(env(safe-area-inset-top) + 90px))!important;left:50%!important;transform:translateX(-50%);width:254px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 128px);overflow-y:auto;z-index:150}#sheet-toolbar .palette-dot{min-height:20px!important}#sheet-toolbar .palette-plus{min-height:20px!important}.sheet-palette-wrap{position:static!important}
}
@media(prefers-reduced-motion:reduce){.shell>aside{transition:none!important}}

@media(max-width:800px){
html[data-theme] .shell>aside nav,.shell>aside nav{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;overflow:visible!important;gap:6px!important;white-space:normal!important;width:100%!important}
html[data-theme] .shell>aside nav a,.shell>aside nav a{width:100%!important;max-width:100%!important;flex:none!important;justify-content:flex-start!important;box-sizing:border-box!important;white-space:normal!important}
.mobile-nav-backdrop{background:#0007!important;border:0!important;border-radius:0!important;width:100vw!important;max-width:none!important;height:100dvh!important}
#reconcile-root header{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;text-align:left!important}
#reconcile-root header>div:first-child{flex-basis:100%!important}
}
