.mobile-page-title,.mobile-account-button,.mobile-nav,.mobile-sheet,.mobile-sheet-backdrop,.mobile-filter-trigger{display:none}

@media (max-width:760px){
  :root{--mobile-header-height:56px;--mobile-nav-height:68px;--mobile-edge:12px;--mobile-touch:48px}
  html,body{width:100%;max-width:100%;overflow-x:clip}
  body{padding:0;overscroll-behavior-y:none}
  body.mobile-sheet-open{overflow:hidden}
  body>header{position:sticky;top:0;z-index:90;display:grid;grid-template-columns:44px minmax(0,1fr) 92px;grid-template-rows:var(--mobile-header-height);align-items:center;width:100%;min-height:var(--mobile-header-height);height:var(--mobile-header-height);padding:0 max(var(--mobile-edge),env(safe-area-inset-right)) 0 max(var(--mobile-edge),env(safe-area-inset-left));gap:8px;overflow:visible}
  body>header>.brand{grid-column:1;grid-row:1;display:grid;width:44px;height:44px;margin:0;place-items:center;overflow:hidden;border-radius:10px}
  body>header>.brand img{width:44px;height:44px;object-fit:cover;border-radius:10px}
  body>header>.brand .product-name{display:none}
  body>header>.mobile-page-title{grid-column:2;grid-row:1;display:block;min-width:0;color:#fff;font-size:16px;font-weight:800;line-height:1.2;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body>header>.desktop-nav{display:none}
  body>header>.account{grid-column:3;grid-row:1;display:flex;width:auto;max-width:none;margin:0;gap:4px;justify-self:end}
  .account-summary,.desktop-logout{display:none!important}
  .notification-bell,.mobile-account-button{display:grid!important;width:44px!important;min-width:44px;min-height:44px;height:44px;padding:0;border:0;border-radius:10px;place-items:center;color:#fff;background:transparent;text-decoration:none;font-size:16px}
  .notification-bell:hover,.notification-bell:focus-visible,.mobile-account-button:hover,.mobile-account-button:focus-visible{background:#294036;outline:2px solid #fff;outline-offset:-2px}
  .mobile-account-button span{display:block;width:24px;height:24px;border:2px solid #d9e3dd;border-radius:50%;font-size:0;position:relative}
  .mobile-account-button span::after{content:"";position:absolute;left:4px;right:4px;bottom:3px;height:7px;background:#d9e3dd;border-radius:8px 8px 4px 4px}
  .mobile-account-button span::before{content:"";position:absolute;left:7px;top:3px;width:6px;height:6px;background:#d9e3dd;border-radius:50%}

  main{width:calc(100% - 24px);max-width:none;margin:16px auto calc(var(--mobile-nav-height) + 28px);min-width:0}
  main>*{min-width:0;max-width:100%}
  .page-head{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  .environment-banner{margin-bottom:12px;padding:10px;font-size:12px}
  .card,.table-card,.support-request-detail{border-radius:14px;padding:16px}
  .table-card{padding:0;overflow:visible;background:transparent;border:0;box-shadow:none}
  .table-card>h2{padding:0;margin:0 0 12px;font-size:18px}
  .table-card>form{padding:0}
  h2{font-size:18px;margin-bottom:14px}
  p{overflow-wrap:anywhere}

  main label{width:100%;max-width:100%;flex-basis:100%!important}
  main :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select:not(.smart-select-native),textarea){width:100%;max-width:100%;min-width:0;min-height:48px;height:48px;font-size:17px}
  main textarea{height:auto;min-height:112px}
  main :is(button,.button){min-height:48px;font-size:16px}
  main .smart-select,main .password-input,main [data-delegation-end]{width:100%;max-width:100%;min-width:0}
  main input:is([type="date"],[type="time"],[type="datetime-local"]){appearance:auto;min-width:0}
  main .form-grid,main .employee-create-grid,main .task-filters form,main .sawing-task-form,main .sawing-job-header,main .sawing-job-line,main .live-shift-header,main .live-shift-row,main .area-roster,main .order-header-fields,main .order-item-row,main .norm-material-row,main .assignment-line{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:14px;width:100%;max-width:100%;grid-template-columns:minmax(0,1fr)}
  main .form-grid>*,main .employee-create-grid>*,main .task-filters form>*,main .sawing-task-form>*,main .sawing-job-header>*,main .sawing-job-line>*,main .live-shift-header>*,main .live-shift-row>*,main .area-roster>*,main .order-header-fields>*,main .order-item-row>*,main .norm-material-row>*,main .assignment-line>*{flex:0 0 auto!important;width:100%;max-width:100%;min-width:0}
  :where(main form):has(>label){display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:14px;width:100%;max-width:100%;grid-template-columns:minmax(0,1fr)}
  :where(main form):has(>label)>*{flex:0 0 auto!important;width:100%;max-width:100%;min-width:0}
  .sawyer-shift-open-form{padding-bottom:12px}
  main form>button,main .form-grid>button,main .form-grid>.button,main .order-item-row>button,main .assignment-line>button,main .norm-material-row>button,main .assignment-actions>button{width:100%;max-width:100%}
  main .role-checkboxes{grid-template-columns:1fr;width:100%}
  main .order-toolbar{display:grid;grid-template-columns:1fr;gap:12px}
  main .order-toolbar .button{width:100%}
  .grid.two,.grid.three,.metrics,.sawing-entry-grid{grid-template-columns:minmax(0,1fr)}

  .table-scroll{width:100%;max-width:100%;overflow:visible}
  table.mobile-card-table{display:block;width:100%;min-width:0;border:0;background:transparent}
  table.mobile-card-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  table.mobile-card-table tbody{display:grid;gap:12px;width:100%}
  table.mobile-card-table tr{display:grid;width:100%;min-width:0;padding:10px 14px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
  table.mobile-card-table td{display:grid;grid-template-columns:minmax(108px,38%) minmax(0,1fr);gap:10px;width:100%;min-width:0;padding:9px 0;border-bottom:1px solid #edf0ec;font-size:14px;overflow-wrap:anywhere}
  table.mobile-card-table td:last-child{border-bottom:0}
  table.mobile-card-table td::before{content:attr(data-mobile-label);color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
  table.mobile-card-table td[colspan]{display:block}
  table.mobile-card-table td[colspan]::before{display:none}
  table.mobile-card-table td form{min-width:0;width:100%}
  table.mobile-card-table td :is(button,.button,input,select){max-width:100%;width:100%}

  .mobile-nav{position:fixed;z-index:95;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));display:grid;grid-auto-flow:column;grid-auto-columns:1fr;min-height:var(--mobile-nav-height);padding:5px 6px;border:1px solid rgba(23,33,29,.12);border-radius:18px;background:rgba(255,255,255,.97);box-shadow:0 12px 34px rgba(10,30,20,.25);backdrop-filter:blur(14px)}
  .mobile-nav :is(a,button){display:grid;width:100%;min-width:0;min-height:56px;padding:5px 2px;border:0;border-radius:12px;place-items:center;align-content:center;gap:2px;color:#526159;background:transparent;text-decoration:none;font-weight:700}
  .mobile-nav :is(a,button)>span{font-size:21px;line-height:1}
  .mobile-nav small{max-width:100%;color:inherit;font-size:10px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-nav :is(a,button).is-active,.mobile-nav :is(a,button)[aria-current="page"]{color:var(--green);background:var(--green2)}
  .mobile-sheet-backdrop{position:fixed;z-index:100;inset:0;display:block;background:rgba(8,20,15,.56);backdrop-filter:blur(2px)}
  .mobile-sheet-backdrop[hidden]{display:none}
  .mobile-sheet{position:fixed;z-index:110;left:0;right:0;bottom:0;display:block;max-height:min(78dvh,640px);padding:8px 16px calc(18px + env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;border-radius:22px 22px 0 0;background:#fff;color:var(--ink);box-shadow:0 -18px 50px rgba(10,30,20,.28)}
  .mobile-sheet[hidden]{display:none}
  .mobile-sheet-handle{width:44px;height:5px;margin:2px auto 10px;border-radius:99px;background:#cbd3cc}
  .mobile-sheet-heading{position:sticky;top:-8px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 -4px 8px;padding:8px 4px;background:#fff}
  .mobile-sheet-heading h2{margin:0;font-size:20px}
  .mobile-sheet-heading button{width:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:#edf2ee;font-size:26px;font-weight:400}
  .mobile-sheet-content{display:grid;gap:6px}
  .mobile-sheet-content>a,.mobile-sheet-group>a{display:flex;align-items:center;min-height:52px;padding:12px;border-radius:12px;color:var(--ink);text-decoration:none;font-size:16px;font-weight:750}
  .mobile-sheet-content>a:hover,.mobile-sheet-content>a:focus-visible,.mobile-sheet-group>a:hover,.mobile-sheet-group>a:focus-visible{background:var(--green2);outline:2px solid var(--green);outline-offset:-2px}
  .mobile-sheet-group{display:grid;gap:4px;padding:6px 0 10px;border-bottom:1px solid var(--line)}
  .mobile-sheet-group:last-child{border-bottom:0}
  .mobile-sheet-group h3{margin:4px 12px;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em}
  .mobile-account-name{display:grid;gap:4px;margin:4px 12px 8px}
  .mobile-account-name small{display:block}
  .mobile-version{margin:12px;color:var(--muted);font-size:13px}
  .mobile-logout{width:100%;color:var(--red);background:#fff;border-color:#e7c8c5}

  .mobile-filter-trigger{display:flex;width:100%;min-height:48px;margin:0 0 12px;align-items:center;justify-content:center;gap:8px;border:1px solid var(--green);color:var(--green);background:#fff}
  .mobile-filter-count{display:inline-grid;min-width:22px;height:22px;padding:0 6px;border-radius:99px;place-items:center;background:var(--green);color:#fff;font-size:12px}
  .mobile-filter-sheet form{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%;padding:0!important}
  .mobile-filter-sheet form>*{width:100%;max-width:100%}

  .assignment-actions,.order-form-actions{display:grid;grid-template-columns:1fr;gap:10px}
  body:has(main [data-assignment-plan]) .assignment-actions,body:has(main .order-items) .order-form-actions{position:sticky;z-index:70;bottom:calc(var(--mobile-nav-height) + 14px);margin:12px -4px 0;padding:10px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 -8px 24px rgba(10,30,20,.14);backdrop-filter:blur(12px)}
  body:has(main [data-live-shift-form]) .row-actions{position:static;margin:0;padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none}
  body:has(main [data-live-shift-form]) .row-actions>button{width:auto;min-width:0;flex:1 1 0}
  main [data-live-shift-form],main [data-live-shift-rows]{width:100%;max-width:100%;min-width:0}
  [data-area-workspace],[data-area-workspace]>* ,[data-area-workspace] form,[data-area-workspace] fieldset,[data-area-workspace] [data-live-shift-row]{width:100%;max-width:100%;min-width:0;overflow-wrap:anywhere}
  [data-area-workspace] fieldset{margin:0;padding:0;border:0}
  .area-report-status{grid-template-columns:1fr;gap:9px}
  .area-report-products{padding:9px 0;border-block:1px solid var(--line)}
  body.keyboard-open .mobile-nav{display:none}
  body.keyboard-open main{margin-bottom:24px}
  footer{padding:18px 12px calc(var(--mobile-nav-height) + 28px)}
  .support-footer-actions{display:grid;gap:12px}
}

@media (max-width:350px){
  body>header{grid-template-columns:40px minmax(0,1fr) 84px;padding-inline:8px;gap:4px}
  body>header>.brand,body>header>.brand img{width:40px;height:40px}
  .notification-bell,.mobile-account-button{width:40px!important;min-width:40px;height:40px;min-height:40px}
  .mobile-page-title{font-size:15px!important}
  table.mobile-card-table td{grid-template-columns:1fr;gap:4px}
  .mobile-nav{left:4px;right:4px}
  .mobile-nav small{font-size:9px}
}

@media (max-width:760px) and (orientation:landscape){
  .mobile-sheet{max-height:88dvh}
  main{margin-top:12px}
}
