/* DAYO V4.3.8.34 · role workbench and phone adaptation */
html,body{max-width:100%;min-width:0!important}
.mobile-nav-toggle,.mobile-nav-backdrop{display:none}
#loginScreen:not(.hidden)+.app-shell .mobile-nav-toggle{display:none!important}
.role-workbench{padding:14px 4px 24px}
.role-workbench-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}
.role-workbench-role{display:inline-flex;padding:5px 10px;border-radius:999px;background:#e7f5f2;color:#07837f;font-size:11px;font-weight:800;letter-spacing:.5px}
.role-workbench-head h2{margin:10px 0 5px;color:#062c4b;font-size:28px}.role-workbench-head p{margin:0;color:#758991;font-size:13px}
.role-workbench-head-actions{display:flex;align-items:center;gap:12px;color:#61747c;font-size:12px}
.role-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.role-metric-card{position:relative;overflow:hidden;min-height:126px;padding:20px;border:1px solid #e0ebe8;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(15,57,63,.055)}
.role-metric-card:after{content:"";position:absolute;right:-26px;top:-32px;width:94px;height:94px;border-radius:50%;background:rgba(13,150,143,.07)}
.role-metric-card>span,.role-metric-card>small,.role-metric-card>strong{display:block;position:relative;z-index:1}.role-metric-card>span{color:#70858b;font-size:12px}.role-metric-card>strong{margin:15px 0 7px;color:#092f3d;font-size:24px}.role-metric-card>small{color:#93a2a5;font-size:10px}
.role-tone-1:after{background:rgba(245,145,60,.10)}.role-tone-2:after{background:rgba(63,126,225,.08)}.role-tone-3:after{background:rgba(128,91,198,.08)}
.role-workbench-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(310px,.75fr);gap:16px}.role-task-panel,.role-shortcut-panel{overflow:hidden}
.role-task-list{display:flex;flex-direction:column}.role-task-list>button{display:grid;grid-template-columns:1fr auto 18px;align-items:center;gap:12px;width:100%;padding:15px 17px;border:0;border-top:1px solid #edf2f0;background:#fff;text-align:left;cursor:pointer}.role-task-list>button:hover{background:#f4faf8}.role-task-list b{display:block;color:#24434c;font-size:13px}.role-task-list small{display:block;margin-top:3px;color:#8c9b9f;font-size:10px}.role-task-list strong{display:grid;place-items:center;min-width:34px;height:28px;border-radius:9px;background:#e7f5f2;color:#087e79}.role-task-list i{color:#85a09c;font-size:21px;font-style:normal}
.role-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px}.role-shortcuts button{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;min-height:78px;padding:12px;border:1px solid #e2ece9;border-radius:12px;background:#f9fbfb;text-align:left;cursor:pointer}.role-shortcuts button:hover{border-color:#9acfc5;background:#f0f9f7}.role-shortcuts button>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e2f3ef;color:#087e79;font-size:17px}.role-shortcuts b{font-size:12px;color:#26464d}.role-shortcuts i{font-style:normal;font-size:9px;color:#829793}
.role-workbench-foot{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:16px;padding:13px;border-radius:12px;background:#07304e;color:#a9c7d3;font-size:10px}.role-workbench-foot b{color:#fff}.role-empty{padding:28px;text-align:center;color:#87999c}
.mobile-attachment-list{display:flex;flex-wrap:wrap;gap:8px}.mobile-attachment-item{display:inline-flex;align-items:center;gap:6px;padding:6px;border:1px solid #dbe8e5;border-radius:10px;background:#f7fbfa}.mobile-attachment-item .mini-btn{margin:0}.mobile-attachment-preview{position:fixed;z-index:10250;inset:0;display:flex;flex-direction:column;background:rgba(4,20,25,.96)}.mobile-attachment-head{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;color:#fff}.mobile-attachment-head>b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-attachment-head>div{display:flex;align-items:center;gap:8px}.mobile-attachment-head a,.mobile-attachment-head button{display:grid;place-items:center;min-width:42px;height:42px;padding:0 12px;border:0;border-radius:10px;background:#fff;color:#17383d;text-decoration:none;font-size:13px;font-weight:700}.mobile-attachment-head button.mobile-attachment-close{font-size:25px}.mobile-attachment-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:10px}.mobile-attachment-stage img{display:block;max-width:100%;max-height:100%;object-fit:contain}.mobile-attachment-stage iframe{width:100%;height:100%;border:0;border-radius:8px;background:#fff}.mobile-attachment-file-card{width:min(440px,92vw);display:grid;gap:14px;padding:28px 20px;border-radius:16px;background:#fff;text-align:center;color:#17383d}.mobile-attachment-file-card>div{font-size:48px}.mobile-attachment-file-card>b{overflow-wrap:anywhere}.mobile-attachment-file-card>span{color:#647b81;font-size:13px;line-height:1.6}.mobile-attachment-file-card>button{min-height:44px;border:1px solid #c9dcda;border-radius:9px;background:#fff;color:#1a5557;font-weight:700}.mobile-attachment-file-card>button:first-of-type{background:#087f78;color:#fff;border-color:#087f78}

@media(max-width:1050px){
  .role-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.role-workbench-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.toolbar{align-items:flex-start!important;gap:12px}.toolbar-actions,.top-actions{flex-wrap:wrap}
}

@media(max-width:760px){
  html,body{overflow-x:hidden}.app-shell{display:block!important;min-width:0!important}.main{margin-left:0!important;padding:58px 12px 20px!important;width:auto!important;min-width:0!important}
  .sidebar{display:flex!important;position:fixed!important;z-index:10030!important;left:0!important;top:0!important;bottom:0!important;width:min(86vw,310px)!important;height:100dvh!important;transform:translateX(-105%);transition:transform .22s ease;box-shadow:18px 0 45px rgba(0,24,43,.28)!important}
  body.mobile-nav-open{overflow:hidden}body.mobile-nav-open .sidebar{transform:translateX(0)}
  .mobile-nav-toggle{display:flex;position:fixed;z-index:10042;left:12px;top:10px;width:42px;height:42px;border:1px solid #d7e5e2;border-radius:11px;background:#fff;box-shadow:0 5px 18px rgba(11,48,62,.14);align-items:center;justify-content:center;flex-direction:column;gap:4px}.mobile-nav-toggle span{display:block;width:19px;height:2px;border-radius:2px;background:#0a505d}
  .mobile-nav-backdrop{display:block;position:fixed;z-index:10020;inset:0;background:rgba(1,20,36,.48);opacity:0;pointer-events:none;transition:opacity .2s}body.mobile-nav-open .mobile-nav-backdrop{opacity:1;pointer-events:auto}
  .logo-wrap{padding-top:18px!important}.sidebar nav button{min-height:46px!important}.topbar{display:none!important}
  .page{min-width:0}.toolbar,.erp-toolbar,.dashboard-simple-head,.role-workbench-head{display:flex!important;align-items:stretch!important;flex-direction:column!important;gap:12px!important;margin-bottom:14px!important}.toolbar h2,.erp-toolbar h2,.dashboard-simple-head h2,.role-workbench-head h2{font-size:21px!important}.toolbar-actions,.top-actions,.dashboard-simple-actions,.role-workbench-head-actions{display:flex!important;width:100%;gap:8px;align-items:center!important;flex-wrap:wrap}.toolbar-actions button,.top-actions button,.dashboard-simple-actions button{min-height:42px;flex:1 1 auto}
  .role-workbench{padding:0}.role-workbench-head h2{margin-top:7px}.role-workbench-head-actions{justify-content:space-between}.role-metric-grid{grid-template-columns:1fr 1fr;gap:9px}.role-metric-card{min-height:104px;padding:14px}.role-metric-card>strong{font-size:19px;margin:11px 0 5px}.role-workbench-grid{grid-template-columns:1fr;gap:11px}.role-shortcuts{grid-template-columns:1fr 1fr;padding:10px;gap:8px}.role-shortcuts button{min-height:70px;padding:9px}.role-workbench-foot{flex-wrap:wrap;gap:8px;margin-bottom:12px}
  .metric-grid,.metric-grid-three,.metric-grid-four,.metric-grid-five,.summary-grid,.dispatch-summary-grid{grid-template-columns:1fr!important}.home-grid,.chart-grid,.activity-grid,.activity-grid-poster,.dashboard-stage,.report-grid,.settings-grid{grid-template-columns:1fr!important}.fishing-mark{display:none!important}.dashboard-toolbar{padding-right:0!important}.dashboard-simple-actions label{flex:1}
  .form-grid,.settlement-filter,.settlement-recon-filter,.inventory-report-filters{grid-template-columns:1fr!important}.form-grid .wide,.form-grid .full,.form-grid [class*="span-"]{grid-column:1!important}.filter-row,.filters,.dispatch-link-row,.inline-picker-row{display:flex!important;flex-direction:column!important;align-items:stretch!important}.dispatch-link-row select{min-width:0!important;width:100%}
  input,select,textarea{max-width:100%;font-size:16px!important}button,.primary-btn,.ghost-btn,.outline-btn,.danger-btn{min-height:42px;touch-action:manipulation}
  .panel{border-radius:12px!important}.panel-head{padding:13px!important;gap:9px;flex-wrap:wrap}.table-wrap{width:100%;max-width:calc(100vw - 24px);overflow-x:auto!important;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.table-wrap table{min-width:720px}.table-wrap.small table{min-width:620px}table th,table td{white-space:nowrap}
  #modal{align-items:flex-end!important;padding:0!important;z-index:10100!important}.modal-card,#modal .modal-card,#modal .modal-card.detail-wide,#modal .other-stock-editor,.dispatch-picker-card{width:100%!important;max-width:none!important;max-height:94dvh!important;margin:0!important;border-radius:18px 18px 0 0!important;overflow:auto!important}.modal-head{position:sticky;top:0;z-index:12;background:#fff}.modal-actions{position:sticky;bottom:0;z-index:11;margin-left:-14px!important;margin-right:-14px!important;padding:11px 14px!important;background:#fff;border-top:1px solid #e4ece9;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.modal-actions button{width:100%;margin:0!important}.product-picker-table,.other-stock-items{max-height:48dvh!important;overflow:auto!important}.modal-close-guard-card{width:calc(100vw - 24px)!important}
  .toast{left:12px!important;right:12px!important;bottom:18px!important;width:auto!important}.login-shell{width:calc(100vw - 24px)!important}.login-card{padding:25px 20px!important}

  /* 手机录单：把电脑版横向明细表转换为逐项卡片 */
  .mobile-document-wrap{max-width:100%!important;max-height:none!important;overflow:visible!important;border:0!important;background:transparent!important}
  table.mobile-document-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;background:transparent!important}
  table.mobile-document-table thead{display:none!important}
  table.mobile-document-table tbody{display:grid!important;gap:12px!important;width:100%!important}
  table.mobile-document-table tbody tr{display:grid!important;width:100%!important;padding:12px!important;border:1px solid #dce9e6!important;border-radius:14px!important;background:#fff!important;box-shadow:0 4px 13px rgba(10,55,64,.055)!important}
  table.mobile-document-table tbody td{display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;width:100%!important;min-width:0!important;height:auto!important;padding:7px 0!important;border:0!important;border-bottom:1px dashed #e6efed!important;text-align:left!important;white-space:normal!important}
  table.mobile-document-table tbody td:last-child{border-bottom:0!important;padding-bottom:0!important}
  table.mobile-document-table tbody td:before{content:attr(data-mobile-label);color:#6c8287;font-size:12px;font-weight:650;line-height:1.25}
  table.mobile-document-table tbody td[colspan]{grid-template-columns:1fr!important}
  table.mobile-document-table input,table.mobile-document-table select,table.mobile-document-table textarea{width:100%!important;min-width:0!important;height:42px!important;text-align:left!important;font-size:16px!important}
  table.mobile-document-table .product-model-entry,table.mobile-document-table .qty-unit{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;width:100%!important;min-width:0!important}
  table.mobile-document-table .product-model-entry button{min-width:45px!important}
  table.mobile-document-table .qty-unit span{min-width:28px!important;text-align:right!important;align-self:center!important}
  table.mobile-document-table .table-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important}
  table.mobile-document-table tbody td>button,table.mobile-document-table tbody td>.mini-btn{width:100%!important}
  table.mobile-document-table tfoot{display:block!important;margin-top:10px!important;padding:10px 12px!important;border:1px solid #cfe3df!important;border-radius:12px!important;background:#eff8f5!important}
  table.mobile-document-table tfoot tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 12px!important}
  table.mobile-document-table tfoot td{display:none!important;position:static!important;width:auto!important;padding:0!important;border:0!important;background:transparent!important;white-space:normal!important}
  table.mobile-document-table tfoot td:not(:empty){display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;font-size:12px!important}
  table.mobile-document-table tfoot td:not(:empty):before{content:attr(data-mobile-label);color:#6c8287;font-weight:600}
  #modal .purchase-editor-wide .category-manager-head,#modal .outsource-document-wide .panel-head{align-items:stretch!important;flex-direction:column!important}
  #modal .purchase-editor-wide .category-manager-head>div,#modal .outsource-document-wide .panel-head>div:last-child{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  #modal .purchase-editor-wide .category-manager-head button,#modal .outsource-document-wide .panel-head button{width:100%!important;margin:0!important}

  /* 公司主页：紧凑、自适应，不出现超宽模块 */
  .dayo-home{padding-bottom:12px!important}.dayo-home-head{gap:10px!important;margin-bottom:12px!important}.dayo-home-head h2{font-size:21px!important}.dayo-home-actions{align-items:stretch!important}.dayo-home-actions label{flex:1 1 120px!important}.dayo-home-actions select,.dayo-home-actions button{width:100%!important;min-height:42px!important}
  .dayo-home-section{margin:2px 0 8px!important}.dayo-home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.dayo-home-metrics .metric-card{min-height:102px!important;padding:14px!important}.dayo-home-metrics .metric-card strong{font-size:19px!important}.dayo-home-grid{grid-template-columns:1fr!important;gap:10px!important}.dayo-home-panel{margin-bottom:10px!important}.dayo-home-panel .panel-head{padding:12px!important}.dayo-home-panel .table-wrap{max-width:100%!important}.dayo-todo-list,.dayo-quick-list{padding:0 12px 12px!important}
  .mobile-attachment-list{display:grid!important;grid-template-columns:1fr!important}.mobile-attachment-item{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important}.mobile-attachment-item>span{grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#536b72;font-size:12px}.mobile-attachment-item .mini-btn{width:100%!important}
}

@media(max-width:430px){
  .role-metric-grid,.role-shortcuts{grid-template-columns:1fr}.role-metric-card{min-height:92px}.role-task-list>button{padding:13px 12px}.role-workbench-role{font-size:10px}
  .modal-actions{grid-template-columns:1fr!important}.login-shell{width:calc(100vw - 16px)!important}
  .dayo-home-metrics{grid-template-columns:1fr!important}.dayo-home-metrics .metric-card{min-height:88px!important}
  table.mobile-document-table tbody td{grid-template-columns:82px minmax(0,1fr)!important;gap:8px!important}table.mobile-document-table tfoot tr{grid-template-columns:1fr!important}
}
