/* Mobile workspace presentation; existing permissions and module actions remain authoritative. */
.mobile-nav-tools{display:none}
details.profile-access>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:12px 0;font-weight:700}
details.profile-access>summary::after{content:'＋';font-size:20px;color:#c55210}
details.profile-access[open]>summary::after{content:'−'}
@media(max-width:980px){
  html body .module-nav{visibility:hidden!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;box-sizing:border-box!important;height:100dvh!important;max-height:100dvh!important;padding-bottom:calc(24px + env(safe-area-inset-bottom))!important}
  html body.mobile-menu-open .module-nav{visibility:visible!important;pointer-events:auto!important}
  html body.mobile-menu-open{position:fixed!important;left:0!important;right:0!important;width:100%!important;overflow:hidden!important;overscroll-behavior:none}
  html body .mobile-menu-backdrop{touch-action:none}
  html body header.topbar #open-general-requisition,html body header.topbar #shared-data-button,html body header.topbar #openQueue,html body header.topbar .icon-btn{display:none!important}
  html body header.topbar .contract-switch{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;max-width:none!important;width:calc(100% + 48px)!important}
  html body header.topbar .top-actions{position:static!important;width:auto!important;margin:0!important}
  html body header.topbar .brand{display:block!important;max-width:none!important}
  html,body{width:100%;min-width:0!important;overflow-x:clip!important}
  body{background:#f6f7f9!important;font-size:15px!important}
  body>.topbar{display:grid!important;grid-template-columns:1fr auto!important;grid-template-rows:52px 48px!important;padding:0 16px 8px 64px!important;gap:0 8px!important;overflow:visible!important;background:#fff!important;box-shadow:0 1px 0 #e5e8ec!important;z-index:100!important}
  .topbar .brand{display:block!important;min-width:0!important;font-size:12px!important;letter-spacing:.03em!important}
  .topbar .brand strong{font-size:12px!important}
  .topbar .contract-switch{grid-row:2!important;grid-column:1/-1!important;margin-left:-48px!important;width:calc(100% + 48px)!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;padding:4px!important;background:#f0f2f5!important;border-radius:12px!important;box-sizing:border-box}
  .contract-switch button{min-height:36px!important;padding:6px 4px!important;font-size:12px!important;border-radius:8px!important}
  .topbar .top-actions{grid-column:2!important;grid-row:1!important;gap:0!important}
  .topbar .top-actions>button,.topbar .top-actions>.primary{display:none!important}
  .topbar .top-actions .avatar{display:flex!important;width:38px!important;height:38px!important;align-items:center;justify-content:center;font-size:13px!important}
  .mobile-menu-toggle{top:5px!important;left:10px!important;height:44px!important;width:44px!important;font-size:25px!important}
  body>main{padding:22px 16px 40px!important;width:100%!important;min-width:0!important}
  .view,.panel,.metric-group,.grid-2>*,.amni-action-row>*{min-width:0!important;max-width:100%!important;box-sizing:border-box}
  .page-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:16px!important}
  .page-head h1{font-size:27px!important;line-height:1.2!important;letter-spacing:-.6px!important}
  .page-head p{font-size:14px!important;line-height:1.55!important}
  .page-head .eyebrow{font-size:11px!important;letter-spacing:1.4px!important}
  .page-head .primary{min-height:46px!important;border-radius:10px!important;font-size:14px!important}
  .meal-summary,.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .meal-summary .kpi:first-child{grid-column:1/-1!important}
  .kpi{background:#fff!important;box-shadow:none!important;border:1px solid #e7e9ed!important;border-radius:13px!important;padding:16px!important;min-width:0!important}
  .kpi label{font-size:11px!important;line-height:1.45!important;letter-spacing:.6px!important}
  .kpi strong{font-size:29px!important;line-height:1.3!important;margin:8px 0!important}
  .kpi small{font-size:12px!important;line-height:1.45!important}
  .metric-group{border:0!important;background:transparent!important;padding:0!important;margin-top:18px!important}
  .contract-strip{padding:8px 0 12px!important}
  .contract-strip h2{font-size:22px!important}
  .meal-bars,.grid-2,.grid-even,.amni-action-row{display:grid!important;grid-template-columns:1fr!important;gap:18px!important}
  .panel-head{flex-wrap:wrap!important}
  .module-nav{width:min(88vw,340px)!important;background:#111e2e!important;padding:64px 14px 24px!important;box-shadow:16px 0 48px #07132244!important}
  .module-nav .side-brand{padding:0 8px 18px!important;gap:12px!important;border-bottom:1px solid #ffffff18!important}
  .module-nav .side-brand img{width:42px!important;height:54px!important;object-fit:contain}
  .module-nav .side-brand strong{font-family:inherit!important;font-size:12px!important;line-height:1.6!important;letter-spacing:.6px}
  .mobile-nav-tools{display:block;margin:4px 0 18px}
  .mobile-nav-tools input{width:100%;box-sizing:border-box;background:#ffffff0d;color:white;border:1px solid #ffffff25;border-radius:10px;padding:12px;font-size:16px!important;min-height:46px!important}
  .mobile-nav-tools input::placeholder{color:#abb7c8}
  .module-nav button[data-view]{display:flex!important;align-items:center!important;gap:12px!important;min-height:46px!important;border-radius:9px!important;padding:11px 12px!important;font-size:14px!important;font-weight:500!important;color:#cbd5e1!important;margin:4px 0!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important}
  .module-nav button[data-view].active{background:#f979191c!important;border-color:#fa81263d!important;color:#ffb275!important}
  .module-nav button[data-view]::before{width:20px!important;text-align:center!important;flex-shrink:0!important;font-size:16px!important}
  .module-nav button[data-mobile-filtered]{display:none!important}
  .module-nav .nav-label{color:#8192aa!important;font-size:10px!important;letter-spacing:1.5px!important;margin:18px 12px 8px!important}
  .profile-menu-v2{position:fixed!important;top:61px!important;right:12px!important;left:12px!important;width:auto!important;max-width:420px!important;max-height:calc(100dvh - 85px)!important;overflow:auto!important;box-sizing:border-box!important;border-radius:16px!important;padding:18px!important}
  .profile-person-copy{min-width:0}.profile-person-copy small{overflow-wrap:anywhere}
  .profile-access-row summary{min-height:44px;display:flex;align-items:center}
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}
  input[type=checkbox],input[type=radio]{min-height:0!important;width:16px!important;height:16px!important}
  dialog{max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:8px auto!important}
  .table-wrap{max-width:100%!important;overflow:auto!important}
}

/* Complete mobile workspace: visible actions, readable requests and contained tables. */
@media(max-width:980px){
 html body>header.topbar{grid-template-rows:52px 48px auto!important;padding-bottom:8px!important}
 html body header.topbar .top-actions{grid-row:3!important;grid-column:1/-1!important;margin-left:-48px!important;width:calc(100% + 48px)!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding-top:8px!important}
 html body header.topbar .top-actions>button,html body header.topbar #open-general-requisition,html body header.topbar #shared-data-button,html body header.topbar #openQueue,html body header.topbar .icon-btn{display:inline-flex!important;align-items:center;justify-content:center;min-height:40px!important;padding:7px 9px!important;font-size:12px!important;white-space:normal!important;flex:1 1 auto}
 html body header.topbar .top-actions .avatar{flex:0 0 38px!important;min-width:38px!important}
 html body main .panel{padding:16px!important}
 html body .table-wrap{overflow-x:auto!important;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 html body .portal-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 .portal-filter-grid label:first-child{grid-column:1/-1}
 html body .portal-filter-grid input,html body .portal-filter-grid select{width:100%!important;min-width:0!important;box-sizing:border-box;min-height:44px!important}
 html body #view-requisition-portal .portal-table{min-width:0!important;width:100%!important;display:block!important;border:0!important}
 .portal-table thead{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .portal-table tbody{display:grid!important;gap:12px}
 .portal-table tr{display:grid!important;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface,#fff);content-visibility:auto;contain-intrinsic-size:auto 440px}
 html body .portal-table td{display:block!important;min-width:0!important;padding:10px 12px!important;border:0!important;overflow-wrap:anywhere;font-size:14px!important;background:transparent!important}
 .portal-table td::before{content:attr(data-label);display:block;font-size:11px;font-weight:700;color:var(--muted);margin-bottom:5px}
 .portal-table td:first-child,.portal-table td:nth-child(2),.portal-table td:nth-child(7),.portal-table td:last-child,.portal-table td[colspan]{grid-column:1/-1}
 .portal-table td:last-child{border-top:1px solid var(--line)!important;display:flex!important;flex-wrap:wrap;gap:8px;align-items:center}
 .portal-table td:last-child::before{flex-basis:100%}
 .portal-table td button{min-height:40px!important;font-size:14px!important;max-width:100%}
 .portal-table .tag{white-space:normal}
 .req-page-tabs button,.req-status-filters button,.req-report-actions button{min-height:44px!important;flex:1 1 auto}
 .req-workflow button{min-width:0;padding:12px!important;font-size:13px!important}
 html body .req-dialog{width:calc(100vw - 16px)!important;padding:16px!important;max-height:calc(100dvh - 16px)!important;overflow:auto;box-sizing:border-box}
 .req-dialog .req-details{grid-template-columns:1fr!important;gap:5px}
 .req-details dd{margin-bottom:10px;overflow-wrap:anywhere}
 .req-dialog .req-form{grid-template-columns:1fr!important}
 .req-dialog .req-form>label{grid-column:1!important;min-width:0}
 .req-dialog input,.req-dialog select,.req-dialog textarea{width:100%;min-width:0;box-sizing:border-box}
 .req-audit pre{overflow-wrap:anywhere}
 html body .view{animation:none!important}
 html body.mobile-menu-open .module-nav{overscroll-behavior:contain!important;touch-action:pan-y!important}
}
@media(max-width:380px){html body .portal-filter-grid{grid-template-columns:1fr!important}.portal-filter-grid label:first-child{grid-column:auto}.req-workflow{grid-template-columns:1fr!important}}

@media(max-width:980px){
 html body #view-requisition-portal button:not(.req-link):not(.primary){border:1px solid var(--line);border-radius:9px;background:var(--surface,#fff);color:var(--ink);padding:10px 12px;font:inherit;font-weight:650}
}
