.mobile-summary{display:none!important}
@media(max-width:700px){
 #demand-table table,#work-table table,#sourcing-table table,#mapping-table table,#lead-table table,#entry-table table,#catalogue-view table,#overview-view .planner table{display:block;min-width:0!important;width:100%!important}
 #catalogue-view thead,#overview-view .planner thead{display:none}
 #catalogue-rows,#inventory-rows{display:block}
 tr.mobile-entry{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;position:relative;padding:8px 12px!important;margin:0!important;border:0!important;border-bottom:1px solid #e3e9df!important;border-radius:0!important;box-shadow:none!important;gap:0!important;min-width:0}
 tr.mobile-entry>td:first-child{grid-column:1/-1!important;padding:0 48px 0 0!important;border:0!important;min-width:0;max-width:100%;height:36px;overflow:hidden;text-align:left!important;display:block!important}
 tr.mobile-entry>td:first-child:before{display:none!important}
 tr.mobile-entry:not(.mobile-open)>td:not(:first-child):not(.mobile-summary):not(.mobile-editor){display:none!important}
 tr.mobile-entry:not(.mobile-open)>td:first-child>small,tr.mobile-entry:not(.mobile-open)>td:first-child>.plan-status,tr.mobile-entry:not(.mobile-open)>td:first-child>.status-badge{display:none!important}
 tr.mobile-entry:not(.mobile-open)>td:first-child .vendor-contact>span,tr.mobile-entry:not(.mobile-open)>td:first-child .item-button small{display:none!important}
 tr.mobile-entry .item-button{min-height:36px!important;gap:8px!important;padding:0!important;max-width:100%;width:100%;overflow:hidden;text-align:left}
 tr.mobile-entry:not(.mobile-open) .item-button>span:last-child{min-width:0;overflow:hidden}
 tr.mobile-entry:not(.mobile-open) .item-name,tr.mobile-entry:not(.mobile-open) td:first-child strong{font-size:16px!important;line-height:32px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;display:block;max-width:100%}
 tr.mobile-entry .item-photo,tr.mobile-entry .item-initial,tr.mobile-entry .item-thumbnail{width:30px!important;height:30px!important;min-width:30px!important;border-radius:6px!important}
 .mobile-entry>.mobile-summary{display:flex!important;align-items:center;min-width:0;min-height:26px;padding:0!important;border:0!important;grid-column:1/-1;text-align:left!important}
 .mobile-summary:before{display:none!important}.mobile-meta{font-size:14px;line-height:24px;color:#4d6152;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-expand{position:absolute;top:9px;right:8px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;border:1px solid #d6dfd1;border-radius:8px;background:#f6f8f3;color:#234a36;font-size:22px;cursor:pointer}
 .mobile-open>.mobile-summary>.mobile-expand{transform:rotate(180deg)}
 tr.mobile-entry.mobile-editable>.mobile-summary{grid-column:1;grid-row:2;padding-right:8px!important;max-width:160px}
 tr.mobile-entry>.mobile-editor{display:block!important;grid-row:2;grid-column:2;padding:0!important;border:0!important;text-align:left!important;min-width:0!important;width:auto!important}
 tr.mobile-entry>.mobile-editor:before{display:none!important}
 .mobile-editor input{min-height:44px!important;font-size:16px!important;width:135px!important;max-width:100%}.mobile-editor button{min-height:44px!important;font-size:14px!important;white-space:nowrap;padding:8px!important}
 .mobile-editor .lead-answer{display:flex!important;gap:6px!important;align-items:center}.mobile-editor .lead-answer input{width:65px!important}.mobile-editor .lead-answer button{width:58px!important}.mobile-editor .lead-answer p{margin:0}
 tr.mobile-entry.mobile-open>td:first-child{height:auto;min-height:36px;overflow:visible}
 tr.mobile-entry.mobile-open>td:not(:first-child):not(.mobile-summary):not(.mobile-editor){grid-column:1/-1!important;display:block!important;width:auto!important;max-width:100%;min-width:0;padding:10px 0!important;text-align:left!important;border-top:1px solid #edf0e9!important}
 tr.mobile-entry.mobile-open .mobile-editor{grid-column:1/-1;grid-row:auto;margin:8px 0!important}.mobile-open.mobile-editable>.mobile-summary{grid-column:1/-1!important;grid-row:auto!important;max-width:none!important}
 .mobile-open td:before{display:block;font-size:12px;color:#687868;margin-bottom:5px}.mobile-open input,.mobile-open select{max-width:100%}
 article.mobile-entry{position:relative;padding:10px 12px!important;border-radius:8px!important;min-width:0;margin:0!important}
 article.mobile-entry:not(.mobile-open)>:not(:first-child):not(.mobile-summary){display:none!important}
 article.mobile-entry:not(.mobile-open)>:first-child{padding:0 46px 0 0!important;min-height:32px;height:32px;overflow:hidden;margin:0!important}
 article.mobile-entry h2,article.mobile-entry h3,article.mobile-entry>strong{font-size:16px!important;line-height:30px!important;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 article.mobile-entry header{gap:8px!important}article.mobile-entry header>div{min-width:0;overflow:hidden}article.mobile-entry header small{display:none}article.mobile-entry header .item-photo,article.mobile-entry .purchase-card-title .item-photo{width:30px!important;height:30px!important;min-width:30px}
 article.mobile-entry .mobile-summary{padding:0!important}article.mobile-entry.mobile-open h2,article.mobile-entry.mobile-open h3{white-space:normal}
 #team-view .mobile-entry:not(.mobile-open)>.button{display:none!important}
 #photo-grid{display:grid!important;grid-template-columns:1fr!important;gap:6px!important}.photo-card{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;grid-template-rows:24px 22px!important;gap:0 12px!important;padding:10px 12px!important;min-height:66px!important;text-align:left!important;align-items:center}.photo-card>img,.photo-card>.photo-placeholder{grid-column:1;grid-row:1/3;width:46px!important;height:46px!important;aspect-ratio:1!important}.photo-card strong{grid-row:1;grid-column:2;font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0!important}.photo-card>span:not(.photo-placeholder){grid-column:2;grid-row:2;padding:0!important;font-size:13px!important}.photo-placeholder small{display:none!important}
 .activity-entry summary{padding:10px 12px!important;min-height:66px!important;gap:8px!important}.activity-entry .activity-copy{min-width:0}.activity-copy strong,.activity-copy>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.activity-entry:not([open]) .activity-copy>small{display:none}.activity-entry .activity-copy>span{font-size:13px}.activity-quantity{font-size:17px!important}
 .question-groups,.question-list{gap:6px!important}.purchase-list{gap:6px!important}.supplier-toolbar{gap:8px;flex-wrap:wrap}.supplier-toolbar .button{font-size:13px;padding:8px}
 .requests-shell #portal-requests{display:grid;gap:6px}
}
@media(max-width:700px){.mobile-entry>.mobile-summary{height:36px!important;box-sizing:border-box;align-self:center}}

.mobile-filter-toggle{display:none}
@media(max-width:700px){
 .action-summary{gap:6px!important;margin-bottom:12px!important}.action-summary button{min-height:66px!important;padding:8px!important;display:grid!important;grid-template-columns:1fr auto;gap:6px;align-items:center}.action-summary button span{font-size:13px!important;line-height:18px!important}.action-summary button strong{font-size:22px!important;line-height:26px!important}.action-summary button small{display:none!important}
 #demand-view .panel-heading{padding:8px 12px!important;min-height:48px}.demand-stages{padding:6px 12px!important;gap:6px!important}.demand-stages button{min-height:44px!important;padding:6px!important;font-size:13px!important}.plan-notice{margin:0!important;padding:0!important;min-height:44px}.plan-presets{display:none!important}.plan-sort-bar{padding:0 12px 8px!important;gap:4px!important}.plan-sort-bar .source-caption{display:none!important}#demand-view .table-controls{padding:8px 12px!important}.page-heading{margin-bottom:16px!important}.plan-sort-controls{gap:6px!important}
 .mobile-filter-group{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding:12px!important;align-items:end}
 .mobile-filter-group:not(.mobile-filters-open)>:not(.mobile-filter-primary):not(.mobile-filter-toggle){display:none!important}
 .mobile-filter-primary{grid-column:1;order:-2;min-width:0}.mobile-filter-toggle{display:block;grid-column:2;order:-1;min-height:48px;padding:8px 12px;border:1px solid #d5decf;border-radius:7px;background:white;font-size:14px;color:#294736}
 .mobile-filters-open>:not(.mobile-filter-primary):not(.mobile-filter-toggle){grid-column:1/-1!important;width:100%;max-width:100%}
 .mobile-filter-group .field{min-width:0}.mobile-filter-group input,.mobile-filter-group select{max-width:100%;min-width:0}
}
@media(max-width:700px){.mobile-entry>.mobile-summary{position:static!important}tr.mobile-entry>td:first-child{height:44px!important;box-sizing:border-box}tr.mobile-entry.mobile-open>td:first-child{height:auto!important}}

/* Stock planning needs the quantities at a glance, before opening row actions.
   Keep the original cells and controls so mobile and desktop use the same data. */
@media(max-width:700px){
 #demand-table tr.mobile-entry{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:12px!important}
 #demand-table tr.mobile-entry>td:first-child{height:auto!important;min-height:44px;overflow:visible}
 #demand-table tr.mobile-entry .item-name{white-space:normal!important;line-height:1.4!important;overflow:visible!important;overflow-wrap:anywhere}
 #demand-table tr.mobile-entry:not(.mobile-open)>td.number,
 #demand-table tr.mobile-entry:not(.mobile-open)>td[data-label="Lead time"]{display:block!important;grid-column:auto!important;min-width:0;width:auto!important;max-width:100%;padding:8px 0!important;border:0!important;text-align:left!important;font-size:18px;line-height:1.4;overflow-wrap:anywhere}
 #demand-table tr.mobile-entry:not(.mobile-open)>td.number:before,
 #demand-table tr.mobile-entry:not(.mobile-open)>td[data-label="Lead time"]:before{display:block;content:attr(data-label);font-size:13px;line-height:1.4;color:#4d6152;margin-bottom:3px;white-space:normal}
 #demand-table tr.mobile-entry:not(.mobile-open)>td.number>small{display:block;font-size:12px;line-height:1.4;margin-top:2px;white-space:normal}
 #demand-table tr.mobile-entry:not(.mobile-open)>td.number>button,
 #demand-table tr.mobile-entry:not(.mobile-open)>td.number>details{display:none}
 #demand-table tr.mobile-entry>.mobile-summary{height:0!important;min-height:0}
 #demand-table .mobile-meta{display:none}
}
