/* Mobile presentation only: original desktop layout and print output are retained. */
.mobile-record-more,.mobile-nav-close,.mobile-nav-shade{display:none}
@media screen and (max-width:760px){
  html{scroll-padding-top:58px;scroll-padding-bottom:110px}
  .content{padding:14px 12px calc(24px + env(safe-area-inset-bottom));min-width:0}
  .workspace-bar{min-height:48px;padding-top:env(safe-area-inset-top)}
  .workspace-bar>.menu-toggle{width:44px;height:44px;flex-basis:44px}
  .workspace-bar .workspace-tab-wrap{height:44px}
  .workspace-bar .workspace-tab{height:40px}
  .workspace-bar .workspace-tab-close{width:32px;height:36px;flex-basis:32px}
  .workspace-bar .workspace-tabs-more>summary{min-height:40px;display:flex;align-items:center}
  .app-shell>.sidebar{width:min(300px,86vw);padding-top:calc(12px + env(safe-area-inset-top));overflow-y:auto}
  .sidebar .nav-item{min-height:44px;height:auto}
  .sidebar .brand{height:56px;position:relative;padding-right:40px}
  .mobile-nav-close{display:block;position:absolute;right:0;top:0;width:44px;height:44px;border:0;border-radius:8px;background:#edf3ff;color:#246bfd;font-size:28px}
  .mobile-nav-shade:not([hidden]){display:block;position:fixed;inset:0;z-index:35;width:100%;height:100%;border:0;background:rgba(15,23,42,.38)}
  #content .page-head,#content .v4-page-head{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
  #content .page-head h1,#content .v4-page-head h1{font-size:21px;overflow-wrap:anywhere}
  #content .page-head p{display:none}
  #content .head-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;max-width:100%}
  #content .head-actions button{min-height:40px}
  #content input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),#content select,#content textarea{font-size:16px!important;min-height:44px;min-width:0;max-width:100%;box-sizing:border-box}
  #content .v4-dashboard-search{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  #content .v4-dashboard-search>input{grid-column:1/-1;width:100%}
  #content .v4-dashboard-search label{min-width:0}
  #content .v4-dashboard-search label input{width:100%;min-width:0}
  #content input[type=checkbox],#content input[type=radio]{width:22px;height:22px;flex-shrink:0}
  #content button,#content summary{touch-action:manipulation}
  #content button:focus-visible,#content summary:focus-visible{outline:2px solid #246bfd;outline-offset:2px}
  #content .sales-focus-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px}
  #content .sales-focus-card{min-height:90px;padding:10px 9px;position:relative;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:6px}
  #content .sales-focus-card small{font-size:12px;line-height:1.4}
  #content .sales-focus-card b{margin:0;font-size:13px;white-space:normal;overflow-wrap:anywhere}
  #content .sales-focus-arrow{display:none}
  #content .sales-focus-hint{display:none}
  #content .sales-focus-card[aria-pressed=true] .sales-focus-hint{display:block;font-size:10px}
  #content .sales-record-status-tabs,#content .record-status-tabs-v442{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:2px;padding:3px}
  #content .sales-record-status-tabs button,#content .record-status-tabs-v442 button{min-height:42px;padding:6px 8px;flex-shrink:0;font-size:12px}
  #content .sales-filter-panel{padding:10px}
  #content .simple-search-row{gap:8px}
  #content .sales-advanced-filters summary{min-height:40px;padding:10px}
  #content .sales-filter-result{flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px}
  #content .sales-focus-caption{margin:0}
  #content .sales-filter-result>button{min-height:36px;margin-left:auto}
  #content .sales-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  #content .production-workflow-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}
  #content .production-stage-card{min-height:70px;padding:10px;border-radius:10px;gap:4px;display:flex;flex-direction:column;align-items:flex-start}
  #content .production-stage-card .stage-index,#content .production-stage-card small{display:none}
  #content .production-stage-card .stage-name{font-size:12px}
  #content .production-stage-card strong{font-size:21px}
  #content .production-attention-v4{padding:10px;gap:8px;flex-direction:row;flex-wrap:wrap;align-items:center}
  #content .production-attention-v4 span{display:none}
  #content .production-overdue-link{min-height:36px;margin-left:auto;font-size:12px}
  #content .purchase-metrics,#content .metric-band{grid-template-columns:repeat(2,minmax(0,1fr))}
  #content .purchase-metrics>div,#content .metric-band>div{padding:10px;min-height:72px}
  #content .purchase-metrics b,#content .metric-band strong{font-size:19px}
  #content .crm-overview{gap:6px;margin:10px 0}
  #content .crm-kpi{padding:10px;min-height:72px}
  #content .crm-kpi strong{font-size:21px}
  #content .crm-kpi small{font-size:12px}
  #content .crm-section-tabs,#content .procurement-business-tabs,#content .tabs{max-width:100%;overflow-x:auto;flex-wrap:nowrap;gap:4px}
  #content .crm-section-tabs button,#content .procurement-business-tabs button,#content .tabs button{min-height:44px;flex-shrink:0;white-space:nowrap;padding:9px 10px}
  #content [data-mobile-filters=true]{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:10px;min-width:0}
  #content [data-mobile-filters=true]>input,#content .v4-production-search{min-width:0;width:100%;grid-column:1}
  .mobile-filter-more{min-width:0;width:100%}
  .mobile-filter-more>summary{display:flex;align-items:center;justify-content:space-between;min-height:40px;border:1px solid #e1e8f2;border-radius:8px;padding:9px 11px;background:#f7f9fc;color:#475569;font-size:13px;cursor:pointer;list-style:none}
  .mobile-filter-more>summary::after{content:'⌄';color:#246bfd}
  .mobile-filter-more[open]>summary::after{content:'⌃'}
  .mobile-filter-more>summary::-webkit-details-marker{display:none}
  .mobile-filter-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-top:10px;min-width:0}
  .mobile-filter-body>*{min-width:0;width:100%;margin:0}
  #content .mobile-filter-body .crm-date-filter,#content .mobile-filter-body .v4-production-tabs{grid-column:1/-1;flex-wrap:wrap;min-width:0}
  #content .crm-date-filter{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  #content .crm-date-filter small{grid-column:1/-1}
  #content .crm-date-filter>span{display:none}
  #content .crm-date-filter input{width:100%}
  #content .production-date-filter{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;padding:5px}
  #content .production-date-filter input{width:100%;padding:4px}
  #content .supplier-result-bar,#content .crm-list-bar{flex-wrap:wrap;gap:8px;padding:10px}
  #content :is(.table-wrap,.v4-production-list,.purchase-table-wrap,.supplier-workspace-table,.settlement-table):has(>.mobile-record-table){overflow:visible;border:0;border-radius:0;background:transparent}
  #content table.mobile-record-table,#content .mobile-record-table>tbody{display:block;width:100%;min-width:0!important;max-width:100%;table-layout:auto}
  #content .mobile-record-table>thead{display:none}
  #content .mobile-record-table>tbody>tr.mobile-record-card{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;padding:14px;margin:0 0 10px;border:1px solid #e1e8f2;border-radius:12px;background:#fff;box-shadow:none;cursor:default}
  #content .mobile-record-card>td{display:block;position:static;min-width:0!important;width:auto!important;max-width:100%;padding:0!important;border:0!important;box-shadow:none;background:transparent;text-align:left;white-space:normal;overflow-wrap:anywhere;align-content:start}
  #content .mobile-record-card>td::before{content:attr(data-mobile-label);display:block;font-size:11px;line-height:1.4;color:#64748b;margin-bottom:4px}
  #content .mobile-record-card>td[data-mobile-role=heading]{grid-column:1/-1;padding-right:28px!important}
  #content .mobile-record-card>td[data-mobile-role=heading]::before{display:none}
  #content .mobile-record-card>td[data-mobile-role=full]{grid-column:1/-1}
  #content .mobile-record-table[data-mobile-kind=sales] td[data-mobile-role=full]::before,#content .mobile-record-table[data-mobile-kind=production] td[data-mobile-role=full]::before{display:inline;margin:0 7px 0 0}
  #content .mobile-record-table[data-mobile-kind=sales] td[data-mobile-role=full] small,#content .mobile-record-table[data-mobile-kind=production] td[data-mobile-role=full] small{display:inline;margin-left:7px}
  #content .mobile-record-card>td[data-mobile-role=actions]{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:10px!important;border-top:1px solid #edf1f7!important}
  #content .mobile-record-card>td[data-mobile-role=actions]::before{display:none}
  #content .mobile-record-card>td[data-mobile-role=check]{position:absolute;right:8px;top:6px;width:44px!important;height:44px;display:grid;place-items:center}
  #content .mobile-record-card>td[data-mobile-role=check]::before{display:none}
  #content .mobile-record-card[data-mobile-expanded=false]>td[data-mobile-extra=true]{display:none}
  #content .mobile-record-card :is(.sales-row-actions,.row-actions,.crm-row-actions,.supplier-row-actions){display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;gap:8px;max-width:none}
  #content .mobile-record-card td[data-mobile-role=actions] button{width:auto!important;margin:0;flex:0 1 auto}
  #content .mobile-record-card button{min-height:40px;max-width:100%;white-space:normal}
  #content .mobile-record-card .record-number-link,#content .mobile-record-card .purchase-link,#content .mobile-record-card .crm-name,#content .mobile-record-card .supplier-name{font-size:15px;min-height:36px;text-align:left}
  #content .mobile-record-card .sales-flow-link{width:100%;justify-content:flex-start;font-size:12px;min-height:36px;padding:7px}
  #content .mobile-record-card small{font-size:12px;line-height:1.45;overflow-wrap:anywhere}
  #content .mobile-record-card img{max-width:100%;object-fit:contain}
  #content .mobile-record-card .mobile-record-more{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;min-height:40px;padding:8px 10px;border:1px solid #dce6f8;border-radius:7px;background:#f2f6ff;color:#246bfd;font-size:12px;cursor:pointer}
  #content .mobile-record-group,#content .mobile-record-group>td{display:block;width:100%;min-width:0;white-space:normal}
  #content .mobile-record-group>td{padding:12px;overflow-wrap:anywhere}
  #content .mobile-record-table[data-mobile-kind=entry] tfoot{display:block;max-width:100%}
  #content .mobile-record-table[data-mobile-kind=entry] tfoot tr{display:flex;max-width:100%;flex-wrap:wrap;gap:12px;padding:12px;background:#f3f7ff}
  #content .mobile-record-table[data-mobile-kind=entry] tfoot td{display:block;min-width:0;width:auto;padding:0;white-space:normal;font-size:13px}
  #content .mobile-record-table[data-mobile-kind=entry] tfoot td::before{content:attr(data-mobile-label);margin-right:4px;color:#64748b;font-weight:400}
  #content .production-entry-wrap-v4:has(.mobile-record-table),#content .order-table-scroll:has(.mobile-record-table){overflow:visible}
  #content .production-entry-table-v4.mobile-record-table td input{width:100%;min-width:0}
  #content .business-pagination,#content .pagination{gap:8px;justify-content:flex-start;flex-wrap:wrap;padding:12px 0}
  #content .business-pagination button,#content .pagination button{min-width:36px;min-height:40px}
  #content .business-page-jump{flex-basis:100%;display:flex;justify-content:flex-end}
  #content .purchase-selection-bar,#content .supplier-selection-bar{padding:10px;gap:8px;flex-wrap:wrap}
  #content .purchase-selection-bar button,#content .supplier-selection-bar button{min-height:40px}
  #content .purchase-selection-bar button:disabled,#content .purchase-selection-bar>small,#content .supplier-selection-bar button:disabled{display:none}
  #content .full-order-surface .draft-sheet-row{grid-template-columns:32px minmax(0,1fr) auto!important;gap:10px!important;padding:12px!important}
  #content .full-order-surface .draft-section-title{flex-wrap:wrap;gap:8px}
  #content .full-order-surface .draft-section-title>div{min-width:0;flex:1}
  #content .full-order-surface .draft-section-title>button{flex-shrink:0;white-space:nowrap;min-height:40px}
  #content .full-order-surface .draft-sheet-row .draft-photo-wrap,#content .full-order-surface .draft-sheet-row .draft-photo{width:84px!important;height:68px!important;grid-column:2;grid-row:1}
  #content .full-order-surface .draft-sheet-row .draft-item-index{grid-column:1;grid-row:1;align-self:start}
  #content .full-order-surface .draft-sheet-row .draft-row-actions{grid-column:3;grid-row:1;flex-direction:row;gap:8px}
  #content .full-order-surface .draft-row-actions button{width:40px;height:40px}
  #content .full-order-surface .draft-sheet-row .draft-item-fields{grid-column:1/-1!important;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;min-width:0}
  #content .full-order-surface .draft-sheet-row .draft-item-fields label{grid-column:auto;font-size:12px!important;min-width:0}
  #content .full-order-surface .draft-item-fields label:has([data-draft-field=type]),#content .full-order-surface .draft-item-fields label:has([data-draft-field=name]),#content .full-order-surface .draft-item-fields label:has([data-draft-field=note]){grid-column:1/-1!important}
  #content .full-order-surface .draft-item-fields input,#content .full-order-surface .draft-item-fields select{width:100%;min-height:44px;padding:9px;border:1px solid #dce4ee!important;border-radius:7px;background:#fff}
  #content .full-order-surface .draft-sheet-row .draft-line-total{grid-column:2;align-self:end;justify-content:flex-end;min-height:44px;background:#f3f7ff;padding:10px;border-radius:7px;font-size:16px}
  #content .full-order-surface{padding-bottom:110px}
  #content .full-order-surface .sales-modal-actions{display:grid;grid-template-columns:68px 68px minmax(0,1fr);gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  #content .full-order-surface .sales-modal-actions>span{grid-column:1/-1;font-size:11px}
  #content .full-order-surface .sales-modal-actions>.draft-auto-status{grid-column:1/-1;margin:0!important;font-size:11px!important;line-height:1.5}
  #content .full-order-surface .sales-modal-actions button{min-height:44px;padding:8px;white-space:nowrap}
  #content .purchase-entry-tab-panel,#content .production-block-head-v4{padding:12px}
  #content .purchase-entry-v5 .purchase-entry-table tr{padding:10px;gap:10px}
  #content .purchase-entry-v5 .purchase-entry-table td{padding:0;min-width:0!important}
  #content .purchase-entry-v5 .purchase-entry-table input,#content .purchase-entry-v5 .purchase-entry-table select{width:100%;padding:8px}
  #content .production-sheet-head-v4{padding:14px;gap:12px}
  #content .production-sheet-title-v4{gap:10px;min-width:0}
  #content .production-sheet-title-v4 h1{font-size:22px;overflow-wrap:anywhere}
  #content .production-sheet-mark-v4{width:40px;height:40px;flex-shrink:0}
  #content .production-sheet-actions-v4{gap:8px;justify-content:flex-start}
  #content .production-sheet-actions-v4 button{min-height:44px}
  #content .production-meta-grid-v4,#content .production-requirements-v4{padding:14px}
  .modal-backdrop .modal{max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:14px;overflow:auto}
}
