/* Scoped, additive mobile styles. No global table conversion or business visibility overrides. */
.m31-page-heading,.m31-bottom,.m31-finance-picker{display:none}
.m31-menu[hidden]{display:none!important}
.m31-menu button[hidden],.m31-badge[hidden]{display:none!important}
.m31-badge{display:inline-block;margin-left:5px;padding:1px 5px;border-radius:10px;background:#dc2626;color:#fff;font-size:12px}
.m31-menu{position:fixed;inset:0!important;z-index:2147483000;display:flex;align-items:flex-end;justify-content:center;padding:0;margin:0;color:#182033;background:rgba(16,24,40,.52)}
.m31-sheet{width:100%;max-width:560px;max-height:82dvh;padding:20px 16px calc(20px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;background:#fff;overflow:auto;box-shadow:0 -14px 36px rgba(16,24,40,.22)}
.m31-menu header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.m31-menu h2{font-size:20px;margin:0}
.m31-menu button{min-height:48px;border:1px solid #dce1eb;border-radius:12px;background:#fff;padding:10px;color:#182033;font:inherit}
.m31-menu-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.m31-menu button[aria-current=page]{color:#5b21b6;border-color:#8b5cf6;background:#f5f3ff}
html.m40-menu-scroll-locked{overflow:hidden!important;overscroll-behavior:none!important}
@media(max-width:1180px){
 body.m32-ready .finance-payroll-summary{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:5px!important;
 }
 body.m32-ready .finance-payroll-summary>.finance-hint{
  min-width:0!important;
  padding:7px 6px!important;
  margin:0!important;
  overflow-wrap:anywhere!important;
 }
 body.m32-ready .finance-payroll-summary>.finance-hint>b{
  display:block!important;
  font-size:10px!important;
  line-height:1.3!important;
 }
 body.m32-ready .finance-payroll-summary>.finance-hint>div{
  font-size:15px!important;
  line-height:1.35!important;
  white-space:nowrap!important;
 }
 body.m32-ready .finance-payroll-summary>.finance-hint>small{
  display:block!important;
  font-size:8px!important;
  line-height:1.3!important;
 }
 body.m31-ready{font-size:14px;background:#f4f6fb!important;padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
 body.m31-menu-visible{overflow:hidden!important}
 .m31-ready button{touch-action:manipulation}
 .m31-ready .admin-navbar,.m31-ready .navbar{position:relative!important;top:auto!important;padding:12px 16px!important;height:auto!important;min-height:64px!important;background:white!important;box-shadow:none!important;border-bottom:1px solid #e4e7ec!important}
 .m31-ready .admin-navbar-logo,.m31-ready .navbar-logo{width:36px!important;height:36px!important}
 .m31-ready .admin-brand{font-size:17px!important}
 .m31-ready .admin-subtitle{font-size:11px!important}
 .m31-ready .admin-container,.m31-ready .container{margin:0!important;padding:16px!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
 .m31-ready #adminFeatureNav,.m31-ready>.tab-bar{display:none!important}
 .m31-page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
 .m31-page-heading h1{font-size:20px;line-height:1.3;margin:0;color:#172b4d}
 .m31-page-heading button{min-height:44px;padding:8px 14px;background:#fff;border:1px solid #dce1eb;border-radius:12px;font-size:14px;color:#5b21b6}
 .m31-bottom{display:flex;position:fixed;bottom:0;left:0;right:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom));gap:4px;background:#fff;border-top:1px solid #e4e7ec;z-index:1100}
 .m31-bottom button{flex:1;min-width:0;min-height:44px;border:0;border-radius:10px;font-size:12px;font-weight:600;background:white;color:#667085}
 .m31-bottom button[hidden]{display:none!important}
 .m31-bottom button[aria-current=page]{background:#ede9fe;color:#5b21b6}
 body.universal-table-fullscreen-open .m31-bottom{display:none}
 /* Actual dashboard: keep date selectors, calculations and drill-downs on their original nodes. */
 #overviewDashboardSection{border-radius:18px!important;background:white!important;border:1px solid #e4e7ec!important;box-shadow:none!important;overflow:visible!important}
 #overviewSection{padding:14px!important}
 #overviewSection>div:first-child{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important}
 #overviewSection>div:first-child>span,#overviewSection>div:first-child>label{grid-column:1/-1;white-space:normal!important}
 #overviewSection .overview-amt-btn{min-width:0!important;max-width:none!important;width:auto!important;padding:12px 8px!important;white-space:nowrap!important;font-size:15px!important}
 #overviewSection .overview-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;margin:16px 0 0!important}
 #overviewSection .overview-card{width:100%!important;min-width:0!important;padding:16px!important;border:1px solid #e1e6ef!important;border-radius:14px!important;background:#fff!important;box-shadow:none!important;box-sizing:border-box}
 #overviewSection .overview-header{display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:8px!important;margin:0 0 12px!important}
 #overviewSection .overview-label{font-size:14px!important;font-weight:700!important;color:#172b4d!important}
 #overviewSection .overview-expand-arrow{margin-left:auto}
 #overviewSection .overview-data{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px 12px!important}
 #overviewSection .overview-row{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:5px!important;min-width:0!important;text-align:left!important;margin:0!important}
 #overviewSection .overview-num{font-size:21px!important;line-height:1.2!important;overflow-wrap:anywhere}
 #overviewSection .overview-desc{font-size:12px!important;line-height:1.4!important;color:#667085!important}
 /* Employee customer workflow already owns its accordion and save handlers. */
 #tabMyCustomers .section-card{padding:16px!important;border-radius:18px!important;border:1px solid #e4e7ec!important;box-shadow:none!important}
 #myCustomerLeadSummary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 #myCustomerLeadSummary button{min-height:72px}
 #myCustomerLeadList select,#myCustomerLeadList textarea{font-size:16px;min-height:44px}
 #myCustomerLeadPager{justify-content:flex-start!important;gap:8px!important;font-size:14px}
 #myCustomerLeadPager button,#myCustomerLeadPager input{min-height:44px}
 /* Finance: seven original views through one compact selector, not a seven-row menu. */
 .m31-ready .m31-finance-tabs{display:none!important}
 .m31-ready .m31-finance-picker{display:flex;align-items:center;gap:12px;margin:0 0 16px;font-size:14px;color:#475467}
 .m31-finance-picker select{flex:1;min-width:0;min-height:48px;border:1px solid #a78bfa;border-radius:12px;padding:10px;background:#f5f3ff;color:#5b21b6;font-size:16px;font-weight:600}
 #adminTab-finance>.admin-section{padding:14px!important;border-radius:16px!important;box-shadow:none!important}
 #adminTab-finance .finance-toolbar{gap:8px!important;align-items:center!important;flex-wrap:wrap!important;margin-bottom:12px!important}
 #adminTab-finance .finance-toolbar>.form-control{flex:1 1 145px;min-width:0!important;max-width:100%!important;min-height:44px!important;font-size:16px!important}
 #adminTab-finance .finance-toolbar>.btn{min-height:44px!important;white-space:normal!important;font-size:14px!important;padding:10px 12px!important}
 #adminTab-finance .finance-toolbar>.finance-check{min-height:44px;font-size:14px}
 #adminTab-finance .finance-hint{font-size:14px!important;line-height:1.65!important;padding:12px!important;border-radius:10px!important}
 #adminTab-finance .finance-zoom{margin-left:0!important;min-height:44px;gap:8px;flex-wrap:wrap}
 #adminTab-finance .finance-zoom button,#adminTab-finance .finance-zoom select{min-height:44px;font-size:14px}
 /* Query/filter groups do not include conditional data or dynamic table rows. */
 .m31-ready .m31-filter-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;align-items:end!important}
 .m31-filter-fields>div{min-width:0!important;max-width:none!important;width:100%}
 .m31-filter-fields>.m31-field-wide{grid-column:1/-1}
 .m31-filter-fields label{font-size:14px!important}
 .m31-filter-fields input,.m31-filter-fields select{min-width:0!important;width:100%!important;min-height:44px!important;font-size:16px!important;box-sizing:border-box}
 .m31-filter-fields>.btn{min-height:44px!important;font-size:14px!important;white-space:normal!important}
 #adminTab-phonesearch>.admin-section,#adminTab-reimburse>.admin-section,#adminTab-tutorial>.admin-section,#adminTab-logs>.admin-section{border-radius:16px!important;box-shadow:none!important;padding:14px!important}
 #adminTab-phonesearch #customerQueryInput{min-width:0!important}
 #adminTab-tutorial .mgr-row{flex-wrap:wrap!important;gap:8px!important}
 #adminTab-tutorial .mgr-row .form-control{max-width:100%!important;min-height:44px!important;font-size:16px!important}
 #adminTab-tutorial .mgr-row .btn{min-height:44px!important;white-space:normal!important;font-size:14px!important}
 #adminTab-tutorial>.admin-section>div:not(.section-header),#logsSection{padding:0!important}
 /* Employee entry keeps the real order builder, amount dropdown and validation. */
 #tabSubmit .stats-grid-v219{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-bottom:16px!important}
 #tabSubmit .year-stats-card{grid-column:1/-1}
 #tabSubmit .stat-card,#tabSubmit .year-stats-card{padding:14px!important;min-width:0;border-radius:14px!important;box-shadow:none!important}
 #tabSubmit .stat-row{gap:10px;flex-wrap:wrap;flex-direction:row!important}
 #tabSubmit .year-stats-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
 #tabSubmit .stat-card-title,#tabSubmit .year-stats-title{font-size:13px!important}
 #tabSubmit .stat-item{min-width:0!important}
 #tabSubmit .stat-number,#tabSubmit .year-stats-num{font-size:20px!important;overflow-wrap:anywhere}
 #tabSubmit .stat-label,#tabSubmit .year-stats-label{font-size:12px!important}
 #tabSubmit .form-card,#tabDrawing .form-card,#tabRecharge .section-card,#tabReimburse .form-card{padding:16px!important;border-radius:16px!important;box-shadow:none!important}
 #tabSubmit .order-card,#tabDrawing .order-card{padding:14px!important;border-radius:14px!important;overflow:visible!important}
 #tabSubmit .form-label,#tabDrawing .form-label{font-size:14px!important;margin-bottom:6px}
 #tabSubmit .form-control,#tabDrawing .form-control,#tabRecharge .form-control{min-height:48px!important;font-size:16px!important;min-width:0!important;max-width:100%!important}
 #tabSubmit .order-card-remove,#tabDrawing .order-card-remove{min-width:44px;min-height:44px}
 #tabSubmit .add-order-btn,#tabSubmit #submitAllBtn{min-height:48px!important;font-size:16px!important;white-space:normal!important}
 #tabSubmit .amount-option-item{min-height:44px;padding:10px 12px;font-size:16px}
 #tabAttendance .attendance-leave-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 #tabAttendance .attendance-leave-grid label{min-width:0;font-size:14px}
 #tabAttendance .form-control{min-width:0;min-height:44px;font-size:16px}
 /* Popups retain their original open/close state. Only the content box is resized. */
 .m31-ready .modal .modal-content{width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;max-height:calc(100dvh - 32px);border-radius:16px!important;overflow:auto;box-sizing:border-box}
 .m31-ready .modal .modal-body{padding:16px!important;max-height:65dvh;overflow:auto}
 .m31-ready .modal .modal-footer{flex-wrap:wrap;gap:10px;padding:12px 16px!important}
 .m31-ready .modal .modal-footer button,.m31-ready .modal .btn-close{min-height:44px;min-width:44px;font-size:14px}
 .m31-ready .modal .form-control{min-height:44px;font-size:16px;min-width:0;max-width:100%}
 @media(max-width:360px){
  .m31-ready .m31-filter-fields,#tabAttendance .attendance-leave-grid{grid-template-columns:1fr!important}
  .m31-page-heading h1{font-size:20px}
  .m31-bottom button{font-size:12px}
 }
}

/* V2961.156: finance late-rule controls have explicit rows on phones. */
#financeLateSettings[hidden]{display:none!important}
#financeLateSettings{padding:16px;border:1px solid #cbd5e1;border-radius:12px;margin:10px 0 16px;background:#fff;box-sizing:border-box;min-width:0}
#financeLateSettings .finance-late-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#financeLateSettings .finance-late-fields label{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:0;margin:0;font-weight:600;line-height:1.4;white-space:normal}
#financeLateSettings .finance-late-fields label span{display:block}
#financeLateSettings .finance-late-fields input,#financeLateSettings .finance-late-fields select{display:block;width:100%;min-width:0;max-width:100%;height:44px;box-sizing:border-box;padding:8px 12px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#1e293b;font:inherit}
#financeLateSettings .finance-late-check{display:flex;align-items:center;gap:10px;margin:16px 0;line-height:1.4;white-space:normal}
#financeLateSettings .finance-late-check input{width:20px;height:20px;flex:none;margin:0}
#financeLateSettings .finance-late-threshold{display:flex;align-items:center;gap:10px;flex-wrap:wrap;line-height:1.4;font-weight:600}
#financeLateSettings .finance-late-threshold input{width:90px;max-width:100%;height:44px;box-sizing:border-box;padding:8px 12px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#1e293b;font:inherit}
#financeLateSettings .finance-late-hint{margin-top:12px;color:#64748b;line-height:1.5}
@media screen and (max-width:700px){
 #finance-payroll{min-width:0}
 #financeLateSettings{padding:14px;margin:10px 0 16px}
 #financeLateSettings .finance-late-fields{grid-template-columns:minmax(0,1fr);gap:12px}
 #financeLateSettings .finance-late-fields label{font-size:14px!important;gap:6px}
 #financeLateSettings .finance-late-fields input,#financeLateSettings .finance-late-fields select{height:46px!important;min-height:46px!important;font-size:16px!important}
 #financeLateSettings .finance-late-check{font-size:14px!important}
 #financeLateSettings .finance-late-threshold{font-size:14px!important;margin-bottom:12px;justify-content:space-between}
 #financeLateSettings .finance-late-threshold input{font-size:16px!important;min-height:46px!important}
 #financeLateSettings .finance-late-save{width:100%;min-height:44px}
 #finance-payroll .finance-late-header{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important}
 #finance-payroll .finance-late-header .btn{flex:0 0 auto;min-height:44px}
 #finance-payroll .finance-late-header #financeLateRuleSummary{flex:1 1 140px;line-height:1.4;overflow-wrap:anywhere}
 #finance-payroll .finance-filter-bar #financePayrollMonth,#finance-payroll .finance-filter-bar #financePayrollCompany,#finance-payroll .finance-filter-bar #financePayrollSearch{flex:1 1 100%!important;min-width:0!important;width:100%!important;box-sizing:border-box!important}
 #finance-payroll .finance-filter-bar>label,#finance-payroll .finance-filter-bar #financePayrollPeriodHint{flex:1 1 100%!important;white-space:normal!important;line-height:1.4}
 #finance-payroll .finance-filter-bar>button{width:100%!important;min-height:44px!important}
}

.tutorial-customer-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.tutorial-customer-card{display:flex;min-width:0;flex-direction:column;gap:8px;padding:12px;border:1px solid #d8e4f0;border-radius:12px;background:#f8fbff;color:#29425f}
.tutorial-card-head,.tutorial-card-line{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.tutorial-card-line>span{flex:0 0 76px;color:#64748b}
.tutorial-card-line>b{min-width:0;text-align:right;overflow-wrap:anywhere}
.tutorial-status{padding:2px 8px;border-radius:999px;font-size:12px;font-weight:700}.tutorial-status.is-on{background:#dcfce7;color:#047857}.tutorial-status.is-off{background:#fee2e2;color:#b91c1c}
.tutorial-card-match{padding:6px 8px;border-radius:7px;background:#f5f3ff;color:#6d28d9;font-size:12px}
.tutorial-card-meta{margin-top:auto;color:#64748b;font-size:12px;line-height:1.55}
@media screen and (max-width:1180px){.tutorial-customer-cards{grid-template-columns:1fr!important}.tutorial-customer-card{padding:11px!important}}

/* Mobile software-stat period controls: larger labels, compact dropdown target, balanced spacing. */
@media screen and (max-width:1180px){
 body.m32-ready.admin-body #swSection>.rank-period-bar>.sw-sales-period-btn{
  display:flex!important;
  min-width:0!important;
  min-height:46px!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  padding:7px 10px!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.15!important;
 }
 body.m32-ready.admin-body #swSection>.rank-period-bar>.sw-sales-period-btn>span[id$='Label']{
  flex:0 1 auto!important;
  min-width:0!important;
 }
 body.m32-ready.admin-body #swSection>.rank-period-bar>.sw-sales-period-btn>.period-date-arrow{
  flex:0 0 auto!important;
  margin-left:1px!important;
  font-size:7px!important;
  opacity:.65!important;
 }
 body.m32-ready.admin-body #swSection>.rank-period-bar>.sw-sales-period-btn>.period-date-select{
  left:auto!important;
  right:5px!important;
  width:20px!important;
  height:100%!important;
 }
}

/* V2961.86: keep both APP headers below the phone status bar and restore the
   administrator-controlled employee welcome text in the compact header. */
@media screen and (max-width:1180px){
 html.android-webview .m32-topbar{
  padding-top:calc(8px + max(env(safe-area-inset-top,0px),30px))!important;
  min-height:calc(62px + max(env(safe-area-inset-top,0px),30px))!important;
 }
 .m32-user-suffix{
  display:block;
  grid-column:4;
  justify-self:center;
  align-self:center;
  max-width:150px;
  margin:0;
  padding:0 4px;
  text-align:center;
  font-size:13px;
  font-weight:750;
  line-height:1.2;
  color:#f59e0b;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
 }
 .m32-user-suffix[hidden]{display:none!important}
 body.m32-ready .m32-topbar .m32-logout{grid-column:5}
}

@media screen and (max-width:420px){
 body.m32-ready:not(.admin-body) .m32-topbar{grid-template-columns:auto auto minmax(82px,auto) minmax(0,1fr) auto!important}
 body.m32-ready:not(.admin-body) .m32-user-suffix{max-width:110px;font-size:12px}
}

/* V2961.87: some packaged WebViews do not expose the android-webview marker.
   The workspace already detects real phones as m34-phone, so reserve the
   full status-bar height through that reliable class for both clients. */
@media screen and (max-width:1180px){
 body.m34-phone .m32-topbar{
  padding-top:56px!important;
  min-height:110px!important;
 }
}

/* Complete mobile workspace: improve every original module without replacing business nodes. */
@media screen and (max-width:1180px){
 .m31-ready .admin-navbar,.m31-ready .navbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
 .m31-ready .navbar-inner{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;width:100%!important;min-width:0!important;padding:0!important}
 .m31-ready .admin-navbar-left,.m31-ready .navbar-left{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;overflow:hidden!important}
 .m31-ready .admin-navbar-right,.m31-ready .navbar-right{display:flex!important;align-items:center!important;flex:0 0 auto!important;margin-left:auto!important}
 .m31-ready .admin-title{display:flex!important;flex-direction:column!important;min-width:0!important;line-height:1.2!important}
 .m31-ready .user-welcome,.m31-ready .user-name{font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 .m31-ready .user-name{font-weight:800!important;color:#172b4d!important}
 .m31-ready .user-suffix{display:none!important}
 .m31-ready .admin-navbar .btn-text,.m31-ready .navbar .btn-text{min-height:40px!important;padding:7px 10px!important;border:1px solid #d0d5dd!important;border-radius:10px!important;background:#fff!important;color:#344054!important;font-size:13px!important;font-weight:700!important;white-space:nowrap!important}
 .m31-ready .admin-tab-content.active,.m31-ready .tab-content.active{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible!important}
 .m31-ready :is(.admin-section,.section-card,.form-card){max-width:100%!important;box-sizing:border-box!important;border:1px solid #e4e7ec!important;border-radius:16px!important;background:#fff!important;box-shadow:0 3px 12px rgba(16,24,40,.05)!important;overflow:visible!important}
 .m31-ready .admin-tab-content.active>.admin-section{margin-bottom:14px!important}
 .m31-ready :is(.section-header,.card-header){min-height:52px!important;padding:12px 14px!important;border-bottom:1px solid #e4e7ec!important;background:#fff!important;border-radius:16px 16px 0 0!important;box-sizing:border-box!important}
 .m31-ready :is(.section-header,.card-header) :is(h2,h3){font-size:16px!important;line-height:1.4!important;margin:0!important;color:#172b4d!important}
 .m31-ready .section-title,.m31-ready .form-title{font-size:18px!important;line-height:1.4!important;color:#172b4d!important}
 .m31-ready .admin-tab-content.active :is(button,.btn),.m31-ready .tab-content.active :is(button,.btn){min-height:42px;font-size:13px;touch-action:manipulation}
 .m31-ready .admin-tab-content.active :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea),
 .m31-ready .tab-content.active :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea){max-width:100%;min-height:44px;font-size:16px!important;box-sizing:border-box}
 .m31-ready .admin-tab-content.active textarea,.m31-ready .tab-content.active textarea{min-height:92px}
 .m31-ready input[type=checkbox],.m31-ready input[type=radio]{width:21px!important;height:21px!important;min-height:21px!important;flex:0 0 21px!important}
 .m31-ready :is(.mgr-hint,.finance-hint,small){font-size:12px!important;line-height:1.55!important}
 .m31-ready img{max-width:100%;height:auto}

 /* Management settings: each existing switch remains a separate, readable card. */
 #adminTab-settings>.admin-section{padding:0 14px 14px!important;margin-bottom:12px!important;overflow:hidden!important}
 #adminTab-settings>.admin-section>.section-header{margin:0 -14px 12px!important}
 #adminTab-settings>.admin-section>.section-header>.btn{margin-left:auto;flex:0 0 auto}
 #adminTab-settings>.admin-section label{font-size:13px!important;line-height:1.55!important}
 #adminTab-settings :is(#settingOcrExtensionsPanel,#settingSubmissionAlarmPanel,#settingSubmissionFeaturePanel){padding:13px!important;gap:12px!important}
 #adminTab-settings :is(#settingTopAmountMode,#settingAdminContact)>*{flex:1 1 160px!important;max-width:100%!important}
 #adminTab-settings [id$='Setting']>div[style*='display:flex'],#adminTab-settings #employeeMgmt>div:first-child>div:last-child{gap:10px!important}
 #adminTab-settings #employeeMgmt>div:first-child input{flex:1 1 145px!important;width:100%!important;min-width:0!important}
 #adminTab-settings #dimBtnCheckList{grid-template-columns:1fr!important}
 #adminTab-settings input[type=range]{min-width:150px;flex:1}

 /* Simple toolbars become two-column touch layouts; long fields occupy a full row. */
 #adminTab-phonesearch .admin-section>.admin-section{padding:0 12px 12px!important;overflow:hidden!important}
 #adminTab-phonesearch :is(#authorizedAccountKeyword,#authorizedAccountCategory,#unlicensedCustomerKeyword){flex:1 1 100%!important;width:100%!important;max-width:100%!important}
 #adminTab-subaccounts>.admin-section{padding:14px!important}
 #adminTab-logs .m31-filter-fields{padding:0!important;background:transparent!important;box-shadow:none!important}
 #adminTab-logs .m31-filter-fields>div{min-width:0!important}
 #adminTab-logs .m31-filter-fields :is(input,select){width:100%!important}
 #adminTab-reviews #submissionReviewPanel,#adminTab-failures :is(#submissionFailureAlertsPanel,#submissionFailureStatsPanel){padding-top:12px!important}

 /* Reports, ranking and employee records read as native phone cards. */
 #adminTab-reports .rank-period-bar,#tabRank .rank-period-bar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:0!important}
 #adminTab-reports .rank-period-btn,#tabRank .rank-period-btn{display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;min-height:42px!important;padding:8px 6px!important;font-size:13px!important;border-radius:11px!important}
 #adminTab-reports .period-date-select,#tabRank .period-date-select{inset:0 0 0 auto!important;width:24px!important;height:100%!important}
 #adminTab-reports .rank-period-btn,#tabRank .rank-period-btn{padding-right:24px!important}
 #adminTab-reports .period-date-arrow,#tabRank .period-date-arrow{position:absolute!important;right:9px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important}
 #adminTab-reports .admin-report-chart-mode{flex:1 1 120px;white-space:normal!important}
 #tabRank>.section-card,#tabRecord>.section-card{padding:16px!important}
 #tabRank .table-wrapper{overflow-x:auto!important}
 #tabRank .rank-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
 #tabRank .rank-table :is(th,td){padding:9px 5px!important;font-size:12px!important;white-space:normal!important}
 #tabRecord>.section-card>div:first-child{align-items:stretch!important}
 #tabRecord>.section-card>div:first-child>*{flex:1 1 150px!important;max-width:100%!important}
 #tabRecord #recentRecords{margin-top:14px}

 /* Employee forms and subpages keep one clear task per card. */
 #tabDrawing>.admin-tab-bar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:0!important}
 #tabDrawing>.admin-tab-bar>.admin-tab-btn{display:flex!important;align-items:center!important;justify-content:center!important;min-height:48px!important;border:1px solid #d0d5dd!important;border-radius:12px!important;background:#fff!important;font-size:15px!important}
 #tabDrawing>.admin-tab-bar>.admin-tab-btn.active{border-color:#6366f1!important;background:#eef2ff!important;color:#4338ca!important}
 #tabDrawing #drawingSubDrawing>.section-card{padding:16px!important}
 #tabRecharge>div:first-child{padding:0!important;max-width:100%!important}
 #tabRecharge>div:first-child>div{border:1px solid #e4e7ec!important;box-shadow:none!important}
 #tabRecharge :is(#rcAmount,#rcSoftware,#rcCustName,#rcCustPhone,#rcCustomerBelong,#rcPaymentTime,#rcOrderNo6,#rcNotes){width:100%!important;min-height:48px!important;font-size:16px!important}
 #tabRecharge #rcSubmitBtn{min-height:50px!important;font-size:16px!important}
 #tabAttendance .attendance-page{padding:0!important;max-width:100%!important}
 #tabAttendance .attendance-hero{padding:16px!important;border-radius:16px!important}
 #tabAttendance .attendance-title{font-size:21px!important}
 #tabAttendance .attendance-status-grid{grid-template-columns:1fr 1fr!important}
 #tabAttendance .attendance-checks{grid-template-columns:1fr 1fr!important}
 #tabAttendance .attendance-actions{grid-template-columns:1fr 1fr!important}
 #tabAttendance .attendance-leave-card{padding:16px!important;border-radius:16px!important}
 #tabAttendance #attendanceLeaveSubmit{width:100%;min-height:48px!important;font-size:16px!important}
 #tabMyCustomers>.section-card>div:first-child{align-items:stretch!important}
 #tabMyCustomers>.section-card>div:first-child>div{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
 #tabMyCustomers>.section-card>div:first-child select{width:100%!important;max-width:100%!important}

 /* Wide source tables stay inside their own scroller and never widen the page. */
 .m31-ready :is(.table-wrapper,.mobile-scroll-table,.finance-table-viewport){max-width:100%!important;-webkit-overflow-scrolling:touch!important}
 .m31-ready .admin-tab-content.active .table-wrapper:not(:has(.m31-record-table)),
 .m31-ready .tab-content.active .table-wrapper:not(:has(.m31-record-table)){overflow-x:auto!important;border:1px solid #ddd6fe!important;border-radius:12px!important}
 .m31-ready .admin-tab-content.active .table-wrapper:not(:has(.m31-record-table))>table,
 .m31-ready .tab-content.active .table-wrapper:not(:has(.m31-record-table))>table{width:max-content!important;min-width:100%!important}
}

/* V2961.46: sales employee home uses four frequent actions in a compact 2x2 grid. */
@media screen and (max-width:1180px){
 body.m32-ready #authorizedAccountTypeCards{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
 }
 body.m32-ready #authorizedAccountTypeCards>button{
  min-width:0!important;
  width:100%!important;
  padding:9px 10px!important;
 }
 body.m32-ready #authorizedAccountTypeCards>button>div:first-child{
  font-size:11px!important;
  line-height:1.35!important;
 }
 body.m32-ready #authorizedAccountTypeCards>button>div:nth-child(2){
  font-size:19px!important;
  line-height:1.25!important;
 }
 body.m32-ready.admin-body .m36-quick-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:7px!important;
 }
body.m32-ready:not(.admin-body) .m36-quick-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
 }
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card{
  min-height:70px!important;
  padding:6px 4px!important;
  border:1px solid #d9e6f4!important;
  border-radius:11px!important;
  background:#f7fbff!important;
  font-size:12px!important;
 }
 body.m32-ready:not(.admin-body) .m36-quick-grid .m32-nav-icon{
  width:29px!important;
  height:29px!important;
  font-size:14px!important;
 }
}
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi{
  min-height:82px!important;
  padding:8px!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi-value{font-size:17px!important}

/* V32 structural phone shell: one task per screen, compact app header and icon navigation. */
.m32-topbar{display:none}
@media screen and (max-width:1180px){
 :root{--m32-blue:#1687f8;--m32-purple:#6558f5;--m32-ink:#172b4d;--m32-muted:#667085;--m32-line:#e3e8ef;--m32-bg:#f3f7fc}
 html,body{max-width:100%!important;overflow-x:hidden!important}
 body.m32-ready{padding:0 0 calc(70px + env(safe-area-inset-bottom))!important;background:linear-gradient(180deg,#eef6ff 0,#f6f8fc 240px,#f4f6f9 100%)!important;color:var(--m32-ink)!important}
 body.m32-ready>.admin-navbar,body.m32-ready>.navbar{display:none!important}
 .m32-topbar{position:sticky;top:0;z-index:1090;display:grid;grid-template-columns:auto auto minmax(0,1fr) auto auto;align-items:center;gap:8px;width:100%;min-height:62px;padding:8px 12px;background:rgba(255,255,255,.96);border-bottom:1px solid rgba(214,223,235,.9);box-shadow:0 3px 14px rgba(28,66,104,.07);backdrop-filter:blur(16px);box-sizing:border-box}
 .m32-topbar button{min-height:40px;border:0;border-radius:11px;background:#edf4ff;color:#31506e;font-size:13px;font-weight:750;padding:7px 10px;touch-action:manipulation}
 .m32-topbar .m32-back{width:40px;padding:0;font-size:30px;line-height:36px;color:#2563eb}
 .m32-topbar .m32-back[hidden]{display:none!important}
 .m32-logo{width:38px;height:38px;object-fit:cover;border-radius:11px;box-shadow:0 2px 8px rgba(37,99,235,.14)}
 .m32-title-wrap{display:flex;min-width:0;flex-direction:column;line-height:1.18}
 .m32-company{font-size:12px;color:#60758a;white-space:nowrap}
 .m32-title{font-size:17px;font-weight:850;color:#152d4a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .m32-topbar .m32-all{background:linear-gradient(135deg,var(--m32-blue),var(--m32-purple));color:#fff;box-shadow:0 4px 10px rgba(72,83,239,.18)}
 .m32-topbar .m32-logout{justify-self:end;min-width:48px!important;min-height:32px!important;padding:4px 8px!important;border-radius:9px!important;background:#fff;border:1px solid #d9e1eb;color:#667085;font-size:11px!important}
 body.m32-ready>.admin-container,body.m32-ready>.container{width:100%!important;max-width:760px!important;margin:0 auto!important;padding:14px 12px 18px!important;background:transparent!important;box-sizing:border-box!important}
 body.m32-ready #adminFeatureNav,body.m32-ready>.tab-bar{display:none!important}

 /* Original modules become separate app screens; their handlers and data nodes remain untouched. */
 body.m32-ready .admin-tab-content,body.m32-ready .tab-content{display:none!important}
 body.m32-ready .admin-tab-content.active,body.m32-ready .tab-content.active{display:block!important;animation:m32-page-in .16s ease-out}
 @keyframes m32-page-in{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:none}}
 body.m32-ready :is(.admin-section,.section-card,.form-card){margin:0 0 12px!important;border:1px solid rgba(218,226,237,.95)!important;border-radius:17px!important;background:rgba(255,255,255,.98)!important;box-shadow:0 5px 18px rgba(39,74,109,.06)!important;overflow:visible!important;contain:none!important}
 body.m32-ready :is(.section-header,.card-header){position:relative!important;min-height:52px!important;padding:12px 14px 12px 20px!important;border-bottom:1px solid #edf0f4!important;border-radius:17px 17px 0 0!important;background:#fff!important}
 body.m32-ready :is(.section-header,.card-header)::before{content:'';position:absolute;left:9px;top:15px;width:4px;height:22px;border-radius:4px;background:linear-gradient(180deg,var(--m32-blue),var(--m32-purple))}
 body.m32-ready :is(.section-header,.card-header) :is(h2,h3){font-size:16px!important;font-weight:850!important;letter-spacing:.01em;color:#182b45!important}
 body.m32-ready .section-title,body.m32-ready .form-title{font-size:18px!important;font-weight:850!important;color:#182b45!important}
 body.m32-ready .admin-section>div:not(.section-header){max-width:100%!important}

 /* Bottom navigation is now a native-looking app bar instead of text tabs. */
 body.m32-ready .m31-bottom{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;left:0;right:0;bottom:0;min-height:62px;padding:5px 7px calc(5px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid #dce3ec;box-shadow:0 -5px 18px rgba(28,66,104,.09);z-index:1200}
 body.m32-ready .m31-bottom button{display:flex;min-width:0;min-height:52px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px 1px;border-radius:11px;background:transparent;color:#718096;font-size:11px;font-weight:700;line-height:1.15}
 body.m32-ready .m31-bottom button[aria-current=page]{background:#edf3ff;color:#4f46e5}
 .m32-nav-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;font-size:15px;font-weight:900;line-height:1}
 body.m32-ready .m31-bottom button[aria-current=page] .m32-nav-icon{background:linear-gradient(135deg,var(--m32-blue),var(--m32-purple));color:#fff;box-shadow:0 3px 8px rgba(79,70,229,.2)}
 .m32-nav-label{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

 /* All-functions sheet: concise 3-column launcher, never a full desktop menu. */
 body.m32-ready .m31-sheet{padding:12px 14px calc(18px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#f8faff}
 body.m32-ready .m31-sheet::before{content:'';display:block;width:42px;height:5px;margin:0 auto 12px;border-radius:5px;background:#cad3df}
 body.m32-ready .m31-menu header{margin-bottom:12px}
 body.m32-ready .m31-menu h2{font-size:19px;color:#172b4d}
 body.m32-ready .m31-menu-items{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 body.m32-ready .m31-menu-items button{display:flex;min-width:0;min-height:70px;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px 3px;border:1px solid #e1e7ef;border-radius:14px;background:#fff;color:#35485f;font-size:12px;font-weight:750;box-shadow:0 2px 8px rgba(31,65,99,.04)}
 body.m32-ready .m31-menu-items button[aria-current=page]{border-color:#9cbcff;background:#edf4ff;color:#4338ca}
 body.m32-ready .m31-menu-items .m32-nav-icon{width:32px;height:32px;background:#eef4ff;color:#4f46e5;font-size:16px}
 body.m32-ready .m31-menu-items button[aria-current=page] .m32-nav-icon{background:linear-gradient(135deg,var(--m32-blue),var(--m32-purple));color:#fff}
 body.m32-ready .m31-close{min-width:58px!important;min-height:40px!important;background:#e9edf3!important;border:0!important}

 /* Dashboard, filters and forms use phone proportions instead of desktop density. */
 body.m32-ready #overviewDashboardSection{border:0!important;background:transparent!important;box-shadow:none!important}
 body.m32-ready #overviewDashboardSection>.section-header{margin-bottom:10px;border:1px solid var(--m32-line)!important;border-radius:16px!important;box-shadow:0 4px 14px rgba(39,74,109,.05)!important}
 body.m32-ready #overviewSection{padding:0!important}
 body.m32-ready #overviewSection .overview-card{border:1px solid var(--m32-line)!important;border-radius:16px!important;box-shadow:0 4px 14px rgba(39,74,109,.05)!important}
 body.m32-ready #overviewSection .overview-data{gap:12px!important}
 body.m32-ready #overviewSection .overview-num{font-size:20px!important}
 body.m32-ready :is(.m31-filter-fields,.m31-form-grid,.m31-upload-grid,.m31-bulk-fields){border-radius:14px!important}
 body.m32-ready .m31-action-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
 body.m32-ready .m31-action-row>input,body.m32-ready .m31-action-row>select,body.m32-ready .m31-action-row>label{grid-column:1/-1!important;width:100%!important}
 body.m32-ready .m31-action-row>.btn{width:100%!important}
 body.m32-ready :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea){border-radius:11px!important}
 body.m32-ready :is(button,.btn){border-radius:11px}
 body.m32-ready #adminTab-finance>.admin-section{padding:12px!important}
 body.m32-ready .m31-finance-picker{position:sticky;top:70px;z-index:18;padding:8px;border:1px solid #d9e2f0;border-radius:13px;background:rgba(255,255,255,.97);box-shadow:0 4px 12px rgba(39,74,109,.06)}
 body.m32-ready #adminTab-finance .finance-toolbar{padding:10px!important;border-radius:13px!important;background:#f6f8fc!important}
 body.m32-ready #adminTab-finance .finance-toolbar>.btn{flex:1 1 125px!important}
 body.m32-ready #tabSubmit .stats-grid-v219{grid-template-columns:1fr 1fr!important}
 body.m32-ready #tabSubmit .stat-card,body.m32-ready #tabSubmit .year-stats-card{border:1px solid var(--m32-line)!important;box-shadow:0 4px 14px rgba(39,74,109,.05)!important}
 body.m32-ready #tabAttendance .attendance-hero{background:linear-gradient(135deg,var(--m32-blue),var(--m32-purple))!important}

 /* Card records visually separate each item; original table colors remain in table/fullscreen mode. */
 body.m32-ready .m31-record-table>tbody>tr{border:1px solid #dce4ee!important;border-radius:15px!important;background:#fff!important;box-shadow:0 4px 13px rgba(39,74,109,.05)!important}
 body.m32-ready .m31-record-table>tbody>tr>td{border-color:#edf0f4!important;background:transparent!important}
 body.m32-ready .m31-record-table>tbody>tr>td::before{font-size:12px!important;color:#718096!important}
 body.m32-ready .m31-record-mode{padding:7px 9px;border:1px solid #dbe3ed;border-radius:12px;background:#fff}
}

@media screen and (max-width:370px){
 .m32-topbar{grid-template-columns:auto auto minmax(0,1fr) auto;gap:6px;padding-left:8px;padding-right:8px}
 .m32-topbar .m32-logout{display:block}
 .m32-title{font-size:15px}
 body.m32-ready .m31-menu-items{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.m32-ready #tabSubmit .stats-grid-v219{grid-template-columns:1fr!important}
}

/* V2961.81 — enlarge admin mobile bottom-navigation labels without wrapping. */
@media screen and (max-width:1180px){
 body.m32-ready.admin-body .m31-bottom button{
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.15!important;
  letter-spacing:0!important;
  padding-left:0!important;
  padding-right:0!important;
 }
 body.m32-ready.admin-body .m31-bottom .m32-nav-label{
  overflow:visible!important;
  text-overflow:clip!important;
 }
}

@media screen and (max-width:390px){
 .m31-ready .admin-container,.m31-ready .container{padding:12px!important}
 .m31-ready .admin-subtitle,.m31-ready .user-welcome{display:none!important}
 .m31-ready .admin-brand{font-size:17px!important}
 .m31-ready .m31-bottom button{font-size:12px!important;padding:5px 2px!important}
 #tabSubmit .stats-grid-v219{grid-template-columns:1fr!important}
 #tabSubmit .year-stats-card{grid-column:auto}
 #tabAttendance .attendance-checks{grid-template-columns:1fr!important}
 .m31-record-table>tbody>tr>td{grid-template-columns:minmax(72px,34%) minmax(0,1fr)!important;padding:10px!important}
}
/* Screen-only transformation of whitelisted, single-header ordinary records. */
@media screen and (max-width:1180px){
 body.m31-ready table.m31-record-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;border:0!important}
 .m31-record-table>thead,.m31-record-table>tbody{display:block!important;width:100%!important}
 .m31-record-table>thead>tr{display:flex!important;flex-wrap:wrap!important;gap:8px}
 .m31-record-table>thead>tr>th:not(.m31-head-control){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap!important}
 .m31-record-table>thead>tr>th.m31-head-control{display:flex!important;align-items:center;gap:8px;min-height:44px;padding:8px 12px!important;margin-bottom:8px}
 .m31-record-table .m31-head-control:has(input[type=checkbox])::before{content:'全选';font-size:14px}
 .m31-record-table>tbody>tr{display:block;margin-bottom:14px;border:1px solid #a78bfa!important;border-radius:12px;overflow:visible!important}
 .m31-record-table>tbody>tr>td{display:grid!important;grid-template-columns:minmax(78px,30%) minmax(0,1fr);gap:10px;width:auto!important;max-width:none!important;min-width:0!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;padding:10px 12px!important;font-size:14px!important;border-width:0 0 1px!important;align-items:start}
 .m31-record-table>tbody>tr>td:last-child{border-bottom:0!important}
 .m31-record-table>tbody>tr>td::before{content:attr(data-m31-label);font-weight:600;color:#475467;grid-column:1;grid-row:1}
 .m31-record-table>tbody>tr>td>*{max-width:100%!important;min-width:0;grid-column:2}
 .m31-record-table input:not([type=checkbox]),.m31-record-table select,.m31-record-table button{min-height:44px;font-size:16px!important}
 .m31-record-table input[type=checkbox]{width:20px;height:20px;margin:6px}
 .m31-record-table>tbody>.m31-empty-row>td{display:block!important;text-align:center!important;padding:24px 12px!important}
 .m31-record-table>tbody>.m31-empty-row>td::before{content:none}
}

/* Module forms: screen presentation only; conditional rows keep their own visibility. */
@media screen and (max-width:1180px){
 .m31-ready .m31-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 .m31-ready .m31-upload-grid,.m31-ready .m31-bulk-fields{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
 .m31-form-grid>*,.m31-upload-grid>*,.m31-bulk-fields>*{min-width:0!important;max-width:100%!important;box-sizing:border-box}
 .m31-form-grid label,.m31-upload-grid label,.m31-bulk-fields label{font-size:14px!important;line-height:1.5}
 .m31-form-grid .form-control,.m31-upload-grid .form-control,.m31-bulk-fields .form-control{width:100%!important;min-width:0!important;max-width:100%!important;min-height:44px!important;font-size:16px!important;box-sizing:border-box}
 .m31-bulk-fields>.finance-check{display:grid!important;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:8px;padding:12px;border:1px solid #ddd6fe;border-radius:10px}
 .m31-bulk-fields>.finance-check>.form-control{grid-column:1/-1}
 .m31-bulk-fields input[type=checkbox]{width:20px;height:20px;margin:0}
 .m31-ready .m31-action-row{flex-wrap:wrap!important;gap:8px!important;align-items:center!important}
 .m31-action-row>.form-control{flex:1 1 160px;min-width:0!important;max-width:100%!important;min-height:44px!important;font-size:16px!important}
 .m31-action-row>label{flex:1 1 130px;min-width:0;font-size:14px!important}
 .m31-action-row>label>.form-control{width:100%;min-width:0;min-height:44px;font-size:16px;box-sizing:border-box}
 .m31-action-row>.btn{min-height:44px!important;padding:10px 12px!important;font-size:14px!important;white-space:normal!important}
 .m31-ready :is(#adminTab-reviews,#adminTab-failures,#adminTab-reports,#adminTab-devices,#adminTab-recharge,#adminTab-subaccounts)>.admin-section{padding:14px!important;border-radius:16px!important;box-shadow:none!important;min-width:0}
 .m31-ready :is(#adminTab-reviews,#adminTab-failures,#adminTab-reports,#adminTab-devices) .section-header{gap:8px;flex-wrap:wrap}
 .m31-ready :is(#adminTab-reviews,#adminTab-failures,#adminTab-reports,#adminTab-devices) .section-header h3{font-size:18px!important;line-height:1.5;min-width:0}
 .m31-ready :is(#adminTab-reviews,#adminTab-failures,#adminTab-reports,#adminTab-devices) .btn{min-height:44px;white-space:normal;font-size:14px}
 #adminTab-recharge .rc-admin-body{padding:0!important;min-width:0}
 #aiLifecyclePanel,#aiBundlePackagePanel{padding:12px!important}
 #aiPkgEditor{padding:10px!important}
 #aiPkgSoftware{width:100%;font-size:16px;min-height:140px;box-sizing:border-box}
 #aiPkgActive{width:20px;height:20px}
 #aiBundlePackagePanel .btn{min-height:44px;font-size:14px;white-space:normal}
 #adminReportChart{height:300px!important}
 #tabReport>.section-card,#tabDevice>.section-card,#tabReimburse>.section-card{padding:16px!important;border-radius:16px!important;box-shadow:none!important;min-width:0;box-sizing:border-box}
 #reportKpiCards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #monthlyReportChart,#dailyTrendChart{height:280px!important}
 #tabReimburse .rb-form-table td:first-child{font-size:14px!important;text-align:left!important;line-height:1.5}
 #tabReimburse .rb-form-table .form-control,#tabReimburse .rb-form-table input[type=file],#rbHistoryKeyword{font-size:16px!important;min-height:44px!important;max-width:100%;box-sizing:border-box}
 #tabReimburse .rb-form-table textarea.form-control{min-height:88px!important}
 #tabReimburse .rb-preview-box{max-width:100%;overflow-wrap:anywhere}
 #tabReimburse{width:100%!important;max-width:100%!important;padding:10px 12px 18px!important;overflow-x:hidden!important;box-sizing:border-box!important}
 #tabReimburse>.form-card,#tabReimburse>.section-card{width:100%!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;padding:15px 14px!important;overflow:hidden!important;box-sizing:border-box!important}
 #tabReimburse .rb-form-table,#tabReimburse .rb-form-table tbody,#tabReimburse .rb-form-table tr,#tabReimburse .rb-form-table td{max-width:100%!important;box-sizing:border-box!important}
 #tabReimburse .rb-form-table input[type=file]{display:block!important;width:100%!important;min-width:0!important;padding:4px 0!important;overflow:hidden!important;font-size:13px!important}
 #tabReimburse .rb-form-table input[type=file]::file-selector-button{max-width:44%;margin-right:8px;padding:7px 9px;border:1px solid #94a3b8;border-radius:7px;background:#f8fafc;color:#334155;font-size:13px}
 #tabReport{width:100%!important;max-width:100%!important;padding:10px 12px 18px!important;overflow-x:hidden!important;box-sizing:border-box!important}
 #tabReport>.section-card{width:100%!important;max-width:100%!important;margin:0 auto!important;padding:15px 14px!important;overflow:hidden!important;box-sizing:border-box!important}
 #tabReport #monthlyReportChart,#tabReport #dailyTrendChart{width:100%!important;max-width:100%!important;min-width:0!important}
 #rbSubmitBtn{min-height:48px!important;font-size:16px!important}
 /* Do not resize the signing canvas: its bitmap-to-touch coordinate mapping stays original. */
 #deviceSignClear,#deviceSignCancel,#deviceSignSubmit{min-height:48px;min-width:64px;font-size:16px;padding:10px}
 @media(max-width:380px){
  .m31-ready .m31-form-grid{grid-template-columns:minmax(0,1fr)!important}
 }
}

.m31-record-mode{display:none}
.m31-record-mode[hidden]{display:none!important}
@media screen and (max-width:1180px){
 .m31-ready .m31-record-mode:not([hidden]){display:flex;align-items:center;gap:12px;margin:12px 0;font-size:14px;color:#475467}
 .m31-record-mode select{min-height:44px;font-size:16px;border:1px solid #a78bfa;border-radius:10px;padding:8px 12px;background:#fff;color:#5b21b6}
 .m31-ready .m31-record-viewport{overflow-x:auto!important;width:100%;max-width:100%;box-sizing:border-box}
 .m31-record-viewport>.m31-record-table{zoom:1!important;transform:none!important;max-width:100%!important}
 .m31-record-viewport .m31-record-table>tbody>tr>td input:not([type=checkbox]),.m31-record-viewport .m31-record-table>tbody>tr>td select{width:100%!important;box-sizing:border-box}
 .m31-record-viewport .m31-record-table>tbody>tr>td .btn{margin-bottom:6px;white-space:normal}
 .m31-record-table>tbody>tr[hidden]{display:none!important}
}

@media screen and (max-width:1180px){
 .m31-record-viewport>.finance-pagination{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;display:flex;flex-wrap:wrap!important;justify-content:flex-start!important;gap:8px;padding:12px 0!important;white-space:normal!important}
 .m31-record-viewport>.finance-pagination select,.m31-record-viewport>.finance-pagination button{min-height:44px;font-size:14px}
 .m31-record-viewport>.finance-pagination>b{flex-basis:100%;font-size:14px}
}

@media screen and (max-width:1180px){
 .m31-record-table>tbody>.m31-group-row>td.m31-self-described{display:block!important;text-align:left!important}
 .m31-record-table>tbody>.m31-group-row>td.m31-self-described::before{content:none}
 .m31-record-table>tbody>.finance-team-row{border-color:#eab308!important}
 .m31-record-table>tbody>.finance-team-row>td:empty{display:none!important}
 .m31-record-table>tbody>:is(.finance-total-row,.finance-category-total-row){border-color:#22c55e!important}
.m31-record-table .pay-leader-subsidy>div{min-width:0!important}
 .m31-record-viewport>.finance-table .finance-team-row input[type=date]{margin:6px 0}
 .m31-record-table>tbody>tr[data-payroll-detail]>td .table-wrapper{overflow-x:auto;max-width:100%}
}

/* V2961.33 — confirmed compact phone adjustments. Keep last so it wins safely. */
@media screen and (max-width:1180px){
 body.m32-ready{font-size:13px!important;padding-bottom:calc(62px + env(safe-area-inset-bottom))!important}
 body.m32-ready .m32-topbar{grid-template-columns:auto auto minmax(0,1fr) auto!important;min-height:52px!important;padding:5px 10px!important;gap:7px!important}
 body.m32-ready .m32-logo{width:34px!important;height:34px!important;border-radius:9px!important}
 body.m32-ready .m32-company{font-size:16px!important;font-weight:850!important;color:#173a61!important}
 body.m32-ready .m32-title{display:none!important}
 body.m32-ready .m32-topbar button{min-height:36px!important;padding:5px 9px!important;font-size:12px!important}
 body.m32-ready .m32-topbar .m32-back{width:34px!important;font-size:25px!important}
 body.m32-ready>.admin-container,body.m32-ready>.container{padding:8px 8px 12px!important}
 body.m32-ready :is(.admin-section,.section-card,.form-card){margin-bottom:8px!important;border-radius:13px!important}
 body.m32-ready .admin-tab-content.active>.admin-section{margin-bottom:8px!important}
 body.m32-ready :is(.section-header,.card-header){min-height:42px!important;padding:8px 10px 8px 17px!important;border-radius:13px 13px 0 0!important}
 body.m32-ready :is(.section-header,.card-header)::before{left:7px!important;top:10px!important;height:20px!important;width:3px!important}
 body.m32-ready :is(.section-header,.card-header) :is(h2,h3){font-size:14px!important}
 body.m32-ready .section-title,body.m32-ready .form-title{font-size:15px!important}
 body.m32-ready .admin-tab-content.active :is(button,.btn),body.m32-ready .tab-content.active :is(button,.btn){min-height:36px!important;font-size:12px!important;padding-top:6px!important;padding-bottom:6px!important}
 body.m32-ready .admin-tab-content.active :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea),
 body.m32-ready .tab-content.active :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea){min-height:38px!important;font-size:14px!important}
 body.m32-ready :is(.m31-filter-fields,.m31-form-grid,.m31-upload-grid,.m31-bulk-fields){gap:7px!important;padding:8px!important}
 body.m32-ready #overviewSection .overview-grid{gap:8px!important;margin-top:8px!important}
 body.m32-ready #overviewSection .overview-card{padding:10px!important;border-radius:13px!important}
 body.m32-ready #overviewSection .overview-num{font-size:18px!important}
 body.m32-ready #overviewSection .overview-data{gap:8px!important}
 body.m32-ready .m31-bottom{min-height:56px!important;padding:3px 5px calc(3px + env(safe-area-inset-bottom))!important;gap:2px!important}
 body.m32-ready .m31-bottom button{min-height:48px!important;font-size:10px!important;gap:1px!important;padding:2px 1px!important}
 body.m32-ready .m31-bottom .m32-nav-icon{width:23px!important;height:23px!important;font-size:14px!important}
 body.m32-ready .m31-menu-items button{min-height:62px!important;font-size:11px!important}
}

/* V2961.61 — keep the mobile company/back bar reachable while page content scrolls. */
@media screen and (max-width:1180px){
 body.m32-ready{padding-top:52px!important}
 body.m32-ready .m32-topbar{
  position:fixed!important;
  top:0!important;
  right:0!important;
  left:0!important;
  width:100%!important;
  z-index:1300!important;
 }
 body.universal-table-fullscreen-open.m32-ready{padding-top:0!important}
 body.universal-table-fullscreen-open.m32-ready .m32-topbar{display:none!important}
}
@media screen and (max-width:1180px) and (orientation:landscape){
 body.m32-ready .m32-topbar{display:grid!important}
 body.m32-ready>.admin-container,body.m32-ready>.container{padding-top:6px!important;max-width:100%!important}
 body.m32-ready .m31-sheet{max-height:88dvh!important}
}

/* Phone detection is added by JS and does not depend on a browser's desktop-site viewport. */
body.m34-phone #adminFeatureNav,body.m34-phone>.tab-bar{display:none!important}
body.m34-phone.m34-landscape #adminFeatureNav,body.m34-phone.m34-landscape>.tab-bar{display:none!important}
body.m34-phone .dashboard-collapse-btn{display:block!important}
body.m34-phone .m32-topbar .m32-logout{display:block!important}
body.m34-phone .m32-topbar{grid-template-columns:auto auto minmax(0,1fr) auto!important}
body.m34-phone .m32-topbar .m32-logout{grid-column:4;justify-self:end}

/* V2961.35 launcher home: the requested two-column icon-card arrangement. */
.m35-home[hidden]{display:none!important}
body.m35-home-visible .m35-home{display:block!important}
body.m35-home-visible .admin-tab-content,body.m35-home-visible .tab-content{display:none!important}
.m35-home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:4px 0 12px}
.m35-home-card{display:flex;min-width:0;min-height:92px;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:10px 5px;border:1px solid #dce4ee;border-radius:16px;background:#fff;color:#29425f;font-size:14px;font-weight:800;box-shadow:0 3px 12px rgba(39,74,109,.05);touch-action:manipulation}
.m35-home-card .m32-nav-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eef4ff;color:#4f46e5;font-size:19px}
.m35-home-card .m32-nav-label{max-width:100%;white-space:normal;text-align:center;line-height:1.3}
.m35-home-card[aria-current=page]{border-color:#8dbaf5;background:#edf5ff;color:#4338ca}
.m35-home-card .m31-badge{position:absolute;margin:0 0 52px 42px}
@media screen and (orientation:landscape){
 body.m34-phone .m35-home-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 body.m34-phone .m35-home-card{min-height:76px;padding:7px 4px}
}

/* V2961.38: five primary modules, grouped dashboard content, and unobstructed My sheet. */
@media screen and (max-width:1180px){
 body.m32-ready .m36-quick-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
 body.m32-ready .m38-main-module{min-height:72px!important;border:1px solid #9dbce9!important;background:#cfe1fb!important;color:#173f72!important;font-size:14px!important;font-weight:850!important}
 body.m32-ready .m38-main-module .m32-nav-icon{background:#2f6fe4!important;color:#fff!important}
 body.m38-dashboard-data #attendanceDashboardSection{display:none!important}
 body.m38-dashboard-attendance #adminTab-dashboard>.admin-section:not(#attendanceDashboardSection){display:none!important}
 body.m38-dashboard-data #adminTab-dashboard>.admin-section>.section-header,
 body.m38-dashboard-attendance #attendanceDashboardSection>.section-header{background:#eaf3ff!important;border-color:#bfd6f3!important}
 body.m38-dashboard-data #adminTab-dashboard>.admin-section>.section-header :is(h2,h3),
 body.m38-dashboard-attendance #attendanceDashboardSection>.section-header :is(h2,h3){font-size:13px!important;color:#244e7c!important}
 body.m38-dashboard-data #adminTab-dashboard>.admin-section>div:not(.section-header) :is(h2,h3,h4),
 body.m38-dashboard-attendance #attendanceDashboardSection>div:not(.section-header) :is(h2,h3,h4){font-size:13px!important}
 body.m32-ready .m31-menu{bottom:calc(62px + env(safe-area-inset-bottom))!important}
 body.m32-ready .m31-sheet{padding-bottom:14px!important}
 body.m32-ready .m31-menu-items{grid-template-columns:1fr!important;gap:7px!important}
 body.m32-ready .m31-menu-items button{min-height:52px!important;flex-direction:row!important;justify-content:flex-start!important;padding:8px 12px!important;text-align:left!important;font-size:13px!important}
 body.m32-ready .m31-menu-items button .m32-nav-label{white-space:normal!important;text-align:left!important}

 /* V2961.44: the home ends immediately above the fixed navigation. */
 body.m32-ready.m35-home-visible{padding-bottom:calc(56px + env(safe-area-inset-bottom))!important}
 body.m32-ready.m35-home-visible>.admin-container,
 body.m32-ready.m35-home-visible>.container{min-height:0!important;height:auto!important;padding-bottom:0!important}
 body.m32-ready.m35-home-visible .m35-home{min-height:0!important;margin-bottom:0!important;padding-bottom:0!important}
 body.m32-ready.m35-home-visible .m35-home>.m36-home-section:last-child{margin-bottom:0!important}

 /* “My” uses the same usable height as a main panel; the bottom navigation stays visible. */
 body.m32-ready .m31-menu{top:0!important;bottom:calc(56px + env(safe-area-inset-bottom))!important;align-items:flex-end!important}
 body.m32-ready .m31-sheet{display:flex!important;flex-direction:column!important;width:100%!important;height:calc(100dvh - 76px - 56px - env(safe-area-inset-bottom))!important;max-height:none!important;min-height:430px!important;padding:12px 14px 14px!important;overflow:hidden!important;overscroll-behavior:none!important;box-sizing:border-box!important;transform:translate3d(0,0,0)!important;backface-visibility:hidden!important}
 body.m32-ready .m31-menu header{flex:0 0 auto!important;margin-bottom:10px!important}
 body.m32-ready .m31-menu-items{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:none!important;grid-auto-rows:52px!important;align-content:start!important;flex:1 1 auto!important;min-height:0!important;gap:6px!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:none!important}
 body.m32-ready .m31-menu-items button{height:52px!important;min-height:52px!important;align-self:auto!important;padding:7px 12px!important}
 body.m32-ready .m31-menu-items .m38-main-module{border-color:#9dbce9!important;background:#cfe1fb!important;color:#173f72!important}
 body.m32-ready .m31-menu-items .m38-main-module .m32-nav-icon{background:#2f6fe4!important;color:#fff!important}
 body.m32-ready.m31-menu-visible{overscroll-behavior:none!important;touch-action:none!important}
 body.m32-ready.m31-menu-visible .m31-menu{touch-action:none!important}
 body.m32-ready.m31-menu-visible .m31-sheet,
 body.m32-ready.m31-menu-visible .m31-menu-items{touch-action:pan-y!important;overscroll-behavior:contain!important}

 /* These four existing settings are moved to first-level entries under “My”. */
 body.m32-ready #adminTab-settings>.m39-my-moved{display:none!important}
 body.m32-ready.m39-my-settings-focus #adminTab-settings>.m39-my-moved.m39-my-active{display:block!important}
 /* “我的”子页采用内容隔离，而不是在完整系统设置长页中做锚点滚动。 */
 body.m32-ready.m39-my-settings-focus #adminTab-settings>.admin-section:not(.m39-my-active){display:none!important}
 body.m32-ready.m39-my-settings-focus #adminTab-settings>.m39-my-active{margin-top:0!important;margin-bottom:0!important}

 /* Finance uses the same phone typography and control density as other modules. */
 body.m32-ready #adminTab-finance{font-size:13px!important}
 body.m32-ready #adminTab-finance .m31-finance-picker{font-size:13px!important;gap:8px!important;margin-bottom:10px!important}
 body.m32-ready #adminTab-finance .m31-finance-picker select,
 body.m32-ready #adminTab-finance .finance-toolbar>.form-control{min-height:38px!important;height:38px!important;padding:6px 9px!important;font-size:13px!important}
 body.m32-ready #adminTab-finance .finance-toolbar{gap:6px!important;margin:6px 0!important;padding:8px!important;font-size:12px!important}
 body.m32-ready #adminTab-finance .finance-toolbar>.btn,
 body.m32-ready #adminTab-finance .finance-toolbar>.finance-check,
 body.m32-ready #adminTab-finance .finance-zoom button,
 body.m32-ready #adminTab-finance .finance-zoom select{min-height:36px!important;height:auto!important;padding:6px 9px!important;font-size:12px!important}
 body.m32-ready #adminTab-finance .finance-hint,
 body.m32-ready #adminTab-finance .finance-toolbar :is(label,span,b){font-size:12px!important;line-height:1.45!important}
}
@media screen and (max-width:370px){body.m32-ready .m36-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* V2961.37 compact service-app home: metrics, four-column shortcuts, list rows. */
.m36-home-section{margin:0 0 10px;padding:10px;border:1px solid #dfe7f0;border-radius:15px;background:#fff;box-shadow:0 3px 12px rgba(39,74,109,.045)}
.m36-home-section>h2{margin:0 0 8px;font-size:14px;line-height:1.3;color:#193553}
.m36-kpi-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.m36-kpi{display:flex;min-width:0;min-height:86px;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;padding:9px 10px;border:1px solid #d9e6f4;border-radius:12px;background:#f7fbff;color:#35516e;text-align:left;touch-action:manipulation}
.m36-kpi>span{font-size:11px;color:#647b91}
.m36-kpi-value{max-width:100%;font-size:20px;line-height:1.18;color:#1677e8;overflow-wrap:anywhere}
.m36-kpi-sub{font-size:10px;line-height:1.25;color:#7b8d9f}
.m36-kpi-compact{min-height:67px;padding-top:7px;padding-bottom:7px}
.m36-kpi-compact .m36-kpi-value{font-size:16px}
.m36-kpi-warn{background:#fffaf0;border-color:#f6dda5}.m36-kpi-warn .m36-kpi-value{color:#d97706}
.m36-kpi-danger{background:#fff6f6;border-color:#f5c2c2}.m36-kpi-danger .m36-kpi-value{color:#dc2626}
.m36-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px 3px}
.m36-quick-grid .m35-home-card{min-height:67px;gap:3px;padding:5px 1px;border:0;border-radius:10px;background:transparent;box-shadow:none;font-size:10px;color:#38516a}
.m36-quick-grid .m35-home-card:active{background:#edf5ff}
.m36-quick-grid .m32-nav-icon{width:30px;height:30px;border-radius:9px;font-size:15px}
.m36-more-list{border-top:1px solid #edf1f5}
.m36-more-row{position:relative;display:grid;width:100%;grid-template-columns:32px minmax(0,1fr) 20px;align-items:center;gap:7px;min-height:43px;padding:5px 3px;border:0;border-bottom:1px solid #edf1f5;background:#fff;color:#354d66;font-size:12px;font-weight:700;text-align:left}
.m36-more-row .m32-nav-icon{width:29px;height:29px;border-radius:8px;background:#eef4ff;color:#4f46e5;font-size:14px}
.m36-more-row .m32-nav-label{white-space:normal}
.m36-more-row .m36-more-arrow{font-size:24px;line-height:1;color:#9aa9b8;text-align:right}
.m36-more-row .m31-badge{position:absolute;right:24px;top:11px}
@media screen and (orientation:landscape){
 body.m34-phone .m36-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 body.m34-phone .m36-kpi{min-height:70px}
 body.m34-phone .m36-quick-grid{grid-template-columns:repeat(8,minmax(0,1fr))}
 body.m34-phone .m36-more-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}
}

/* Final home grids: admin shortcuts share the full row; employee shortcuts stay 2 x 2. */
@media screen and (max-width:1180px){
 body.m32-ready.admin-body.m34-phone .m36-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body.m32-ready:not(.admin-body).m34-phone .m36-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.m32-ready.admin-body .m31-bottom{grid-template-columns:repeat(5,minmax(0,1fr))!important}
 body.m32-ready:not(.admin-body) .m31-bottom{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 body.m32-ready:not(.admin-body).m34-phone.m35-home-visible .m35-home{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr);
  min-height:calc(100dvh - 52px - 62px - env(safe-area-inset-bottom))!important;
 }
 body.m32-ready:not(.admin-body).m34-phone.m35-home-visible .m35-home>.m36-home-section:last-child{
  display:flex;
  min-height:0;
  flex-direction:column;
 }
 body.m32-ready:not(.admin-body).m34-phone.m35-home-visible .m35-home>.m36-home-section:last-child .m36-quick-grid{
  flex:1;
  grid-template-rows:repeat(2,minmax(86px,1fr));
 }

 /* Employee home palette: distinct but restrained, matching the colors used by other modules. */
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi:nth-child(1){
  border-color:#bfdbfe!important;background:#eff6ff!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi:nth-child(2){
  border-color:#ddd6fe!important;background:#f5f3ff!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi:nth-child(3){
  border-color:#bbf7d0!important;background:#f0fdf4!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi:nth-child(1) .m36-kpi-value{color:#087fe7!important}
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi:nth-child(2) .m36-kpi-value{color:#6d4aff!important}
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi:nth-child(3) .m36-kpi-value{color:#059669!important}

 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(1){
  border-color:#bfdbfe!important;background:#eff6ff!important;
 }
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(2){
  border-color:#c7d2fe!important;background:#eef2ff!important;
 }
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(3){
  border-color:#fde68a!important;background:#fffbeb!important;
 }
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(4){
  border-color:#ddd6fe!important;background:#f5f3ff!important;
 }
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(1) .m32-nav-icon{background:#dbeafe!important;color:#087fe7!important}
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(2) .m32-nav-icon{background:#e0e7ff!important;color:#4f46e5!important}
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(3) .m32-nav-icon{background:#fef3c7!important;color:#d97706!important}
 body.m32-ready:not(.admin-body) .m36-quick-grid .m35-home-card:nth-child(4) .m32-nav-icon{background:#ede9fe!important;color:#7c3aed!important}
}

/* V2961.45: align shortcut and My cards with the neutral overview-card palette. */
@media screen and (max-width:1180px){
 body.m32-ready .m36-quick-grid .m38-main-module{
  min-height:67px!important;
  gap:3px!important;
  padding:5px 2px!important;
  border:1px solid #d9e6f4!important;
  border-radius:10px!important;
  background:#f7fbff!important;
  color:#35516e!important;
  font-size:11px!important;
  line-height:1.2!important;
 }
 body.m32-ready .m36-quick-grid .m38-main-module .m32-nav-icon{
  width:28px!important;
  height:28px!important;
  border-radius:8px!important;
  font-size:14px!important;
 }
 body.m32-ready .m36-quick-grid .m38-main-module .m32-nav-label{
  font-size:11px!important;
  line-height:1.2!important;
 }
body.m32-ready .m31-menu-items .m38-main-module{
  border-color:#d9e6f4!important;
  background:#f7fbff!important;
  color:#35516e!important;
 }
}

/* V2961.64: normal sales employee home follows the approved 3 + 6 + 4 layout. */
@media screen and (max-width:1180px){
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi{
  min-height:88px!important;
  padding:10px 9px!important;
  border-radius:14px!important;
  box-shadow:0 4px 12px rgba(39,74,109,.055)!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi>span{
  font-size:12px!important;
  font-weight:700!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi-value{
  font-size:19px!important;
  line-height:1.15!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi-sub{
  font-size:10px!important;
 }
 body.m32-ready:not(.admin-body).m34-phone.m35-home-visible .m35-home.m64-sales-home{
  display:block!important;
  min-height:0!important;
 }
 body.m32-ready:not(.admin-body).m34-phone.m35-home-visible .m35-home.m64-sales-home>.m36-home-section:last-child{
  display:block!important;
 }
 body.m32-ready:not(.admin-body).m34-phone.m35-home-visible .m35-home.m64-sales-home>.m36-home-section:last-child .m36-quick-grid,
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(3,minmax(82px,auto))!important;
  gap:9px!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card.m38-main-module{
  min-height:82px!important;
  padding:9px 6px!important;
  gap:6px!important;
  border-radius:14px!important;
  font-size:13px!important;
  box-shadow:0 4px 12px rgba(39,74,109,.055)!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card.m38-main-module .m32-nav-label{
  font-size:13px!important;
  font-weight:800!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card.m38-main-module .m32-nav-icon{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
  font-size:16px!important;
 }
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(1){border-color:#bfdbfe!important;background:#eff6ff!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(2){border-color:#c7d2fe!important;background:#eef2ff!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(3){border-color:#fde68a!important;background:#fffbeb!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(4){border-color:#ddd6fe!important;background:#f5f3ff!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(5){border-color:#bae6fd!important;background:#f0f9ff!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(6){border-color:#bbf7d0!important;background:#f0fdf4!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(1) .m32-nav-icon{background:#dbeafe!important;color:#087fe7!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(2) .m32-nav-icon{background:#e0e7ff!important;color:#4f46e5!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(3) .m32-nav-icon{background:#fef3c7!important;color:#d97706!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(4) .m32-nav-icon{background:#ede9fe!important;color:#7c3aed!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(5) .m32-nav-icon{background:#e0f2fe!important;color:#0284c7!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m36-quick-grid .m35-home-card:nth-child(6) .m32-nav-icon{background:#dcfce7!important;color:#059669!important}
 body.m32-ready:not(.admin-body) .m31-bottom{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:2px!important;
 }
 body.m32-ready:not(.admin-body) .m31-bottom button{
  font-size:10px!important;
  padding-left:1px!important;
  padding-right:1px!important;
 }
}

@media screen and (max-width:370px){
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi{padding-left:6px!important;padding-right:6px!important}
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi-value{font-size:17px!important}
 body.m32-ready:not(.admin-body) .m31-bottom button{font-size:9px!important}
}

/* V2961.85: employee home uses three full-width performance rows. */
@media screen and (max-width:1180px){
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi-grid,
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi-grid{
  grid-template-columns:minmax(0,1fr)!important;
  gap:9px!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi,
 body.m32-ready:not(.admin-body) .m64-sales-home .m41-employee-summary .m36-kpi{
  display:grid!important;
  grid-template-columns:minmax(78px,auto) minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-items:center!important;
  column-gap:14px!important;
  row-gap:2px!important;
  min-height:74px!important;
  padding:10px 14px!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi>span{
  grid-column:1!important;
  grid-row:1 / span 2!important;
  align-self:center!important;
  font-size:15px!important;
  font-weight:800!important;
  white-space:nowrap!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi-value{
  grid-column:2!important;
  grid-row:1!important;
  max-width:none!important;
  font-size:23px!important;
  line-height:1.12!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
  white-space:nowrap!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi-sub{
  grid-column:2!important;
  grid-row:2!important;
  font-size:12px!important;
  white-space:nowrap!important;
 }
 body.m32-ready:not(.admin-body) .m41-employee-summary + .m36-home-section{
  margin-top:18px!important;
 }
 body.m32-ready:not(.admin-body) .m31-bottom button{
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.12!important;
 }
 body.m32-ready:not(.admin-body) .m31-bottom .m32-nav-label{
  overflow:visible!important;
  text-overflow:clip!important;
 }
}

@media screen and (max-width:370px){
 body.m32-ready:not(.admin-body) .m41-employee-summary .m36-kpi-value{font-size:21px!important}
 body.m32-ready:not(.admin-body) .m31-bottom button{font-size:12px!important}
}

/* V2961.88 final phone-header column ownership. This follows the older
   four-column phone rule so the centered suffix and logout never overlap. */
@media screen and (max-width:1180px){
 body.m34-phone.m32-ready:not(.admin-body) .m32-topbar{
  grid-template-columns:auto auto minmax(82px,auto) minmax(0,1fr) auto!important;
 }
 body.m34-phone.m32-ready:not(.admin-body) .m32-user-suffix{grid-column:4!important}
 body.m34-phone.m32-ready:not(.admin-body) .m32-logout{grid-column:5!important;justify-self:end}
}

/* V2961.89: final explicit customer-requested offset. Apply to both employee
   and admin phone headers regardless of WebView/UA markers. */
@media screen and (max-width:1180px){
 body.m32-ready{padding-top:calc(52px + 1cm)!important}
 body.m32-ready .m32-topbar{
  padding-top:calc(8px + 1cm)!important;
  min-height:calc(62px + 1cm)!important;
 }
}

/* V2961.175: drawing tabs and title stay in flow above the date field. */
@media(max-width:768px){
 #tabDrawing>.admin-tab-bar{position:static!important;top:auto!important;height:auto!important;min-height:48px!important;margin-bottom:16px!important;transform:none!important;z-index:auto!important}
 #drawingSubDrawing>.section-card>.section-title{position:static!important;float:none!important;transform:none!important;height:auto!important;line-height:1.5!important;margin:0 0 16px!important;padding:0!important}
 #drawingSubDrawing>.section-card>.form-group{clear:both;position:relative;transform:none!important;margin-top:0!important}
}
