[hidden]{display:none!important}
:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif;color:#1a2740;background:#f5f7fb;font-size:14px;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}a{color:inherit}h1,h2,h3,p{margin:0}h1{font-size:22px;letter-spacing:-.7px;font-weight:720}h2{font-size:18px;letter-spacing:-.4px}h3{font-size:14px}small{font-size:11px;color:#68778f}svg{display:block;flex-shrink:0}.boot{height:100vh;display:grid;place-items:center;color:#64748b}.shell{display:flex;min-height:100dvh}.sidebar{position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;gap:24px;width:230px;flex-shrink:0;padding:22px 15px;background:#fff;border-right:1px solid #e5eaf1}.brand{display:flex;align-items:center;gap:11px;padding:4px 10px 8px}.brand-icon{width:36px;height:36px;background:#2558a6;color:white;display:grid;place-items:center;border-radius:11px}.brand-name{font-size:18px;font-weight:780;letter-spacing:-.6px}.brand-caption{color:#8793a5;font-size:10px;letter-spacing:.25px}.nav{display:flex;flex-direction:column;gap:4px}.nav-btn{display:flex;align-items:center;gap:11px;text-align:left;border:0;border-radius:10px;padding:11px 12px;background:transparent;color:#596b86;width:100%;font-size:13px;font-weight:600}.nav-btn:hover{background:#f4f7fc}.nav-btn.active{background:#eaf1ff;color:#2355a0}.sidebar-bottom{margin-top:auto;border-top:1px solid #e9edf4;padding-top:16px;display:flex;flex-direction:column;gap:10px}.user-chip{display:flex;align-items:center;gap:9px;padding:3px 5px}.avatar{background:#e9eff9;color:#24549a;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;font-weight:800}.username{font-size:12px;font-weight:700}.userrole{text-transform:capitalize;font-size:11px;color:#7b8797}.main{min-width:0;flex:1}.topbar{height:67px;background:#fff;border-bottom:1px solid #e5eaf1;display:flex;justify-content:space-between;align-items:center;padding:0 32px}.topbar-title{font-size:14px;font-weight:700}.muted{color:#7b8797}.content{max-width:1200px;margin:auto;padding:26px 32px 64px}.header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:21px}.subtitle{margin-top:5px;color:#7b8797;font-size:12px}.surface{background:white;border:1px solid #e7ecf2;border-radius:13px;box-shadow:0 1px 2px rgba(13,44,84,.025)}.section-head{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid #e8ecf2;gap:10px}.section-heading{font-size:13px;font-weight:700}.tag{display:inline-flex;align-items:center;justify-content:center;border-radius:7px;padding:4px 7px;font-size:11px;font-weight:700;background:#eef3fa;color:#43618b}.tag.red{background:#fff0f1;color:#c43148}.tag.green{background:#eaf8f0;color:#218653}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:17px}.stat{padding:17px 18px}.stat-label{font-size:11px;color:#77869a}.stat-value{font-size:27px;font-weight:750;line-height:1.4;letter-spacing:-.8px}.stat-value.red{color:#dc425a}.stat-icon{display:inline-flex;color:#5073a7;margin-bottom:6px}.table-wrap{overflow-x:auto;max-width:100%;width:100%}table{border-collapse:collapse;width:100%;text-align:left;font-size:12px}th{font-size:11px;color:#64748b;font-weight:700;background:#f7f9fc;white-space:nowrap;border-bottom:1px solid #e5eaf1;padding:10px 12px}td{border-bottom:1px solid #edf0f5;padding:9px 12px;color:#25334c;vertical-align:middle}tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfcfe}.number{text-align:right;font-variant-numeric:tabular-nums}.center{text-align:center}.item-name{font-weight:600}.line2{display:block;color:#7c899a;font-size:10px;margin-top:3px;white-space:nowrap}.date-text{font-size:11px;white-space:nowrap}.clickable{cursor:pointer}.clickable:hover{color:#245dac;text-decoration:underline}.dot{height:9px;width:9px;display:inline-block;vertical-align:middle;border-radius:50%}.dot.red{background:#e4465d;box-shadow:0 0 0 3px #fff0f2}.dot.green{background:#27b271;box-shadow:0 0 0 3px #eaf8ef}.toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;padding:14px 16px;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field label{font-size:11px;font-weight:700;color:#60728d}.input,.select{border:1px solid #dfe5ee;background:#fff;color:#1c2a44;border-radius:9px;height:37px;min-width:0;padding:0 10px;outline:0;width:100%}.input:focus,.select:focus{border-color:#3e7ad0;box-shadow:0 0 0 3px #e9f0ff}.input::placeholder{color:#a6b0bf}.select{appearance:auto}.search{width:min(240px,100%)}.input.qty-input{height:34px;border-radius:7px;width:90px;text-align:center;font-weight:650;font-variant-numeric:tabular-nums;background:#fbfdff;border-color:#cbd9e9}.input.qty-input:not(:placeholder-shown){background:#edf5ff;border-color:#679bdc}.input.qty-input:focus{background:#fff}.prev-qty{font-size:12px;font-weight:650}.prev-unit{color:#8b98a8;font-size:10px;margin-left:3px}.stock-table td{padding:4px 12px;height:43px}.stock-table th{padding:9px 12px}.stock-table{table-layout:fixed}.stock-table th:nth-child(1){width:48%}.stock-table th:nth-child(2){width:25%}.stock-table th:nth-child(3){width:27%}.stock-table .input.qty-input{max-width:100%}.stock-table thead{position:sticky;top:0;z-index:1}.stock-row.dirty{background:#fafcff}.qty-controls{display:flex;align-items:center;gap:8px;min-width:0}.category-chip{font-size:11px;color:#2d5c9f;background:#e9f2ff;padding:6px 9px;border-radius:7px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:8px;border:1px solid transparent;font-size:12px;font-weight:700;min-height:35px;padding:8px 12px;white-space:nowrap}.btn-primary{background:#2563b5;color:#fff}.btn-primary:hover{background:#20549d}.btn-outline{background:white;color:#335777;border-color:#d9e2ef}.btn-outline:hover{background:#f6f9fd}.btn-danger{color:#c43c51;border-color:#f4c9d0;background:#fff}.btn-soft{color:#255caf;background:#edf4ff}.btn-ghost{background:transparent;color:#657993}.btn-sm{font-size:11px;min-height:29px;padding:5px 8px}.btn-icon{padding:7px}.actions{display:flex;align-items:center;gap:6px;justify-content:end;flex-wrap:wrap}.section-footer{padding:12px 16px;border-top:1px solid #e8ecf2;display:flex;align-items:center;justify-content:space-between;gap:10px}.hint{font-size:11px;color:#8794a7}.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end;padding:15px 16px}.filters .field{min-width:150px;flex:0 1 230px}.segmented{display:inline-flex;align-items:center;background:#eef2f7;padding:3px;border-radius:9px;gap:3px}.segmented button{border:0;background:transparent;color:#6f7f96;padding:8px 11px;border-radius:7px;font-size:12px;font-weight:700}.segmented button.active{background:#fff;color:#23539c;box-shadow:0 1px 3px #d9e1eb}.tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.tabs button{border:0;background:transparent;border-radius:8px;padding:9px 13px;font-weight:700;color:#78869a;font-size:12px}.tabs button.active{background:#eaf1ff;color:#265aa6}.empty{text-align:center;padding:44px 15px;color:#7d899a;font-size:12px}.empty svg{margin:0 auto 9px}.update-bar{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:12px 16px;background:#fff;border-top:1px solid #e7ecf2;border-radius:0 0 13px 13px}.progress{height:5px;width:100px;background:#eaf0f7;border-radius:4px;overflow:hidden}.progress-fill{height:100%;background:#3478c5;width:0%;transition:width .12s}.progress-row{display:flex;flex-direction:column;gap:6px}.status-cell{white-space:nowrap}.report-toolbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:14px 16px}.report-btns{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:13px 16px;border-top:1px solid #e8ecf2}.report-table{font-size:11px}.report-table td{padding:8px 10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-grid .full{grid-column:1/-1}dialog{border:0;padding:0;border-radius:14px;max-width:min(480px,calc(100% - 24px));width:100%;box-shadow:0 18px 70px #15233b3d;color:#1a2740}dialog::backdrop{background:#12223e72}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #e6ebf1}.modal-body{padding:20px}.modal-footer{padding:15px 20px;border-top:1px solid #e7ecf2;display:flex;justify-content:end;gap:9px}.toast{position:fixed;right:24px;bottom:24px;background:#1b304d;color:white;z-index:2000;border-radius:10px;padding:11px 16px;font-size:12px;box-shadow:0 10px 30px #101e3540;opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity .18s,transform .18s;max-width:min(400px,95vw)}.toast.visible{opacity:1;transform:translateY(0)}.toast.error{background:#a43143}.auth-wrap{min-height:100dvh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 50% 15%,#e5edfb,transparent 40%),#f5f7fb}.auth-card{width:min(390px,100%);padding:30px}.auth-card .brand{padding:0;margin-bottom:28px}.auth-card h1{font-size:22px}.auth-card .subtitle{line-height:1.5;margin-bottom:23px}.auth-card form{display:flex;flex-direction:column;gap:15px}.auth-card .btn{margin-top:4px;height:42px}.auth-note{text-align:center;font-size:11px;color:#8b98a9;padding-top:22px}.mobile-nav{display:none}.mobile-header{display:none}.mobile-save{display:none}.note{font-size:11px;color:#8491a3;padding:9px 16px}.state-label{font-size:10px}.compact-table th,.compact-table td{padding-left:8px;padding-right:8px}.stock-main{border-radius:13px 13px 0 0}.subtle-alert{border-radius:8px;background:#fff7f7;color:#a5384d;padding:9px 12px;font-size:11px}.badge-disabled{display:inline-block;font-size:10px;border-radius:6px;padding:3px 6px;background:#eef0f3;color:#748195;margin-left:6px}.top-actions{display:flex;gap:8px;align-items:center}.col-gap{display:flex;gap:6px;align-items:center}.sr-only{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}
@media(max-width:900px){.sidebar{width:195px}.content{padding:21px 18px 45px}.topbar{padding:0 20px}.report-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){:root{font-size:13px;background:#fff}.shell{display:block}.sidebar{display:none}.main{width:100%}.topbar{display:none}.mobile-header{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;border-bottom:1px solid #e9edf3;background:white}.mobile-header .brand{padding:0}.mobile-header .brand-icon{height:31px;width:31px;border-radius:9px}.mobile-header .brand-name{font-size:16px}.mobile-header .brand-caption{font-size:9px}.mobile-nav{display:flex;position:fixed;z-index:80;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #dce5ee;justify-content:space-around;align-items:stretch;height:calc(59px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -1px 8px #233c5a0b}.mobile-nav button{min-width:0;flex:1;background:white;color:#8896a9;border:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;font-size:9px;font-weight:700;padding:4px 1px}.mobile-nav button.active{color:#245caa}.mobile-nav button.active svg{stroke-width:2.4}.content{padding:15px 10px 95px}.header{margin-bottom:13px;gap:8px}.header h1{font-size:19px}.subtitle{font-size:11px;margin-top:3px}.surface{border-radius:10px}.stats{gap:8px;margin-bottom:11px}.stat{padding:10px 11px}.stat-icon{margin-bottom:3px}.stat-value{font-size:23px}.stat-label{font-size:10px;line-height:1.25}.section-head{padding:11px 10px}.section-heading{font-size:12px}.toolbar{padding:9px;gap:8px}.filters{padding:10px;gap:8px}.filters .field{min-width:130px;flex:1 1 120px}.stock-table td{height:39px;padding:3px 7px}.stock-table th{padding:8px 7px;font-size:10px}.stock-table th:nth-child(1){width:45%}.stock-table th:nth-child(2){width:24%}.stock-table th:nth-child(3){width:31%}.stock-table td{font-size:12px}.stock-table .input.qty-input{height:30px;padding:0 5px;width:100%;font-size:13px}.prev-qty{font-size:12px}.prev-unit{font-size:10px}.update-bar{padding:11px 10px}.mobile-save{display:none}.section-footer{padding:10px}.table-wrap{scrollbar-width:thin}th,td{padding:9px 7px}table{font-size:11px}.date-text{font-size:10px}.line2{font-size:9px}.report-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.report-toolbar .field{min-width:0}.report-btns{padding:9px;gap:8px}.report-table{min-width:520px}.tabs button{padding:7px 9px;font-size:11px}.actions{gap:3px}.btn-sm{padding:5px 6px;min-height:28px}.page-stock .content{padding-bottom:165px}.page-stock .mobile-save{display:flex;position:fixed;bottom:calc(59px + env(safe-area-inset-bottom));left:0;right:0;z-index:75;border-top:1px solid #e1e7ef;background:#fff;padding:9px 12px;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 -5px 15px #1b375012}.page-stock .desktop-save{display:none}.page-stock .mobile-save .btn{min-width:137px}.progress{width:80px}.auth-card{padding:25px}.select,.input{height:35px}.stock-main{border-radius:10px}.hide-mobile{display:none}}
@media(min-width:681px){.mobile-save{display:none!important}}


/* PF Stock Module 1.1: readable, space-efficient tables and category-wise Item Master. */
.table-wrap > table{max-width:1000px;font-size:13px}
.table-wrap th{padding:8px 9px;font-size:12px}
.table-wrap td{padding:6px 9px;line-height:1.35}
.table-wrap .line2{font-size:11px;margin-top:1px}
.table-wrap .date-text{font-size:12px}
.table-wrap .prev-unit{font-size:11px}
.report-table{font-size:13px}
.report-table td{padding:6px 9px}
.stock-table{max-width:100%!important}
.stock-table td{padding:3px 8px;height:42px}
.stock-table th{padding:8px 8px}
.stock-table .prev-qty{font-size:13px}
.stock-table .input.qty-input{font-size:14px;height:33px}
.stat-link{display:block;text-align:left;font:inherit;width:100%;color:inherit;cursor:pointer;transition:box-shadow .15s,border-color .15s,transform .15s}
.stat-link:hover{border-color:#adc8eb;box-shadow:0 3px 12px #264b7e15;transform:translateY(-1px)}
.stat-link:focus-visible{outline:3px solid #6399e9;outline-offset:2px}
.stat-link .stat-label{display:flex;align-items:center;justify-content:space-between;gap:4px}
.stat-link .stat-label svg{color:#af3850}
.master-toolbar{align-items:center;gap:10px;padding:10px 12px}
.master-filter-controls{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin-left:auto}
.master-filter-controls .field{gap:4px}
.master-category-field{width:195px}
.master-search-field{width:195px}
.master-search-field .input{width:100%}
.master-table{max-width:900px!important}
.master-table td{padding:6px 8px}
.master-table th{padding:7px 8px}
.master-table .qty-cell{font-variant-numeric:tabular-nums;white-space:nowrap}
.master-table .unit-inline{color:#7c899a;font-size:11px}
.master-group-row th{background:#edf3fc;color:#274c82;text-transform:none;font-size:12px;font-weight:750;border-top:1px solid #d9e6f6;padding:7px 10px!important;text-align:left}
.master-group-row .group-count{font-size:11px;color:#667a98;font-weight:500;margin-left:7px}
.master-table .actions{flex-wrap:nowrap;justify-content:flex-start;gap:4px}
.master-table .actions .btn{min-height:28px;padding:4px 7px}
@media(max-width:680px){
  .table-wrap > table{font-size:12.5px;max-width:100%}
  .table-wrap th{font-size:11.5px;padding:7px 6px}
  .table-wrap td{padding:5px 6px}
  .table-wrap .line2{font-size:10.5px}
  .table-wrap .date-text{font-size:11px}
  .stock-table td{height:40px;padding:3px 6px}
  .stock-table th{padding:7px 6px}
  .stock-table .prev-qty{font-size:13px}
  .stock-table .input.qty-input{height:32px;font-size:14px}
  .master-toolbar{align-items:stretch;padding:8px}
  .master-filter-controls{width:100%;margin-left:0;flex-wrap:nowrap;gap:7px}
  .master-filter-controls .field{min-width:0;flex:1;width:50%}
  .master-filter-controls .input,.master-filter-controls .select{width:100%;font-size:12px}
  .master-table{min-width:0;max-width:100%!important;table-layout:auto}
  .master-table td{padding:5px 6px}
  .master-table .actions .btn{padding:4px 5px;font-size:11px}
  .master-group-row th{padding:6px 8px!important}
  .stat-link:hover{transform:none}
}

.master-table .actions [data-toggle]{gap:4px}
@media(max-width:680px){
  .master-table .actions .toggle-label{display:none}
  .master-table .actions .btn{padding:4px 4px;min-width:26px;min-height:28px}
  .master-table .tag{font-size:10px;padding:3px 4px}
  .master-table .qty-cell{white-space:normal}
  .master-table th,.master-table td{padding-left:5px;padding-right:5px}
  .master-table .actions{gap:3px}
}

/* PF Stock Module: keep the longer app title inside the narrow desktop sidebar. */
.sidebar .brand>div:last-child{min-width:0}
.sidebar .brand-name{font-size:15px;line-height:1.15;overflow-wrap:normal}

/* PF ERP launchpad; stock entry remains unchanged. */
.erp-shell{min-height:100dvh;background:#f6f8fc;color:#1a2942}
.erp-topbar{height:74px;padding:0 max(24px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e6ebf3}
.erp-logo{display:flex;align-items:center;gap:12px}.erp-logo .brand-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#e8f0ff;color:#2563a8}.erp-logo strong{display:block;font-size:19px;letter-spacing:-.4px}.erp-logo small{display:block;color:#8592a5;font-size:10px;font-weight:800;letter-spacing:1px;margin-top:2px}
.erp-account{display:flex;align-items:center;gap:14px}.erp-welcome{font-weight:650;font-size:13px;color:#56667b}.erp-content{max-width:1120px;margin:auto;padding:48px 24px 64px}.erp-heading{margin-bottom:28px}.erp-kicker{font-size:11px;color:#3d70bb;font-weight:800;letter-spacing:1.8px}.erp-heading h1{font-size:30px;letter-spacing:-.8px;margin:9px 0 7px}.erp-heading p{font-size:14px;color:#718096}
.erp-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.erp-module{font:inherit;display:flex;flex-direction:column;align-items:stretch;text-align:left;position:relative;background:#fff;border:1px solid #e2e8f1;border-radius:16px;min-height:220px;padding:24px;box-shadow:0 2px 7px #20324e07;gap:18px;cursor:pointer;color:#1c2c43;opacity:1}.erp-module.erp-ready:hover{border-color:#8aafe6;box-shadow:0 8px 26px #2b5c9715;transform:translateY(-2px)}.erp-module:focus-visible{outline:3px solid #77a3e6;outline-offset:3px}.erp-module.erp-soon{background:#fafbfe;cursor:default}.erp-module-icon{display:grid;place-items:center;width:49px;height:49px;border-radius:13px;background:#eaf2fd;color:#2866b0}.erp-module-icon.production{color:#936e30;background:#fff6df}.erp-module-icon.treep{color:#568073;background:#eaf7f0}.erp-module-body{display:flex;flex-direction:column;gap:8px}.erp-module-body strong{font-size:18px}.erp-module-body small{font-size:12px;color:#738197;line-height:1.5;max-width:250px}.erp-status{font-size:11px;font-weight:750;color:#8794a7;margin-top:10px}.erp-status.erp-live{color:#227c59}.erp-module-arrow{position:absolute;top:34px;right:24px;color:#91a2b9}.erp-footnote{font-size:12px;color:#8b97a8;margin-top:24px}.portal-return{display:flex;align-items:center;gap:8px;width:calc(100% - 22px);margin:0 11px 12px;padding:9px 15px;background:#e9f0fb;border:1px solid #d9e6f7;border-radius:8px;color:#2861aa;font-size:12px;font-weight:750;cursor:pointer}.portal-return:hover{background:#dceafa}.module-perms{border:1px solid #e2e8ef;border-radius:9px;padding:12px;display:flex;flex-direction:column;gap:10px}.module-perms legend{font-size:12px;font-weight:750;color:#53637d}.module-perm{display:flex;gap:8px;align-items:center;font-size:12px;color:#283a55;cursor:pointer}.module-perm input{accent-color:#3478c5}.module-list{font-size:12px}
@media(max-width:800px){.erp-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.erp-topbar{padding:0 15px;height:64px}.erp-logo strong{font-size:17px}.erp-logo small{font-size:9px}.erp-welcome{display:none}.erp-content{padding:27px 14px 100px}.erp-heading{margin-bottom:22px}.erp-heading h1{font-size:24px}.erp-module-grid{grid-template-columns:1fr;gap:11px}.erp-module{min-height:auto;padding:17px 18px;flex-direction:row;align-items:flex-start;gap:14px;border-radius:12px}.erp-module-icon{flex-shrink:0;width:45px;height:45px}.erp-module-body strong{font-size:15px}.erp-module-body small{font-size:11.5px}.erp-status{margin-top:2px}.erp-module-arrow{right:14px;top:19px}.erp-module-body{padding-right:22px}.mobile-header .brand{margin-right:auto}.mobile-header .btn{white-space:nowrap;font-size:11px;padding:5px}.mobile-header{gap:6px}.module-list{min-width:98px}}

/* PF Production Planning: neat high-density master tables, large enough to read. */
.pp-surface{overflow:hidden}.pp-toolbar{gap:9px;flex-wrap:wrap}.pp-tabs{display:flex;flex-wrap:wrap;gap:4px}.pp-filter-category{min-width:170px}.pp-filter-search{min-width:185px}.pp-table{font-size:13.5px;line-height:1.35}.pp-table th{padding:9px 10px;white-space:normal}.pp-table td{padding:7px 10px;vertical-align:middle}.pp-table td .item-name{font-size:13.5px}.pp-table .line2{font-size:11.5px;line-height:1.5}.pp-actions{display:flex;gap:4px;justify-content:flex-start;flex-wrap:nowrap}.pp-actions .btn{padding:5px 7px;min-height:31px}.pp-textarea{width:100%;min-height:75px;resize:vertical;padding:9px}.pp-items th:nth-child(1){width:31%}.pp-items th:nth-child(2),.pp-items th:nth-child(3){width:18%}.pp-items th:nth-child(4){width:12%}.pp-parties th:nth-child(1){width:38%}
@media(max-width:680px){.page-production-masters .mobile-nav{display:none}.page-production-masters .content{padding-bottom:40px}.page-production-masters .sidebar .brand-name{font-size:14px}.page-production-masters .mobile-header .brand-name{font-size:13px}.pp-toolbar{padding:8px}.pp-tabs{width:100%}.pp-tabs button{font-size:12px;padding:7px 8px}.pp-filter-category{flex:1;min-width:120px}.pp-filter-search{min-width:110px;flex:1}.pp-table{font-size:12.5px}.pp-table td,.pp-table th{padding:7px 6px}.pp-table .item-name{font-size:12.5px!important}.pp-table .line2{font-size:11px}.pp-items,.pp-parties{min-width:550px;table-layout:fixed}.pp-table-wrap{overflow-x:auto}.pp-actions .btn span{display:none}.pp-actions .btn{padding:5px 5px;min-width:25px}.pp-table .tag{font-size:10px}}

.pp-mobile-actions{display:none}
@media(max-width:680px){.pp-items,.pp-parties{min-width:0;table-layout:auto;width:100%}.pp-items th:nth-child(4),.pp-items th:nth-child(5),.pp-items td:nth-child(4),.pp-items td:nth-child(5),.pp-parties th:nth-child(4),.pp-parties th:nth-child(5),.pp-parties td:nth-child(4),.pp-parties td:nth-child(5){display:none}.pp-mobile-actions{display:flex;align-items:center;gap:6px;margin-top:6px;flex-wrap:wrap}.pp-mobile-actions .actions{display:flex;gap:3px}.pp-items th:first-child,.pp-items td:first-child{width:53%}.pp-items th:nth-child(2),.pp-items td:nth-child(2),.pp-items th:nth-child(3),.pp-items td:nth-child(3){width:23.5%}.pp-parties th:first-child,.pp-parties td:first-child{width:48%}.pp-parties th:nth-child(2),.pp-parties td:nth-child(2){width:23%}.pp-parties th:nth-child(3),.pp-parties td:nth-child(3){width:29%}.pp-items th,.pp-parties th{font-size:11px;padding:7px 4px}.pp-items td,.pp-parties td{padding:6px 4px}}

/* PF Production Planning v2 — compact inline multi-row master editing */
.pp-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid #e5ebf3;background:#f9fbff}
.pp-bulk-actions .btn{min-height:33px}
.pp-bulk-caption{color:#64748b;font-size:12px;margin-right:auto}
.pp-bulk-table{max-width:none!important;width:100%;table-layout:fixed}
.pp-bulk-table.pp-categories{min-width:480px}
.pp-bulk-table.pp-raw-materials{min-width:690px}
.pp-bulk-table.pp-items{min-width:800px}
.pp-bulk-table.pp-parties{min-width:750px}
.pp-bulk-table .pp-bulk-input{display:block;width:100%;min-width:0;height:34px;padding:5px 8px;border:1px solid #cbd5e1;border-radius:6px;font-size:13px;line-height:1.3;background:#fff;color:#192b43}
.pp-bulk-table .pp-bulk-input:focus{border-color:#3878c4;box-shadow:0 0 0 2px #3878c41b;outline:0}
.pp-bulk-table .pp-bulk-input[type=number]{text-align:right;font-variant-numeric:tabular-nums}
.pp-bulk-table td{padding:5px 6px!important}
.pp-bulk-table th{padding:7px 8px!important;text-align:left}
.pp-bulk-table tr.pp-edited>td{background:#eff6ff}
.pp-bulk-table .pp-inherited-category{display:block;white-space:normal;font-size:10.5px;color:#64748b;line-height:1.25;margin:3px 0 0}
.pp-bulk-table .pp-details-toggle{display:block;border:0;background:none;color:#2563a8;font-size:11px;font-weight:700;padding:3px 0;margin:2px 0 0;text-align:left;cursor:pointer}
.pp-bulk-table .pp-extra-row[hidden]{display:none}
.pp-bulk-table .pp-extra-row td{background:#f7f9fd;padding:10px!important}
.pp-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:8px 12px}
.pp-extra-grid .field{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#56657b}
.pp-bulk-table.pp-items th:first-child{width:21%}
.pp-bulk-table.pp-items th:nth-child(2){width:29%}
.pp-bulk-table.pp-items th:nth-child(3),.pp-bulk-table.pp-items th:nth-child(4){width:18%}
.pp-bulk-table.pp-items th:nth-child(5){width:14%}
@media(max-width:680px){
 .pp-bulk-actions{justify-content:flex-start;position:sticky;top:0;z-index:10;gap:6px;padding:8px}
 .pp-bulk-caption{flex-basis:100%;font-size:11px}
 .pp-bulk-table .pp-bulk-input{font-size:12.5px;height:33px;padding:5px 6px}
 .pp-bulk-table td{padding:4px 5px!important}
 .pp-extra-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}
}

/* PF Production Planning dashboard — clean, six-tile layout */
.pp-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:14px 0 12px}
.pp-dashboard-tile{width:100%;min-height:136px;border:1px solid #e2e8f1;background:#fff;border-radius:13px;display:flex;flex-wrap:wrap;align-content:flex-start;align-items:center;gap:10px;padding:19px;text-align:left;color:#1d2c45;cursor:pointer;font:inherit;transition:box-shadow .16s,border-color .16s}
.pp-dashboard-tile:hover,.pp-dashboard-tile:focus-visible{border-color:#a9c4ef;box-shadow:0 7px 20px #234c7818;outline:none}
.pp-dashboard-icon{display:grid;place-items:center;flex:none;width:39px;height:39px;border-radius:10px;background:#eaf2fd;color:#255ca5}
.pp-dashboard-tile-content{display:flex;flex:1;min-width:140px;flex-direction:column;gap:5px}
.pp-dashboard-name{font-size:15px;font-weight:750;line-height:1.32}
.pp-dashboard-sub{font-size:12px;color:#728197;line-height:1.35}
.pp-dashboard-state{font-size:10px;white-space:nowrap;border-radius:6px;background:#f0f3f7;color:#68798d;padding:4px 7px}
.pp-dashboard-tile>svg{color:#a1aec0}
.pp-dashboard-help{font-size:12px;color:#78879c;margin:14px 0 0;line-height:1.6}
@media(max-width:1100px){.pp-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.pp-dashboard-grid{gap:9px}.pp-dashboard-tile{min-height:134px;padding:12px;gap:8px;align-content:flex-start}.pp-dashboard-icon{width:31px;height:31px}.pp-dashboard-icon svg{width:18px;height:18px}.pp-dashboard-tile-content{flex-basis:100%;min-width:0;gap:4px}.pp-dashboard-name{font-size:13px}.pp-dashboard-sub{font-size:10.5px}.pp-dashboard-state{font-size:9px}.pp-dashboard-help{font-size:11px}}

/* Production Planning orders — modern and dense, with tactile inputs. */
.pp-dashboard-tile:disabled{cursor:default;opacity:.68;box-shadow:none!important;border-color:#e2e8f1!important}
.pp-dashboard-state.pp-ready{background:#ebf8f2;color:#237b54}
.pp-order-party-panel,.pp-order-quick-panel{padding:16px 18px;margin-bottom:12px}
.pp-order-party-panel{display:flex;align-items:end;gap:18px;flex-wrap:wrap}
.pp-order-party-field{max-width:475px;min-width:210px;flex:1 1 350px}
.pp-center-display{font-size:12.5px;color:#65748b;padding-bottom:10px}
.pp-combobox{position:relative}
.pp-combobox input{width:100%}
.pp-suggestions{position:absolute;top:calc(100% + 3px);left:0;right:0;z-index:50;max-height:290px;overflow:auto;border:1px solid #d5deea;border-radius:9px;background:#fff;box-shadow:0 12px 26px #1d34512b}
.pp-suggestions[hidden],.pp-quick-editor[hidden]{display:none!important}
.pp-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:9px 12px;width:100%;background:#fff;border:0;border-bottom:1px solid #f0f3f7;text-align:left;cursor:pointer;font:inherit}
.pp-option:hover,.pp-option:focus-visible{background:#eef5ff;outline:none}
.pp-option strong{font-weight:650;color:#20324b;font-size:13px}
.pp-option small{font-size:11px;color:#687d98}
.pp-order-section-title{font-size:13.5px;font-weight:750;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:12px}
.pp-small-muted{font-size:11px;color:#7f8b9a;font-weight:500}
.pp-order-quick-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.pp-quick-search-field{flex:1 1 300px;min-width:180px}
.pp-quick-editor{flex:1 1 250px;min-width:220px;max-width:360px}
.pp-quick-editor>label{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:11px;font-weight:650;margin-bottom:6px;color:#52637b}
.pp-quick-qty-row{display:flex;gap:7px}
.pp-quick-qty-row .input{width:100%;min-width:80px;flex:1;font-size:14px;font-variant-numeric:tabular-nums}
.pp-quick-qty-row .btn{flex:none}
.pp-order-table-panel{margin-bottom:12px;overflow:hidden}
.pp-order-table-top{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 15px;border-bottom:1px solid #e9eef4;flex-wrap:wrap}
.pp-order-table-top>div{display:flex;flex-direction:column;gap:2px}
.pp-order-table-top strong{font-size:14px}
.pp-order-table-top small{font-size:11px;color:#74849b}
.pp-list-category-label{display:flex;align-items:center;gap:8px;color:#5c6c83;font-weight:650;font-size:11px}
.pp-list-category-label .select{min-width:175px;max-width:240px;font-size:12px}
.pp-order-table-wrap{max-height:60vh;overflow-y:auto;overflow-x:hidden}
.pp-order-table{width:100%;max-width:100%!important;border-collapse:collapse}
.pp-order-table thead{position:sticky;top:0;z-index:4;background:#f5f7fb}
.pp-order-table th{font-size:12px;font-weight:750;padding:9px 14px}
.pp-order-table td{font-size:13.5px;padding:6px 14px;line-height:1.2}
.pp-order-table tbody tr:hover{background:#f8fbff}
.pp-list-product-name{font-size:13.5px;font-weight:620}
.pp-order-table td .line2{margin-top:2px;font-size:10.5px;color:#7a899e}
.pp-order-qty-cell{width:170px;text-align:right}
.pp-order-table .input.pp-list-qty{height:34px;width:118px;max-width:100%;margin-left:auto;text-align:right;padding:5px 8px;font-size:14px;font-variant-numeric:tabular-nums}
.pp-order-helper{font-size:11px;line-height:1.5;color:#728198;margin:9px 14px 12px}
.pp-order-save-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #e1e7f0;border-radius:10px;padding:12px 15px;box-shadow:0 2px 6px #14243706}
.pp-order-summary{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:baseline;color:#586981;font-size:12.5px}
.pp-order-summary strong{font-size:15px;color:#182b43;font-variant-numeric:tabular-nums}
.pp-order-save-bar .btn{min-width:130px}
.required-mark{color:#d3485d}
.pp-pending-panel{overflow:hidden}
.pp-pending-top{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:14px 17px;background:#f8faff;flex-wrap:wrap}
.pp-pending-top strong{font-size:13px}
.pp-pending-top span{color:#61738e;font-size:12px}
.pp-pending-center{border-top:1px solid #e5ecf3;background:#fff}
.pp-pending-center>summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;padding:15px 18px}
.pp-pending-center>summary::-webkit-details-marker,.pp-pending-order>summary::-webkit-details-marker{display:none}
.pp-pending-center>summary:hover{background:#f9fbff}
.pp-pending-summary-title{font-size:15px;font-weight:750;color:#213653;flex:1}
.pp-pending-summary-title strong{color:#235c9f;font-size:15px}
.pp-pending-count{color:#77879e;font-size:11px}
.pp-pending-chevron{color:#91a4ba;transition:transform .15s}
.pp-pending-center[open]>.pp-pending-center-summary>.pp-pending-chevron,.pp-pending-center[open]>summary .pp-pending-chevron{transform:rotate(90deg)}
.pp-pending-order-list{padding:5px 15px 13px;background:#f8fafc}
.pp-pending-order{border:1px solid #e4eaf3;border-radius:9px;background:#fff;margin:8px 0;overflow:hidden}
.pp-pending-order>summary{display:flex;align-items:center;justify-content:space-between;gap:15px;cursor:pointer;padding:11px 13px;list-style:none}
.pp-pending-order>summary strong{font-size:13px}
.pp-pending-order>summary .line2{font-size:11px;color:#718097;margin-top:2px}
.pp-pending-order-total{color:#244e89;white-space:nowrap}
.pp-pending-lines{padding:0 13px 9px}
.pp-pending-lines table{width:100%;max-width:100%}
.pp-pending-lines th,.pp-pending-lines td{padding:6px 8px;font-size:12px}
.pp-pending-empty{padding:30px 18px;text-align:center;color:#78879a;font-size:13px}
@media(max-width:680px){
 .page-production-new-order .content{padding-bottom:132px}
 .pp-order-party-panel,.pp-order-quick-panel{padding:12px;margin-bottom:10px}
 .pp-order-party-field{flex-basis:100%}
 .pp-center-display{padding-bottom:2px;font-size:11px}
 .pp-order-section-title{font-size:12.5px;gap:3px;margin-bottom:8px}
 .pp-small-muted{font-size:10px}
 .pp-order-quick-row{gap:9px}
 .pp-quick-search-field,.pp-quick-editor{flex-basis:100%;max-width:100%}
 .pp-order-table-wrap{max-height:none;overflow:visible}
 .pp-order-table-top{padding:8px 9px;gap:6px}
 .pp-order-table-top strong{font-size:12.5px}
 .pp-order-table-top small{font-size:10px}
 .pp-list-category-label .select{min-width:120px;max-width:165px;height:32px}
 .pp-order-table th{padding:7px 8px;font-size:11.5px}
 .pp-order-table td{padding:4px 8px;font-size:12.5px}
 .pp-list-product-name{font-size:12.5px}
 .pp-order-table td .line2{font-size:10px}
 .pp-order-qty-cell{width:115px}
 .pp-order-table .input.pp-list-qty{width:103px;height:33px;font-size:13.5px}
 .pp-order-save-bar{position:fixed;left:0;right:0;bottom:calc(59px + env(safe-area-inset-bottom));z-index:75;border-radius:0;padding:9px 12px;box-shadow:0 -4px 16px #17365713}
 .pp-order-summary{font-size:11px;gap:3px;flex-direction:column}
 .pp-order-summary strong{font-size:13px}
 .pp-order-save-bar .btn{min-height:39px}
 .pp-pending-summary-title,.pp-pending-summary-title strong{font-size:13.5px}
 .pp-pending-center>summary{padding:13px 11px;gap:8px}
 .pp-pending-top{padding:10px 11px}
 .pp-pending-order-list{padding:3px 8px 9px}
 .pp-pending-order>summary{padding:9px}
 .pp-pending-count{font-size:10px}
}

/* v3 — Production Planning: high-density, clean Excel-like order entry. */
.page-production-new-order .content,
.page-production-pending-order .content,
.page-production-planning-order .content,
.page-production-completed-order .content{max-width:1060px}
.page-production-new-order .header{margin-bottom:9px}
.page-production-new-order .header h1{font-size:19px}
.page-production-new-order .header .subtitle{display:none}
.page-production-new-order .pp-order-party-panel,
.page-production-new-order .pp-order-quick-panel{padding:8px 10px;margin-bottom:6px;border-radius:8px}
.page-production-new-order .field{gap:3px}
.page-production-new-order .field label{font-size:11px}
.page-production-new-order .pp-order-party-panel{gap:8px}
.page-production-new-order .pp-center-display{padding-bottom:3px;font-size:11px}
.page-production-new-order .pp-order-section-title{font-size:12px;margin-bottom:4px}
.page-production-new-order .pp-order-quick-row{gap:6px}
.page-production-new-order .input,.page-production-new-order .select{height:31px;border-radius:5px;font-size:13px;padding:0 7px}
.page-production-new-order .pp-order-quick-panel .pp-quick-editor{max-width:300px}
.page-production-new-order .pp-order-quick-panel .pp-quick-qty-row .btn{min-height:31px;padding:5px 8px}
.page-production-new-order .pp-order-table-panel{border-radius:5px}
.page-production-new-order .pp-order-table-top{padding:5px 8px;gap:8px}
.page-production-new-order .pp-order-table-top strong{font-size:12px}
.pp-muted-count{color:#7a889a;font-weight:500}
.page-production-new-order .pp-list-category-label{font-size:11px;gap:5px}
.page-production-new-order .pp-list-category-label .select{min-width:115px;height:28px;max-width:220px}
.page-production-new-order .pp-order-table-wrap{max-height:calc(100dvh - 320px);overflow-y:auto}
.page-production-new-order .pp-excel-table{border-collapse:collapse;table-layout:fixed}
.page-production-new-order .pp-excel-table th{padding:3px 8px;height:26px;font-size:12px;border:1px solid #dfe5ed;background:#f3f6fa}
.page-production-new-order .pp-excel-table td{padding:0 7px;height:27px;font-size:12.5px;border:1px solid #e1e6ed;line-height:1.12}
.page-production-new-order .pp-excel-table th:first-child{width:77%}
.page-production-new-order .pp-excel-table th:last-child{width:23%;text-align:center}
.page-production-new-order .pp-excel-table tbody tr:nth-child(even){background:#f8fafc}
.page-production-new-order .pp-list-product-name{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;font-weight:520}
.page-production-new-order .pp-order-qty-cell{width:23%;padding:0!important}
.page-production-new-order .pp-excel-table .input.pp-list-qty{width:100%;height:26px;border:0;border-radius:0;background:transparent;font-size:13px;text-align:center;padding:0 2px;font-variant-numeric:tabular-nums;box-shadow:none}
.page-production-new-order .pp-excel-table .input.pp-list-qty:not(:placeholder-shown){background:#edf6ff;color:#145da7;font-weight:700}
.page-production-new-order .pp-excel-table .input.pp-list-qty:focus{outline:2px solid #3a7bd5;outline-offset:-2px;background:#fff}
.page-production-new-order .pp-order-save-bar{padding:7px 10px;border-radius:7px}
.page-production-new-order .pp-order-save-bar .btn{min-height:34px}

/* Compact center-wise status lists: select whole center, view detail on tap. */
.pp-dense-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.pp-dense-header h1{font-size:19px;letter-spacing:-.25px}
.pp-back-dashboard{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border:1px solid #dbe4ef;background:#fff;border-radius:6px;color:#496586}
.pp-center-metric{margin-left:auto;font-size:11px;color:#6b7d92;white-space:nowrap}
.pp-center-list-panel{overflow:hidden;border-radius:7px}
.pp-center-list-table{width:100%;max-width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.pp-center-list-table th{height:28px;padding:4px 8px;border:1px solid #dbe3ed;background:#f2f5fa;font-size:11.5px;color:#50627b}
.pp-center-list-table th:nth-child(2){text-align:center}
.pp-center-list-table td{height:30px;padding:0 6px;border:1px solid #e0e5ec}
.pp-center-list-table tbody tr:nth-child(even){background:#f5f7fa}
.pp-center-list-table .pp-center-check-cell{width:45px!important;text-align:center;padding:0 2px!important}
.pp-center-list-table input[type=checkbox]{width:15px;height:15px;accent-color:#2868b1;vertical-align:middle;cursor:pointer;margin:0}
.pp-center-name-cell{text-align:center}
.pp-center-name{display:block;width:100%;padding:3px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:transparent;border:0;text-align:center;font-size:13px;color:#215e9e;font-weight:620;letter-spacing:.05px}
.pp-center-name:hover,.pp-center-name:focus-visible{background:#eaf2fc;text-decoration:underline}
.pp-center-action-bar{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:8px 12px;background:#fff;border:1px solid #e0e6ef;border-radius:0 0 9px 9px;font-size:11px;color:#5c7089}
.pp-center-action-bar .btn{min-height:34px}
.pp-center-empty{text-align:center;padding:28px 8px!important;color:#7f8996}
.pp-center-detail-order{padding:8px 0;border-bottom:1px solid #e1e6ee}
.pp-center-detail-order strong{font-size:13px}
.pp-center-detail-note{display:block;font-size:10px;color:#798597;margin:4px 0}
.pp-center-detail-order td{padding:4px 7px;font-size:12px}
.pp-center-details{max-height:65vh;overflow:auto}

@media(max-width:680px){
  /* Orders use dedicated compact full-screen workspace, not bottom tab bar. */
  .page-production-new-order .mobile-nav,
  .page-production-pending-order .mobile-nav,
  .page-production-planning-order .mobile-nav,
  .page-production-completed-order .mobile-nav{display:none}
  .page-production-new-order .content,
  .page-production-pending-order .content,
  .page-production-planning-order .content,
  .page-production-completed-order .content{padding:7px 6px 68px}
  .page-production-new-order .header{margin-bottom:5px}
  .page-production-new-order .header h1{font-size:16px}
  .page-production-new-order .pp-order-party-panel,
  .page-production-new-order .pp-order-quick-panel{padding:5px 7px;margin-bottom:4px;border-radius:5px}
  .page-production-new-order .pp-order-party-field{flex:1 1 190px;min-width:150px}
  .page-production-new-order .pp-order-party-panel{flex-wrap:nowrap}
  .page-production-new-order .pp-center-display{max-width:85px;font-size:9.5px;line-height:1.25;overflow-wrap:anywhere}
  .page-production-new-order .field label{font-size:10px}
  .page-production-new-order .input{height:29px;font-size:12px}
  .page-production-new-order .pp-order-section-title{margin-bottom:2px;font-size:11px}
  .page-production-new-order .pp-small-muted{font-size:9px}
  .page-production-new-order .pp-order-quick-row{align-items:stretch}
  .page-production-new-order .pp-quick-search-field{flex:1 1 100%;min-width:0}
  .page-production-new-order .pp-quick-editor{flex:1 1 100%;max-width:100%;min-width:0}
  .page-production-new-order .pp-order-table-top{padding:3px 6px}
  .page-production-new-order .pp-order-table-top strong{font-size:11px}
  .page-production-new-order .pp-list-category-label .select{max-width:120px;min-width:95px;height:25px;font-size:11px}
  .page-production-new-order .pp-order-table-wrap{max-height:calc(100dvh - 220px);overflow-y:auto}
  .page-production-new-order .pp-excel-table th{height:23px;padding:2px 5px;font-size:11px}
  .page-production-new-order .pp-excel-table td{height:25px;padding:0 6px;font-size:12px}
  .page-production-new-order .pp-list-product-name{font-size:12px}
  .page-production-new-order .pp-excel-table .input.pp-list-qty{height:24px;font-size:12px}
  .page-production-new-order .pp-order-save-bar{position:fixed;bottom:env(safe-area-inset-bottom);left:0;right:0;z-index:75;padding:5px 8px;border-radius:0;box-shadow:0 -2px 12px #1d34521a}
  .page-production-new-order .pp-order-save-bar .btn{min-height:33px}
  .page-production-new-order .pp-order-summary{flex-direction:row;align-items:center;gap:7px;font-size:10px}
  .page-production-new-order .pp-order-summary strong{font-size:11px}
  .pp-dense-header{margin-bottom:5px}
  .pp-dense-header h1{font-size:16px}
  .pp-center-list-table th{height:24px;font-size:11px;padding:2px 3px}
  .pp-center-list-table td{height:26px;padding:0 3px}
  .pp-center-list-table .pp-center-check-cell{width:40px!important}
  .pp-center-list-table input[type=checkbox]{width:15px;height:15px}
  .pp-center-name{font-size:12px;padding:3px 2px;line-height:19px}
  .pp-center-list-panel{max-height:calc(100dvh - 152px);overflow-y:auto}
  .pp-center-list-table thead{position:sticky;top:0;z-index:1}
  .pp-center-action-bar{position:fixed;bottom:env(safe-area-inset-bottom);left:0;right:0;z-index:75;border-radius:0;padding:5px 10px;box-shadow:0 -2px 12px #1d34521a}
}

/* PF Production Planning v4: readable Excel-like rows, each saved order separate. */
.page-production-new-order .pp-excel-table th{
 height:34px;font-size:14px;padding:5px 9px;
}
.page-production-new-order .pp-excel-table td{
 height:38px;font-size:14px;padding:2px 9px;line-height:1.3;
}
.page-production-new-order .pp-list-product-name{font-size:14px;white-space:normal;line-height:1.28}
.page-production-new-order .pp-excel-table .input.pp-list-qty{height:36px;font-size:15px}
.page-production-new-order .pp-order-table-wrap{max-height:calc(100dvh - 330px)}
.pp-order-stage-table th{height:34px;font-size:13px}
.pp-order-stage-table td{height:41px;padding:3px 7px}
.pp-order-stage-table .pp-center-name{font-size:15px;text-align:left;padding:5px 9px;letter-spacing:0;line-height:1.4}
.pp-order-stage-table input[type=checkbox]{width:18px;height:18px}
.pp-stage-action-bar{gap:12px}
.pp-stage-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.pp-stage-action-bar .btn{min-height:38px;font-size:13px;padding:7px 12px}
.pp-order-detail-intro{display:flex;flex-direction:column;gap:2px;margin-bottom:10px;font-size:14px}
.pp-order-detail-intro span,.pp-order-detail-note,.pp-edit-helper{color:#697a92;font-size:12px}
.pp-order-detail-note{margin-bottom:8px}
.pp-edit-helper{margin:7px 0 12px;line-height:1.4}
.pp-edit-lines{width:100%;border-collapse:collapse;table-layout:fixed}
.pp-edit-lines th,.pp-edit-lines td{border-bottom:1px solid #e3e9f2;padding:8px 7px;font-size:14px}
.pp-edit-lines th:last-child,.pp-edit-lines td:last-child{width:110px;text-align:right}
.pp-edit-quantity{width:100%;max-width:112px;text-align:right;height:35px;font-size:15px}
.pp-add-product-row{display:flex;align-items:center;gap:8px;margin:12px 0}
.pp-add-product-row .select{flex:1;min-width:0}
.pp-order-name:hover,.pp-order-name:focus-visible{text-decoration:underline}
@media(max-width:680px){
 .page-production-new-order .pp-excel-table th{height:31px;font-size:13.5px;padding:4px 7px}
 .page-production-new-order .pp-excel-table td{height:37px;font-size:14px;padding:2px 7px}
 .page-production-new-order .pp-list-product-name{font-size:14px;line-height:1.25}
 .page-production-new-order .pp-excel-table .input.pp-list-qty{height:34px;font-size:15px}
 .page-production-new-order .pp-order-table-wrap{max-height:calc(100dvh - 230px)}
 .pp-order-stage-table th{height:31px;font-size:13px}
 .pp-order-stage-table td{height:40px;padding:3px 5px}
 .pp-order-stage-table .pp-center-name{font-size:15px;line-height:1.35;padding:5px 7px}
 .pp-order-stage-table .pp-center-check-cell{width:43px!important}
 .pp-order-stage-table input[type=checkbox]{width:19px;height:19px}
 .pp-center-list-panel{max-height:calc(100dvh - 190px);overflow-y:auto}
 .pp-stage-action-bar{padding:7px 9px;align-items:center}
 .pp-stage-actions{gap:6px;flex-wrap:nowrap}
 .pp-stage-action-bar .btn{font-size:12px;padding:6px 9px;min-height:38px}
 .pp-edit-lines th,.pp-edit-lines td{font-size:13.5px}
}
@media(max-width:680px){
 /* Keep type readable while fitting approximately 15 product rows per phone. */
 .page-production-new-order .pp-excel-table td{height:33px;min-height:33px}
 .page-production-new-order .pp-excel-table .input.pp-list-qty{height:31px;font-size:14.5px}
 .page-production-new-order .pp-excel-table th{height:29px}
}

/* PF Production Planning v5: readable dense entry, no iOS/Chrome input auto-zoom */
.pp-dashboard-name{font-size:18px;line-height:1.25;font-weight:750}
.pp-dashboard-tile{min-height:140px;padding:20px}
.pp-dashboard-sub{font-size:12.5px}
.pp-edit-lines th,.pp-edit-lines td{padding:10px 9px;font-size:15px}
.pp-edit-quantity{min-height:42px;font-size:16px;padding:7px 10px}
.pp-edit-product-search-wrap{position:relative;margin:16px 0 8px;padding-top:12px;border-top:1px solid #e2e8f1}
.pp-edit-product-search-wrap label{display:block;font-size:13px;font-weight:700;margin-bottom:7px;color:#52637b}
.pp-edit-product-search-wrap>.input{height:43px;font-size:16px}
.pp-edit-suggestions{position:relative;z-index:10;background:#fff;border:1px solid #d1dce9;border-radius:8px;max-height:190px;overflow:auto;margin-top:5px;box-shadow:0 6px 16px #1b375012}
.pp-edit-suggestions[hidden]{display:none}
.pp-edit-suggestion{display:block;width:100%;background:#fff;border:0;border-bottom:1px solid #edf0f4;padding:10px 13px;text-align:left;font-size:15px;color:#1f395a;cursor:pointer}
.pp-edit-suggestion:hover,.pp-edit-suggestion:focus-visible{background:#edf4ff}
.pp-edit-no-match{padding:10px;font-size:13px;color:#7b8797}
.pp-order-stage-table th{font-size:14px}
.pp-order-stage-table td{height:47px;padding:5px 9px}
.pp-order-stage-table .pp-center-name{font-size:16px;line-height:1.45;padding:7px 10px}
.page-production-new-order .pp-excel-table td{height:43px;font-size:15px;line-height:1.25}
.page-production-new-order .pp-list-product-name{font-size:15px;line-height:1.25}
.page-production-new-order .pp-excel-table .input.pp-list-qty{height:40px;font-size:16px}
@media(max-width:680px){
 /* 16px is critical: mobile browsers can magnify the page for smaller focused inputs. */
 .input,.select,.pp-bulk-table .pp-bulk-input,.pp-edit-quantity,
 .pp-order-table .input.pp-list-qty,.pp-quick-qty-row .input,
 .page-production-new-order .pp-excel-table .input.pp-list-qty{font-size:16px!important}
 .pp-dashboard-name{font-size:16.5px}
 .pp-dashboard-tile{min-height:144px;padding:14px}
 .pp-dashboard-sub{font-size:12px}
 .page-production-new-order .pp-excel-table th{height:33px;font-size:13px}
 .page-production-new-order .pp-excel-table td{height:43px;min-height:43px;font-size:14.5px;padding:4px 7px}
 .page-production-new-order .pp-excel-table .input.pp-list-qty{height:39px}
 .page-production-new-order .pp-list-product-name{font-size:14.5px;line-height:1.24}
 .page-production-new-order .pp-order-table-wrap{max-height:calc(100dvh - 250px)}
 .pp-order-stage-table td{height:49px;padding:5px 7px}
 .pp-order-stage-table .pp-center-name{font-size:16px;line-height:1.4;padding:8px 8px}
 .pp-order-stage-table th{height:35px;font-size:14px}
 .pp-order-stage-table input[type=checkbox]{width:20px;height:20px}
 .pp-center-list-panel{max-height:calc(100dvh - 192px)}
 .pp-edit-lines th,.pp-edit-lines td{font-size:14.5px;padding:10px 6px}
 .pp-edit-quantity{font-size:16px;min-height:42px}
 .pp-stage-action-bar .btn{font-size:13px}
}

/* Manual physical counts — separate from orders and Stock Module. */
.pp-manual-panel{padding:12px;margin-top:10px}
.pp-manual-meta{font-size:13px;color:#5f7085;margin-bottom:10px;line-height:1.5}
.pp-manual-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,180px);gap:9px;margin-bottom:10px}
.pp-manual-filters .input{width:100%;min-width:0;font-size:16px}
.pp-manual-table-scroll{overflow:auto;max-height:calc(100dvh - 290px)}
.pp-manual-table{width:100%;border-collapse:collapse;table-layout:fixed}
.pp-manual-table th{position:sticky;top:0;background:#f0f4f8;z-index:1;text-align:left;font-weight:650;font-size:14px;padding:10px 9px;border-bottom:1px solid #dbe2eb}
.pp-manual-table th:nth-child(1){width:50%}
.pp-manual-table th:nth-child(2){width:23%;text-align:right}
.pp-manual-table th:nth-child(3){width:27%;text-align:center}
.pp-manual-table td{padding:5px 9px;border-bottom:1px solid #e5eaf1;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
.pp-manual-table .pp-manual-existing{text-align:right;font-variant-numeric:tabular-nums;color:#52667c}
.pp-manual-table .pp-manual-input{width:100%;min-width:0;padding:8px 6px;text-align:center;font-size:16px;min-height:39px;box-sizing:border-box}
.pp-manual-save{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#fff;border:1px solid #e5eaf1;border-radius:12px;box-shadow:0 -2px 10px #172d4110;margin-top:10px}
@media(max-width:600px){.pp-manual-panel{padding:8px}.pp-manual-table-scroll{max-height:calc(100dvh - 305px)}.pp-manual-table th{font-size:13px;padding:9px 5px}.pp-manual-table td{font-size:14px;padding:4px 5px}.pp-manual-table .pp-manual-input{font-size:16px;padding:8px 2px}.pp-manual-filters{grid-template-columns:minmax(0,1fr) 125px;gap:6px}.pp-manual-save{position:fixed;bottom:env(safe-area-inset-bottom);left:0;right:0;z-index:75;border-radius:0}}

/* PF Production Planning: compact two-column manual stock, deliberate reset */
.pp-manual-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 10px}
.pp-manual-help{color:#596a80;font-size:13px;line-height:1.4}
.pp-manual-reset{flex-shrink:0;border:1px solid #cb7a7a!important;color:#ab2636!important;background:#fff!important;font-size:14px!important;padding:8px 12px!important;min-height:39px}
.pp-manual-table th:first-child{width:72%}
.pp-manual-table th:nth-child(2){width:28%;text-align:center}
.pp-manual-qty-cell{text-align:right}
.pp-manual-table .pp-manual-input{max-width:140px;margin-left:auto;font-size:16px;min-height:42px}
@media(max-width:600px){.pp-manual-help{font-size:12px}.pp-manual-reset{font-size:13px!important;padding:7px 9px!important}.pp-manual-table th:first-child{width:66%}.pp-manual-table th:nth-child(2){width:34%}.pp-manual-table td{padding:6px 7px}.pp-manual-table .pp-manual-input{font-size:16px;min-height:43px}}

/* PF Production: New Order-style quick stock entry and totals */
.pp-manual-total{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;background:#eff5ff;border:1px solid #d7e6fb;border-radius:8px;color:#1f3756;font-size:15px;font-weight:600;margin:10px 0}
.pp-manual-total strong{font-size:19px;font-variant-numeric:tabular-nums;color:#165cb3}
.pp-manual-quick{padding:9px 10px;background:#f7f9fc;border:1px solid #e0e7f1;border-radius:9px;margin:10px 0 12px}
.pp-manual-quick>label{display:block;font-size:14px;font-weight:650;margin-bottom:5px}
.pp-manual-quick .pp-combobox{position:relative}
.pp-manual-quick .pp-suggestions{position:absolute;top:100%;left:0;right:0;z-index:40;max-height:210px;overflow:auto;box-shadow:0 6px 14px #0002}
.pp-manual-quick-entry{display:flex;align-items:center;gap:8px;margin-top:9px;flex-wrap:wrap}
.pp-manual-quick-entry[hidden]{display:none}
.pp-manual-quick-entry span{flex:1;min-width:100px;font-size:14px;font-weight:600}
.pp-manual-quick-entry input{width:110px;min-width:95px;text-align:right;font-size:16px!important}
.pp-manual-quick-entry .btn{white-space:nowrap;min-height:40px}
.pp-manual-total-bottom{margin-top:12px;margin-bottom:0}
@media(max-width:600px){.pp-manual-total{font-size:14px;padding:8px 10px}.pp-manual-total strong{font-size:18px}.pp-manual-quick{padding:8px}.pp-manual-quick-entry input{width:95px}.pp-manual-table-scroll{max-height:calc(100dvh - 435px)}.pp-manual-quick .input{font-size:16px!important}}


/* Stock tables deliberately share the exact Excel-like New Order grid geometry. */
.page-production-ready-stock .pp-manual-table-scroll,
.page-production-raw-stock .pp-manual-table-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100dvh - 410px)}
.page-production-ready-stock .pp-manual-table,
.page-production-raw-stock .pp-manual-table{width:100%;table-layout:fixed;border-collapse:collapse}
.page-production-ready-stock .pp-manual-table th,
.page-production-raw-stock .pp-manual-table th{height:33px;box-sizing:border-box;padding:4px 8px;font-size:13px;font-weight:750;color:#33435b;background:#f3f6fa;border:1px solid #dfe5ed;text-align:left}
.page-production-ready-stock .pp-manual-table th:first-child,
.page-production-raw-stock .pp-manual-table th:first-child{width:77%}
.page-production-ready-stock .pp-manual-table th:last-child,
.page-production-raw-stock .pp-manual-table th:last-child{width:23%;text-align:center}
.page-production-ready-stock .pp-manual-table td,
.page-production-raw-stock .pp-manual-table td{height:43px;box-sizing:border-box;padding:4px 8px;font-size:15px;line-height:1.25;border:1px solid #e1e6ed;overflow-wrap:anywhere}
.page-production-ready-stock .pp-manual-table tbody tr:nth-child(even),
.page-production-raw-stock .pp-manual-table tbody tr:nth-child(even){background:#f8fafc}
.page-production-ready-stock .pp-manual-qty-cell,
.page-production-raw-stock .pp-manual-qty-cell{width:23%;padding:0!important}
.page-production-ready-stock .pp-manual-table .input.pp-manual-input,
.page-production-raw-stock .pp-manual-table .input.pp-manual-input{display:block;width:100%;max-width:100%;min-width:0;height:40px;min-height:40px;margin:0;box-sizing:border-box;border:0;border-radius:0;background:transparent;box-shadow:none;padding:0 3px;text-align:center;font-size:16px!important;font-weight:700;color:#145da7;font-variant-numeric:tabular-nums}
.page-production-ready-stock .pp-manual-table .input.pp-manual-input:focus,
.page-production-raw-stock .pp-manual-table .input.pp-manual-input:focus{outline:2px solid #3a7bd5;outline-offset:-2px;background:#fff}
.page-production-ready-stock .pp-reading-btn,.page-production-raw-stock .pp-reading-btn{white-space:nowrap}
.pp-reading-btn{white-space:nowrap;min-height:39px;font-weight:650}
@media(max-width:600px){
 .page-production-ready-stock .pp-manual-table th,
 .page-production-raw-stock .pp-manual-table th{height:33px;font-size:13px;padding:4px 7px}
 .page-production-ready-stock .pp-manual-table td,
 .page-production-raw-stock .pp-manual-table td{height:43px;padding:4px 7px;font-size:14.5px}
 .page-production-ready-stock .pp-manual-table .input.pp-manual-input,
 .page-production-raw-stock .pp-manual-table .input.pp-manual-input{height:39px;min-height:39px;font-size:16px!important}
 .page-production-ready-stock .pp-manual-table th:first-child,
 .page-production-raw-stock .pp-manual-table th:first-child{width:77%}
 .page-production-ready-stock .pp-manual-table th:last-child,
 .page-production-raw-stock .pp-manual-table th:last-child{width:23%}
 .page-production-ready-stock .pp-manual-table-scroll,
 .page-production-raw-stock .pp-manual-table-scroll{max-height:calc(100dvh - 440px)}
 .pp-stage-action-bar{flex-wrap:wrap}
 .pp-reading-btn{font-size:13px;padding:8px 10px}
}

/* Stock quick entry: same card, search field, quantity field and blue focus treatment as New Order. */
.page-production-ready-stock .pp-manual-quick,
.page-production-raw-stock .pp-manual-quick{background:#fff;border:1px solid #e6ebf2;border-radius:8px;padding:12px 14px;margin:8px 0 10px}
.page-production-ready-stock .pp-manual-quick>label,
.page-production-raw-stock .pp-manual-quick>label{font-size:13.5px;font-weight:750;color:#33435b;margin-bottom:8px}
.page-production-ready-stock .pp-manual-quick .input,
.page-production-raw-stock .pp-manual-quick .input{font-size:16px!important;min-height:40px;border-color:#ccd7e5;border-radius:6px}
.page-production-ready-stock .pp-manual-quick-entry,
.page-production-raw-stock .pp-manual-quick-entry{gap:8px;margin-top:9px}
.page-production-ready-stock .pp-manual-quick-entry .btn,
.page-production-raw-stock .pp-manual-quick-entry .btn{min-height:40px}
.page-production-ready-stock .pp-manual-table-scroll,
.page-production-raw-stock .pp-manual-table-scroll{border:1px solid #dfe5ed;border-radius:5px}
@media(max-width:600px){
 .page-production-ready-stock .pp-manual-quick,
 .page-production-raw-stock .pp-manual-quick{padding:8px 10px;margin:6px 0 8px}
 .page-production-ready-stock .pp-manual-quick>label,
 .page-production-raw-stock .pp-manual-quick>label{font-size:12.5px;margin-bottom:5px}
}

/* Continuous full-page order and stock rows: no nested vertical scrolling. */
.page-production-new-order .pp-order-table-wrap,
.page-production-ready-stock .pp-manual-table-scroll,
.page-production-raw-stock .pp-manual-table-scroll{
 max-height:none!important;overflow-y:visible!important;overflow-x:visible!important;
}
.page-production-new-order .pp-order-table-wrap{overflow:visible!important}
.page-production-ready-stock .pp-manual-table-scroll,
.page-production-raw-stock .pp-manual-table-scroll{height:auto!important}
.pp-ready-switch{display:inline-flex;align-items:center;gap:8px;margin-left:auto;font-size:13px;font-weight:700;color:#345273;cursor:pointer;white-space:nowrap}
.pp-ready-switch input{appearance:none;width:39px;height:23px;border-radius:20px;background:#b6c2d1;position:relative;margin:0;cursor:pointer;flex-shrink:0;transition:background .15s}
.pp-ready-switch input:checked{background:#2563b5}
.pp-ready-switch input:before{content:'';position:absolute;left:3px;top:3px;width:17px;height:17px;border-radius:50%;background:#fff;transition:transform .15s}
.pp-ready-switch input:checked:before{transform:translateX(16px)}
.pp-ready-switch input:focus-visible{outline:3px solid #92b8ed;outline-offset:2px}
@media(max-width:600px){.pp-ready-switch{font-size:12px;gap:5px}.pp-ready-switch input{width:36px;height:22px}.pp-ready-switch input:before{width:16px;height:16px}.pp-ready-switch input:checked:before{transform:translateX(14px)}}

/* Keep the Ready Stock switch anchored toward the top-right, wrapping on phones. */
.page-production-planning-order .pp-dense-header{flex-wrap:wrap;align-items:center}
.page-production-planning-order .pp-ready-switch{margin-left:auto}
@media(max-width:600px){.page-production-planning-order .pp-dense-header{gap:6px}.page-production-planning-order .pp-ready-switch{margin-left:auto;max-width:100%}.page-production-planning-order .pp-center-metric{font-size:11px}}

/* PF ERP visual system — consolidated final overrides (mobile first). */
:root {
  --pf-ink:#192a43;
  --pf-muted:#61718a;
  --pf-primary:#2563aa;
  --pf-primary-soft:#e9f2ff;
  --pf-line:#dfe6f0;
  --pf-page:#f5f7fb;
  --pf-card:#ffffff;
  --pf-focus:#79a9f6;
  color-scheme:light;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
html{scroll-behavior:smooth;overscroll-behavior-y:auto}
body{color:var(--pf-ink);background:var(--pf-page);overflow-x:hidden}
button,input,select,textarea{font-family:inherit}
button{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--pf-focus);outline-offset:2px;
}
button:disabled{opacity:.45;box-shadow:none;cursor:not-allowed}
.surface{background:var(--pf-card);border:1px solid var(--pf-line);border-radius:14px;box-shadow:0 2px 10px rgba(27,54,91,.035)}
.content{max-width:1240px;padding:26px 32px 70px}
.header{margin-bottom:19px;align-items:center}
.header h1,.pp-dense-header h1{font-size:23px;font-weight:760;letter-spacing:-.5px;line-height:1.22}
.section-heading{font-size:14px;font-weight:730}
.section-head{padding:15px 17px}
.field{gap:7px}
.field label,.pp-list-category-label{font-size:12.5px;font-weight:670;color:#516580}
.input,.select,textarea.input{min-height:43px;height:43px;border:1px solid #cbd7e6;border-radius:9px;background:#fff;color:var(--pf-ink);font-size:14px;padding:8px 12px;transition:border-color .15s,box-shadow .15s}
.input:focus,.select:focus,textarea.input:focus{outline:0;border-color:#4387df;box-shadow:0 0 0 3px #4387df28}
.input::placeholder{color:#8897aa;opacity:1}
.btn{min-height:40px;border-radius:10px;font-size:13px;font-weight:690;padding:9px 13px;gap:7px;transition:background .15s,border-color .15s,box-shadow .15s}
.btn-sm{min-height:36px;font-size:12.5px;padding:7px 10px}
.btn-primary{background:var(--pf-primary)}
.btn-primary:hover{background:#1f5698}
.btn-outline{border-color:#cfdce9;color:#315273}
.btn-outline:hover{background:#eef5ff}
.nav-btn{min-height:43px;font-size:13.5px;border-radius:10px}
.nav-btn.active{font-weight:760}
.topbar{height:68px}
.topbar-title{font-size:15px}
.toolbar,.filters{gap:12px}
.table-wrap{max-width:100%;scrollbar-width:thin;overscroll-behavior-inline:contain}
.table-wrap th{font-size:12px;letter-spacing:.01em;color:#52637b}
.table-wrap td{font-size:13px}
.table-wrap tbody tr:hover{background:#f6f9ff}
.stock-table .input.qty-input{font-size:16px;min-height:38px;height:38px}
.stock-table td{height:46px}
.master-table .actions .btn,.pp-actions .btn{min-height:34px;min-width:34px}
.tag{font-size:11.5px}
.segmented button,.tabs button{min-height:38px;font-size:13px}
.auth-card{max-width:410px;padding:34px 32px}
.auth-card .brand{margin-bottom:24px}
.auth-card h1{margin-bottom:20px;font-size:25px}
.auth-card .input{min-height:45px}
.auth-card .btn{min-height:45px;font-size:14px}
.erp-shell{background:var(--pf-page)}
.erp-content{max-width:1120px;padding-top:40px}
.erp-heading h1{font-size:28px;letter-spacing:-.6px}
.erp-kicker{display:none}
.erp-module{border-color:var(--pf-line);border-radius:16px;min-height:168px;box-shadow:0 2px 10px #1d3b6410;transition:transform .16s,box-shadow .16s,border-color .16s}
.erp-module:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 22px #1d3b6417}
.erp-module-body strong{font-size:18px;line-height:1.35}
.erp-module-icon{border-radius:13px}
/* Production dashboard: important data, no explanatory badges. */
.pp-dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:6px 0 16px}
.pp-dashboard-tile{position:relative;display:flex;align-items:flex-start;flex-direction:column;flex-wrap:nowrap;min-width:0;min-height:157px;padding:19px;gap:12px;border:1px solid var(--pf-line);border-radius:15px;box-shadow:0 2px 9px #20395a08;transition:border-color .16s,box-shadow .16s,transform .16s}
.pp-dashboard-tile:hover{transform:translateY(-2px);box-shadow:0 10px 21px #1f4b8115}
.pp-dashboard-tile:focus-visible{outline:2px solid var(--pf-focus);outline-offset:2px}
.pp-dashboard-icon{width:42px;height:42px;background:var(--pf-primary-soft);border-radius:12px}
.pp-dashboard-tile-content{flex:1;min-width:0;gap:6px;justify-content:center}
.pp-dashboard-name{font-size:18px;line-height:1.28;font-weight:750;letter-spacing:-.2px;overflow-wrap:break-word}
.pp-dashboard-sub{font-size:12.5px;line-height:1.45;color:var(--pf-muted);overflow-wrap:anywhere}
.pp-dashboard-tile>svg:last-child{position:absolute;right:16px;top:22px;color:#9aabc0}
/* Orders: one continuous page, identical stock grid geometry. */
.pp-order-party-panel,.pp-order-quick-panel{padding:15px 17px;margin-bottom:12px;border-radius:13px}
.pp-order-party-panel{gap:12px}
.pp-order-party-field{max-width:550px}
.pp-center-display{font-size:13px;color:var(--pf-muted);padding-bottom:10px}
.pp-order-section-title{font-size:15px;margin-bottom:11px}
.pp-option{min-height:43px;padding:10px 14px}
.pp-option strong{font-size:14px}
.pp-order-table-top{padding:13px 16px;gap:9px}
.pp-order-table-top strong{font-size:15px}
.pp-list-category-label .select{height:39px;min-height:39px;font-size:13px}
.pp-order-table-wrap,.page-production-new-order .pp-order-table-wrap{max-height:none!important;height:auto!important;overflow:visible!important}
.pp-excel-table{table-layout:fixed}
.pp-excel-table th:first-child,.pp-manual-table th:first-child{width:77%}
.pp-excel-table th:last-child,.pp-manual-table th:last-child{width:23%}
.page-production-new-order .pp-excel-table th,.pp-manual-table th{height:38px;padding:8px 10px;font-size:13px;font-weight:730;background:#f2f6fb;color:#536783;border:1px solid var(--pf-line)}
.page-production-new-order .pp-excel-table td,.pp-manual-table td{height:47px;padding:5px 10px;font-size:15px;line-height:1.3;border:1px solid #e0e7f0;overflow-wrap:anywhere}
.page-production-new-order .pp-excel-table tbody tr:nth-child(even),.pp-manual-table tbody tr:nth-child(even){background:#f8fafd}
.page-production-new-order .pp-list-product-name,.pp-manual-table .pp-list-product-name{font-size:15px;line-height:1.32;font-weight:560}
.page-production-new-order .pp-order-qty-cell,.pp-manual-qty-cell{width:23%;padding:0!important}
.page-production-new-order .pp-excel-table .input.pp-list-qty,.pp-manual-table .input.pp-manual-input{display:block;width:100%;max-width:100%;height:44px;min-height:44px;margin:0;padding:0 6px;border:0;border-radius:0;background:transparent;color:#205b9e;box-shadow:none;text-align:center;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
.page-production-new-order .pp-excel-table .input.pp-list-qty:focus,.pp-manual-table .input.pp-manual-input:focus{outline:2px solid #4d90e4;outline-offset:-2px;background:#fff}
.pp-order-save-bar{border:1px solid var(--pf-line);border-radius:12px;padding:12px 15px}
.pp-order-summary{font-size:13.5px}
.pp-order-summary strong{font-size:16px}
/* Stage lists retain each order; actions are clear and aligned. */
.pp-dense-header{display:flex;align-items:center;gap:11px;margin-bottom:12px}
.pp-dense-header h1{flex:1;min-width:0}
.pp-back-dashboard{flex-shrink:0;min-height:41px;min-width:41px;border:1px solid var(--pf-line);background:#fff;color:#3d5776;border-radius:10px;display:grid;place-items:center}
.pp-center-metric{font-size:12.5px;color:var(--pf-muted);white-space:nowrap}
.pp-center-list-panel{border-radius:13px;overflow:visible;max-height:none}
.pp-center-list-table,.pp-order-stage-table{table-layout:fixed;width:100%}
.pp-order-stage-table th{height:38px;font-size:13px;background:#f1f5fa;color:#526981}
.pp-order-stage-table td{height:50px;padding:5px 9px}
.pp-order-stage-table .pp-center-check-cell{width:55px!important;text-align:center}
.pp-order-stage-table input[type=checkbox]{width:21px;height:21px;accent-color:var(--pf-primary)}
.pp-order-stage-table .pp-center-name{min-height:39px;width:100%;padding:8px 10px;text-align:left;font-size:16px;font-weight:650;line-height:1.3;color:#235b9c;white-space:normal;overflow-wrap:anywhere}
.pp-order-stage-table tbody tr:nth-child(even){background:#f8fafd}
.pp-order-name:hover,.pp-order-name:focus-visible{text-decoration:none;background:var(--pf-primary-soft)}
.pp-planning-options{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:0 0 12px}
.pp-planning-options .pp-ready-switch{margin:0;background:#fff;border:1px solid var(--pf-line);padding:9px 11px;border-radius:10px;font-size:13px;color:#3b506c}
.pp-planning-options .pp-ready-switch input{width:41px;height:24px}
.pp-planning-options .pp-ready-switch input:before{width:18px;height:18px}
.pp-planning-options .pp-ready-switch input:checked:before{transform:translateX(17px)}
.pp-stage-action-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;border-radius:12px;padding:11px 14px;margin-top:11px;border:1px solid var(--pf-line);background:#fff}
.pp-stage-action-bar #pp-selected-count{flex:none;font-weight:700;color:#586e87}
.pp-report-actions{display:flex;align-items:center;flex:1;gap:7px;min-width:0}
.pp-report-actions .btn{min-height:39px;font-size:12.5px}
.pp-stage-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;margin-left:auto}
.pp-stage-actions .btn{min-height:41px;font-size:13px}
/* Manual stock: same rows and controls as New Order, with one page scroll. */
.pp-manual-panel{padding:14px 16px;margin-top:0}
.pp-manual-meta{font-size:12.5px;color:#66788f;margin-bottom:7px}
.pp-manual-total{margin:10px 0;padding:11px 13px;border-radius:10px;background:#eef5ff;border-color:#d8e6f8;font-size:14px}
.pp-manual-total strong{font-size:20px;color:#235a9d}
.pp-manual-quick{background:#fff!important;border:1px solid var(--pf-line)!important;border-radius:10px!important;padding:12px 14px!important;margin:12px 0!important}
.pp-manual-quick>label{font-size:13.5px!important;margin-bottom:8px!important;color:#52637b}
.pp-manual-filters{gap:9px;grid-template-columns:minmax(0,1fr) minmax(125px,210px)}
.pp-manual-actions{justify-content:flex-end;margin:7px 0 12px}
.pp-manual-reset{min-height:39px;font-size:13px!important;border-radius:9px!important}
.page-production-ready-stock .pp-manual-table-scroll,.page-production-raw-stock .pp-manual-table-scroll{max-height:none!important;height:auto!important;overflow:visible!important;border-radius:8px}
.pp-manual-table tbody tr[hidden]{display:none!important}
.pp-manual-table{table-layout:fixed}
.pp-manual-save{border-radius:12px;min-height:62px;padding:12px 15px;font-size:13px}
/* Admin forms and editing: comfortable with touch and on-screen keyboards. */
dialog{max-width:min(570px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow-y:auto;border-radius:15px}
dialog::backdrop{background:#12223e88}
.modal-head{padding:16px 19px;background:#fff;position:sticky;top:0;z-index:2}
.modal-head h2{font-size:18px}
.modal-body{padding:17px 19px}
.modal-footer{position:sticky;bottom:0;z-index:2;background:#fff;padding:13px 19px;gap:9px}
.pp-edit-lines th,.pp-edit-lines td{font-size:14px;padding:10px 8px}
.pp-edit-quantity{font-size:16px;min-height:43px}
.pp-edit-product-search-wrap>.input{height:44px}
.pp-bulk-table .pp-bulk-input{min-height:39px;height:39px;font-size:14px}
.pp-bulk-actions{gap:9px;padding:12px}
.pp-tabs button{min-height:39px}
/* Accessible motion, contrast, and keyboard behavior. */
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
@media(hover:none){.pp-dashboard-tile:hover,.erp-module:hover:not(:disabled),.stat-link:hover{transform:none}}
@media(max-width:1090px){
 .pp-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pp-stage-action-bar{align-items:stretch}
 .pp-report-actions{flex-wrap:wrap}
}
@media(max-width:680px){
 :root{font-size:14px;background:var(--pf-page)}
 body{background:var(--pf-page)}
 .content{padding:14px 12px calc(86px + env(safe-area-inset-bottom))}
 .mobile-header{height:62px;min-height:62px;gap:8px;padding:9px 12px;background:#fff;position:relative;z-index:4}
 .mobile-header .brand{min-width:0;flex:1;gap:8px}
 .mobile-header .brand-icon{width:34px;height:34px;flex:none}
 .mobile-header .brand>div:last-child{min-width:0}
 .mobile-header .brand-name{font-size:15px;font-weight:750;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.45px}
 .mobile-header .brand-caption{display:none}
 .mobile-header .btn{min-height:38px;font-size:12px;padding:7px 10px}
 .mobile-header #mobile-logout{width:38px;padding:6px}
 .mobile-nav{height:calc(64px + env(safe-area-inset-bottom));min-height:64px;gap:0;padding:0 4px env(safe-area-inset-bottom);box-shadow:0 -4px 17px #1d355212}
 .mobile-nav button{min-height:60px;flex:1 1 0;min-width:0;padding:7px 3px 6px;gap:5px;font-size:10.5px;line-height:1.1;white-space:normal;color:#78889d}
 .mobile-nav button svg{width:19px;height:19px}
 .mobile-nav button span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-nav button.active{color:#205ca6;background:#f2f7ff}
 .mobile-more-panel[hidden]{display:none!important}
 .mobile-more-panel{position:fixed;z-index:82;bottom:calc(64px + env(safe-area-inset-bottom));left:9px;right:9px;max-height:min(68dvh,520px);overflow-y:auto;background:#fff;border:1px solid #dce5ef;border-radius:14px 14px 7px 7px;padding:12px;box-shadow:0 -12px 40px #122b4f30}
 .mobile-more-title{padding:5px 8px 11px;font-weight:750;font-size:14px;color:#5d6e85}
 .mobile-more-item{display:flex;align-items:center;gap:12px;width:100%;padding:13px 12px;min-height:46px;border:0;border-radius:9px;background:#fff;text-align:left;color:#243b5b;font-size:14px;font-weight:660}
 .mobile-more-item span{flex:1}
 .mobile-more-item.active,.mobile-more-item:focus-visible{background:#edf5ff;color:#205b9c}
 .header{align-items:center;margin-bottom:13px}
 .header h1,.pp-dense-header h1{font-size:20px;letter-spacing:-.45px}
 .surface{border-radius:12px}
 .section-head{padding:12px 13px}
 .section-heading{font-size:13.5px}
 .field label,.pp-list-category-label{font-size:12px}
 .input,.select,textarea,.pp-bulk-table .pp-bulk-input,.pp-edit-quantity,.stock-table .input.qty-input,.pp-quick-qty-row .input,.pp-manual-quick-entry input,.page-production-new-order .pp-excel-table .input.pp-list-qty,.pp-manual-table .input.pp-manual-input{font-size:16px!important}
 .input,.select{min-height:43px;height:43px;padding:8px 10px}
 .btn{font-size:13px;min-height:41px}
 .btn-sm{min-height:38px;font-size:12px}
 .tabs{gap:4px}
 .tabs button{font-size:12.5px;min-height:39px}
 .table-wrap td{font-size:12.5px}
 .table-wrap th{font-size:12px}
 .stock-table td{height:46px;padding:4px 7px}
 .stock-table .input.qty-input{height:39px;min-height:39px}
 .stock-table .item-name{font-size:13px;line-height:1.3}
 .stat{padding:12px}
 .stat-value{font-size:25px}
 .stat-label{font-size:11px}
 .master-table .actions .btn,.pp-actions .btn{min-height:35px;min-width:35px}
 .master-filter-controls .input,.master-filter-controls .select{font-size:16px}
 .erp-topbar{height:63px}
 .erp-content{padding:23px 13px 95px}
 .erp-heading{margin-bottom:17px}
 .erp-heading h1{font-size:23px}
 .erp-module-grid{grid-template-columns:1fr;gap:10px}
 .erp-module{min-height:94px;padding:17px;border-radius:13px;align-items:center}
 .erp-module-body strong{font-size:17px}
 .erp-module-icon{width:46px;height:46px}
 .pp-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:2px 0 12px}
 .pp-dashboard-tile{min-height:158px;padding:14px 12px;gap:10px;border-radius:13px}
 .pp-dashboard-icon{height:37px;width:37px;border-radius:10px}
 .pp-dashboard-icon svg{width:20px;height:20px}
 .pp-dashboard-tile-content{flex-basis:auto;flex:1;min-width:0;gap:6px}
 .pp-dashboard-name{font-size:15.5px;line-height:1.32;letter-spacing:-.18px;font-weight:750}
 .pp-dashboard-sub{font-size:11.5px;line-height:1.35}
 .pp-dashboard-tile>svg:last-child{right:11px;top:19px;width:15px}
 /* Standalone order workspaces have their own bottom actions; no competing tab bar. */
 .page-production-new-order .mobile-nav,.page-production-pending-order .mobile-nav,.page-production-planning-order .mobile-nav,.page-production-completed-order .mobile-nav{display:none}
 .page-production-new-order .content{padding:12px 10px calc(99px + env(safe-area-inset-bottom))}
 .page-production-new-order .header{margin-bottom:11px}
 .page-production-new-order .header h1{font-size:20px}
 .page-production-new-order .pp-order-party-panel,.page-production-new-order .pp-order-quick-panel{padding:12px 12px;margin-bottom:10px;border-radius:11px}
 .page-production-new-order .pp-order-party-panel{flex-wrap:wrap;gap:6px}
 .page-production-new-order .pp-order-party-field{flex:1 1 100%;min-width:0}
 .page-production-new-order .pp-center-display{max-width:100%;font-size:12px;padding:0}
 .page-production-new-order .pp-order-section-title{font-size:14px;margin-bottom:9px}
 .page-production-new-order .pp-order-quick-row{gap:9px}
 .page-production-new-order .pp-order-table-top{padding:10px 11px;gap:8px}
 .page-production-new-order .pp-order-table-top strong{font-size:14px}
 .page-production-new-order .pp-list-category-label .select{min-width:94px;max-width:139px;height:37px;font-size:16px}
 .page-production-new-order .pp-excel-table th{height:36px;padding:7px 9px;font-size:13px}
 .page-production-new-order .pp-excel-table td{height:47px;min-height:47px;padding:5px 9px;font-size:14.5px;line-height:1.3}
 .page-production-new-order .pp-list-product-name{font-size:14.5px;line-height:1.3}
 .page-production-new-order .pp-excel-table .input.pp-list-qty{height:44px;min-height:44px;font-size:16px}
 .page-production-new-order .pp-order-save-bar{position:fixed;bottom:0;left:0;right:0;z-index:75;border-radius:0;padding:10px 13px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 19px #1b385a16}
 .page-production-new-order .pp-order-summary{flex-direction:column;gap:3px;font-size:12px}
 .page-production-new-order .pp-order-summary strong{font-size:14px}
 .page-production-new-order .pp-order-save-bar .btn{min-height:44px}
 .page-production-pending-order .content,.page-production-planning-order .content,.page-production-completed-order .content{padding:12px 10px calc(150px + env(safe-area-inset-bottom))}
 .pp-dense-header{gap:8px;margin-bottom:10px}
 .pp-dense-header h1{font-size:19px}
 .pp-back-dashboard{min-height:39px;min-width:39px}
 .pp-center-metric{font-size:12px}
 .pp-center-list-panel{max-height:none!important;overflow:visible!important}
 .pp-order-stage-table th{height:37px;padding:7px 8px;font-size:12.5px}
 .pp-order-stage-table td{height:49px;padding:4px 7px}
 .pp-order-stage-table .pp-center-name{font-size:16px;min-height:41px;padding:8px 9px;line-height:1.32}
 .pp-order-stage-table .pp-center-check-cell{width:48px!important}
 .pp-order-stage-table input[type=checkbox]{width:22px;height:22px}
 .pp-planning-options{gap:7px;padding-bottom:11px;justify-content:space-between}
 .pp-planning-options .pp-ready-switch{flex:1 1 auto;display:flex;align-items:center;justify-content:space-between;white-space:normal;font-size:12px;font-weight:680;padding:9px 10px;gap:8px}
 .pp-planning-options .pp-ready-switch input{flex:none}
 .pp-stage-action-bar{position:fixed;z-index:75;bottom:0;left:0;right:0;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;gap:8px;border:0;border-top:1px solid var(--pf-line);border-radius:0;margin:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 18px #20375818}
 .pp-stage-action-bar #pp-selected-count{grid-column:1;grid-row:1;font-size:12px;align-self:center}
 .pp-stage-actions{grid-column:2;grid-row:1;display:flex;justify-content:flex-end;gap:6px;margin:0;flex-wrap:nowrap}
 .pp-stage-actions .btn{font-size:12px;padding:8px 10px;min-height:42px;white-space:nowrap}
 .pp-report-actions{grid-column:1/-1;grid-row:2;display:flex;overflow-x:auto;flex-wrap:nowrap;max-width:calc(100vw - 24px);gap:7px;padding:1px 0 2px;scrollbar-width:thin;scroll-snap-type:x proximity}
 .pp-report-actions .btn{flex:none;font-size:12px;min-height:40px;scroll-snap-align:start}
 .pp-manual-panel{padding:11px 10px}
 .pp-manual-quick{padding:11px!important}
 .pp-manual-quick>label{font-size:13px!important}
 .pp-manual-total{padding:10px;font-size:13px}
 .pp-manual-total strong{font-size:19px}
 .pp-manual-filters{grid-template-columns:minmax(0,1fr) minmax(118px,37%);gap:7px}
 .pp-manual-actions{justify-content:flex-end;margin:7px 0 10px}
 .pp-manual-reset{min-height:40px;font-size:12.5px!important}
 .page-production-ready-stock .pp-manual-table-scroll,.page-production-raw-stock .pp-manual-table-scroll{max-height:none!important;overflow:visible!important}
 .page-production-ready-stock .pp-manual-table th,.page-production-raw-stock .pp-manual-table th{height:36px;padding:7px 8px;font-size:13px}
 .page-production-ready-stock .pp-manual-table td,.page-production-raw-stock .pp-manual-table td{height:47px;padding:5px 8px;font-size:14.5px}
 .page-production-ready-stock .pp-manual-table .input.pp-manual-input,.page-production-raw-stock .pp-manual-table .input.pp-manual-input{height:44px;min-height:44px;font-size:16px}
 .page-production-ready-stock .content,.page-production-raw-stock .content{padding-bottom:calc(150px + env(safe-area-inset-bottom))}
 .page-production-ready-stock .pp-manual-save,.page-production-raw-stock .pp-manual-save{position:sticky;bottom:calc(65px + env(safe-area-inset-bottom));z-index:73;padding:10px 12px;border-radius:10px;box-shadow:0 -5px 15px #20375812}
 .pp-manual-quick-entry{flex-wrap:wrap}
 .pp-manual-quick-entry input{flex:1;min-width:100px}
 .pp-manual-quick-entry .btn{min-height:43px}
 .pp-bulk-actions{padding:9px 10px}
 .pp-bulk-caption{display:none}
 .pp-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pp-bulk-table .pp-bulk-input{font-size:16px;height:40px;min-height:40px}
 .pp-bulk-table td{padding:6px 5px!important}
 .modal-head{padding:13px 14px}
 .modal-body{padding:14px}
 .modal-footer{padding:12px 14px calc(12px + env(safe-area-inset-bottom))}
 .modal-footer .btn{min-height:43px}
 .pp-edit-lines th,.pp-edit-lines td{padding:10px 7px;font-size:14px}
 .pp-edit-quantity{min-height:43px;font-size:16px}
 .auth-card{padding:27px 23px}
}
@media(max-width:345px){
 .pp-dashboard-grid{gap:8px}
 .pp-dashboard-tile{padding:11px 9px;min-height:166px}
 .pp-dashboard-name{font-size:14px}
 .mobile-header .brand-name{font-size:13px}
 .pp-stage-actions .btn{font-size:11.5px;padding:7px}
 .pp-planning-options .pp-ready-switch{font-size:11px;padding:8px}
}
/* PF ERP | Compact Pro v2
   Deliberately shared geometry across Stock + Production; 16px mobile inputs prevent focus zoom.
   A single body-scroll surface is retained for every product/order list. */
:root{
 --pf-page:#f5f7fa;--pf-line:#dce4ee;--pf-primary:#2162ad;
 --pf-primary-soft:#e9f2fd;--pf-focus:#3079cf;--pf-muted:#64758d;
 --pf-ink:#172b45;
}
body{color:var(--pf-ink);background:var(--pf-page);-webkit-tap-highlight-color:transparent}
:where(button,input,select,textarea):focus-visible{outline:2px solid var(--pf-focus);outline-offset:2px}
:where(.input,.select):focus{outline:none;border-color:#397ed3;box-shadow:0 0 0 2px #d8e9ff}
.surface{border:1px solid var(--pf-line);border-radius:9px;box-shadow:0 1px 2px #152c4505}
.btn{border-radius:7px;min-height:36px;padding:7px 11px;font-weight:680}
.btn-sm{min-height:32px}
.input,.select{height:39px;min-height:39px;border-radius:7px}
.header{align-items:center;margin-bottom:10px;gap:10px}
.header h1,.pp-dense-header h1{font-size:20px;line-height:1.25;letter-spacing:-.38px;font-weight:760}
.content{max-width:1480px;padding:18px 22px 64px}
.topbar{height:52px;padding:0 22px}
.sidebar{width:204px;padding:16px 11px;gap:13px}
.sidebar .brand{padding:2px 8px 8px}
.sidebar .brand-name{font-size:15px;letter-spacing:-.35px}
.sidebar .brand-caption{font-size:9px}
.sidebar .nav{gap:2px}
.sidebar .nav-btn{min-height:39px;padding:9px 11px;font-size:12.5px}
.sidebar .sidebar-bottom{padding-top:9px;gap:7px}
.sidebar .brand-icon{width:33px;height:33px;border-radius:8px}
.section-head{padding:10px 12px}
.toolbar,.filters{padding:9px 12px;gap:9px}
.stats{gap:9px;margin-bottom:10px}
.stat{padding:10px 12px}
.stat-icon{margin-bottom:1px}
.stat-label{font-size:11px}
.stat-value{font-size:23px;line-height:1.15}
.table-wrap th{padding:8px 9px;font-size:11.5px}
.table-wrap td{padding:7px 9px;font-size:12.5px}
.note{display:none}
.section-footer{padding:9px 12px}
.tag{padding:3px 6px}
.erp-content{max-width:1100px;padding-top:25px}
.erp-heading{margin-bottom:13px}
.erp-module-grid{gap:10px}
.erp-module{min-height:112px;padding:13px 15px;border-radius:11px}
.erp-module-body strong{font-size:16px}
.erp-module-icon{width:39px;height:39px;border-radius:9px}
/* Six production destinations: no blank vertical area inside each tile. */
.pp-dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
.pp-dashboard-tile{
 display:grid;grid-template-columns:36px minmax(0,1fr) 14px;
 align-items:center;align-content:center;min-height:79px;max-height:none;
 padding:11px 12px;gap:10px;border-radius:10px;
 box-shadow:0 1px 3px #17355409;
}
.pp-dashboard-tile:hover{transform:none;border-color:#a9c3e7;box-shadow:0 3px 12px #17355410}
.pp-dashboard-icon{width:36px;height:36px;border-radius:9px}
.pp-dashboard-icon svg{width:19px;height:19px}
.pp-dashboard-tile-content{display:flex;flex-direction:column;justify-content:center;flex:auto;min-width:0;gap:3px}
.pp-dashboard-name{font-size:14px;line-height:1.3;letter-spacing:-.1px;font-weight:720;overflow-wrap:normal}
.pp-dashboard-sub{font-size:10.5px;line-height:1.3;color:#728199}
.pp-dashboard-tile>svg:last-child{position:static;width:14px;height:14px}
/* New Order: one combined entry panel, immediately followed by product rows. */
.pp-order-entry-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:12px;padding:11px 13px;margin-bottom:8px}
.pp-order-entry-panel .pp-order-party-panel,.pp-order-entry-panel .pp-order-quick-panel{border:0;background:transparent;box-shadow:none;border-radius:0;padding:0!important;margin:0!important;min-width:0;display:flex;flex-direction:column;gap:4px}
.pp-order-entry-panel .pp-order-quick-panel{border-left:1px solid var(--pf-line);padding-left:12px!important}
.pp-order-party-field{min-width:0;max-width:none}
.pp-order-entry-panel .field{gap:3px}
.pp-order-entry-panel .field label{font-size:11px;color:#596d84}
.pp-order-entry-panel .pp-order-section-title{font-size:11px;color:#596d84;font-weight:700;margin:0}
.pp-order-entry-panel .pp-quick-search-field label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.pp-order-entry-panel .pp-center-display{font-size:11px;line-height:1.3;padding:0;min-height:14px}
.pp-order-entry-panel .input{height:39px;min-height:39px;border-radius:7px}
.pp-order-entry-panel .pp-order-quick-row{gap:5px}
.pp-order-entry-panel .pp-quick-editor{max-width:100%;flex:1}
.pp-order-entry-panel .pp-quick-qty-row{gap:6px}
.pp-order-table-panel{border-radius:8px;overflow:hidden}
.pp-order-table-top{min-height:38px;padding:5px 10px;gap:7px}
.pp-order-table-top strong{font-size:13px}
.pp-list-category-label{font-size:11px;gap:5px}
.pp-list-category-label .select{min-height:31px;height:31px;min-width:100px;padding:3px 6px;font-size:12px}
.page-production-new-order .pp-order-table-wrap{max-height:none!important;height:auto!important;overflow:visible!important}
.page-production-new-order .pp-excel-table th,.pp-manual-table th{
 height:30px;padding:5px 9px;font-size:12px;
 border:1px solid #dce4ed;background:#eef3f9;
}
.page-production-new-order .pp-excel-table td,.pp-manual-table td{
 height:39px;min-height:39px;padding:3px 9px;
 font-size:14px;line-height:1.28;border:1px solid #e2e9f2;
}
.page-production-new-order .pp-list-product-name,.pp-manual-table .pp-list-product-name{font-size:14px;line-height:1.28;font-weight:590}
.page-production-new-order .pp-excel-table .input.pp-list-qty,.pp-manual-table .input.pp-manual-input{
 min-height:38px;height:38px;font-size:16px;padding:0 4px;
}
.pp-order-save-bar{padding:8px 12px;border-radius:8px;min-height:54px}
.pp-order-summary{gap:5px 12px;font-size:12px}
.pp-order-summary strong{font-size:14px}
/* Independent order rows, solid selection area, no giant empty row padding. */
.pp-dense-header{margin-bottom:8px;gap:8px}
.pp-back-dashboard{min-width:35px;min-height:35px;width:35px;height:35px;border-radius:7px}
.pp-center-metric{font-size:11.5px}
.pp-center-list-panel{border-radius:9px;max-height:none!important;overflow:visible!important}
.pp-order-stage-table th{height:31px;padding:6px 9px;font-size:12px}
.pp-order-stage-table td{height:41px;padding:2px 7px}
.pp-order-stage-table .pp-center-check-cell{width:44px!important}
.pp-order-stage-table input[type=checkbox]{width:19px;height:19px}
.pp-order-stage-table .pp-center-name{min-height:38px;padding:7px 9px;font-size:14.5px;line-height:1.2;font-weight:660}
.pp-planning-options{justify-content:flex-start;gap:7px;padding:0 0 8px}
.pp-planning-options .pp-ready-switch{margin:0;padding:6px 9px;border-radius:8px;min-height:37px;gap:10px;font-size:12px}
.pp-planning-options .pp-ready-switch input{width:36px;height:21px}
.pp-planning-options .pp-ready-switch input:before{width:15px;height:15px}
.pp-planning-options .pp-ready-switch input:checked:before{transform:translateX(15px)}
/* Planning report buttons live in a compact popover, not a permanent extra toolbar. */
.pp-stage-action-bar{display:flex;gap:8px;align-items:center;flex-wrap:nowrap;min-height:56px;padding:8px 11px;border-radius:9px}
.pp-stage-action-bar #pp-selected-count{font-size:12px;white-space:nowrap}
.pp-stage-actions{margin-left:auto;display:flex;gap:7px;justify-content:flex-end;flex-wrap:nowrap}
.pp-stage-actions .btn{min-height:37px;font-size:12px;padding:7px 10px}
.pp-bulk-short{display:none}
.pp-reports-menu{position:relative;order:3;flex:none}
.pp-reports-menu summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:5px;min-height:37px;border:1px solid #cedbea;border-radius:7px;padding:7px 11px;background:#fff;color:#215a9e;font-size:12px;font-weight:750;white-space:nowrap;cursor:pointer}
.pp-reports-menu summary::-webkit-details-marker{display:none}
.pp-reports-menu summary:focus-visible{outline:2px solid #397ed3;outline-offset:2px}
.pp-reports-menu[open] summary{background:#edf5ff;border-color:#82aee2}
.pp-reports-menu .pp-report-actions{display:flex;position:absolute;right:0;bottom:calc(100% + 7px);width:min(295px,calc(100vw - 24px));flex-direction:column;gap:4px;padding:7px;max-height:min(65dvh,360px);overflow-y:auto;overflow-x:hidden;border:1px solid #dce4ed;border-radius:10px;background:#fff;box-shadow:0 12px 32px #122a4a27;z-index:81}
.pp-reports-menu .pp-report-actions .btn{justify-content:flex-start;width:100%;min-height:39px;font-size:12.5px;flex:none;white-space:normal;text-align:left}
/* Manual stock: one search, one category filter, immediate table. */
.pp-manual-panel{padding:9px 11px 10px}
.pp-manual-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pp-manual-total-top{display:flex;align-items:baseline;gap:8px;flex:1;background:#eef5ff;border-color:#d5e5f7;border-radius:7px;min-height:38px;margin:0;padding:6px 10px;font-size:12px;font-weight:680}
.pp-manual-total-top strong{margin-left:auto;font-size:19px;line-height:1.1}
.pp-manual-meta{font-size:11px;margin:5px 1px 7px;color:#718097}
.pp-manual-reset{min-height:37px;font-size:11.5px!important;padding:6px 9px!important;border-radius:7px!important;white-space:nowrap}
.pp-manual-search-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,145px);gap:8px;align-items:start;margin-bottom:8px}
.pp-manual-quick{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;min-width:0}
.pp-manual-quick>label,.pp-visual-label{display:block;margin:0 0 4px!important;font-size:11px!important;color:#5e7086;font-weight:730}
.pp-manual-quick .input,.pp-manual-filters .input{min-height:39px;height:39px;font-size:13px}
.pp-manual-filters{display:flex;flex-direction:column;gap:0;min-width:0}
.pp-manual-quick-entry{position:relative;z-index:5;gap:5px;margin-top:5px}
.pp-manual-quick-entry input{min-width:70px}
.pp-manual-quick-entry .btn{min-height:39px}
.pp-manual-table-scroll{overflow:visible!important;max-height:none!important}
.pp-manual-table th:first-child{width:77%}
.pp-manual-table th:last-child{width:23%}
.pp-manual-table tbody tr[hidden]{display:none!important}
.pp-manual-total-bottom{margin:7px 0 0;padding:6px 9px;border-radius:7px;font-size:12px}
.pp-manual-total-bottom strong{font-size:16px}
.pp-manual-save{min-height:50px;border:1px solid var(--pf-line);padding:8px 12px;font-size:12px}
.pp-manual-save .btn{min-height:39px}
/* Masters, stock module, reports: reclaim padding without sacrificing readability. */
.pp-toolbar{padding:8px 10px;gap:8px}
.pp-tabs{gap:4px}
.pp-tabs button{min-height:34px;padding:7px 9px;font-size:12px}
.pp-bulk-actions{padding:6px 9px;gap:6px}
.pp-bulk-table td{padding:4px 5px!important}
.pp-bulk-table th{padding:6px 7px!important}
.pp-bulk-table .pp-bulk-input{min-height:35px;height:35px}
.pp-table td{padding:6px 8px}
.pp-table th{padding:7px 8px}
.report-toolbar{padding:9px 11px;gap:8px}
.report-btns{padding:9px 11px}
.stock-table td{height:40px;padding:3px 7px}
.stock-table .input.qty-input{height:37px;min-height:37px}
.stock-main .toolbar{padding:8px 10px}
.stock-main .section-head{padding:8px 10px}
.modal-head{padding:12px 15px}
.modal-body{padding:13px 15px}
.modal-footer{padding:10px 15px}
/* Display only the actions that matter in mobile; no nested scrolling in entry sheets. */
@media(max-width:1090px){
 .pp-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pp-stage-action-bar{flex-wrap:wrap}
}
@media(max-width:680px){
 body{font-size:13.5px}
 .content{padding:9px 9px calc(66px + env(safe-area-inset-bottom));max-width:none}
 .mobile-header{height:49px;min-height:49px;padding:5px 9px;gap:6px}
 .mobile-header .brand{gap:6px;padding:0;flex:1;min-width:0}
 .mobile-header .brand-icon{width:29px;height:29px;border-radius:7px}
 .mobile-header .brand-icon svg{width:16px;height:16px}
 .mobile-header .brand-name{font-size:13.5px;font-weight:770;letter-spacing:-.25px}
 .mobile-header .brand-caption{display:none}
 .mobile-header .btn{min-height:32px;padding:5px 8px;font-size:11.5px;border-radius:7px}
 .mobile-header [data-app-return]{white-space:nowrap}
 .mobile-header .top-actions{gap:4px}
 .mobile-nav{height:54px;padding:0 3px env(safe-area-inset-bottom)}
 .mobile-nav button{min-height:50px;padding:5px 2px 4px;gap:3px;font-size:10px}
 .mobile-nav button svg{width:17px;height:17px}
 .mobile-more-panel{bottom:calc(54px + env(safe-area-inset-bottom));padding:7px}
 .mobile-more-item{min-height:43px;padding:9px 11px}
 .header{margin-bottom:7px;min-height:29px;gap:7px}
 .header h1,.pp-dense-header h1{font-size:18px;letter-spacing:-.3px}
 .header .btn{min-height:32px}
 .pp-dense-header{margin-bottom:6px;gap:7px}
 .pp-back-dashboard{min-width:30px;min-height:30px;width:30px;height:30px;border-radius:7px}
 .pp-center-metric{font-size:10.5px}
 .surface{border-radius:9px}
 .input,.select{font-size:16px!important;min-height:39px;height:39px;padding:6px 9px}
 .btn{font-size:12px;min-height:37px;padding:7px 9px}
 .btn-sm{min-height:33px}
 .table-wrap th{font-size:11.5px;padding:6px 7px}
 .table-wrap td{font-size:12.5px;padding:5px 7px}
 .stats{gap:6px;margin-bottom:8px}
 .stat{padding:8px 9px}
 .stat-icon{display:none}
 .stat-value{font-size:21px;margin-top:2px}
 .section-head{padding:8px 10px}
 .erp-topbar{height:50px}
 .erp-content{padding:15px 10px 70px}
 .erp-heading{margin-bottom:10px}
 .erp-heading h1{font-size:21px}
 .erp-module-grid{gap:7px}
 .erp-module{min-height:75px;padding:11px 12px}
 .erp-module-icon{width:38px;height:38px}
 .erp-module-body strong{font-size:15px}
 /* Dashboard stays two-column but with a horizontal icon/title composition. */
 .pp-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0}
 .pp-dashboard-tile{grid-template-columns:29px minmax(0,1fr);min-height:96px;padding:9px 8px;column-gap:7px;row-gap:4px;align-items:start;border-radius:9px}
 .pp-dashboard-icon{height:29px;width:29px;border-radius:8px;align-self:start}
 .pp-dashboard-icon svg{width:17px;height:17px}
 .pp-dashboard-tile-content{align-self:center;justify-content:center;gap:3px;min-width:0}
 .pp-dashboard-name{font-size:13px;line-height:1.27;letter-spacing:-.1px;font-weight:730;overflow-wrap:anywhere}
 .pp-dashboard-sub{font-size:10px;line-height:1.2}
 .pp-dashboard-tile>svg:last-child{display:none}
 /* No separate scrolling panels or large labels around New Order. */
 .page-production-new-order .content{padding:9px 8px calc(66px + env(safe-area-inset-bottom))}
 .page-production-new-order .header{margin-bottom:7px}
 .page-production-new-order .header h1{font-size:18px}
 .pp-order-entry-panel{display:flex;flex-direction:column;gap:7px;padding:8px 9px;margin-bottom:7px}
 .pp-order-entry-panel .pp-order-party-panel,.pp-order-entry-panel .pp-order-quick-panel{padding:0!important;margin:0!important;gap:2px;max-width:none}
 .pp-order-entry-panel .pp-order-quick-panel{padding:6px 0 0!important;border-left:0;border-top:1px solid var(--pf-line)}
 .pp-order-entry-panel .pp-order-section-title{margin:0 0 3px;font-size:11px}
 .pp-order-entry-panel .pp-center-display{font-size:10.5px}
 .pp-order-entry-panel .field label{font-size:11px}
 .pp-order-entry-panel .input{height:38px;min-height:38px;font-size:16px!important}
 .pp-order-entry-panel .pp-quick-search-field{min-width:0}
 .page-production-new-order .pp-order-table-top{min-height:35px;padding:5px 8px;gap:5px}
 .page-production-new-order .pp-order-table-top strong{font-size:12px}
 .page-production-new-order .pp-list-category-label .select{min-width:94px;max-width:142px;height:30px;min-height:30px;font-size:13px!important}
 .page-production-new-order .pp-excel-table th,.page-production-ready-stock .pp-manual-table th,.page-production-raw-stock .pp-manual-table th{height:29px;min-height:29px;padding:5px 7px;font-size:11.5px}
 .page-production-new-order .pp-excel-table td,.page-production-ready-stock .pp-manual-table td,.page-production-raw-stock .pp-manual-table td{height:39px;min-height:39px;padding:3px 8px;font-size:14px;line-height:1.2}
 .page-production-new-order .pp-list-product-name,.pp-manual-table .pp-list-product-name{font-size:14px;line-height:1.22;font-weight:580}
 .page-production-new-order .pp-excel-table .input.pp-list-qty,.page-production-ready-stock .pp-manual-table .input.pp-manual-input,.page-production-raw-stock .pp-manual-table .input.pp-manual-input{height:38px;min-height:38px;font-size:16px!important}
 .page-production-new-order .pp-order-save-bar{bottom:0;padding:6px 10px calc(6px + env(safe-area-inset-bottom));min-height:55px}
 .page-production-new-order .pp-order-save-bar .btn{min-height:40px}
 .page-production-new-order .pp-order-summary{font-size:11.5px;gap:2px}
 .page-production-new-order .pp-order-summary strong{font-size:13px}
 /* Planning: one slim action row, not a two-row fixed footer. */
 .page-production-pending-order .content,.page-production-planning-order .content,.page-production-completed-order .content{padding:9px 8px calc(68px + env(safe-area-inset-bottom))}
 .pp-planning-options{padding-bottom:6px;gap:6px;flex-wrap:nowrap}
 .pp-planning-options .pp-ready-switch{min-height:35px;flex:1 1 0;padding:5px 8px;font-size:11px;line-height:1.15;gap:5px;white-space:normal}
 .pp-planning-options .pp-ready-switch input{width:35px;height:20px;flex:none}
 .pp-planning-options .pp-ready-switch input:before{width:14px;height:14px}
 .pp-planning-options .pp-ready-switch input:checked:before{transform:translateX(15px)}
 .pp-order-stage-table th{height:30px;padding:5px 6px;font-size:11.5px}
 .pp-order-stage-table td{height:41px;padding:2px 6px}
 .pp-order-stage-table .pp-center-check-cell{width:40px!important}
 .pp-order-stage-table input[type=checkbox]{width:19px;height:19px}
 .pp-order-stage-table .pp-center-name{min-height:37px;font-size:14px;line-height:1.2;padding:6px 8px}
 .pp-stage-action-bar{position:fixed;z-index:75;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:6px;min-height:56px;margin:0;padding:7px 9px calc(7px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--pf-line);border-radius:0;box-shadow:0 -4px 13px #15334d10}
 .pp-stage-action-bar #pp-selected-count{font-size:11px;min-width:0;flex:none}
 .pp-stage-actions{display:flex;grid-row:auto;grid-column:auto;gap:4px;margin:0;order:2;flex:none}
 .pp-stage-actions .btn{min-height:36px;padding:7px 8px;font-size:11.5px}
 .pp-bulk-full{display:none}
 .pp-bulk-short{display:inline}
 .pp-reports-menu{grid-row:auto;grid-column:auto;order:3;min-width:0;flex:none}
 .pp-reports-menu summary{min-height:36px;padding:6px 7px;font-size:11.5px}
 .pp-reports-menu .pp-report-actions{position:absolute;right:0;bottom:calc(100% + 10px);width:min(290px,calc(100vw - 16px));max-width:none;overflow-y:auto;overflow-x:hidden;flex-direction:column;gap:5px;padding:7px;scroll-snap-type:none}
 .pp-reports-menu .pp-report-actions .btn{min-height:39px;font-size:12px}
 /* Stock: no duplicate filter field, no double cards, no bottom navigation collision. */
 .page-production-ready-stock .mobile-nav,.page-production-raw-stock .mobile-nav{display:none}
 .page-production-ready-stock .content,.page-production-raw-stock .content{padding:9px 8px calc(62px + env(safe-area-inset-bottom))}
 .pp-manual-panel{padding:8px 8px 10px}
 .pp-manual-heading{gap:6px}
 .pp-manual-total-top{min-height:36px;margin:0;padding:5px 9px;font-size:12px;border-radius:7px}
 .pp-manual-total-top strong{font-size:18px}
 .pp-manual-meta{margin:4px 1px 6px;font-size:10.5px;line-height:1.3}
 .pp-manual-reset{min-height:36px;padding:5px 7px!important;font-size:11px!important}
 .pp-manual-search-row{grid-template-columns:minmax(0,1fr) minmax(93px,33%);gap:6px;margin-bottom:7px}
 .pp-manual-quick{padding:0!important;margin:0!important}
 .pp-manual-quick>label,.pp-visual-label{font-size:10.5px!important;margin-bottom:3px!important}
 .pp-manual-quick .input,.pp-manual-filters .input{height:38px;min-height:38px;font-size:16px!important;padding:6px 7px}
 .pp-manual-quick-entry{flex-wrap:wrap;gap:5px}
 .pp-manual-quick-entry input{min-width:100px}
 .page-production-ready-stock .pp-manual-table-scroll,.page-production-raw-stock .pp-manual-table-scroll{max-height:none!important;height:auto!important;overflow:visible!important}
 .page-production-ready-stock .pp-manual-save,.page-production-raw-stock .pp-manual-save{position:fixed;left:0;right:0;bottom:0;z-index:75;min-height:54px;margin:0;padding:7px 11px calc(7px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--pf-line);border-radius:0;box-shadow:0 -4px 14px #1a385011}
 .page-production-ready-stock .pp-manual-save .btn,.page-production-raw-stock .pp-manual-save .btn{min-height:38px}
 .pp-manual-total-bottom{margin-top:5px}
 /* Same density for all other areas. */
 .stock-main .toolbar{gap:7px;padding:7px 9px}
 .stock-main .section-head{padding:7px 9px}
 .stock-table td{height:39px;padding:3px 6px}
 .stock-table .input.qty-input{min-height:36px;height:36px;font-size:16px!important}
 .mobile-save{padding:7px 10px}
 .report-toolbar{gap:6px;padding:7px}
 .report-toolbar .field label{font-size:10.5px}
 .report-btns{padding:7px;gap:6px}
 .pp-toolbar{padding:6px;gap:6px}
 .pp-tabs button{padding:6px 7px;min-height:32px;font-size:11.5px}
 .pp-bulk-actions{padding:6px;gap:5px}
 .pp-bulk-table .pp-bulk-input{min-height:35px;height:35px;font-size:16px!important}
 .pp-table td,.pp-table th{padding:5px 5px}
 .modal-head{padding:10px 12px}
 .modal-body{padding:11px 12px}
 .modal-footer{padding:9px 12px calc(9px + env(safe-area-inset-bottom))}
 .pp-edit-lines td,.pp-edit-lines th{padding:7px 5px}
 .pp-edit-quantity{min-height:39px;font-size:16px}
}
@media(max-width:355px){
 .pp-dashboard-tile{min-height:102px;padding:8px 6px;grid-template-columns:26px minmax(0,1fr);column-gap:5px}
 .pp-dashboard-icon{width:26px;height:26px}
 .pp-dashboard-name{font-size:12.5px}
 .pp-stage-action-bar{gap:4px;padding-left:6px;padding-right:6px}
 .pp-stage-actions .btn{padding:6px 5px;font-size:10.5px}
 .pp-reports-menu summary{padding:6px 5px;font-size:10.5px}
}
/* Prevent historical flex-basis declarations from stretching search fields vertically. */
.pp-order-entry-panel .pp-order-party-field,
.pp-order-entry-panel .pp-quick-search-field{
 flex:none!important;flex-basis:auto!important;max-width:none!important;
 width:100%;min-height:0;
}
.pp-order-entry-panel .pp-order-party-panel,
.pp-order-entry-panel .pp-order-quick-panel{align-items:stretch;justify-content:flex-start}
.pp-order-entry-panel .pp-order-quick-row{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}
.pp-order-entry-panel .pp-quick-editor{flex:none!important;width:100%}
@media(max-width:680px){
 .page-production-new-order .pp-order-party-field{flex:none!important;width:100%;max-width:none!important;min-width:0}
 .pp-order-entry-panel .pp-order-quick-row{gap:4px}
}
/* Final vertical rhythm: keep fast-entry fields in reach without multiple header blocks. */
@media(max-width:680px){
 .pp-order-entry-panel{padding:6px 8px;gap:4px}
 .pp-order-entry-panel .pp-order-section-title{display:none}
 .pp-order-entry-panel .pp-order-quick-panel{padding-top:4px!important}
 .pp-order-entry-panel .pp-center-display:empty{display:none}
 .pp-order-entry-panel .pp-center-display{min-height:0}
 .pp-order-entry-panel .field label{font-size:10.5px}
 .pp-order-entry-panel .pp-order-quick-row{gap:0}
 .page-production-new-order .pp-excel-table td,
 .page-production-ready-stock .pp-manual-table td,
 .page-production-raw-stock .pp-manual-table td{height:38px;min-height:38px}
 .page-production-new-order .pp-excel-table .input.pp-list-qty,
 .page-production-ready-stock .pp-manual-table .input.pp-manual-input,
 .page-production-raw-stock .pp-manual-table .input.pp-manual-input{height:37px;min-height:37px}
}
/* The persistent Dashboard action in the app header already provides this route. */
.pp-dense-header .pp-back-dashboard{display:none}
/* Keep column labels visible during long, continuous page scrolling. */
.page-production-new-order .pp-excel-table thead th,
.page-production-ready-stock .pp-manual-table thead th,
.page-production-raw-stock .pp-manual-table thead th{position:sticky;top:0;z-index:6;background:#eef3f9}

/* Today's Planning: all five actions remain visible (2 workflow + 3 reports). */
.pp-stage-action-bar.pp-planning-five-actions{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:9px;padding:9px 12px;min-height:60px;
}
.pp-planning-action-status{flex:0 0 auto;white-space:nowrap;font-size:12px;font-weight:750;color:#536881}
.pp-planning-move-actions,.pp-planning-report-actions{display:flex;align-items:stretch;gap:7px;min-width:0}
.pp-planning-five-actions .btn{min-height:39px;padding:8px 12px;font-size:12px;white-space:normal;line-height:1.15;text-align:center}
.pp-planning-report-actions .btn{background:#f7faff;border-color:#cbd9e9;color:#235b9d}
.pp-planning-report-actions .btn:hover:not(:disabled){background:#eaf2ff;border-color:#91b5e4}
@media(max-width:960px) and (min-width:681px){
  .pp-stage-action-bar.pp-planning-five-actions{justify-content:flex-start;gap:8px}
}
@media(max-width:680px){
 .page-production-planning-order .content{padding-bottom:calc(155px + env(safe-area-inset-bottom))!important}
 .pp-stage-action-bar.pp-planning-five-actions{
   position:fixed;bottom:0;left:0;right:0;z-index:75;
   display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;
   gap:5px;min-height:0;padding:6px 9px calc(8px + env(safe-area-inset-bottom));
   margin:0;border:0;border-top:1px solid #dce5ee;border-radius:0;
   background:#fff;box-shadow:0 -5px 16px #15334d14;
   align-items:stretch;justify-content:stretch;
 }
 .pp-planning-five-actions .pp-planning-action-status{min-width:0;line-height:15px;font-size:11px}
 .pp-planning-five-actions .pp-planning-move-actions{
   display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-width:0;
 }
 .pp-planning-five-actions .pp-planning-report-actions{
   display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-width:0;
 }
 .pp-planning-five-actions .btn{
   width:100%;min-width:0;min-height:40px;max-width:none;
   padding:6px 5px;font-size:12px;font-weight:750;line-height:1.14;
   white-space:normal;overflow-wrap:normal;hyphens:none;
 }
 .pp-planning-five-actions .pp-planning-report-actions .btn{min-height:43px}
}
@media(max-width:355px){
 .pp-planning-five-actions .btn{font-size:11px;padding:5px 2px}
 .pp-planning-five-actions .pp-planning-report-actions{gap:4px}
 .pp-planning-five-actions .pp-planning-move-actions{gap:5px}
}

/* Stock categories, closing quantities and ERP access */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.stock-tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:10px;align-items:stretch}
.stock-category-tile{min-width:0;overflow:hidden}
.stock-tile-main,.stock-alert-tile{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;text-align:left;color:#17233b;cursor:pointer}
.stock-tile-main{padding:10px 12px;border:0;background:transparent}
.stock-tile-main:hover{background:#f5f8ff}
.stock-tile-main:focus-visible{outline-offset:-3px}
.stock-tile-main>svg,.stock-alert-tile>svg{color:#61738c}
.stock-tile-text strong,.stock-alert-tile strong{display:block;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.stock-tile-text small,.stock-alert-tile small{display:block;margin-top:2px;font-size:11px;color:#52637b}
.stock-tile-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#edf3fe;color:#2456a0}
.stock-tile-stamp{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:4px 11px 6px;border-top:1px solid #e7edf5;min-height:41px;background:#fbfcff;font-size:11px;color:#52637b}
.stock-tile-stamp>span{min-width:0;overflow-wrap:anywhere}
.stock-tile-stamp small{display:block;margin-top:1px;font-size:10.5px}
.stock-tile-stamp .btn{min-height:34px;flex:none;padding-inline:8px;white-space:nowrap}
.stock-alert-tile{padding:11px 12px;border-color:#f2ced3;background:#fff7f8}
.stock-alert-tile:hover{background:#fff0f1}
.stock-alert-tile .stock-tile-icon{color:#ac2539;background:#ffe6e9}
.stock-entry-toolbar{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:8px 10px;border-bottom:1px solid #e4ebf5}
.stock-entry-toolbar .input{width:min(100%,340px);min-width:0}
.stock-entry-toolbar .tag{flex:none}
.stock-entry-panel table .qty-input{width:clamp(70px,18vw,130px)}
.stock-entry-panel .stock-table th:nth-child(2){width:clamp(85px,23vw,156px);white-space:nowrap}
.stock-entry-panel .stock-table th:nth-child(3){width:calc(clamp(70px,18vw,130px) + 18px);white-space:nowrap}
.stock-entry-panel .stock-table td:nth-child(2){overflow-wrap:anywhere}
.stock-entry-panel .stock-table td:first-child{overflow-wrap:anywhere}
.stock-entry-panel .table-wrap{max-height:none}
.stock-entry-actions{position:sticky;bottom:0;z-index:2;background:#f8fbff;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-top:1px solid #e4ebf5}
.stock-report-header{gap:8px;align-items:flex-start}
.stock-report-category{margin-top:2px;color:#52637b;font-size:12px;font-weight:650;overflow-wrap:anywhere}
.stock-report-tools{display:flex;align-items:center;gap:6px;flex:none}
.stock-report-tools input{width:155px;min-width:0}
.stock-monthly-panel{min-width:0;overflow:hidden}
.stock-monthly-scroll{overflow-x:auto;overscroll-behavior-inline:contain}
.stock-monthly-scroll:focus-visible{outline-offset:-2px}
.stock-monthly-scroll .stock-monthly-table{min-width:100%;max-width:none;width:max-content;border-collapse:separate;border-spacing:0}
.stock-monthly-scroll .stock-monthly-table th,.stock-monthly-scroll .stock-monthly-table td{padding:7px 8px;border:0;border-bottom:1px solid #e4ebf5;border-right:1px solid #edf1f7;text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap;min-width:38px}
.stock-monthly-scroll thead th{background:#eaf1fc;color:#23477c}
.stock-monthly-scroll .stock-monthly-table th:first-child{position:sticky;left:0;z-index:1;text-align:left;width:150px;max-width:150px;min-width:150px;white-space:normal;overflow-wrap:anywhere;border-right:1px solid #cfdaec}
.stock-monthly-scroll tbody th{background:#f7faff;color:#17233b}
.stock-monthly-scroll tbody th small{display:block;font-weight:400;color:#5d708c}
.stock-monthly-scroll tbody tr:nth-child(even) td{background:#f7faff}
.stock-missing{color:#7789a1}
.users-list{display:grid;gap:7px}
.erp-user-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:8px 11px}
.erp-user-row strong,.erp-user-row small{display:block;overflow-wrap:anywhere}
.erp-user-row small{color:#52637b;margin-top:1px}
.erp-user-identity{display:flex;align-items:center;gap:9px;min-width:0}
.erp-user-identity>div{min-width:0}
.erp-user-identity .avatar{flex:none}
#edit-dialog:has(#user-form){width:min(670px,calc(100vw - 16px));max-width:none}
#user-form .modal-footer{position:sticky;bottom:0;background:#fff;z-index:2}
#user-access-fieldset.user-permissions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:7px;min-width:0}
.user-access-group{border:1px solid #dce5f2;border-radius:8px;background:#fff;min-width:0}
.user-access-module,.user-tile-panel .module-perm{display:flex;align-items:center;gap:7px;min-height:34px;padding:4px 8px;min-width:0;cursor:pointer;line-height:1.2;overflow-wrap:anywhere}
.user-access-module input,.user-tile-panel input{flex:none;accent-color:#2355a4}
.user-access-module .tag,.user-tile-kind{margin-left:auto;flex:none}
.user-tile-panel{border-top:1px solid #e4ebf5}
.user-tile-list .module-perm{border-top:1px solid #edf2f8;background:#f8fbff}
.user-tile-kind{font-size:10px;color:#52637b}
.user-tile-tools{display:flex;gap:5px;padding:3px 7px 5px}
.user-tile-tools .btn{font-size:11px;padding:4px 7px;min-height:29px}
.user-admin-note{padding:8px 10px;background:#eef5ff;color:#23477c;border-radius:7px}
@media(max-width:680px){
 .stock-tile-grid{grid-template-columns:1fr;gap:7px}
 .stock-tile-main,.stock-alert-tile{padding:7px 9px;min-height:47px}
 .stock-tile-stamp{padding:2px 8px;min-height:37px}
 .stock-tile-stamp .btn{min-height:32px}
 .stock-entry-actions{bottom:calc(54px + env(safe-area-inset-bottom,0px))}
 .stock-report-header{display:flex;flex-wrap:nowrap}
 .stock-report-header h1{font-size:18px}
 .stock-report-tools{gap:4px}
 .stock-report-tools input{width:118px;font-size:12px;padding-inline:4px}
 .stock-report-tools .btn{padding-inline:5px;white-space:nowrap}
 .stock-monthly-scroll .stock-monthly-table th:first-child{width:110px;min-width:110px;max-width:110px}
 .erp-user-row{grid-template-columns:minmax(0,1fr) auto auto;gap:3px 6px;padding:7px}
 .erp-user-identity{grid-column:1;grid-row:1}
 .erp-user-access{grid-column:1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding-left:3px;font-size:11px}
 .erp-user-row>.tag,.erp-user-row>button{grid-row:1 / 3}
 #user-access-fieldset.user-permissions{grid-template-columns:1fr}
}
@media(max-width:360px){
 .page-users #erp-logout span{display:none}
 .stock-report-header h1{font-size:16px}
}

/* Activity timestamps and search keyboard selection */
.stock-category-tile .stock-tile-stamp{min-height:29px;display:block;padding:6px 10px}
.stock-tile-stamp time{white-space:normal}
.pp-order-audit{display:flex;justify-content:center;flex-wrap:wrap;gap:2px 13px;padding:0 4px 5px;color:#52637b;font-size:11px;line-height:1.38}
.pp-order-audit-entry{min-width:0;overflow-wrap:anywhere}
.pp-order-audit-entry strong{color:#314761;font-weight:650}
.pp-order-audit-entry time{white-space:nowrap}
.pp-center-details .pp-order-audit{justify-content:flex-start;padding:4px 0 8px}
.pp-option[aria-selected="true"],.pp-edit-suggestion[aria-selected="true"]{background:#e9f2ff;box-shadow:inset 3px 0 #2456a0}
/* One line per order, driven by the actual space available to the list. */
.pp-center-list-panel{container-type:inline-size;container-name:pp-orders}
.pp-order-stage-table .pp-center-check-cell{width:44px!important;padding:0}
.pp-order-stage-table input[type=checkbox]{margin:0;vertical-align:middle}
.pp-order-stage-table tr.pp-order-row td{height:44px}
.pp-order-stage-table td.pp-center-name-cell{padding:0 4px 0 0}
.pp-order-stage-table .pp-center-name.pp-order-name{
 display:flex;align-items:center;justify-content:space-between;gap:7px;min-height:44px;
 padding:0 6px;text-align:left;white-space:nowrap;overflow:hidden;cursor:pointer
}
.pp-order-stage-table .pp-order-name:focus-visible{outline:2px solid #235b9c;outline-offset:-2px;border-radius:5px}
.pp-row-heading{display:flex;justify-content:space-between;gap:7px;text-align:left;padding-right:2px}
.pp-order-stage-table th:has(.pp-row-heading){padding-inline:6px 8px}
.pp-row-identity{display:flex;align-items:baseline;gap:3px;min-width:0;flex:1}
.pp-row-center,.pp-row-qty,.pp-row-actor{min-width:0;overflow:hidden;text-overflow:ellipsis}
.pp-row-qty{color:#52637b;font-size:11px;font-weight:600;max-width:43%;flex:0 0 auto;font-variant-numeric:tabular-nums}
.pp-row-activity{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;max-width:66%;color:#52637b;font-size:11px;font-weight:500;font-variant-numeric:tabular-nums}
.pp-row-event{display:flex;align-items:baseline;gap:3px;min-width:0;overflow:hidden}
.pp-row-event time{flex:none}
.pp-row-action{font-weight:650;color:#314761;flex:none}
.pp-row-activity-full,.pp-row-activity-latest .pp-row-actor{display:none}
@container pp-orders (min-width:430px){
 .pp-row-activity-latest .pp-row-actor{display:block}
}
@container pp-orders (min-width:660px){
 .pp-row-activity-latest{display:none}
 .pp-row-activity-full{display:flex}
 .pp-order-stage-table .pp-center-name.pp-order-name{padding:0 9px}
 .pp-row-activity{font-size:12px}
 .pp-row-heading{padding-left:3px}
}

/* ERP Home administrative backup action */
.erp-backup-form{margin:0;min-width:0}
.erp-backup-form .erp-module{width:100%;height:100%}
.erp-backup-form .erp-module-body strong{overflow-wrap:anywhere}

/* Keep mobile content below notches/system status bars rather than drawing
   into the translucent upper edge of standalone mobile browsers. */
@media(max-width:680px){
 html,body{background:#fff}
 body{padding-top:env(safe-area-inset-top,0px)}
}


/* Loading Form master additions: packet quantity and searchable Party Rates. */
.pp-party-rates-body{display:grid;gap:12px;padding:15px 18px;max-height:min(67dvh,660px);overflow-y:auto;overscroll-behavior:contain}
.pp-party-rate-info{display:grid;gap:5px;padding:12px;border:1px solid #dce7f0;border-radius:10px;background:#f2f7fc}
.pp-party-rate-info strong{font-size:14px;color:#163b5a;overflow-wrap:anywhere}
.pp-party-rate-info span,.pp-party-rate-help{font-size:12px;color:#526e85;line-height:1.4}
.pp-party-rate-info span{display:block}
.pp-party-rate-help{margin:0 0 9px}
.pp-party-rate-section{min-width:0;display:grid;gap:9px}
.pp-party-rate-section[hidden],.pp-party-rate-row[hidden]{display:none!important}
.pp-party-rate-section .field{margin:0}
.pp-party-rate-rows{display:grid;gap:5px;max-height:42dvh;overflow-y:auto;overflow-x:hidden;padding:2px;overscroll-behavior:contain}
.pp-party-rate-row{display:grid;grid-template-columns:minmax(0,1fr) 120px;align-items:center;gap:12px;min-height:47px;padding:7px 11px;border:1px solid #dfebf2;border-radius:9px;background:#f9fbfe}
.pp-party-rate-row>span{display:grid;gap:3px;min-width:0}
.pp-party-rate-row strong{font-size:12px;font-weight:800;color:#25415d;overflow-wrap:anywhere}
.pp-party-rate-row small{font-size:10px;font-weight:600;color:#71879a}
.pp-party-rate-row input{width:100%;min-width:0;min-height:38px;text-align:right;font-size:15px;font-variant-numeric:tabular-nums}
.pp-rates-action{font-weight:800!important;color:#165c87!important;background:#edf7ff!important;border-color:#afd4ed!important;white-space:nowrap}
.pp-party-product-rows{max-height:44dvh}
.pp-items:not(.pp-bulk-table){table-layout:auto}
.pp-bulk-table.pp-items{min-width:920px}
.pp-items th:nth-child(1){width:28%}
.pp-items th:nth-child(4),.pp-items th:nth-child(5){width:12%}
@media(max-width:680px){
 .pp-party-rates-body{max-height:calc(80dvh - 118px);padding:11px 12px}
 .pp-party-rate-row{grid-template-columns:minmax(0,1fr) 102px;gap:7px;padding:7px}
 .pp-party-rate-rows{max-height:37dvh}
 .pp-items:not(.pp-bulk-table) th:nth-child(3),.pp-items:not(.pp-bulk-table) td:nth-child(3){display:none!important}
 .pp-items:not(.pp-bulk-table) th:nth-child(4),.pp-items:not(.pp-bulk-table) td:nth-child(4){display:table-cell!important;width:25%}
 .pp-items:not(.pp-bulk-table) th:nth-child(6),.pp-items:not(.pp-bulk-table) td:nth-child(6){display:none!important}
 .pp-bulk-table.pp-items th,.pp-bulk-table.pp-items td{display:table-cell!important}
 .pp-mobile-actions .pp-actions{flex-wrap:wrap}
 .pp-rates-action{font-size:11px!important;padding:5px 8px!important}
}

/* Consistent Apple system typography and iPhone Settings-size switches. */
html,body,button,input,select,textarea{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif}
.pp-ready-switch input,.pp-planning-options .pp-ready-switch input{appearance:none!important;-webkit-appearance:none!important;width:51px!important;height:31px!important;border:0!important;border-radius:999px!important;background:#e9e9eb!important;position:relative!important;flex:none!important}
.pp-ready-switch input:checked,.pp-planning-options .pp-ready-switch input:checked{background:#34c759!important}
.pp-ready-switch input:before,.pp-planning-options .pp-ready-switch input:before{content:""!important;position:absolute!important;left:2px!important;top:2px!important;width:27px!important;height:27px!important;border-radius:50%!important;background:white!important;box-shadow:0 1px 3px #0003!important;transition:transform .15s!important}
.pp-ready-switch input:checked:before,.pp-planning-options .pp-ready-switch input:checked:before{transform:translateX(20px)!important}

/* PDF generation: visible, centered progress dialog (CSP-safe classes). */
.pf-pdf-loading-overlay{position:fixed!important;inset:0!important;z-index:2147483647!important;background:rgba(12,23,40,.68)!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:20px!important;box-sizing:border-box!important}
.pf-pdf-loading-card{box-sizing:border-box;width:min(100%,440px);padding:36px 24px 32px;background:#fff;border-radius:24px;box-shadow:0 24px 70px rgba(0,0,0,.32);text-align:center;font-family:-apple-system,BlinkMacSystemFont,Arial,sans-serif;color:#18283e}
.pf-pdf-loading-icon{font-size:46px;line-height:1;margin-bottom:18px}
.pf-pdf-loading-heading{font-size:26px;font-weight:800;line-height:1.25;margin-bottom:14px}
.pf-pdf-loading-number{font-size:40px;font-weight:800;color:#1769c2;line-height:1.2;margin-bottom:18px}
.pf-pdf-loading-track{height:18px;background:#e6edf5;border-radius:99px;overflow:hidden}
.pf-pdf-loading-bar{height:100%;width:30%;border-radius:99px;background:#1776d2;animation:pf-pdf-pulse 1.4s ease-in-out infinite alternate}
.pf-pdf-loading-bar.pf-pdf-loading-determinate{animation:none}
.pf-pdf-loading-caption{font-size:16px;color:#52647b;line-height:1.5;margin-top:20px}
@keyframes pf-pdf-pulse{from{width:12%}to{width:90%}}

.pf-pdf-loading-cancel{margin-top:22px;padding:12px 26px;border:1px solid #c8d4e2;border-radius:12px;background:#f4f7fa;color:#243950;font-size:17px;font-weight:700;cursor:pointer;min-height:48px}

/* Shared WhatsApp-inspired temporary notification across all ERP modules. */
#toast.toast{position:fixed!important;left:50%!important;right:auto!important;bottom:calc(26px + env(safe-area-inset-bottom,0px))!important;top:auto!important;transform:translate(-50%,16px)!important;width:max-content!important;max-width:min(92vw,680px)!important;min-width:0!important;box-sizing:border-box!important;border-radius:999px!important;padding:17px 26px!important;background:#242424!important;color:#fff!important;font-size:16px!important;font-weight:650!important;line-height:1.4!important;text-align:center!important;box-shadow:0 12px 32px #0004!important;z-index:2147483600!important;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease!important;overflow-wrap:anywhere}
#toast.toast.visible,#toast.toast.show{opacity:1!important;transform:translate(-50%,0)!important}
#toast.toast.error{background:#242424!important;color:#fff!important}
@media(max-width:480px){#toast.toast{font-size:15px!important;padding:15px 22px!important}}

/* iOS-inspired action dialogs, excluding Loading Supervisor. */
body:not(.page-production-loading) #edit-dialog,
body:not(.page-production-loading) dialog:not(.loading-dialog):not(.loading-success-dialog):not(.pf-pdf-preview){
 border:0;border-radius:24px;background:#fff;color:#111;box-shadow:0 24px 75px #0005;overflow:hidden;
}
body:not(.page-production-loading) dialog:not(.pf-pdf-preview)::backdrop{background:rgba(0,0,0,.72)}
body:not(.page-production-loading) #edit-dialog .modal-head{justify-content:center;text-align:center;border:0;padding:23px 20px 8px}
body:not(.page-production-loading) #edit-dialog .modal-head h2,
body:not(.page-production-loading) #edit-dialog .modal-head h3{font-size:22px;font-weight:750;color:#111}
body:not(.page-production-loading) #edit-dialog .modal-body{padding:14px 22px 22px;color:#252525}
body:not(.page-production-loading) #edit-dialog .modal-footer{display:flex;gap:0;padding:0;border-top:1px solid #d5d5d5;background:#fff}
body:not(.page-production-loading) #edit-dialog .modal-footer button{flex:1;min-width:0;border:0;border-radius:0;box-shadow:none;background:#fff;color:#1685ed;font-size:17px;font-weight:600;min-height:56px}
body:not(.page-production-loading) #edit-dialog .modal-footer button+button{border-left:1px solid #d5d5d5}
body:not(.page-production-loading) #edit-dialog .modal-footer button:first-child:not(:last-child){color:#f04438}

/* iOS-inspired action confirmation (not used in Loading Supervisor). */
dialog.pf-action-dialog{position:fixed;inset:0;margin:auto;width:min(88vw,390px);max-width:390px;max-height:85dvh;box-sizing:border-box;padding:0;border:0;border-radius:24px;background:#fff;color:#111;box-shadow:0 24px 65px #0005;text-align:center;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;overflow:hidden}
dialog.pf-action-dialog::backdrop{background:rgba(0,0,0,.68)}
.pf-action-heading{font-size:24px;font-weight:750;padding:28px 24px 10px}
.pf-action-message{font-size:16px;line-height:1.5;padding:8px 24px 28px;overflow-wrap:anywhere;max-height:48dvh;overflow:auto}
.pf-action-buttons{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #d1d1d6}
.pf-action-buttons button{min-height:66px;background:#fff;border:0;font:500 21px -apple-system,BlinkMacSystemFont,Arial,sans-serif;cursor:pointer}
.pf-action-cancel{color:#e14a3b;border-right:1px solid #d1d1d6!important}
.pf-action-ok{color:#1682e6}

/* Compact iPhone alert proportions; override generic dialog and button styling. */
dialog.pf-action-dialog{width:min(86vw,330px)!important;max-width:330px!important;min-width:0!important;border-radius:17px!important;box-shadow:0 12px 35px #0003!important;background:#fff!important;padding:0!important;text-align:center!important;overflow:hidden!important}
dialog.pf-action-dialog .pf-action-heading{font-size:19px!important;line-height:1.25!important;font-weight:650!important;padding:20px 18px 0!important;margin:0!important}
dialog.pf-action-dialog .pf-action-message{font-size:14px!important;line-height:1.4!important;font-weight:400!important;padding:12px 19px 22px!important;margin:0!important;max-height:45dvh!important;overflow:auto!important}
dialog.pf-action-dialog .pf-action-buttons{display:grid!important;grid-template-columns:1fr 1fr!important;border-top:1px solid #d1d1d6!important;margin:0!important;padding:0!important}
dialog.pf-action-dialog .pf-action-buttons button{height:48px!important;min-height:48px!important;max-height:48px!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:0!important;background:#fff!important;font-size:17px!important;font-weight:400!important;line-height:48px!important}
dialog.pf-action-dialog .pf-action-cancel{color:#e34b43!important;border-right:1px solid #d1d1d6!important}
dialog.pf-action-dialog .pf-action-ok{color:#1683e9!important}
dialog.pf-action-dialog::backdrop{background:rgba(0,0,0,.62)!important}

/* Native dialog auto-focus must not draw a blue outline across Cancel. */
dialog.pf-action-dialog .pf-action-buttons button:focus,
dialog.pf-action-dialog .pf-action-buttons button:focus-visible,
dialog.pf-action-dialog:focus,
dialog.pf-action-dialog:focus-visible{outline:none!important;outline-offset:0!important;box-shadow:none!important}



/* iPhone Safari: render mobile header at native pixel resolution. */
@media(max-width:700px){
 .mobile-header,.mobile-header .brand,.mobile-header .brand-name,.mobile-header .brand-icon,.mobile-header .btn,.mobile-header svg{
  filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  text-shadow:none!important;transform:none!important;
 }
 .mobile-header{isolation:isolate;-webkit-font-smoothing:antialiased;background:#fff!important}
 .mobile-header .brand-name{font-weight:700!important;letter-spacing:0!important;-webkit-font-smoothing:antialiased}
 .mobile-header svg{shape-rendering:geometricPrecision}
}

/* iPhone standalone app: keep header content below the top system overlay. */
@media(max-width:700px){
 @supports(padding-top:env(safe-area-inset-top)){
  .mobile-header{
   padding-top:calc(12px + env(safe-area-inset-top,0px))!important;
   height:calc(61px + env(safe-area-inset-top,0px))!important;
   min-height:calc(61px + env(safe-area-inset-top,0px))!important;
   align-items:flex-end!important;
   padding-bottom:10px!important;
  }
 }
}

/* More iPhone top clearance and left-side Dashboard/ERP navigation. */
@media(max-width:700px){
 .mobile-header{
  padding-top:calc(26px + env(safe-area-inset-top,0px))!important;
  height:calc(78px + env(safe-area-inset-top,0px))!important;
  min-height:calc(78px + env(safe-area-inset-top,0px))!important;
  align-items:flex-end!important;
  padding-bottom:12px!important;
 }
 .mobile-header [data-app-return]{order:0;flex:none!important;margin-right:4px}
 .mobile-header .brand{order:1;flex:1!important;min-width:0!important;margin-right:auto!important}
 .mobile-header #mobile-logout{order:2;flex:none!important}
}

/* Balanced mobile app header: wide ERP control, centered brand, refined logout. */
@media(max-width:700px){
 .mobile-header{position:relative!important;display:flex!important;justify-content:space-between!important;gap:5px!important;padding-left:12px!important;padding-right:12px!important}
 .mobile-header [data-app-return]{
  position:relative!important;z-index:2!important;order:0!important;
  min-width:76px!important;min-height:38px!important;padding:8px 12px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  border:1px solid #d4dfed!important;border-radius:11px!important;
  background:#f4f7fc!important;color:#24529a!important;font-size:12px!important;font-weight:750!important;
  margin-right:0!important;box-shadow:0 1px 3px #1b33500d!important;
 }
 .mobile-header .brand{
  position:absolute!important;left:50%!important;bottom:12px!important;transform:translateX(-50%)!important;
  width:auto!important;max-width:calc(100% - 166px)!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:5px!important;flex:none!important;margin:0!important;padding:0!important;
  text-align:center!important;z-index:1!important;
 }
 .mobile-header .brand-icon{flex:none!important;width:27px!important;height:27px!important}
 .mobile-header .brand-name{
  font-size:clamp(10px,2.8vw,13px)!important;font-weight:750!important;
  letter-spacing:-.2px!important;line-height:1.15!important;white-space:normal!important;text-align:center!important;
 }
 .mobile-header #mobile-logout{
  position:relative!important;z-index:2!important;order:2!important;margin-left:auto!important;
  width:39px!important;min-width:39px!important;height:39px!important;min-height:39px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  padding:0!important;border:1px solid #e7d6d6!important;border-radius:12px!important;
  background:#fff5f5!important;color:#bd3d45!important;
  box-shadow:0 1px 3px #6a263010!important;
 }
 .mobile-header #mobile-logout svg{width:18px!important;height:18px!important}
}

/* Precision-aligned professional mobile header: three-column grid, no overlaps. */
@media(max-width:700px){
 .mobile-header{
  display:grid!important;
  grid-template-columns:82px minmax(0,1fr) 82px!important;
  grid-template-rows:42px!important;
  align-items:center!important;
  justify-items:stretch!important;
  column-gap:6px!important;
  padding:calc(26px + env(safe-area-inset-top,0px)) 12px 12px!important;
  height:auto!important;
  min-height:calc(80px + env(safe-area-inset-top,0px))!important;
  background:#fff!important;
  border-bottom:1px solid #e7edf5!important;
 }
 .mobile-header [data-app-return]{
  grid-column:1!important;grid-row:1!important;
  position:static!important;order:unset!important;
  width:82px!important;min-width:0!important;max-width:82px!important;
  height:40px!important;min-height:40px!important;
  margin:0!important;padding:0 8px!important;
  border-radius:10px!important;justify-self:start!important;
  font-size:12px!important;font-weight:700!important;
 }
 .mobile-header .brand{
  grid-column:2!important;grid-row:1!important;
  position:static!important;left:auto!important;bottom:auto!important;
  transform:none!important;
  width:100%!important;max-width:100%!important;
  height:42px!important;
  min-width:0!important;
  margin:0!important;padding:0!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:6px!important;
  text-align:center!important;
 }
 .mobile-header .brand-icon{
  flex:0 0 26px!important;width:26px!important;height:26px!important;
  border-radius:8px!important;
 }
 .mobile-header .brand>div{min-width:0!important}
 .mobile-header .brand-name{
  font-size:clamp(10px,2.8vw,13px)!important;
  font-weight:750!important;line-height:1.2!important;
  letter-spacing:-.15px!important;
  white-space:normal!important;overflow-wrap:normal!important;
  text-align:center!important;
 }
 .mobile-header #mobile-logout{
  grid-column:3!important;grid-row:1!important;
  position:static!important;order:unset!important;
  justify-self:end!important;align-self:center!important;
  margin:0!important;
  width:40px!important;min-width:40px!important;
  height:40px!important;min-height:40px!important;
  background:#f7f9fc!important;color:#465c78!important;
  border:1px solid #dce5ef!important;border-radius:10px!important;
  box-shadow:none!important;
 }
 .mobile-header #mobile-logout:active,.mobile-header [data-app-return]:active{background:#e9eff7!important}
}

/* Header refinement: balanced controls and readable centered brand without clipping. */
@media(max-width:700px){
 .mobile-header{
  grid-template-columns:minmax(0,1fr) minmax(0,1.65fr) minmax(0,1fr)!important;
  column-gap:8px!important;
  padding-left:12px!important;padding-right:12px!important;
  grid-template-rows:minmax(44px,auto)!important;
 }
 .mobile-header [data-app-return]{
  grid-column:1!important;
  width:100%!important;max-width:112px!important;min-width:0!important;
  height:42px!important;min-height:42px!important;
  padding:0 8px!important;
  font-size:clamp(10px,2.7vw,12px)!important;
  white-space:nowrap!important;overflow:hidden!important;
  border-radius:12px!important;
 }
 .mobile-header [data-app-return] svg{flex-shrink:0!important;width:15px!important;height:15px!important}
 .mobile-header .brand{
  grid-column:2!important;min-width:0!important;
  height:auto!important;min-height:44px!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  gap:3px!important;
 }
 .mobile-header .brand-icon{width:27px!important;height:27px!important;flex:0 0 27px!important}
 .mobile-header .brand>div{width:100%!important;min-width:0!important}
 .mobile-header .brand-name{
  font-size:clamp(10px,2.7vw,12px)!important;line-height:1.15!important;
  letter-spacing:0!important;font-weight:750!important;
  white-space:normal!important;overflow-wrap:normal!important;
  text-align:center!important;
 }
 .mobile-header #mobile-logout{
  grid-column:3!important;justify-self:end!important;
  width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;
  border-radius:12px!important;
 }
}

/* Final mobile header layout: controls on one row, centered brand on its own row. */
@media(max-width:700px){
 .mobile-header{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:44px 36px!important;
  gap:10px 8px!important;
  align-items:center!important;
  padding:calc(23px + env(safe-area-inset-top,0px)) 16px 14px!important;
  height:auto!important;
  min-height:0!important;
  justify-items:stretch!important;
 }
 .mobile-header [data-app-return]{
  grid-column:1!important;grid-row:1!important;
  justify-self:start!important;
  width:auto!important;min-width:118px!important;max-width:none!important;
  height:42px!important;min-height:42px!important;
  padding:0 14px!important;font-size:13px!important;
  overflow:visible!important;white-space:nowrap!important;
  display:inline-flex!important;align-items:center!important;gap:7px!important;
 }
 .mobile-header #mobile-logout{
  grid-column:2!important;grid-row:1!important;
  justify-self:end!important;
  width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
  margin:0!important;
 }
 .mobile-header .brand{
  grid-column:1 / -1!important;grid-row:2!important;
  position:static!important;transform:none!important;
  width:100%!important;max-width:100%!important;
  height:36px!important;min-height:36px!important;
  display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:center!important;
  gap:9px!important;margin:0!important;padding:0!important;
 }
 .mobile-header .brand-icon{
  width:30px!important;height:30px!important;flex:0 0 30px!important;
 }
 .mobile-header .brand>div{width:auto!important;min-width:0!important}
 .mobile-header .brand-name{
  font-size:clamp(15px,4vw,18px)!important;
  line-height:1.2!important;font-weight:750!important;
  white-space:nowrap!important;letter-spacing:-.25px!important;
 }
}

/* Single-row premium mobile header: equal control rails and true centered brand. */
@media(max-width:700px){
 .mobile-header{
  display:grid!important;
  grid-template-columns:100px minmax(0,1fr) 44px!important;
  grid-template-rows:44px!important;
  align-items:center!important;
  gap:6px!important;
  padding:calc(26px + env(safe-area-inset-top,0px)) 12px 12px!important;
  height:auto!important;min-height:calc(82px + env(safe-area-inset-top,0px))!important;
  background:#fff!important;
 }
 .mobile-header [data-app-return]{
  grid-column:1!important;grid-row:1!important;justify-self:start!important;
  width:100px!important;min-width:100px!important;max-width:100px!important;
  height:42px!important;min-height:42px!important;
  padding:0 8px!important;font-size:12px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:5px!important;white-space:nowrap!important;overflow:visible!important;
  border-radius:11px!important;
 }
 .mobile-header [data-app-return] svg{width:14px!important;height:14px!important;flex-shrink:0!important}
 .mobile-header .brand{
  grid-column:2!important;grid-row:1!important;
  position:static!important;transform:none!important;
  display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:center!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  height:44px!important;min-height:44px!important;
  gap:6px!important;padding:0!important;margin:0!important;
 }
 .mobile-header .brand-icon{width:26px!important;height:26px!important;flex:0 0 26px!important;border-radius:8px!important}
 .mobile-header .brand>div{width:auto!important;min-width:0!important}
 .mobile-header .brand-name{
  font-size:clamp(10px,2.75vw,13px)!important;
  line-height:1.15!important;letter-spacing:-.15px!important;
  font-weight:750!important;white-space:normal!important;
  overflow-wrap:normal!important;text-align:left!important;
 }
 .mobile-header #mobile-logout{
  grid-column:3!important;grid-row:1!important;
  justify-self:end!important;align-self:center!important;
  width:42px!important;min-width:42px!important;
  height:42px!important;min-height:42px!important;
  margin:0!important;padding:0!important;border-radius:11px!important;
 }
}

/* New Order: centered heading and compact inline Add Party action. */
.pp-new-order-header{
 position:relative;display:flex;align-items:center;justify-content:center;
 min-height:42px;margin-bottom:12px;padding:0 110px;
}
.pp-new-order-header h1{margin:0;text-align:center;font-size:21px;line-height:1.3}
.pp-new-order-header #pp-add-party-inline{
 position:absolute;right:0;top:50%;transform:translateY(-50%);
 display:inline-flex;align-items:center;justify-content:center;gap:4px;
 min-height:32px;padding:5px 9px;font-size:11px;font-weight:700;
 border-radius:8px;white-space:nowrap;
}
@media(max-width:700px){
 .pp-new-order-header{min-height:38px;margin-bottom:9px;padding:0 90px}
 .pp-new-order-header h1{font-size:19px}
 .pp-new-order-header #pp-add-party-inline{min-height:30px;padding:5px 7px;font-size:10.5px}
}

/* Refined party entry form: clear hierarchy, responsive fields and comfortable touch targets. */
#edit-dialog:has(.pp-party-entry-form){width:min(94vw,620px);max-width:620px;border-radius:18px}
#edit-dialog:has(.pp-party-entry-form) .modal-head{padding:20px 22px 12px;border-bottom:1px solid #e8edf3}
#edit-dialog:has(.pp-party-entry-form) .modal-head h2{font-size:20px;font-weight:750;letter-spacing:-.35px}
.pp-party-entry-form .modal-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;padding:20px 22px;max-height:min(65dvh,590px);overflow-y:auto}
.pp-party-entry-form .field{min-width:0;margin:0}
.pp-party-entry-form .field.full{grid-column:1/-1}
.pp-party-entry-form .field label{display:block;font-size:12px;font-weight:700;color:#52627a;margin-bottom:6px}
.pp-party-entry-form .input{width:100%;min-height:43px;border:1px solid #d9e2ec;border-radius:10px;background:#fafcff;font-size:14px;padding:10px 12px}
.pp-party-entry-form .input:focus{background:#fff;border-color:#4e83d0;box-shadow:0 0 0 3px #2e6bb016;outline:none}
.pp-party-entry-form .pp-party-required label:after{content:" *";color:#d14c55}
.pp-party-entry-form .modal-footer{padding:13px 20px;gap:10px;border-top:1px solid #e8edf3}
.pp-party-entry-form .modal-footer button{min-height:44px;border-radius:10px;font-weight:700}
@media(max-width:600px){
 #edit-dialog:has(.pp-party-entry-form){width:calc(100vw - 22px);max-width:calc(100vw - 22px);max-height:90dvh}
 .pp-party-entry-form .modal-body{grid-template-columns:1fr;gap:12px;padding:16px;max-height:65dvh}
 .pp-party-entry-form .modal-footer{padding:12px 16px}
}

/* Explicit, persistent Party Added confirmation. */
.pf-party-added-dialog{width:min(90vw,360px)!important;max-width:360px!important;text-align:center!important;padding:24px 22px 20px!important;border-radius:20px!important}
.pf-party-added-dialog .pf-party-added-check{display:grid;place-items:center;margin:0 auto 14px;width:52px;height:52px;border-radius:50%;background:#e4f7ed;color:#17884c;font-size:28px;font-weight:800}
.pf-party-added-dialog .pf-action-heading{text-align:center!important;font-size:19px!important;font-weight:800!important;line-height:1.3!important}
.pf-party-added-dialog .pf-party-added-name{margin:13px 0 20px;font-size:18px;font-weight:750;line-height:1.35;overflow-wrap:anywhere;color:#172a42;text-align:center}
.pf-party-added-dialog .pf-action-buttons{display:flex!important;justify-content:center!important}
.pf-party-added-dialog .pf-action-ok{min-width:120px!important;min-height:43px!important;border-radius:11px!important;font-weight:750!important}

/* All persistent alerts use the established compact iPhone-style action dialog. */
dialog.pf-party-added-dialog.pf-action-dialog{
 width:min(86vw,330px)!important;max-width:330px!important;min-width:0!important;
 padding:0!important;border-radius:17px!important;overflow:hidden!important;
 background:rgba(250,250,252,.97)!important;box-shadow:0 12px 35px #0003!important;
 text-align:center!important;
}
dialog.pf-party-added-dialog .pf-party-added-check{
 display:grid!important;place-items:center!important;
 width:46px!important;height:46px!important;margin:19px auto 8px!important;
 border-radius:50%!important;background:#e4f7ed!important;color:#168b50!important;
 font-size:26px!important;font-weight:750!important;
}
dialog.pf-party-added-dialog .pf-action-heading{
 padding:4px 16px 0!important;margin:0!important;font-size:17px!important;
 line-height:1.3!important;font-weight:700!important;text-align:center!important;
}
dialog.pf-party-added-dialog .pf-party-added-name{
 padding:0 16px!important;margin:9px 0 18px!important;
 font-size:15px!important;font-weight:650!important;color:#172a42!important;
 line-height:1.35!important;text-align:center!important;overflow-wrap:anywhere!important;
}
dialog.pf-party-added-dialog .pf-action-buttons{
 display:block!important;margin:0!important;padding:0!important;
 border-top:1px solid rgba(60,60,67,.23)!important;
}
dialog.pf-party-added-dialog .pf-action-ok{
 display:block!important;width:100%!important;min-width:0!important;
 height:48px!important;min-height:48px!important;
 padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
 background:transparent!important;color:#007aff!important;font-size:17px!important;
 font-weight:500!important;text-align:center!important;box-shadow:none!important;
}
dialog.pf-party-added-dialog::backdrop{background:rgba(0,0,0,.35)!important}

/* Compact iPhone party editor: all fields in two columns, keyboard-safe scrolling. */
@media(max-width:700px){
 #edit-dialog:has(.pp-party-entry-form){
  position:fixed!important;top:env(safe-area-inset-top,0px)!important;
  bottom:auto!important;left:50%!important;transform:translateX(-50%)!important;
  width:calc(100vw - 20px)!important;max-width:540px!important;
  max-height:min(88dvh,calc(100dvh - env(safe-area-inset-top,0px) - 8px))!important;
  margin:0!important;padding:0!important;overflow:hidden!important;
  display:flex;flex-direction:column;
 }
 #edit-dialog:has(.pp-party-entry-form):not([open]){display:none!important}
 #edit-dialog:has(.pp-party-entry-form) #modal-content{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
 #edit-dialog:has(.pp-party-entry-form) .modal-head{flex:0 0 auto!important;padding:10px 14px 8px!important}
 #edit-dialog:has(.pp-party-entry-form) .modal-head h2{font-size:17px!important;line-height:1.2!important}
 .pp-party-entry-form{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
 .pp-party-entry-form .modal-body{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px 9px!important;padding:9px 12px!important;
  max-height:none!important;min-height:0!important;overflow-y:auto!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
 }
 .pp-party-entry-form .field.full{grid-column:1/-1!important}
 .pp-party-entry-form .field label{font-size:10px!important;line-height:1.1!important;margin-bottom:3px!important}
 .pp-party-entry-form .input{
  min-height:32px!important;height:32px!important;padding:5px 8px!important;
  border-radius:7px!important;font-size:16px!important;line-height:20px!important;
 }
 .pp-party-entry-form textarea.input{height:40px!important;min-height:40px!important;resize:none!important}
 .pp-party-entry-form .modal-footer{
  flex:0 0 auto!important;display:flex!important;gap:8px!important;
  padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))!important;
  background:#fff!important;
 }
 .pp-party-entry-form .modal-footer button{
  flex:1!important;min-height:35px!important;height:35px!important;
  font-size:13px!important;border-radius:8px!important;
 }
}

/* iOS keyboard fix: dialog shrinks to visual viewport; only fields scroll. */
@media(max-width:700px){
 dialog#edit-dialog:has(.pp-party-entry-form)[open]{
  box-sizing:border-box!important;
  position:fixed!important;
  top:calc(var(--pf-visible-top,0px) + 6px)!important;
  bottom:auto!important;left:50%!important;right:auto!important;
  transform:translateX(-50%)!important;
  margin:0!important;
  width:calc(100vw - 20px)!important;
  height:calc(var(--pf-visible-height,100dvh) - 12px)!important;
  max-height:calc(var(--pf-visible-height,100dvh) - 12px)!important;
  min-height:0!important;
  overflow:hidden!important;
  flex-direction:column!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) #modal-content{
  flex:1 1 auto!important;min-height:0!important;height:100%!important;
  overflow:hidden!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form{
  flex:1 1 auto!important;min-height:0!important;height:100%!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form .modal-body{
  flex:1 1 auto!important;min-height:0!important;height:auto!important;
  max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;
  touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;
  align-content:start!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form .modal-footer{
  flex:0 0 auto!important;position:relative!important;bottom:auto!important;
  z-index:2!important;padding:7px 12px!important;
  box-shadow:0 -2px 8px #0000000a!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form .modal-footer button{
  height:38px!important;min-height:38px!important;
 }
}

/* Party editor correction: content-sized dialog, never a full-screen blank sheet. */
@media(max-width:700px){
 dialog#edit-dialog:has(.pp-party-entry-form)[open]{
  display:flex!important;flex-direction:column!important;
  top:calc(var(--pf-visible-top,0px) + 6px)!important;
  left:50%!important;bottom:auto!important;right:auto!important;
  transform:translateX(-50%)!important;margin:0!important;
  width:calc(100vw - 20px)!important;
  height:auto!important;min-height:0!important;
  max-height:calc(var(--pf-visible-height,100dvh) - 12px)!important;
  overflow:hidden!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) #modal-content{
  display:flex!important;flex-direction:column!important;
  height:auto!important;min-height:0!important;flex:0 1 auto!important;
  max-height:inherit!important;overflow:hidden!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form{
  display:flex!important;flex-direction:column!important;
  height:auto!important;min-height:0!important;flex:0 1 auto!important;
  overflow:hidden!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form .modal-body{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  flex:0 1 auto!important;height:auto!important;min-height:0!important;
  max-height:none!important;overflow-y:auto!important;
  overflow-x:hidden!important;touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  align-content:start!important;align-items:start!important;
  gap:6px 9px!important;padding:8px 12px!important;
 }
 dialog#edit-dialog:has(.pp-party-entry-form) .pp-party-entry-form .modal-footer{
  flex:0 0 auto!important;position:relative!important;
  margin:0!important;padding:7px 12px!important;min-height:48px!important;
  background:#fff!important;
 }
}

/* Android: constrain party dialog to keyboard-visible viewport; preserve iPhone layout. */
@media(max-width:700px){
 html:has(dialog#edit-dialog[open] .pp-party-entry-form){overscroll-behavior:none}
 dialog#edit-dialog:has(.pp-party-entry-form)[open]{
  max-height:calc(var(--pf-visible-height,100dvh) - 12px)!important;
 }
 dialog#edit-dialog.pf-android-keyboard-open:has(.pp-party-entry-form)[open]{
  top:calc(var(--pf-visible-top,0px) + 4px)!important;
  height:calc(var(--pf-visible-height,100dvh) - 8px)!important;
  max-height:calc(var(--pf-visible-height,100dvh) - 8px)!important;
 }
 dialog#edit-dialog.pf-android-keyboard-open:has(.pp-party-entry-form) #modal-content,
 dialog#edit-dialog.pf-android-keyboard-open:has(.pp-party-entry-form) .pp-party-entry-form{
  min-height:0!important;max-height:100%!important;overflow:hidden!important;
 }
 dialog#edit-dialog.pf-android-keyboard-open:has(.pp-party-entry-form) .modal-head{
  flex-shrink:0!important;
 }
 dialog#edit-dialog.pf-android-keyboard-open:has(.pp-party-entry-form) .pp-party-entry-form .modal-body{
  flex:1 1 auto!important;min-height:0!important;max-height:none!important;
  overflow-y:scroll!important;overflow-x:hidden!important;
  touch-action:pan-y!important;overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
 }
 dialog#edit-dialog.pf-android-keyboard-open:has(.pp-party-entry-form) .pp-party-entry-form .modal-footer{
  flex:0 0 auto!important;position:relative!important;bottom:auto!important;
  z-index:5!important;background:#fff!important;padding:6px 12px!important;
 }
}

/* Consistent popup Cancel/Close controls: remove browser blue focus rectangles. */
dialog .pf-action-cancel,
dialog .modal-footer button[type="button"],
dialog .modal-footer .btn-outline,
dialog .pf-action-buttons button,
dialog .modal-footer button{
 -webkit-tap-highlight-color:transparent!important;
 background-clip:padding-box!important;
}
dialog .pf-action-cancel:focus,
dialog .pf-action-cancel:focus-visible,
dialog .modal-footer button[type="button"]:focus,
dialog .modal-footer button[type="button"]:focus-visible,
dialog .modal-footer .btn-outline:focus,
dialog .modal-footer .btn-outline:focus-visible,
dialog .pf-action-buttons button:focus,
dialog .pf-action-buttons button:focus-visible,
dialog .modal-footer button:focus,
dialog .modal-footer button:focus-visible{
 outline:none!important;outline-offset:0!important;
 box-shadow:none!important;
 -webkit-box-shadow:none!important;
}
dialog .pf-action-cancel:active,
dialog .modal-footer button[type="button"]:active{
 -webkit-tap-highlight-color:transparent!important;
}

/* Compact Edit Order only: dense product rows, fixed actions and independent scrolling. */
dialog#edit-dialog:has(.pp-edit-order-modal)[open]{width:min(96vw,650px)!important;max-height:calc(100dvh - 22px)!important;overflow:hidden!important}
dialog#edit-dialog:has(.pp-edit-order-modal) #modal-content{min-height:0!important;overflow:hidden!important}
.pp-edit-order-modal{display:flex;flex-direction:column;min-height:0;max-height:calc(100dvh - 26px);overflow:hidden}
.pp-edit-order-modal .modal-head{flex:0 0 auto;padding:8px 12px!important}
.pp-edit-order-modal .modal-head h2{font-size:16px!important;margin:0!important}
.pp-edit-order-modal .modal-body.pp-center-details{flex:1 1 auto;min-height:0;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;padding:5px 10px!important}
.pp-edit-order-modal .pp-order-detail-intro{margin:0!important;padding:3px 0!important;font-size:12px!important}
.pp-edit-order-modal .pp-order-audit{padding:2px 0 4px!important;margin:0!important;font-size:11px!important}
.pp-edit-order-modal .pp-edit-lines{width:100%;border-collapse:collapse}
.pp-edit-order-modal .pp-edit-lines th{padding:4px 6px!important;font-size:11px!important;line-height:1.15!important}
.pp-edit-order-modal .pp-edit-lines td{padding:2px 6px!important;font-size:12px!important;line-height:1.15!important}
.pp-edit-order-modal .pp-edit-lines td:last-child{width:100px}
.pp-edit-order-modal .pp-edit-name{font-size:12px!important;line-height:1.2!important}
.pp-edit-order-modal .pp-edit-quantity{height:32px!important;min-height:32px!important;padding:3px 7px!important;font-size:16px!important;border-radius:6px!important}
.pp-edit-order-modal .pp-edit-product-search-wrap{margin:5px 0!important;padding:4px 0!important}
.pp-edit-order-modal .pp-edit-product-search-wrap label{font-size:11px!important;margin-bottom:3px!important}
.pp-edit-order-modal #pp-add-edit-search{height:35px!important;min-height:35px!important;font-size:16px!important}
.pp-edit-order-modal .modal-footer{flex:0 0 auto;position:relative!important;bottom:auto!important;padding:7px 10px!important;gap:8px!important;background:#fff!important;z-index:3}
.pp-edit-order-modal .modal-footer button{min-height:38px!important}
@media(max-width:700px){
 dialog#edit-dialog:has(.pp-edit-order-modal)[open]{top:8px!important;max-height:calc(100dvh - 16px)!important}
 .pp-edit-order-modal{max-height:calc(100dvh - 18px)}
}

/* PF-ERP Home admin hamburger: consolidated management tools. */
.erp-account{position:relative;gap:9px}
.erp-admin-wrap{position:relative;z-index:60;flex:0 0 auto}
.erp-admin-trigger{
 display:grid;place-items:center;width:39px;height:39px;border:1px solid #cbd9ea;
 border-radius:9px;background:#edf4fc;color:#204b7f;font-size:24px;font-weight:800;
 line-height:1;cursor:pointer
}
.erp-admin-trigger[aria-expanded=true]{background:#dceafb;border-color:#83a9d9}
.erp-admin-dropdown{
 position:absolute;right:0;top:calc(100% + 8px);width:min(88vw,308px);
 display:flex;flex-direction:column;padding:6px;background:#fff;border:1px solid #d6e1ef;
 border-radius:12px;box-shadow:0 15px 38px #132e4f30;z-index:100
}
.erp-admin-dropdown[hidden]{display:none!important}
.erp-admin-dropdown button{
 display:flex;align-items:center;gap:11px;width:100%;min-height:45px;padding:10px 12px;
 border:0;border-radius:7px;background:transparent;text-align:left;color:#1a3859;
 font:700 13px/1.3 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;cursor:pointer
}
.erp-admin-dropdown button:hover,.erp-admin-dropdown button:focus-visible{background:#edf4fe}
.erp-admin-dropdown form{margin:0;padding:0}
.archive-panel{padding:0;overflow:hidden}
.archive-tools{display:flex;gap:9px;padding:12px;border-bottom:1px solid #e1e9f1}
.archive-tools select{max-width:170px;flex:0 0 170px}
.archive-tools input{flex:1;min-width:0}
.archive-rows{padding:8px 12px 16px;max-height:calc(100dvh - 320px);min-height:160px;overflow:auto}
.archive-group{margin:0 0 14px}
.archive-group h2{font-size:13px;color:#526b83;background:#f1f5fa;padding:8px 10px;border-radius:7px;margin:0 0 4px}
.archive-group h2 small{font-size:11px;color:#75879d}
.archive-row{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #edf1f5;min-height:52px;padding:8px 5px}
.archive-row:last-child{border-bottom:0}
.archive-row-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.archive-row-main strong{font-size:13px;line-height:1.25;overflow-wrap:anywhere;color:#192f4b}
.archive-row-main small{font-size:11px;color:#73839a}
.archive-row button{flex:0 0 auto;min-width:77px}
@media(max-width:680px){
 .erp-admin-trigger{width:36px;height:36px}
 .erp-account #erp-logout{font-size:11px;min-height:34px;padding:7px}
 .archive-tools{padding:9px;gap:7px}
 .archive-tools select{max-width:120px;flex:0 0 120px;font-size:12px;padding:5px}
 .archive-tools input{font-size:12px}
 .archive-rows{padding:5px 9px 14px;max-height:calc(100dvh - 265px)}
}

/* ChatGPT iOS-inspired floating ERP Home actions sheet. */
.erp-admin-wrap{z-index:150}
.erp-admin-trigger{
 width:43px!important;height:43px!important;border-radius:50%!important;
 border:1px solid #dedee1!important;background:#f4f4f5!important;
 color:#171717!important;font-size:24px!important;font-weight:500!important;
 box-shadow:0 1px 3px #0000000b!important;
}
.erp-admin-trigger[aria-expanded=true]{background:#e9e9eb!important;border-color:#d1d1d5!important}
.erp-admin-dropdown{
 position:absolute!important;top:calc(100% + 12px)!important;right:0!important;
 width:min(88vw,345px)!important;max-height:min(78dvh,560px)!important;
 overflow-y:auto!important;overscroll-behavior:contain!important;
 display:flex!important;flex-direction:column!important;
 padding:11px!important;gap:2px!important;
 border:1px solid #e2e2e4!important;border-radius:27px!important;
 background:#fafafa!important;color:#171717!important;
 box-shadow:0 20px 55px #00000025,0 4px 12px #0000000b!important;
 z-index:500!important;
 -webkit-overflow-scrolling:touch;
}
.erp-admin-dropdown[hidden]{display:none!important}
.erp-admin-dropdown button{
 display:flex!important;align-items:center!important;justify-content:flex-start!important;
 gap:18px!important;width:100%!important;min-height:61px!important;
 padding:12px 16px!important;margin:0!important;
 background:transparent!important;border:0!important;border-radius:15px!important;
 color:#18181a!important;
 font:500 18px/1.25 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif!important;
 text-align:left!important;letter-spacing:-.2px!important;
}
.erp-admin-dropdown button svg{
 flex:0 0 25px!important;width:25px!important;height:25px!important;
 stroke-width:2.1!important;color:inherit!important;
}
.erp-admin-dropdown button span{min-width:0!important;overflow-wrap:anywhere}
.erp-admin-dropdown button:active,.erp-admin-dropdown button:hover,.erp-admin-dropdown button:focus-visible{
 background:#ebebed!important;
}
.erp-admin-dropdown form{width:100%!important;margin:0!important;padding:0!important}
.erp-admin-dropdown .erp-menu-divider{
 height:1px!important;min-height:1px!important;margin:7px 10px!important;
 background:#e5e5e7!important;
}
.erp-admin-dropdown .erp-menu-danger{color:#e02b37!important}
.erp-admin-dropdown .erp-menu-danger:hover{background:#fff0f1!important}
@media(max-width:680px){
 .erp-admin-trigger{width:42px!important;height:42px!important}
 .erp-admin-dropdown{
  width:min(89vw,345px)!important;
  top:calc(100% + 11px)!important;
  right:0!important;
  padding:10px!important;
  border-radius:26px!important;
 }
 .erp-admin-dropdown button{min-height:59px!important;font-size:18px!important;padding:11px 15px!important}
}

/* ChatGPT iOS-inspired floating More navigation, shared by Stock, Production & Trip. */
@media(max-width:900px){
 .mobile-more-panel{
  position:fixed!important;z-index:220!important;
  bottom:calc(74px + env(safe-area-inset-bottom))!important;
  left:auto!important;right:12px!important;
  width:min(88vw,345px)!important;max-height:min(70dvh,540px)!important;
  display:flex!important;flex-direction:column!important;gap:2px!important;
  padding:11px!important;overflow-y:auto!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch;
  background:#fafafa!important;color:#18181a!important;
  border:1px solid #e2e2e4!important;border-radius:27px!important;
  box-shadow:0 20px 55px #00000025,0 4px 12px #0000000b!important;
 }
 .mobile-more-panel[hidden]{display:none!important}
 .mobile-more-title{
  padding:11px 16px 8px!important;margin:0 0 4px!important;
  color:#77777a!important;font:500 15px/1.3 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif!important;
 }
 .mobile-more-panel .mobile-more-item{
  display:flex!important;align-items:center!important;gap:17px!important;
  flex:0 0 auto!important;width:100%!important;min-height:60px!important;
  padding:12px 15px!important;margin:0!important;
  background:transparent!important;border:0!important;border-radius:15px!important;
  text-align:left!important;color:#18181a!important;
  font:500 18px/1.25 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif!important;
  letter-spacing:-.2px!important;cursor:pointer!important;
 }
 .mobile-more-panel .mobile-more-item svg:first-child{
  width:25px!important;height:25px!important;flex:0 0 25px!important;
  stroke-width:2.1!important;color:inherit!important;
 }
 .mobile-more-panel .mobile-more-item span{
  flex:1 1 auto!important;min-width:0!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
 }
 .mobile-more-panel .mobile-more-item svg:last-child{
  width:18px!important;height:18px!important;flex:0 0 18px!important;
  color:#b3b3b7!important;
 }
 .mobile-more-panel .mobile-more-item.active{
  background:#e9e9eb!important;color:#18181a!important;
 }
 .mobile-more-panel .mobile-more-item:active,
 .mobile-more-panel .mobile-more-item:hover,
 .mobile-more-panel .mobile-more-item:focus-visible{
  background:#ebebed!important;
 }
}

/* All Stock, Production and Trip navigation now lives in the top-right hamburger.
   The old bottom mobile icon tray is intentionally removed. */
.mobile-nav{display:none!important}
@media(max-width:900px){
 .mobile-header{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important}
 .mobile-header>.brand{flex:1 1 auto!important;min-width:0!important}
 .mobile-header>.brand>div{min-width:0!important}
 .mobile-header .brand-name{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 .mobile-header>.mobile-more-trigger{
  flex:0 0 42px!important;display:grid!important;place-items:center!important;
  width:42px!important;height:42px!important;min-width:42px!important;
  padding:0!important;margin-left:auto!important;
  border:1px solid #dedee1!important;border-radius:50%!important;
  background:#f4f4f5!important;color:#171717!important;
  font:500 24px/1 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif!important;
  box-shadow:0 1px 3px #0000000b!important;cursor:pointer!important
 }
 .mobile-header>.mobile-more-trigger[aria-expanded=true]{
  background:#e9e9eb!important;border-color:#d1d1d5!important
 }
 .mobile-more-panel{
  top:calc(72px + env(safe-area-inset-top))!important;
  bottom:auto!important;right:12px!important;left:auto!important;
  width:min(89vw,345px)!important;
  max-height:min(75dvh,590px)!important;
  border-radius:27px!important;
 }
 .mobile-more-title{padding:11px 16px 8px!important}
 .mobile-more-panel .mobile-more-item{min-height:58px!important}
 .mobile-more-panel .mobile-more-item.active{background:#e9e9eb!important}
 .main,.content{padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
}
@media(min-width:901px){
 .mobile-more-panel,.mobile-header>.mobile-more-trigger{display:none!important}
}

/* Header navigation: pin hamburger to the same upper-right rail as ERP Home.
   Explicit grid placement overrides legacy mobile-header layout rules. */
@media(max-width:900px){
 .mobile-header{
  display:grid!important;
  grid-template-columns:minmax(72px,1fr) minmax(0,1.6fr) minmax(44px,1fr)!important;
  grid-template-rows:44px!important;
  align-items:center!important;
  column-gap:8px!important;
  position:relative!important;
  padding-left:12px!important;padding-right:12px!important;
 }
 .mobile-header>[data-app-return]{
  grid-column:1!important;grid-row:1!important;
  justify-self:start!important;align-self:center!important;
  position:relative!important;left:auto!important;right:auto!important;
  width:auto!important;max-width:100%!important;
 }
 .mobile-header>.brand{
  grid-column:2!important;grid-row:1!important;
  justify-self:center!important;align-self:center!important;
  width:100%!important;max-width:100%!important;
  min-width:0!important;margin:0!important;
  position:relative!important;left:auto!important;right:auto!important;
  transform:none!important;
 }
 .mobile-header>.mobile-more-trigger{
  grid-column:3!important;grid-row:1!important;
  justify-self:end!important;align-self:center!important;
  position:relative!important;inset:auto!important;
  order:unset!important;margin:0!important;
  width:43px!important;height:43px!important;
  min-width:43px!important;max-width:43px!important;
  border-radius:50%!important;
 }
 .mobile-more-panel{right:12px!important;left:auto!important}
}


/* Consistent compact ChatGPT menu typography on ERP Home and module navigation. */
.erp-admin-dropdown button,
.erp-admin-dropdown button span,
.mobile-more-panel .mobile-more-item,
.mobile-more-panel .mobile-more-item span{
 font-size:16px!important;
 line-height:1.3!important;
 font-weight:500!important;
 letter-spacing:-.15px!important;
}
.mobile-more-panel .mobile-more-title{font-size:13px!important}

/* Screenshot-calibrated compact ChatGPT iPhone popover proportions.
   Shared typography, icon scale and density across ERP hamburger menus. */
.erp-admin-dropdown,
.mobile-more-panel{
 width:min(78vw,290px)!important;
 padding:9px!important;
 border-radius:25px!important;
 gap:0!important;
}
.erp-admin-dropdown button,
.erp-admin-dropdown button span,
.mobile-more-panel .mobile-more-item,
.mobile-more-panel .mobile-more-item span{
 font:400 16px/1.25 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif!important;
 letter-spacing:-.3px!important;
}
.erp-admin-dropdown button,
.mobile-more-panel .mobile-more-item{
 min-height:46px!important;
 padding:8px 11px!important;
 gap:13px!important;
 border-radius:12px!important;
}
.erp-admin-dropdown button svg,
.mobile-more-panel .mobile-more-item svg:first-child{
 width:21px!important;height:21px!important;flex:0 0 21px!important;
 stroke-width:1.9!important;
}
.mobile-more-panel .mobile-more-item svg:last-child{
 width:15px!important;height:15px!important;flex:0 0 15px!important;
}
.mobile-more-panel .mobile-more-title{
 padding:8px 11px 10px!important;
 margin:0!important;
 font:400 13px/1.35 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif!important;
 letter-spacing:0!important;color:#818184!important;
}
.erp-menu-divider{margin:5px 9px!important}
@media(max-width:900px){
 .mobile-more-panel{
  width:min(78vw,290px)!important;
  max-height:min(73dvh,540px)!important;
  right:12px!important;
  padding:9px!important;
  gap:0!important;
  border-radius:25px!important;
 }
 .mobile-more-panel .mobile-more-item{
  min-height:46px!important;
  padding:8px 11px!important;
  gap:13px!important;
 }
 .mobile-more-panel .mobile-more-item svg:first-child{
  width:21px!important;height:21px!important;flex:0 0 21px!important;
 }
 .mobile-more-panel .mobile-more-item svg:last-child{
  width:15px!important;height:15px!important;flex:0 0 15px!important;
 }
 .mobile-more-panel .mobile-more-title{font-size:13px!important;padding:8px 11px 10px!important}
 .erp-admin-dropdown{width:min(78vw,290px)!important}
}

/* Android-wide Inter typography, including dialogs, controls, nav and menus.
   iPhone/iPad keep the existing SF Pro system font. */
:root.pf-android,
:root.pf-android body,
:root.pf-android body *,
:root.pf-android button,
:root.pf-android input,
:root.pf-android textarea,
:root.pf-android select,
:root.pf-android option,
:root.pf-android dialog,
:root.pf-android .erp-admin-dropdown button,
:root.pf-android .mobile-more-panel .mobile-more-item{
 font-family:"Inter",Roboto,Arial,sans-serif!important;
}

/* Daily Fry / Namkeen / Makai production entry */
.pp-daily-card{padding:12px 14px}
.pp-daily-table{width:100%}
.pp-daily-notes{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.pp-daily-notes .field{display:flex;flex-direction:column;gap:6px;font-weight:600}
.pp-daily-notes textarea{width:100%;resize:vertical;font-weight:400}
.pp-daily-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
.trip-day-nav #pp-daily-date{width:145px;min-width:0;padding-inline:6px}
@media(max-width:600px){.pp-daily-card{padding:9px}.pp-daily-notes{grid-template-columns:1fr;gap:10px}}

/* Production reports: exact New Order item list and quantity cell styling. */
.pp-daily-card .pp-excel-table{border-collapse:collapse;table-layout:fixed}
.pp-daily-card .pp-excel-table th{padding:3px 8px;height:26px;font-size:12px;border:1px solid #dfe5ed;background:#f3f6fa}
.pp-daily-card .pp-excel-table td{padding:0 7px;height:27px;font-size:12.5px;border:1px solid #e1e6ed;line-height:1.12}
.pp-daily-card .pp-excel-table th:first-child{width:77%}
.pp-daily-card .pp-excel-table th:last-child{width:23%;text-align:center}
.pp-daily-card .pp-excel-table tbody tr:nth-child(even){background:#f8fafc}
.pp-daily-card .pp-list-product-name{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;font-weight:520}
.pp-daily-card .pp-order-qty-cell{width:23%;padding:0!important}
.pp-daily-card .pp-excel-table .input.pp-list-qty{width:100%;height:26px;border:0;border-radius:0;background:transparent;font-size:13px;text-align:center;padding:0 2px;font-variant-numeric:tabular-nums;box-shadow:none}
.pp-daily-card .pp-excel-table .input.pp-list-qty:not(:placeholder-shown){background:#edf6ff;color:#145da7;font-weight:700}
.pp-daily-card .pp-excel-table .input.pp-list-qty:focus{outline:2px solid #3a7bd5;outline-offset:-2px;background:#fff}
.pp-daily-card .pp-order-save-bar{padding:7px 10px;border-radius:7px}
.pp-daily-card .pp-order-save-bar .btn{min-height:34px}
.pp-daily-card .pp-order-table-wrap{max-height:none;overflow-x:auto;overflow-y:visible}
.pp-daily-card .pp-order-table{min-width:0}

/* Today's dashboard updates: highlight only the updater and timestamp. */
.pf-updated-today{color:#16834b;font-weight:700}

/* Compact stock-entry screen improvements; retain ERP blue/white theme. */
.pp-dense-header{margin-bottom:5px}
.pp-dense-header h1{font-size:clamp(16px,3.7vw,19px)}
.pp-manual-panel{margin-top:5px;padding:9px 10px}
.pp-manual-heading{gap:7px}
.pp-manual-total-top{min-height:35px;padding:5px 9px}
.pp-manual-reset{min-height:35px!important;padding:5px 9px!important;font-size:11px!important;border-color:#d3a0a4!important}
.pp-manual-meta{margin:4px 1px 6px;line-height:1.35}
.pp-manual-search-row{margin-bottom:5px;gap:7px}
.pp-manual-quick .input,.pp-manual-filters .input{height:35px;min-height:35px}
.pp-manual-quick>label,.pp-visual-label{margin-bottom:3px!important}
.pp-manual-table{table-layout:fixed}
.pp-manual-table th{position:sticky;top:0;z-index:2}
.pp-manual-table td{height:30px!important;padding-top:0!important;padding-bottom:0!important}
.pp-manual-table .pp-manual-input{height:30px!important;min-height:30px!important}
.pp-manual-save{padding:8px 12px;gap:10px}
.pp-manual-save:not(:has(button:disabled)) .btn{background:#205ca8;border-color:#205ca8;color:white;font-weight:750}
@media(max-width:600px){
 .pp-manual-panel{padding:7px 8px}
 .pp-manual-table td{height:31px!important}
 .pp-manual-table .pp-manual-input{height:31px!important;min-height:31px!important}
 .pp-manual-save{padding:9px 12px calc(9px + env(safe-area-inset-bottom));bottom:0}
}

/* Stock form: preserve original alternating row colors; total aligned below Qty. */
.pp-manual-heading{justify-content:flex-end;margin-bottom:4px}
.pp-manual-table tfoot .pp-stock-total-row th,.pp-manual-table tfoot .pp-stock-total-row td{position:static;background:#eef5ff;border:1px solid #dbe5f1;padding:7px 9px;font-size:13px;font-weight:700}
.pp-manual-table tfoot .pp-stock-total-row th{text-align:left}
.pp-manual-table tfoot .pp-stock-total-row td{text-align:center;color:#205ca8;font-variant-numeric:tabular-nums;font-size:18px}
.pp-manual-table tbody tr:focus-within{outline:none}

/* Stock form: Reset to 0 occupies former item-count header slot. */
.pp-dense-header .pp-manual-reset{margin-left:auto;flex-shrink:0;min-height:33px!important;padding:5px 8px!important}
.pp-manual-panel{margin-top:3px}

/* Hold Reset to 0 for 0.8s; reset is draft-only until Save Stock. */
.pp-manual-reset{touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.pp-manual-reset.pp-reset-holding{background:#fff1f1!important;border-color:#b02c3b!important;color:#b02c3b!important}

/* Daily production reports visually match Current Ready Product Stock.
   Date navigation, notes, save and all report behavior are unchanged. */
.pp-daily-card.pp-manual-panel{margin-top:5px;padding:9px 10px}
.pp-daily-card .pp-manual-table-scroll{overflow:visible!important;max-height:none!important}
.pp-daily-card .pp-daily-table{width:100%;table-layout:fixed;border-collapse:collapse}
.pp-daily-card .pp-daily-table th:first-child{width:77%;text-align:left}
.pp-daily-card .pp-daily-table th:last-child{width:23%;text-align:center}
.pp-daily-card .pp-daily-table td{height:30px!important;padding:0 5px!important;font-size:14px;line-height:1.4}
.pp-daily-card .pp-daily-table .pp-manual-input{height:30px!important;min-height:30px!important;max-width:140px;width:100%;padding:3px 5px!important;margin-left:auto;text-align:center;font-size:16px}
.pp-daily-card .pp-daily-table tbody tr:nth-child(even){background:#f6f9fc}
.pp-daily-card .pp-daily-table tbody tr:nth-child(odd){background:#fff}
.pp-daily-card .pp-daily-table .input.pp-list-qty:not(:placeholder-shown){background:#edf6ff;color:#145da7;font-weight:700}
.pp-daily-card .pp-daily-notes{margin-top:12px}
@media(max-width:600px){
 .pp-daily-card.pp-manual-panel{padding:7px 8px}
 .pp-daily-card .pp-daily-table th:first-child{width:77%}
 .pp-daily-card .pp-daily-table th:last-child{width:23%}
 .pp-daily-card .pp-daily-table td{height:31px!important;padding:0 4px!important}
 .pp-daily-card .pp-daily-table .pp-manual-input{height:31px!important;min-height:31px!important;padding:3px 2px!important}
}

/* Screenshot-matched stock grid for Fry, Namkeen and Makai reports.
   Override legacy daily-report typography and filled-input backgrounds. */
.pp-daily-card .pp-daily-table thead th{
 height:33px!important;box-sizing:border-box;padding:4px 8px!important;
 font-size:13px!important;font-weight:750!important;color:#33435b!important;
 background:#edf2fa!important;border:1px solid #dfe5ed!important;
}
.pp-daily-card .pp-daily-table tbody td{
 height:30px!important;box-sizing:border-box;padding:0 8px!important;
 font-size:15px!important;line-height:1.25!important;
 border:1px solid #e1e6ed!important;vertical-align:middle;
}
.pp-daily-card .pp-daily-table tbody tr:nth-child(even){background:#f4f8fa!important}
.pp-daily-card .pp-daily-table tbody tr:nth-child(odd){background:#fff!important}
.pp-daily-card .pp-daily-table .pp-list-product-name{
 display:block!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 font-size:15px!important;font-weight:650!important;line-height:1.25!important;
 color:#25344f!important;
}
.pp-daily-card .pp-daily-table td.pp-manual-qty-cell{width:23%;padding:0!important;text-align:center}
.pp-daily-card .pp-daily-table .input.pp-list-qty{
 display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
 height:30px!important;min-height:30px!important;margin:0!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;
 background:transparent!important;padding:0 3px!important;
 text-align:center!important;font-size:16px!important;font-weight:700!important;
 color:#145da7!important;font-variant-numeric:tabular-nums;
}
.pp-daily-card .pp-daily-table .input.pp-list-qty:not(:placeholder-shown){background:transparent!important;color:#145da7!important}
.pp-daily-card .pp-daily-table .input.pp-list-qty::placeholder{color:#145da7!important;opacity:1}
.pp-daily-card .pp-daily-table .input.pp-list-qty:focus{outline:2px solid #3a7bd5!important;outline-offset:-2px;background:#fff!important}
@media(max-width:600px){
 .pp-daily-card .pp-daily-table tbody td{height:31px!important;padding:0 8px!important}
 .pp-daily-card .pp-daily-table .input.pp-list-qty{height:31px!important;min-height:31px!important}
}

/* Production report polish: compact controls, clear editing, stock-style fixed Save bar. */
.pp-daily-screen{padding-bottom:calc(85px + env(safe-area-inset-bottom))}
.pp-daily-screen .pp-daily-daybar{padding:6px 9px!important;margin:5px 0 7px!important}
.pp-daily-screen .trip-day-nav{display:flex;align-items:center;justify-content:center;gap:7px}
.pp-daily-screen .trip-date-arrow{min-height:36px!important;height:36px!important;min-width:38px!important;padding:4px 8px!important}
.pp-daily-screen .trip-day-nav #pp-daily-date{height:36px!important;min-height:36px!important}
.pp-daily-screen .pp-daily-card.pp-manual-panel{margin-top:0;padding:8px 9px 10px}
.pp-daily-screen .pp-daily-table thead th{background:#edf2fa!important}
.pp-daily-screen .pp-daily-table .input.pp-list-qty:focus{outline:2px solid #3a7bd5!important;outline-offset:-2px;background:#fff!important}
.pp-daily-screen .pp-daily-notes{margin-top:10px;gap:10px}
.pp-daily-screen .pp-daily-notes .field{gap:4px;font-size:13px;font-weight:700;color:#263b56}
.pp-daily-screen .pp-daily-notes #pp-daily-oil{height:40px!important;min-height:40px!important;max-height:40px!important;padding:8px 10px;resize:none}
.pp-daily-screen .pp-daily-notes #pp-daily-note{min-height:78px;padding:9px 10px;resize:vertical}
.pp-daily-screen .pp-daily-actions{
 position:fixed;left:0;right:0;bottom:0;z-index:75;
 display:flex;align-items:center;justify-content:space-between;
 gap:12px;margin:0;padding:9px 14px calc(9px + env(safe-area-inset-bottom));
 background:#fff;border-top:1px solid #dce5f0;box-shadow:0 -4px 14px rgba(25,48,80,.05);
}
.pp-daily-screen .pp-daily-actions .muted{font-size:12px;line-height:1.3;min-width:0;overflow-wrap:anywhere}
.pp-daily-screen .pp-daily-actions .btn{min-height:40px;padding:8px 17px;font-size:14px;font-weight:700;flex-shrink:0}
@media(max-width:600px){
 .pp-daily-screen .pp-daily-card.pp-manual-panel{padding:7px 8px 9px}
 .pp-daily-screen .pp-daily-notes{grid-template-columns:1fr;gap:9px}
 .pp-daily-screen .pp-daily-actions{padding:9px 12px calc(9px + env(safe-area-inset-bottom))}
}

/* Daily production total follows the same Qty-column footer as stock forms. */
.pp-daily-screen .pp-daily-table tfoot .pp-daily-total-row th,
.pp-daily-screen .pp-daily-table tfoot .pp-daily-total-row td{
 padding:7px 8px!important;background:#edf2fa!important;border:1px solid #dfe5ed!important;
 font-size:14px!important;font-weight:750!important;color:#33435b!important;
}
.pp-daily-screen .pp-daily-table tfoot .pp-daily-total-row th{text-align:left!important}
.pp-daily-screen .pp-daily-table tfoot .pp-daily-total-row td{text-align:center!important;color:#145da7!important;font-size:17px!important;font-variant-numeric:tabular-nums}

/* Trip-style daily production preview is read-only until Edit Report is chosen. */
.pp-daily-preview{padding-bottom:24px}
.pp-daily-read-qty{display:block;text-align:center;font-size:16px;font-weight:700;color:#145da7}
.pp-daily-read-field{min-height:39px;display:flex;align-items:center;padding:8px 10px;border:1px solid #dce5f0;border-radius:9px;background:#f8fafc;color:#263b56;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.pp-daily-read-note{min-height:58px;align-items:flex-start}
.pp-daily-preview-meta{padding:10px 4px;font-size:12px;color:#778397}
.pp-daily-preview .pp-daily-table tbody td{cursor:default}

/* Distinct production report View and Edit modes. */
.pp-daily-mode-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:5px 0 8px;padding:7px 10px;border:1px solid #e0e7ef;border-radius:9px;background:#f8fafc}
.pp-daily-mode-badge{font-size:11px;font-weight:800;letter-spacing:.055em;white-space:nowrap;padding:5px 8px;border-radius:6px;background:#e8edf3;color:#40516b}
.pp-daily-mode-hint{font-size:12px;color:#65738a}
.pp-daily-mode-banner.is-edit{background:#eaf3ff;border-color:#b9d5f7}
.pp-daily-mode-banner.is-edit .pp-daily-mode-badge{background:#1767ba;color:white}
.pp-daily-mode-banner.is-edit .pp-daily-mode-hint{color:#245a95}
.pp-daily-editing .pp-daily-card{background:#f3f8ff!important;border-color:#bed6f2!important}
.pp-daily-editing .pp-daily-table tbody td.pp-manual-qty-cell{background:#f0f6ff!important;padding:2px 5px!important}
.pp-daily-editing .pp-daily-table .input.pp-list-qty{height:27px!important;min-height:27px!important;background:white!important;border:1px solid #7fb0e8!important;border-radius:5px!important;box-shadow:0 1px 2px rgba(15,66,130,.06)!important}
.pp-daily-editing .pp-daily-table .input.pp-list-qty:focus{outline:2px solid #1767ba!important;outline-offset:0!important;background:white!important}
.pp-daily-editing .pp-daily-notes .input{background:#fff!important;border:1px solid #9abde8!important}
.pp-daily-preview .pp-daily-card{background:white!important}
.pp-daily-preview .pp-daily-table td.pp-manual-qty-cell{background:transparent!important}
.pp-daily-preview .pp-daily-read-field{border:0!important;background:transparent!important;padding:5px 0!important;min-height:26px}
.pp-daily-unsaved{color:#b45a13!important;font-weight:750!important}

/* Slightly larger dashboard tile titles, without changing tile layout. */
.pp-dashboard-grid .pp-dashboard-name{font-size:19px;line-height:1.28}
@media(max-width:700px){.pp-dashboard-grid .pp-dashboard-name{font-size:15px;line-height:1.3}}


/* Admin custom ordering editor — mobile-first, native drag and numeric position. */
.pp-sort-overlay{position:fixed;inset:0;z-index:3000;background:rgba(15,31,55,.55);display:flex;align-items:center;justify-content:center;padding:12px}
.pp-sort-panel{width:min(540px,100%);max-height:92dvh;display:flex;flex-direction:column;overflow:hidden;background:white;border-radius:14px;box-shadow:0 20px 65px rgba(0,0,0,.2)}
.pp-sort-head,.pp-sort-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid #e3e9f1}
.pp-sort-footer{border-bottom:0;border-top:1px solid #e3e9f1}
.pp-sort-head strong{font-size:17px;color:#183453}
.pp-sort-controls{display:flex;gap:10px;padding:12px 15px 0}
.pp-sort-controls .select{flex:1;min-width:0}
.pp-sort-help{font-size:12px;color:#65758a;margin:9px 15px}
.pp-sort-list{overflow:auto;overscroll-behavior:contain;min-height:90px;padding:3px 12px 12px}
.pp-sort-row{display:flex;align-items:center;gap:11px;min-height:52px;margin:6px 0;padding:7px 10px;background:#f7faff;border:1px solid #e1eaf5;border-radius:9px}
.pp-sort-handle{font-size:23px;color:#53739a;cursor:grab;touch-action:none;user-select:none}
.pp-sort-label{flex:1;min-width:0;font-size:14px;font-weight:650;color:#253a55;overflow-wrap:anywhere}
.pp-sort-position{width:64px!important;min-width:64px!important;text-align:center;font-size:15px!important}
@media(max-width:550px){.pp-sort-overlay{padding:0}.pp-sort-panel{width:100%;height:100dvh;max-height:100dvh;border-radius:0}.pp-sort-row{min-height:55px}}

/* Visible drag feedback and automatic scrolling for long mobile sort lists. */
.pp-sort-row{transition:background .12s,border-color .12s,transform .12s}
.pp-sort-handle{touch-action:none;cursor:grab;display:grid;place-items:center;width:34px;min-width:34px;height:38px;border-radius:7px;background:#e8f1fc;color:#285b9c;user-select:none;-webkit-user-select:none}
.pp-sort-handle:active{cursor:grabbing}
.pp-sort-placeholder{border:2px dashed #2671c5!important;background:#dbeaff!important;opacity:.7;box-shadow:inset 0 0 0 2px #fff}
.pp-sort-placeholder .pp-sort-label{opacity:.45}
.pp-sort-ghost{position:fixed!important;z-index:4000!important;pointer-events:none!important;opacity:.96;background:#fff!important;border:2px solid #2777c9!important;box-shadow:0 12px 28px rgba(17,67,123,.28)!important;transform:scale(1.025);margin:0!important}
.pp-sort-ghost input{pointer-events:none}
.pp-sort-list{scroll-behavior:auto;overscroll-behavior:contain}

/* Independent drag drop slot: keeps iOS pointer events alive while scrolling. */
.pp-sort-drop-slot{box-sizing:border-box;flex:none;width:100%;border:2px dashed #2671c5;border-radius:10px;background:rgba(39,119,201,.12);margin:5px 0;box-shadow:inset 0 0 0 1px rgba(39,119,201,.12)}
.pp-sort-ghost{box-sizing:border-box;will-change:top;touch-action:none}

/* Branded startup / connection-failure overlay. External CSS is required by CSP. */
#pf-welcome{position:fixed;inset:0;z-index:99999;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;text-align:center;font-family:Inter,system-ui,-apple-system,sans-serif;color:#1a2140}
#pf-welcome[hidden]{display:none!important}
#pf-welcome img{display:block;width:min(84vw,390px);height:auto;max-height:42vh;object-fit:contain;margin:0 auto}
#pf-welcome .pf-parent{font-weight:850;font-size:clamp(22px,5vw,32px);letter-spacing:.08em;margin-top:4px;text-align:center}
#pf-welcome .pf-parent-label{font-size:11px;letter-spacing:.2em;font-weight:700;color:#777f93;margin-top:20px;text-align:center}
#pf-welcome .pf-welcome-state{margin-top:28px;font-size:14px;font-weight:600;color:#637087;text-align:center}
#pf-welcome .pf-welcome-error{color:#c43232;max-width:340px;line-height:1.5}
#pf-welcome .pf-welcome-retry{background:#202554;color:white;border:0;border-radius:10px;padding:12px 28px;font-weight:700;margin-top:18px;cursor:pointer}
#pf-welcome .pf-welcome-retry[hidden]{display:none!important}

#pf-welcome .pf-erp-title{font-size:clamp(38px,10vw,58px);font-weight:900;letter-spacing:.14em;line-height:1.1;margin-top:16px;color:#202554;text-align:center}

/* Premium compact welcome composition; original Chatkaz artwork stays untouched. */
#pf-welcome{background:linear-gradient(180deg,#fff 0%,#fff 73%,#f3f7fd 100%);padding:calc(24px + env(safe-area-inset-top,0px)) 22px calc(24px + env(safe-area-inset-bottom,0px));gap:0}
#pf-welcome img{width:min(76vw,350px);max-height:37vh;object-fit:contain}
#pf-welcome .pf-parent{font-size:clamp(20px,5.5vw,24px);font-weight:750;letter-spacing:.045em;margin-top:14px;line-height:1.3}
#pf-welcome .pf-erp-title{font-size:clamp(36px,9.5vw,42px);font-weight:850;letter-spacing:.09em;line-height:1.15;margin-top:6px}
#pf-welcome .pf-welcome-progress{width:126px;height:3px;background:#dce5f2;border-radius:8px;overflow:hidden;margin-top:25px}
#pf-welcome .pf-welcome-progress span{display:block;height:100%;width:40%;background:#202554;border-radius:8px;animation:pf-welcome-slide 1.25s ease-in-out infinite}
#pf-welcome .pf-welcome-state{font-size:13px;font-weight:500;color:#718096;margin-top:12px}
#pf-welcome .pf-welcome-progress:has(~ .pf-welcome-state.pf-welcome-error){display:none}
@keyframes pf-welcome-slide{0%{transform:translateX(-110%)}100%{transform:translateX(360%)}}
@media(prefers-reduced-motion:reduce){#pf-welcome .pf-welcome-progress span{animation:none;width:100%}}

#pf-welcome .pf-erp-subtitle{margin-top:5px;font-size:clamp(10px,2.7vw,12px);font-weight:650;letter-spacing:.16em;color:#66748e;text-align:center}

/* Final welcome polish */
#pf-welcome{font-family:Inter,system-ui,-apple-system,sans-serif;transition:opacity .24s ease;overflow:auto;overscroll-behavior:contain}
#pf-welcome.pf-welcome-exit{opacity:0;pointer-events:none}
#pf-welcome img{width:min(74vw,320px);max-height:34vh;flex-shrink:0}
#pf-welcome .pf-parent{font-weight:700;letter-spacing:.035em;margin-top:8px}
#pf-welcome .pf-erp-title{font-weight:800;letter-spacing:.075em;margin-top:5px}
#pf-welcome .pf-erp-subtitle{font-weight:600;letter-spacing:.12em;margin-top:6px}
#pf-welcome .pf-welcome-progress{width:112px;margin-top:30px}
#pf-welcome .pf-welcome-state{color:#59677d;line-height:1.5}
#pf-welcome .pf-welcome-error{color:#a62d36;margin-top:12px}
#pf-welcome .pf-connection-icon{display:none;margin-top:26px;width:40px;height:40px;border-radius:50%;background:#fff0f1;color:#a62d36;place-items:center}
#pf-welcome.pf-is-offline .pf-connection-icon{display:grid}
#pf-welcome.pf-is-offline .pf-welcome-progress{display:none}
#pf-welcome .pf-welcome-retry{min-height:46px;min-width:175px;font-size:14px}
@media(prefers-reduced-motion:reduce){#pf-welcome{transition:none}}

/* Stock master management: scoped, responsive, consistent controls. */
.stock-master-panel{border:1px solid #e0e7ef;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px #17365c06}
.stock-master-panel .master-toolbar{padding:14px;gap:14px;align-items:center}
.stock-master-panel .tabs{display:flex;background:#f0f3f8;border:1px solid #e6ebf2;border-radius:10px;padding:3px;gap:3px}
.stock-master-panel .tabs button{flex:1;border:0;border-radius:7px;min-height:34px;padding:7px 14px;font-weight:600;color:#65748a;background:transparent}
.stock-master-panel .tabs button.active{background:#fff;color:#2458a2;box-shadow:0 1px 4px #1b365b18}
.stock-master-panel .master-filter-controls label{font-size:11px;letter-spacing:.035em;font-weight:650;color:#596b82}
.stock-master-panel .master-filter-controls .input,.stock-master-panel .master-filter-controls .select{border:1px solid #dce4ed;border-radius:9px;min-height:40px;background:#fff}
.stock-master-panel .master-search-box{position:relative;min-width:0;width:100%}
.stock-master-panel .master-search-box svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:#8492a6;pointer-events:none}
.stock-master-panel .master-search-box .input{padding-left:34px;width:100%}
.stock-master-panel .master-table{width:100%;max-width:none!important}
.stock-master-panel .master-table thead th{background:#f7f9fc;color:#62738a;font-size:11px;font-weight:650;padding:10px 12px;border-bottom:1px solid #e4eaf1}
.stock-master-panel .master-table td{padding:12px;border-bottom:1px solid #edf0f5;vertical-align:middle}
.stock-master-panel .master-table tr:last-child td{border-bottom:0}
.stock-master-panel .master-table .item-name{font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.stock-master-panel .master-table .qty-cell strong{font-weight:750;font-variant-numeric:tabular-nums}
.stock-master-panel .master-table .line2{font-size:11px;line-height:1.4;margin-top:3px;color:#718096}
.stock-master-panel .master-table .master-low-stock strong,.stock-master-panel .master-table .master-low-stock .line2{color:#b45309}
.stock-master-panel .master-group-row th{background:#edf3fb;color:#36577e;padding:9px 12px!important;border:0;font-size:11px;letter-spacing:.035em}
.stock-master-panel .group-count{display:inline-block;background:#fff;border:1px solid #dce6f2;border-radius:20px;padding:2px 7px;font-size:10px;letter-spacing:0}
.stock-master-panel .master-table .tag{border-radius:20px;font-size:10px;font-weight:650;padding:4px 7px;white-space:nowrap}
.stock-master-panel .master-table .actions{gap:5px}
.stock-master-panel .master-table .actions .btn{border:1px solid #e0e7ef;background:#fff;color:#3e5876;border-radius:8px;min-height:36px;min-width:36px;padding:6px;justify-content:center}
.stock-master-panel .master-table .actions .toggle-label{display:none}
.stock-master-panel .master-table .actions .btn:hover{background:#edf3fb;color:#2458a2}
@media(max-width:680px){
.stock-master-panel .master-toolbar{padding:12px;gap:12px}
.stock-master-panel .tabs{width:100%}
.stock-master-panel .master-filter-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.stock-master-panel .master-filter-controls .field{width:100%;min-width:0}
.stock-master-panel .master-filter-controls .field:only-child{grid-column:1/-1}
.stock-master-panel .master-filter-controls .input,.stock-master-panel .master-filter-controls .select{font-size:16px;min-width:0}
.stock-master-panel .master-table{table-layout:fixed}
.stock-master-panel .master-table thead th:nth-child(1){width:32%}
.stock-master-panel .master-table thead th:nth-child(2){width:23%}
.stock-master-panel .master-table thead th:nth-child(3){width:19%}
.stock-master-panel .master-table thead th:nth-child(4){width:26%}
.stock-master-panel .master-table thead th,.stock-master-panel .master-table td{padding:10px 5px;font-size:11px}
.stock-master-panel .master-table td:first-child,.stock-master-panel .master-table thead th:first-child{padding-left:9px}
.stock-master-panel .master-table .actions{flex-wrap:wrap;gap:3px}
.stock-master-panel .master-table .actions .btn{min-width:28px;min-height:36px;padding:4px}
.stock-master-panel .master-table .line2{font-size:10px;overflow-wrap:anywhere}
.stock-master-panel .master-table .tag{font-size:9px;padding:4px 5px}
}

/* Prevent stock alert text from overflowing into status column. */
.stock-master-panel .master-table .qty-cell{white-space:normal;min-width:0}
.stock-master-panel .master-table .qty-cell .line2{display:block;white-space:normal;overflow-wrap:anywhere;max-width:100%;line-height:1.4}

.stock-master-panel .master-items-table .master-alert-qty{font-weight:650;font-variant-numeric:tabular-nums}
.stock-master-panel .master-items-table .master-unit{color:#596b82;overflow-wrap:anywhere}
@media(max-width:680px){
.stock-master-panel .master-items-table thead th:nth-child(1){width:29%}
.stock-master-panel .master-items-table thead th:nth-child(2){width:12%}
.stock-master-panel .master-items-table thead th:nth-child(3){width:15%}
.stock-master-panel .master-items-table thead th:nth-child(4){width:18%}
.stock-master-panel .master-items-table thead th:nth-child(5){width:26%}
.stock-master-panel .master-items-table thead th{white-space:normal;line-height:1.3}
.stock-master-panel .master-items-table td{overflow-wrap:anywhere}
}

/* Compact master toolbars, shared by Stock and Production. */
.stock-master-panel .master-toolbar,.pp-surface .master-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:0 8px 7px}
.stock-master-panel .master-toolbar .tabs,.pp-surface .master-toolbar .tabs{display:flex;flex-wrap:nowrap;width:100%;gap:0;padding:0;background:transparent;border:0;border-bottom:1px solid #e0e7ef;border-radius:0;box-shadow:none}
.stock-master-panel .master-toolbar .tabs button,.pp-surface .master-toolbar .tabs button{flex:1;min-width:0;min-height:34px;padding:6px 4px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;box-shadow:none;font-size:12px;font-weight:600;color:#65748a;white-space:normal}
.stock-master-panel .master-toolbar .tabs button.active,.pp-surface .master-toolbar .tabs button.active{border-bottom-color:#2458a2;background:transparent;color:#2458a2;box-shadow:none}
.stock-master-panel .master-filter-controls,.pp-surface .master-filter-controls{display:flex;flex-wrap:nowrap;gap:6px;width:100%;margin:0;align-items:center}
.stock-master-panel .master-filter-controls .field,.pp-surface .master-filter-controls .field{flex:1;min-width:0;width:auto;gap:0;margin:0}
.stock-master-panel .master-filter-controls label,.pp-surface .master-filter-controls label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.stock-master-panel .master-filter-controls .input,.stock-master-panel .master-filter-controls .select,.pp-surface .master-filter-controls .input,.pp-surface .master-filter-controls .select{height:36px;min-height:36px;width:100%;padding-block:4px;border-radius:7px}
.stock-master-panel .master-group-row th,.pp-surface .master-group-row th{padding-block:5px!important}
@media(max-width:680px){
.stock-master-panel .master-toolbar,.pp-surface .master-toolbar{gap:5px;padding:0 7px 6px}
.stock-master-panel .master-filter-controls .input,.stock-master-panel .master-filter-controls .select,.pp-surface .master-filter-controls .input,.pp-surface .master-filter-controls .select{font-size:16px}
.pp-surface .master-toolbar .tabs button{font-size:11px}
}

/* Keep the Stock Master Management heading on one line. */
.page-masters .header h1{font-size:18px;white-space:nowrap;letter-spacing:-.45px}
@media(max-width:680px){.page-masters .header{gap:5px;flex-wrap:nowrap}.page-masters .header h1{font-size:clamp(11px,3.55vw,15px);letter-spacing:-.4px}.page-masters .header>.btn{flex-shrink:0;white-space:nowrap;padding-inline:6px;font-size:clamp(10px,2.8vw,12px)}}

/* Unified master table styling: retain every field, scroll wider tables. */
.unified-master-panel{border:1px solid #e0e7ef;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px #17365c06}
.unified-master-panel .pp-table:not(.pp-bulk-table){width:100%;max-width:none!important;table-layout:auto}
.unified-master-panel .pp-table:not(.pp-bulk-table) thead th{background:#f7f9fc;color:#62738a;font-size:11px;font-weight:650;padding:10px 12px;border-bottom:1px solid #e4eaf1}
.unified-master-panel .pp-table:not(.pp-bulk-table) td{padding:12px;border-bottom:1px solid #edf0f5;vertical-align:middle}
.unified-master-panel .pp-table .item-name{font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.unified-master-panel .pp-table .line2{font-size:11px;line-height:1.4;color:#718096}
.unified-master-panel .master-group-row th{background:#edf3fb;color:#36577e;padding:5px 12px!important;border:0;font-size:11px;letter-spacing:.035em}
.unified-master-panel .group-count{display:inline-block;background:#fff;border:1px solid #dce6f2;border-radius:20px;padding:2px 7px;font-size:10px;letter-spacing:0}
.unified-master-panel .tag{border-radius:20px;font-size:10px;font-weight:650;padding:4px 7px;white-space:nowrap}
.unified-master-panel .pp-actions{gap:5px;flex-wrap:nowrap}
.unified-master-panel .pp-actions .btn{border:1px solid #e0e7ef;background:#fff;color:#3e5876;border-radius:8px;min-height:36px;min-width:36px;padding:6px;justify-content:center}
.unified-master-panel .pp-actions .btn span{display:none}
.unified-master-panel .pp-bulk-actions{padding:4px 8px;background:#fff;gap:5px}
.unified-master-panel .pp-bulk-actions .btn{min-height:30px}
@media(max-width:680px){
.unified-master-panel .pp-table:not(.pp-bulk-table) th,.unified-master-panel .pp-table:not(.pp-bulk-table) td{display:table-cell!important;width:auto!important;padding:10px 5px;font-size:11px}
.unified-master-panel .pp-table:not(.pp-bulk-table) .item-name{font-size:11px!important}
.unified-master-panel .pp-table:not(.pp-bulk-table).pp-items{min-width:560px}
.unified-master-panel .pp-table:not(.pp-bulk-table).pp-parties{min-width:520px}
.unified-master-panel .pp-table:not(.pp-bulk-table).pp-raw-materials{min-width:420px}
.unified-master-panel .pp-table-wrap{overflow-x:auto}
.unified-master-panel .pp-actions .btn{min-width:28px;min-height:36px;padding:4px}
.unified-master-panel .pp-actions{gap:3px}
.unified-master-panel .tag{font-size:9px;padding:4px 5px}
}

/* User access editor: one scrollable body, fixed header and save controls. */
dialog#edit-dialog:has(#user-form)[open]{width:min(670px,calc(100vw - 16px))!important;max-height:calc(100dvh - 24px)!important;overflow:hidden!important}
dialog#edit-dialog:has(#user-form) #modal-content{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 24px);min-height:0;overflow:hidden!important}
dialog#edit-dialog:has(#user-form) .modal-head{flex:0 0 auto}
dialog#edit-dialog #user-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
dialog#edit-dialog #user-form .modal-body{flex:1 1 auto;min-height:0;max-height:none!important;overflow-y:auto!important;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;align-content:start}
dialog#edit-dialog #user-form .modal-footer{flex:0 0 auto;position:static}
#user-access-fieldset.user-permissions{grid-template-columns:1fr;max-height:none;overflow:visible;min-width:0}
#user-access-fieldset[hidden],#user-form [hidden]{display:none!important}
#user-form .user-tile-list{max-height:none;overflow:visible}
