:root{--bg:#0f0f10;--panel:#171717;--panel2:#202020;--border:#3d3d3d;--text:#fff;--muted:#b9c0c9;--blue:#2563eb;--purple:#5939e8;--green:#00a000;--red:#ff1744;--yellow:#fff200}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:14px}a{color:inherit}.layout{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,#141414,#101010);border-right:1px solid #333;padding:22px 12px;overflow:auto}.brand{font-weight:900;font-size:26px;font-style:italic;letter-spacing:1px;margin-bottom:28px}.brand span{color:#336dff}.brand small{display:block;font-size:15px;font-style:normal;letter-spacing:1.5px;margin-top:12px;text-transform:uppercase}.nav{display:flex;flex-direction:column;gap:8px;margin-bottom:34px}.nav a{text-decoration:none;padding:13px 16px;border-radius:6px;font-weight:800}.nav a:hover,.nav a.active{background:linear-gradient(90deg,#2563eb,#5b35e8)}.side-card{border:1px solid #333;border-radius:6px;background:#151515;margin-top:18px;padding:14px}.side-title{font-size:17px;font-weight:900;line-height:1.05;margin-bottom:12px}.side-title b{display:inline-block;background:#f03;color:#fff;border-radius:20px;padding:3px 9px;margin-left:5px}.side-item,.side-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;color:var(--yellow);font-weight:900}.main{min-width:0;padding:16px 18px 28px;overflow-x:hidden}.topbar{display:flex;align-items:center;justify-content:space-between;background:#151515;border:1px solid #333;border-radius:7px;padding:16px 18px;margin-bottom:16px}.h1{font-size:28px;font-weight:900}.sub{color:var(--muted);margin-top:4px}.btn{background:#155bd8;color:#fff;border:0;border-radius:5px;padding:10px 16px;font-weight:900;cursor:pointer;text-decoration:none}.btn:hover{filter:brightness(1.12)}.btn.secondary{background:#303030;border:1px solid #555}.btn.danger{background:#b91c1c}.btn.mini-save{font-size:12px;padding:6px 8px;margin-left:6px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.card{background:linear-gradient(#1b1b1b,#151515);border:1px solid #444;border-radius:7px;text-align:center;padding:17px 10px}.card .label{font-weight:900}.card .value{font-size:32px;color:#5d7cff;font-weight:900;margin:8px 0 4px}.section{background:#151515;border:1px solid #333;border-radius:7px;margin-bottom:16px;overflow:hidden}.section h2,.toolbar h2{margin:0;font-size:21px;font-weight:900}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid #333}.table-wrap{width:100%;overflow-x:auto;overflow-y:visible}.section>.table-wrap{padding:0}table{border-collapse:collapse;width:100%;min-width:max-content}th,td{border:1px solid #555;padding:9px 10px;white-space:nowrap;color:#fff}th{background:#333;font-weight:900;text-align:left}td.num,th.num{text-align:right}.sortable th{cursor:pointer;user-select:none}.sortable th:hover{color:#8db4ff}.sortable th::after{content:' ↕';color:#aaa;font-size:11px}.search{background:#111;border:1px solid #555;color:#fff;padding:9px 11px;border-radius:5px;min-width:280px}.pill{display:inline-block;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:900;border:1px solid}.pill.confirmed{background:rgba(34,197,94,.13);border-color:#22c55e;color:#80f19c}.pill.soft{background:rgba(245,158,11,.16);border-color:#f59e0b;color:#ffd38a}.muted{color:var(--muted)}.action-cell form{margin:0 3px 0 0}.inline-select{background:#111;color:#fff;border:1px solid #555;border-radius:5px;padding:6px 8px}.inventory-section{padding:12px 14px 14px;background:#151515}.inventory-section h2{margin-bottom:12px}.inventory-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}.inventory-col{display:flex;flex-direction:column;gap:14px;min-width:0}.inventory-block{width:100%;min-width:0;overflow:hidden;border:1px solid #222;background:#111}.inventory-block h3{margin:0;text-align:center;color:#000;font-size:28px;letter-spacing:.5px;padding:9px 12px;font-weight:900}.inventory-block .table-wrap{width:100%;overflow-x:auto;display:block}.inventory-block table{width:max-content;min-width:100%;table-layout:auto}.inventory-block th{background:#eee;color:#000;text-align:left}.inventory-block td{color:#000}.inventory-block th,.inventory-block td{border:1px solid #222;padding:8px 10px;font-size:14px}.inventory-block .num{text-align:center;min-width:82px}.inventory-block th:first-child,.inventory-block td:first-child{min-width:125px}.inventory-block th:nth-child(2),.inventory-block td:nth-child(2){min-width:95px}.inventory-block.diamond h3{background:#fff7c7}.inventory-block.diamond td{background:#fffbe2}.inventory-block.rzr h3{background:#f5c184}.inventory-block.rzr td{background:#ffe0bd}.inventory-block.rx41 h3{background:#d08db6}.inventory-block.rx41 td{background:#edd4e2}.inventory-block.posters h3{background:#b99edc}.inventory-block.posters td{background:#e8ddfa}.inventory-block.processors h3{background:#c7e2ad}.inventory-block.processors td{background:#ecf8e2}
.inventory-block.panel-parts h3{background:#d6e4f0}
.inventory-block.panel-parts td{background:#eef6fc}
.inventory-block.panel-parts th,
.inventory-block.panel-parts td{font-size:12px !important;padding:6px 7px !important;}
.inventory-block.panel-parts .inline-input{width:64px !important;}
.inventory-block.panel-parts .mini-save{font-size:10px !important;padding:5px 6px !important;}
.check-ok{color:var(--green)!important;font-weight:900}.check-short{color:var(--red)!important;font-weight:900}.readonly-num{font-weight:900;text-decoration:none;color:#111}.inline-input{width:76px;background:#fff;color:#000;border:1px solid #555;border-radius:4px;padding:5px 6px;font-weight:900;text-align:center}.inline-inventory-form{display:inline-flex;align-items:center;gap:4px;margin:0}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px}.settings-grid label{display:block;font-weight:900;margin-bottom:6px}.settings-grid input,.settings-grid select{width:100%;background:#111;color:#fff;border:1px solid #555;border-radius:5px;padding:10px}.section p{padding:0 14px}.actions.left{padding:0 14px 14px;justify-content:flex-start}.flash{padding:10px 12px;border-radius:6px;margin:0 0 12px;background:#163154;border:1px solid #2a5c91;color:#dbeafe}.flash.error{background:#3b1111;border-color:#7f1d1d;color:#fecaca}.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.72);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}.modal{background:#1b1b1b;border:1px solid #555;border-radius:8px;box-shadow:0 25px 90px rgba(0,0,0,.65);width:min(980px,96vw);max-height:90vh;overflow:auto}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #444}.modal-body{padding:18px 20px}.form-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}label{display:block;color:#ddd;font-size:12px;font-weight:900;margin-bottom:6px}input,select,textarea{width:100%;background:#222;color:#fff;border:1px solid #555;border-radius:5px;padding:10px}textarea{min-height:80px}.check-panel{margin-top:14px;display:block}.check-card{background:#202020;border:1px solid #555;border-radius:5px;padding:12px;margin-bottom:8px}.check-card strong{display:block;font-size:16px;margin-bottom:6px}.actions{display:flex;justify-content:flex-end;gap:10px;padding-top:16px}@media(max-width:1599px){.inventory-columns{grid-template-columns:1fr}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.layout{display:block}.sidebar{position:static;width:auto;height:auto}.main{padding:12px}.cards,.form-grid,.settings-grid{grid-template-columns:1fr}.search{min-width:0;width:100%}.toolbar,.topbar{align-items:flex-start;flex-direction:column}}

/* Active Jobs page compact fit */
.low-count{display:inline-block;background:#f03;color:#fff;border-radius:20px;padding:3px 9px;margin-left:5px;text-decoration:none;font-weight:900}.low-count:hover{filter:brightness(1.15)}
.no-title-toolbar{justify-content:flex-end;padding:10px 12px}.active-jobs-section .table-wrap{overflow-x:visible}.jobs-fit-table{width:100%;min-width:0;table-layout:fixed}.jobs-fit-table th,.jobs-fit-table td{padding:7px 7px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.jobs-fit-table th:nth-child(1),.jobs-fit-table td:nth-child(1){width:62px}.jobs-fit-table th:nth-child(2),.jobs-fit-table td:nth-child(2){width:92px}.jobs-fit-table th:nth-child(3),.jobs-fit-table td:nth-child(3){width:82px}.jobs-fit-table th:nth-child(4),.jobs-fit-table td:nth-child(4){width:190px}.jobs-fit-table th:nth-child(5),.jobs-fit-table td:nth-child(5){width:58px}.jobs-fit-table th:nth-child(6),.jobs-fit-table td:nth-child(6){width:82px}.jobs-fit-table th:nth-child(7),.jobs-fit-table td:nth-child(7){width:55px}.jobs-fit-table th:nth-child(8),.jobs-fit-table td:nth-child(8){width:88px}.jobs-fit-table th:nth-child(9),.jobs-fit-table td:nth-child(9){width:45px}.jobs-fit-table th:nth-child(10),.jobs-fit-table td:nth-child(10){width:80px}.jobs-fit-table th:nth-child(11),.jobs-fit-table td:nth-child(11){width:95px}.jobs-fit-table th:nth-child(12),.jobs-fit-table td:nth-child(12){width:140px}.jobs-fit-table th:nth-child(13),.jobs-fit-table td:nth-child(13){width:68px}.jobs-fit-table th:nth-child(14),.jobs-fit-table td:nth-child(14){width:72px}.jobs-fit-table th:nth-child(15),.jobs-fit-table td:nth-child(15){width:155px}.jobs-fit-table .pill{padding:4px 8px;font-size:11px}.jobs-fit-table .inline-select{padding:5px 5px;font-size:12px}.jobs-fit-table .action-cell{white-space:nowrap;overflow:visible}.jobs-fit-table .action-btn{padding:6px 8px;font-size:11px}.notes-cell{max-width:140px}.job-name-cell{max-width:190px}
@media(max-width:1350px){.jobs-fit-table th,.jobs-fit-table td{font-size:11px;padding:6px 5px}.jobs-fit-table th:nth-child(12),.jobs-fit-table td:nth-child(12){display:none}.jobs-fit-table th:nth-child(10),.jobs-fit-table td:nth-child(10){display:none}.jobs-fit-table th:nth-child(15),.jobs-fit-table td:nth-child(15){width:145px}.jobs-fit-table .action-btn{padding:5px 6px}}
@media(max-width:1100px){.active-jobs-section .table-wrap{overflow-x:auto}.jobs-fit-table{min-width:1050px}}

/* Final Active Jobs fit: show every column and action button inside the browser width */
.active-jobs-section .table-wrap.jobs-fit-wrap{
  overflow-x:hidden !important;
  width:100%;
}
.active-jobs-section .jobs-fit-table{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
  border-collapse:collapse;
}
.active-jobs-section .jobs-fit-table th,
.active-jobs-section .jobs-fit-table td{
  padding:6px 5px !important;
  font-size:clamp(9px, .72vw, 12px) !important;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.active-jobs-section .jobs-fit-table th:nth-child(1), .active-jobs-section .jobs-fit-table td:nth-child(1){width:5.0%;}
.active-jobs-section .jobs-fit-table th:nth-child(2), .active-jobs-section .jobs-fit-table td:nth-child(2){width:7.2%;}
.active-jobs-section .jobs-fit-table th:nth-child(3), .active-jobs-section .jobs-fit-table td:nth-child(3){width:6.4%;}
.active-jobs-section .jobs-fit-table th:nth-child(4), .active-jobs-section .jobs-fit-table td:nth-child(4){width:15.0%;}
.active-jobs-section .jobs-fit-table th:nth-child(5), .active-jobs-section .jobs-fit-table td:nth-child(5){width:4.4%;}
.active-jobs-section .jobs-fit-table th:nth-child(6), .active-jobs-section .jobs-fit-table td:nth-child(6){width:6.3%;}
.active-jobs-section .jobs-fit-table th:nth-child(7), .active-jobs-section .jobs-fit-table td:nth-child(7){width:4.0%;}
.active-jobs-section .jobs-fit-table th:nth-child(8), .active-jobs-section .jobs-fit-table td:nth-child(8){width:6.2%;}
.active-jobs-section .jobs-fit-table th:nth-child(9), .active-jobs-section .jobs-fit-table td:nth-child(9){width:3.6%;}
.active-jobs-section .jobs-fit-table th:nth-child(10), .active-jobs-section .jobs-fit-table td:nth-child(10){width:6.2%;}
.active-jobs-section .jobs-fit-table th:nth-child(11), .active-jobs-section .jobs-fit-table td:nth-child(11){width:7.2%;}
.active-jobs-section .jobs-fit-table th:nth-child(12), .active-jobs-section .jobs-fit-table td:nth-child(12){width:10.2%;}
.active-jobs-section .jobs-fit-table th:nth-child(13), .active-jobs-section .jobs-fit-table td:nth-child(13){width:5.1%;}
.active-jobs-section .jobs-fit-table th:nth-child(14), .active-jobs-section .jobs-fit-table td:nth-child(14){width:5.4%;}
.active-jobs-section .jobs-fit-table th:nth-child(15), .active-jobs-section .jobs-fit-table td:nth-child(15){width:11.6%;}
.active-jobs-section .jobs-fit-table .pill{
  padding:3px 6px !important;
  font-size:clamp(8px, .63vw, 11px) !important;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.active-jobs-section .jobs-fit-table .inline-select{
  width:100%;
  min-width:0;
  padding:4px 2px !important;
  font-size:clamp(8px, .63vw, 11px) !important;
}
.active-jobs-section .jobs-fit-table .action-cell{
  overflow:visible !important;
  white-space:normal !important;
}
.active-jobs-section .jobs-fit-table .action-cell form{display:inline-block !important;margin:0 1px 2px 0 !important;}
.active-jobs-section .jobs-fit-table .action-btn{
  padding:4px 5px !important;
  font-size:clamp(8px, .62vw, 10px) !important;
  line-height:1.1;
  margin:0;
}
@media(max-width:1250px){
  .active-jobs-section .jobs-fit-table th,
  .active-jobs-section .jobs-fit-table td{padding:5px 3px !important;}
  .active-jobs-section .jobs-fit-table .action-btn{padding:3px 4px !important;}
}
@media(max-width:900px){
  .active-jobs-section .jobs-fit-table th,
  .active-jobs-section .jobs-fit-table td{font-size:8px !important;padding:4px 2px !important;}
  .active-jobs-section .jobs-fit-table .action-btn{font-size:8px !important;padding:2px 3px !important;}
  .active-jobs-section .jobs-fit-table .pill{font-size:8px !important;padding:2px 3px !important;}
}

.required-mark{color:#ff4757;font-weight:900}
.field-error{border-color:#ff1744!important;box-shadow:0 0 0 2px rgba(255,23,68,.22)!important;background:#2a1418!important}
.form-warning{margin-top:14px;border:1px solid #ff1744;background:#351016;color:#ffd2d8;border-radius:6px;padding:10px 12px;font-weight:900}
.btn:disabled{opacity:.45;cursor:not-allowed;filter:none}
.user-card{border:1px solid #333;border-radius:6px;background:#151515;margin:8px 0 18px;padding:12px}.user-name{font-weight:900}.user-role{color:#8db4ff;font-size:12px;font-weight:900;margin-top:3px}.logout-link{display:inline-block;margin-top:8px;color:#ddd;text-decoration:none;font-weight:900}.logout-link:hover{color:#fff}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at top,#1c1c1d,#0f0f10)}.login-card{width:min(420px,92vw);background:#151515;border:1px solid #333;border-radius:9px;padding:26px;box-shadow:0 25px 90px rgba(0,0,0,.45)}.login-brand{margin-bottom:22px}.login-card label{margin-top:12px}.login-card input{margin-bottom:10px}.login-btn{width:100%;margin-top:12px}.login-help{color:var(--muted);font-size:12px;margin-top:14px;text-align:center}.reset-form{display:flex;gap:8px;align-items:center}.reset-form input{max-width:220px}.reset-form .btn{padding:8px 10px}

/* Add inventory item form */
.add-inventory-section{margin-bottom:16px}
.add-inventory-form{padding:14px}
.add-inventory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end}
.add-inventory-grid label{display:block;color:#ddd;font-size:12px;font-weight:900;margin-bottom:6px}
.add-inventory-actions{display:flex;align-items:end}
.add-inventory-actions .btn{width:100%}
@media(max-width:1200px){.add-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.add-inventory-grid{grid-template-columns:1fr}}
.processor-rows{display:flex;flex-direction:column;gap:8px;margin-top:4px}.processor-row{display:grid;grid-template-columns:minmax(220px,1fr) 90px auto;gap:8px;align-items:end}.processor-row select,.processor-row input{width:100%}.small-btn{padding:7px 10px;font-size:12px;margin-top:8px}.remove-processor-row{padding:7px 10px;font-size:12px}.processor-row .field-error{border-color:#ef4444!important;box-shadow:0 0 0 1px rgba(239,68,68,.3)}
@media(max-width:700px){.processor-row{grid-template-columns:1fr 90px}.processor-row button{grid-column:1/-1}}


/* Archive icon beside item name (no extra action column) */
.item-name-cell{display:flex;align-items:center;justify-content:space-between;gap:8px;white-space:nowrap;}
.archive-inline-form{display:inline-flex;margin:0;}
.archive-icon{border:0;background:transparent;color:#111;cursor:pointer;font-size:15px;line-height:1;padding:2px 3px;border-radius:4px;opacity:.72;}
.archive-icon:hover{opacity:1;background:rgba(0,0,0,.12);}
.archived-inventory-section .table-wrap{overflow-x:auto;}


/* Clean archive icon inside item cell: removes black bars under item names */
.inventory-block td.item-name-cell{
  display:table-cell !important;
  background-clip:padding-box;
}
.item-name-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  width:100%;
}
.item-name-wrap .item-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.archive-inline-form{
  display:inline-flex !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  flex:0 0 auto;
}
.archive-icon{
  border:0 !important;
  background:transparent !important;
  color:#111 !important;
  cursor:pointer;
  font-size:15px;
  line-height:1;
  padding:2px 3px;
  border-radius:4px;
  opacity:.75;
}
.archive-icon:hover{opacity:1;background:rgba(0,0,0,.12)!important;}
.archived-inventory-section .toolbar{align-items:center;}
.archived-inventory-section .action-cell form{margin-right:4px;}


/* Settings user table layout fixes */
.inline-role-form{display:grid !important;grid-template-columns:minmax(160px,1fr) auto;gap:8px;align-items:center;width:100%;margin:0;}
.inline-role-form select{width:100%;min-width:0;}
.inline-role-form .btn{white-space:nowrap;padding:8px 10px;}
.reset-form{display:grid !important;grid-template-columns:minmax(160px,220px) auto;gap:8px;align-items:center;width:100%;margin:0;}
.reset-form input{width:100%;max-width:none;min-width:0;}
.reset-form .btn{white-space:nowrap;padding:8px 10px;}
@media(max-width:900px){.inline-role-form,.reset-form{grid-template-columns:1fr}.inline-role-form .btn,.reset-form .btn{width:100%;}}

/* Change report details should stay inside the screen */
.audit-table{width:100% !important;min-width:0 !important;table-layout:fixed;}
.audit-table th,.audit-table td{white-space:normal !important;overflow-wrap:anywhere;word-break:break-word;vertical-align:top;}
.audit-table th:nth-child(1),.audit-table td:nth-child(1){width:150px;}
.audit-table th:nth-child(2),.audit-table td:nth-child(2){width:90px;}
.audit-table th:nth-child(3),.audit-table td:nth-child(3){width:130px;}
.audit-table th:nth-child(4),.audit-table td:nth-child(4){width:80px;}
.audit-table th:nth-child(5),.audit-table td:nth-child(5){width:210px;}
.audit-table .details-cell{max-width:100%;line-height:1.35;}
.search-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.search-form .search{min-width:min(360px,100%);}

/* Inventory search visibility */
#inventorySearch{max-width:360px;width:min(360px,100%);}
.pill.pending{background:#fff3cd;color:#9a6700;border-color:#facc15;}
.pill.approved{background:#102f1a;color:#86efac;border-color:#22c55e;}
.btn.warning{background:#f59e0b;color:#111;border-color:#d97706;}
.form-warning{border:1px solid #f59e0b;background:#2b210e;color:#fbbf24;padding:10px;border-radius:8px;margin-top:10px;font-weight:700;}


/* Restore visible Active Jobs action buttons after approval-column update */
.active-jobs-section .table-wrap.jobs-fit-wrap{
  width:100% !important;
  overflow-x:hidden !important;
}
.active-jobs-section .jobs-fit-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.active-jobs-section .jobs-fit-table th,
.active-jobs-section .jobs-fit-table td{
  font-size:11px !important;
  padding:6px 4px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.active-jobs-section .jobs-fit-table .action-cell{
  overflow:visible !important;
  white-space:normal !important;
  line-height:1.1 !important;
}
.active-jobs-section .jobs-fit-table .action-cell form{
  display:inline-block !important;
  margin:0 2px 2px 0 !important;
}
.active-jobs-section .jobs-fit-table .action-btn{
  display:inline-block !important;
  padding:4px 5px !important;
  font-size:10px !important;
  line-height:1.1 !important;
}
.active-jobs-section .jobs-fit-table .inline-select{
  padding:4px 3px !important;
  font-size:10px !important;
}
.active-jobs-section .jobs-fit-table .pill{
  padding:3px 5px !important;
  font-size:10px !important;
}
@media(max-width:1350px){
  .active-jobs-section .jobs-fit-table th,
  .active-jobs-section .jobs-fit-table td{font-size:9px !important;padding:4px 2px !important;}
  .active-jobs-section .jobs-fit-table .action-btn{font-size:8px !important;padding:3px 3px !important;}
  .active-jobs-section .jobs-fit-table .pill{font-size:8px !important;padding:2px 3px !important;}
  .active-jobs-section .jobs-fit-table .inline-select{font-size:8px !important;padding:2px 2px !important;}
}

/* Password settings polish */
.password-change-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;align-items:start}.password-change-grid label{display:block;font-weight:900;margin-bottom:6px}.password-wrap{display:flex;gap:7px;align-items:center}.password-wrap input{width:100%;background:#111;color:#fff;border:1px solid #555;border-radius:5px;padding:10px}.show-pass{flex:0 0 auto;background:#303030;color:#fff;border:1px solid #555;border-radius:5px;padding:10px 12px;font-weight:900;cursor:pointer}.show-pass:hover{filter:brightness(1.15)}.password-right{display:flex;flex-direction:column;gap:8px}.confirm-label{margin-top:6px}.password-strength{font-size:12px;margin:0 0 2px}.password-strength.good{color:#22c55e}.password-strength.medium{color:#f59e0b}.password-strength.weak{color:#ff5f6d}.password-right .btn{align-self:start;margin-top:8px}.password-right .btn:disabled{opacity:.45;cursor:not-allowed;filter:none}@media(max-width:900px){.password-change-grid{grid-template-columns:1fr}.password-right .btn{align-self:stretch}}


/* Final inventory/completed-job fit fixes */
.inventory-block .table-wrap{
  overflow-x:hidden !important;
}
.inventory-block table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.inventory-block th,
.inventory-block td{
  font-size:13px !important;
  padding:7px 8px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.inventory-block th:first-child,
.inventory-block td:first-child{width:22% !important;min-width:0 !important;}
.inventory-block th:nth-child(2),
.inventory-block td:nth-child(2){width:12% !important;min-width:0 !important;}
.inventory-block th:nth-child(3),
.inventory-block td:nth-child(3){width:13% !important;min-width:0 !important;}
.inventory-block th:nth-child(4),
.inventory-block td:nth-child(4){width:12% !important;min-width:0 !important;}
.inventory-block th:nth-child(5),
.inventory-block td:nth-child(5){width:15% !important;min-width:0 !important;}
.inventory-block th:nth-child(6),
.inventory-block td:nth-child(6){width:12% !important;min-width:0 !important;}
.inventory-block th:nth-child(7),
.inventory-block td:nth-child(7){width:14% !important;min-width:0 !important;overflow:visible !important;text-overflow:clip !important;}
.inventory-block .inline-input{
  width:70px !important;
  max-width:100% !important;
  padding:5px 4px !important;
}
.inventory-block .mini-save{
  padding:6px 7px !important;
  font-size:11px !important;
  margin-left:4px !important;
}
.inventory-block .inline-inventory-form{
  max-width:100%;
  gap:3px !important;
}
.inventory-block.processors th,
.inventory-block.processors td,
.inventory-block.posters th,
.inventory-block.posters td{
  font-size:12px !important;
  padding:6px 7px !important;
}
.inventory-block.processors .inline-input,
.inventory-block.posters .inline-input{width:64px !important;}
.inventory-block.processors .mini-save,
.inventory-block.posters .mini-save{font-size:10px !important;padding:5px 6px !important;}

/* Completed jobs should stay inside the content width */
.completed-jobs-section .table-wrap{
  width:100% !important;
  overflow-x:hidden !important;
}
.completed-jobs-section table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.completed-jobs-section th,
.completed-jobs-section td{
  font-size:11px !important;
  padding:6px 5px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.completed-jobs-section .action-cell,
.completed-jobs-section td:last-child{
  overflow:visible !important;
  white-space:normal !important;
}
.completed-jobs-section .action-btn{
  font-size:10px !important;
  padding:6px 7px !important;
  white-space:nowrap !important;
}
@media(max-width:1350px){
  .inventory-block th,.inventory-block td{font-size:11px !important;padding:5px 4px !important;}
  .inventory-block .inline-input{width:54px !important;padding:4px 2px !important;}
  .inventory-block .mini-save{font-size:9px !important;padding:4px 4px !important;}
  .completed-jobs-section th,.completed-jobs-section td{font-size:9px !important;padding:4px 3px !important;}
  .completed-jobs-section .action-btn{font-size:8px !important;padding:4px 4px !important;}
}

/* Fix inventory Save buttons being cut off: stack Save under Reorder At input */
.inventory-block td:nth-child(7){
  overflow:visible !important;
}
.inventory-block td:nth-child(7) .inline-inventory-form{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px !important;
  width:100% !important;
  max-width:100% !important;
}
.inventory-block td:nth-child(7) .inline-input{
  width:58px !important;
  max-width:100% !important;
  margin:0 !important;
}
.inventory-block td:nth-child(7) .mini-save{
  width:58px !important;
  max-width:100% !important;
  margin:0 !important;
  padding:5px 3px !important;
  font-size:10px !important;
  line-height:1.1 !important;
  text-align:center !important;
}
.inventory-block th:nth-child(7),
.inventory-block td:nth-child(7){
  width:16% !important;
}
.inventory-block th:nth-child(1),
.inventory-block td:nth-child(1){width:20% !important;}
.inventory-block th:nth-child(2),
.inventory-block td:nth-child(2){width:10% !important;}
.inventory-block th:nth-child(3),
.inventory-block td:nth-child(3){width:12% !important;}
.inventory-block th:nth-child(4),
.inventory-block td:nth-child(4){width:12% !important;}
.inventory-block th:nth-child(5),
.inventory-block td:nth-child(5){width:14% !important;}
.inventory-block th:nth-child(6),
.inventory-block td:nth-child(6){width:10% !important;}
@media(max-width:1599px){
  .inventory-block td:nth-child(7) .inline-input,
  .inventory-block td:nth-child(7) .mini-save{width:64px !important;}
}

/* Logo image replacement */
.brand-image{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:0;
  letter-spacing:.5px;
  overflow:visible;
  padding:4px 0 12px;
}
.brand-image img{
  width:220px;
  max-width:100%;
  height:auto;
  object-fit:contain;
  display:block;
  border-radius:0;
  overflow:visible;
}
.brand-image small{display:none;}
.login-brand{
  align-items:center;
  text-align:center;
  padding:0 0 18px;
}
.login-brand img{
  width:345px;
  max-width:100%;
  height:auto;
  margin:0 auto;
  object-fit:contain;
}
.add-user-grid{grid-template-columns:repeat(5,minmax(150px,1fr));align-items:end}
@media(max-width:1200px){.add-user-grid{grid-template-columns:repeat(2,minmax(180px,1fr));}}
@media(max-width:700px){.add-user-grid{grid-template-columns:1fr;}}

.remove-user-form{margin:0;}
.remove-user-form .btn{padding:8px 10px;white-space:nowrap;}
.users-table th,.users-table td{vertical-align:middle;}


/* Final logo/card cleanup */
.brand-image{overflow:visible !important;padding:8px 0 16px !important;margin-bottom:18px !important;}
.brand-image img{width:225px !important;max-width:100% !important;height:auto !important;object-fit:contain !important;display:block !important;overflow:visible !important;}
.login-brand{overflow:visible !important;padding:12px 0 22px !important;margin-bottom:10px !important;}
.login-brand img{width:360px !important;max-width:100% !important;height:auto !important;object-fit:contain !important;}
.dashboard-summary-cards{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
.inventory-section>.toolbar{margin:-12px -14px 12px -14px;}
.inventory-section>.toolbar .search{margin-left:auto;}
@media(max-width:900px){.dashboard-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}.inventory-section>.toolbar .search{width:100%;margin-left:0;}}

/* Logo hard fix: padded asset + no clipping anywhere */
.brand-image,
.login-brand{
  overflow: visible !important;
  line-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.sidebar .brand-image{
  padding: 6px 0 20px !important;
  margin: 0 0 18px 0 !important;
  width: 100% !important;
}
.sidebar .brand-image img{
  width: 225px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}
.login-card .login-brand{
  padding: 0 0 22px !important;
  margin: 0 0 12px 0 !important;
}
.login-card .login-brand img{
  width: 360px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}
/* Keep dashboard summary cards restricted to only the 4 panel families shown in dashboard.html */
.dashboard-summary-cards{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
@media(max-width:900px){.dashboard-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}}

/* Final R-logo only cleanup */
.brand-image,
.login-brand{
  overflow: visible !important;
  line-height: 0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.sidebar .brand-image{
  padding: 12px 0 6px !important;
  margin: 0 auto 4px !important;
  width:100% !important;
}
.sidebar .brand-image img{
  width: 118px !important;
  max-width: 118px !important;
  height: auto !important;
  object-fit: contain !important;
  display:block !important;
}
.app-title{
  text-align:center;
  text-transform:uppercase;
  letter-spacing:1.7px;
  font-weight:900;
  font-size:15px;
  margin:0 0 26px;
  color:#fff;
}
.login-card .login-brand{
  padding: 0 0 8px !important;
  margin: 0 auto 0 !important;
}
.login-card .login-brand img{
  width: 230px !important;
  max-width: 88% !important;
  height:auto !important;
  object-fit:contain !important;
  display:block !important;
}
.login-title{
  text-align:center;
  text-transform:uppercase;
  letter-spacing:1.7px;
  font-weight:900;
  font-size:15px;
  margin:6px 0 24px;
  color:#fff;
}
.login-card{width:min(460px,92vw) !important;}
/* Dashboard top summary cards: only the four panel families */
.dashboard-summary-cards{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
@media(max-width:900px){.dashboard-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}}

/* Final logo implementation - full Refresh LED mark, no duplicate Inventory System text */
.sidebar .brand-image,
.login-card .login-brand{
  overflow: visible !important;
  line-height: normal !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.sidebar .brand-image{
  padding: 16px 0 18px !important;
  margin: 0 auto 18px !important;
  width: 100% !important;
}
.sidebar .brand-image img{
  width: 220px !important;
  max-width: 220px !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}
.login-card .login-brand{
  padding: 0 0 24px !important;
  margin: 0 auto 0 !important;
}
.login-card .login-brand img{
  width: 390px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}
.app-title,
.login-title{
  display: none !important;
}
.login-card{
  width: min(520px, 92vw) !important;
}

/* FINAL transparent Refresh LED logo placement */
.brand-image, .login-brand, .brand-image img, .login-brand img{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
.sidebar .brand-image{
  padding: 10px 0 18px !important;
  margin: 0 auto 18px !important;
  overflow: visible !important;
}
.sidebar .brand-image img{
  width: 220px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}
.login-card .login-brand{
  padding: 0 0 30px !important;
  margin: 0 auto 0 !important;
  overflow: visible !important;
}
.login-card .login-brand img{
  width: 420px !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}
.app-title, .login-title{display:none !important;}

/* Email alert recipient manager */
.alert-email-manager{margin:18px 14px 14px;padding:14px;border:1px solid #333;border-radius:10px;background:#151515}
.alert-email-manager h3{margin:0 0 6px;font-size:18px;text-transform:uppercase;letter-spacing:.4px}
.alert-email-add-form{display:grid;grid-template-columns:minmax(240px,1fr) 130px;gap:10px;align-items:end;margin:12px 0 14px;max-width:720px}
.alert-email-list{display:grid;gap:8px;max-width:720px}
.alert-email-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #333;border-radius:8px;background:#101010}
.alert-email-row span{overflow-wrap:anywhere}
@media(max-width:700px){.alert-email-add-form{grid-template-columns:1fr}.alert-email-row{align-items:flex-start;flex-direction:column}.alert-email-row form{width:100%}.alert-email-row button{width:100%}}

/* Ship Date + vertical processors fit updates */
.processors-cell{
  white-space:normal !important;
  line-height:1.15 !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.processor-line{
  display:block;
  white-space:nowrap;
  margin:0 0 2px 0;
}
.processor-line span{font-weight:900;color:#dbeafe;}
.dashboard-jobs-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.dashboard-jobs-table th,
.dashboard-jobs-table td{
  font-size:11px !important;
  padding:6px 5px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.dashboard-jobs-table .processors-cell{
  font-size:10px !important;
}
.dashboard-jobs-table th:nth-child(4),
.dashboard-jobs-table td:nth-child(4){width:16% !important;}
.dashboard-jobs-table th:nth-child(8),
.dashboard-jobs-table td:nth-child(8){width:9% !important;}
.dashboard-jobs-table th:nth-child(11),
.dashboard-jobs-table td:nth-child(11){width:8% !important;}
.active-jobs-section .jobs-fit-table .processors-cell{
  white-space:normal !important;
  font-size:9px !important;
  line-height:1.1 !important;
}
.completed-jobs-section .processors-cell{
  white-space:normal !important;
  line-height:1.1 !important;
}
@media(max-width:1350px){
  .dashboard-jobs-table th,.dashboard-jobs-table td{font-size:9px !important;padding:4px 3px !important;}
  .dashboard-jobs-table .processors-cell{font-size:8px !important;}
}


/* Requested table fit updates: wider Status, narrower Zoho, wider Packed, dashboard Ship Date editor */
.active-jobs-section .jobs-fit-table col.status-col{width:140px !important;min-width:140px !important;}
.active-jobs-section .jobs-fit-table th.status-col,
.active-jobs-section .jobs-fit-table td.status-col{width:140px !important;min-width:140px !important;text-align:center;overflow:visible !important;}
.active-jobs-section .jobs-fit-table .pill{padding:5px 12px !important;}
.active-jobs-section .jobs-fit-table col.zoho-col{width:85px !important;min-width:85px !important;}
.active-jobs-section .jobs-fit-table th.zoho-col,
.active-jobs-section .jobs-fit-table td.zoho-col{width:85px !important;min-width:85px !important;}
.active-jobs-section .jobs-fit-table col.packed-col{width:120px !important;min-width:120px !important;}
.active-jobs-section .jobs-fit-table th.packed-col,
.active-jobs-section .jobs-fit-table td.packed-col{width:120px !important;min-width:120px !important;}
.active-jobs-section .jobs-fit-table .inline-select{width:100% !important;min-width:0 !important;}
.dashboard-jobs-table th.status-col,
.dashboard-jobs-table td.status-col{width:140px !important;min-width:140px !important;text-align:center;}
.dashboard-jobs-table .pill{padding:5px 12px !important;}
.dashboard-jobs-table th.zoho-col,
.dashboard-jobs-table td.zoho-col{width:85px !important;min-width:85px !important;}
.dashboard-jobs-table th.packed-col,
.dashboard-jobs-table td.packed-col{width:120px !important;min-width:120px !important;}
.inline-ship-date-form{margin:0;}
.inline-date{width:135px !important;min-width:135px;background:#222;color:#fff;border:1px solid #555;border-radius:5px;padding:6px 7px;font-weight:700;}


/* Processor table: no Pitch column and Save button always visible */
.inventory-block.processors table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.inventory-block.processors th,
.inventory-block.processors td{
  white-space:nowrap !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.processors th:nth-child(1),
.inventory-block.processors td:nth-child(1){width:26% !important;}
.inventory-block.processors th:nth-child(2),
.inventory-block.processors td:nth-child(2){width:13% !important;}
.inventory-block.processors th:nth-child(3),
.inventory-block.processors td:nth-child(3){width:13% !important;}
.inventory-block.processors th:nth-child(4),
.inventory-block.processors td:nth-child(4){width:15% !important;}
.inventory-block.processors th:nth-child(5),
.inventory-block.processors td:nth-child(5){width:12% !important;}
.inventory-block.processors th:nth-child(6),
.inventory-block.processors td:nth-child(6){width:21% !important;}
.inventory-block.processors .inline-inventory-form{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px !important;
  width:100% !important;
}
.inventory-block.processors .inline-input{
  width:54px !important;
  min-width:48px !important;
  padding:5px 4px !important;
}
.inventory-block.processors .mini-save{
  width:auto !important;
  min-width:42px !important;
  margin-left:0 !important;
  padding:5px 6px !important;
  display:inline-block !important;
}

/* Panel Parts table: no Pitch column and long item names get more room */
.inventory-block.panel-parts table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.inventory-block.panel-parts th,
.inventory-block.panel-parts td{
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.panel-parts th:nth-child(1),
.inventory-block.panel-parts td:nth-child(1){width:36% !important;}
.inventory-block.panel-parts th:nth-child(2),
.inventory-block.panel-parts td:nth-child(2){width:11% !important;}
.inventory-block.panel-parts th:nth-child(3),
.inventory-block.panel-parts td:nth-child(3){width:11% !important;}
.inventory-block.panel-parts th:nth-child(4),
.inventory-block.panel-parts td:nth-child(4){width:14% !important;}
.inventory-block.panel-parts th:nth-child(5),
.inventory-block.panel-parts td:nth-child(5){width:11% !important;}
.inventory-block.panel-parts th:nth-child(6),
.inventory-block.panel-parts td:nth-child(6){width:17% !important;}
.inventory-block.panel-parts .inline-inventory-form{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px !important;
  width:100% !important;
}
.inventory-block.panel-parts .inline-input{
  width:58px !important;
  min-width:50px !important;
  padding:5px 4px !important;
}
.inventory-block.panel-parts .mini-save{
  width:auto !important;
  min-width:42px !important;
  margin-left:0 !important;
  padding:5px 6px !important;
  display:inline-block !important;
}


/* Mech/Vegas inventory columns and wider Dashboard Ship Date picker */
.inventory-block td:last-child{
  overflow:visible !important;
}
.inventory-block td:last-child .inline-input{
  width:54px !important;
  max-width:100% !important;
  padding:5px 4px !important;
}
.inventory-block td:last-child .mini-save{
  min-width:52px !important;
  margin-left:3px !important;
  padding:5px 6px !important;
  font-size:10px !important;
}
.inventory-block .inline-input{
  width:54px !important;
  min-width:46px !important;
}
.inventory-block.diamond th:nth-child(1),
.inventory-block.diamond td:nth-child(1),
.inventory-block.rzr th:nth-child(1),
.inventory-block.rzr td:nth-child(1),
.inventory-block.rx41 th:nth-child(1),
.inventory-block.rx41 td:nth-child(1),
.inventory-block.posters th:nth-child(1),
.inventory-block.posters td:nth-child(1){width:19% !important;}
.inventory-block.diamond th:nth-child(2),
.inventory-block.diamond td:nth-child(2),
.inventory-block.rzr th:nth-child(2),
.inventory-block.rzr td:nth-child(2),
.inventory-block.rx41 th:nth-child(2),
.inventory-block.rx41 td:nth-child(2),
.inventory-block.posters th:nth-child(2),
.inventory-block.posters td:nth-child(2){width:9% !important;}
.inventory-block.diamond th:nth-child(3),
.inventory-block.diamond td:nth-child(3),
.inventory-block.rzr th:nth-child(3),
.inventory-block.rzr td:nth-child(3),
.inventory-block.rx41 th:nth-child(3),
.inventory-block.rx41 td:nth-child(3),
.inventory-block.posters th:nth-child(3),
.inventory-block.posters td:nth-child(3){width:10% !important;}
.inventory-block.diamond th:nth-child(4),
.inventory-block.diamond td:nth-child(4),
.inventory-block.rzr th:nth-child(4),
.inventory-block.rzr td:nth-child(4),
.inventory-block.rx41 th:nth-child(4),
.inventory-block.rx41 td:nth-child(4),
.inventory-block.posters th:nth-child(4),
.inventory-block.posters td:nth-child(4){width:10% !important;}
.inventory-block.diamond th:nth-child(5),
.inventory-block.diamond td:nth-child(5),
.inventory-block.rzr th:nth-child(5),
.inventory-block.rzr td:nth-child(5),
.inventory-block.rx41 th:nth-child(5),
.inventory-block.rx41 td:nth-child(5),
.inventory-block.posters th:nth-child(5),
.inventory-block.posters td:nth-child(5){width:12% !important;}
.inventory-block.diamond th:nth-child(6),
.inventory-block.diamond td:nth-child(6),
.inventory-block.rzr th:nth-child(6),
.inventory-block.rzr td:nth-child(6),
.inventory-block.rx41 th:nth-child(6),
.inventory-block.rx41 td:nth-child(6),
.inventory-block.posters th:nth-child(6),
.inventory-block.posters td:nth-child(6){width:13% !important;}
.inventory-block.diamond th:nth-child(7),
.inventory-block.diamond td:nth-child(7),
.inventory-block.rzr th:nth-child(7),
.inventory-block.rzr td:nth-child(7),
.inventory-block.rx41 th:nth-child(7),
.inventory-block.rx41 td:nth-child(7),
.inventory-block.posters th:nth-child(7),
.inventory-block.posters td:nth-child(7){width:10% !important;}
.inventory-block.diamond th:nth-child(8),
.inventory-block.diamond td:nth-child(8),
.inventory-block.rzr th:nth-child(8),
.inventory-block.rzr td:nth-child(8),
.inventory-block.rx41 th:nth-child(8),
.inventory-block.rx41 td:nth-child(8),
.inventory-block.posters th:nth-child(8),
.inventory-block.posters td:nth-child(8){width:17% !important;}

.inventory-block.processors th:nth-child(1),
.inventory-block.processors td:nth-child(1){width:24% !important;}
.inventory-block.processors th:nth-child(2),
.inventory-block.processors td:nth-child(2){width:11% !important;}
.inventory-block.processors th:nth-child(3),
.inventory-block.processors td:nth-child(3){width:11% !important;}
.inventory-block.processors th:nth-child(4),
.inventory-block.processors td:nth-child(4){width:12% !important;}
.inventory-block.processors th:nth-child(5),
.inventory-block.processors td:nth-child(5){width:13% !important;}
.inventory-block.processors th:nth-child(6),
.inventory-block.processors td:nth-child(6){width:10% !important;}
.inventory-block.processors th:nth-child(7),
.inventory-block.processors td:nth-child(7){width:19% !important;}
.inventory-block.panel-parts th:nth-child(1),
.inventory-block.panel-parts td:nth-child(1){width:31% !important;}
.inventory-block.panel-parts th:nth-child(2),
.inventory-block.panel-parts td:nth-child(2){width:10% !important;}
.inventory-block.panel-parts th:nth-child(3),
.inventory-block.panel-parts td:nth-child(3){width:10% !important;}
.inventory-block.panel-parts th:nth-child(4),
.inventory-block.panel-parts td:nth-child(4){width:11% !important;}
.inventory-block.panel-parts th:nth-child(5),
.inventory-block.panel-parts td:nth-child(5){width:13% !important;}
.inventory-block.panel-parts th:nth-child(6),
.inventory-block.panel-parts td:nth-child(6){width:9% !important;}
.inventory-block.panel-parts th:nth-child(7),
.inventory-block.panel-parts td:nth-child(7){width:16% !important;}

.dashboard-jobs-table .inline-date{
  width:170px !important;
  min-width:170px !important;
  box-sizing:border-box !important;
}
.dashboard-jobs-table th:nth-child(11),
.dashboard-jobs-table td:nth-child(11){
  width:180px !important;
  min-width:180px !important;
  overflow:visible !important;
}
@media(max-width:1350px){
  .dashboard-jobs-table .inline-date{width:155px !important;min-width:155px !important;}
  .dashboard-jobs-table th:nth-child(11),
  .dashboard-jobs-table td:nth-child(11){width:165px !important;min-width:165px !important;}
}


/* === Final repair: Active Jobs buttons visible + corrected dashboard counts === */
.active-jobs-section .table-wrap.jobs-fit-wrap{
  overflow-x:hidden !important;
  width:100% !important;
}
.active-jobs-section .jobs-fit-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.active-jobs-section .jobs-fit-table th,
.active-jobs-section .jobs-fit-table td{
  padding:5px 4px !important;
  font-size:clamp(8px,.68vw,11px) !important;
  line-height:1.15 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
/* 17-column Active Jobs layout: Job ID smaller, Job Name larger, Actions restored */
.active-jobs-section .jobs-fit-table th:nth-child(1), .active-jobs-section .jobs-fit-table td:nth-child(1){width:4.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(2), .active-jobs-section .jobs-fit-table td:nth-child(2){width:7% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(3), .active-jobs-section .jobs-fit-table td:nth-child(3){width:5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(4), .active-jobs-section .jobs-fit-table td:nth-child(4){width:5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(5), .active-jobs-section .jobs-fit-table td:nth-child(5){width:16% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(6), .active-jobs-section .jobs-fit-table td:nth-child(6){width:3.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(7), .active-jobs-section .jobs-fit-table td:nth-child(7){width:5.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(8), .active-jobs-section .jobs-fit-table td:nth-child(8){width:3.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(9), .active-jobs-section .jobs-fit-table td:nth-child(9){width:6.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(10), .active-jobs-section .jobs-fit-table td:nth-child(10){width:3.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(11), .active-jobs-section .jobs-fit-table td:nth-child(11){width:5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(12), .active-jobs-section .jobs-fit-table td:nth-child(12){width:7% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(13), .active-jobs-section .jobs-fit-table td:nth-child(13){width:4.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(14), .active-jobs-section .jobs-fit-table td:nth-child(14){width:4.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(15), .active-jobs-section .jobs-fit-table td:nth-child(15){width:3.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(16), .active-jobs-section .jobs-fit-table td:nth-child(16){width:4.5% !important;}
.active-jobs-section .jobs-fit-table th:nth-child(17), .active-jobs-section .jobs-fit-table td:nth-child(17){width:10.5% !important;}
.active-jobs-section .jobs-fit-table td.action-cell,
.active-jobs-section .jobs-fit-table th:last-child,
.active-jobs-section .jobs-fit-table td:last-child{
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:normal !important;
}
.active-jobs-section .jobs-fit-table .action-cell form{
  display:inline-block !important;
  margin:0 1px 2px 0 !important;
}
.active-jobs-section .jobs-fit-table .action-btn{
  display:inline-block !important;
  visibility:visible !important;
  padding:4px 5px !important;
  font-size:clamp(7px,.56vw,9px) !important;
  line-height:1.05 !important;
  margin:0 !important;
  white-space:nowrap !important;
}
.active-jobs-section .jobs-fit-table .processors-cell{
  white-space:normal !important;
  line-height:1.05 !important;
}
.active-jobs-section .jobs-fit-table .pill{
  padding:3px 6px !important;
  font-size:clamp(7px,.58vw,10px) !important;
  max-width:100% !important;
}
.active-jobs-section .jobs-fit-table .inline-select{
  width:100% !important;
  min-width:0 !important;
  padding:3px 2px !important;
  font-size:clamp(7px,.58vw,10px) !important;
}
@media(max-width:1100px){
  .active-jobs-section .table-wrap.jobs-fit-wrap{overflow-x:auto !important;}
  .active-jobs-section .jobs-fit-table{min-width:1120px !important;}
}


/* Dashboard pixel-pitch summary cards */
.dashboard-summary-cards.dashboard-pitch-cards{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  align-items:stretch;
}
.pitch-card{
  padding:14px 10px !important;
}
.pitch-card .label{
  font-size:15px;
  margin-bottom:10px;
}
.pitch-breakdown{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(72px,1fr));
  gap:8px;
}
.pitch-mini{
  border:1px solid #3f3f3f;
  border-radius:6px;
  background:#121212;
  padding:7px 5px;
  min-height:78px;
}
.pitch-label{
  font-weight:900;
  color:#fff;
  font-size:14px;
  margin-bottom:4px;
}
.pitch-free{
  font-size:22px;
  line-height:1.1;
  font-weight:900;
}
.pitch-caption{
  color:#cbd5e1;
  font-size:10px;
  margin-top:2px;
}
.pitch-incoming{
  color:#facc15;
  font-size:11px;
  font-weight:800;
  margin-top:4px;
}

/* Split Spider into its own RX41-style table */
.inventory-block.spider h3{background:#c77fb0;}
.inventory-block.spider td{background:#efd1e4;}

@media(max-width:1400px){
  .dashboard-summary-cards.dashboard-pitch-cards{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media(max-width:900px){
  .dashboard-summary-cards.dashboard-pitch-cards{
    grid-template-columns:repeat(1,minmax(0,1fr)) !important;
  }
}

/* Keep dashboard date picker fully visible after removing Total Qty */
.dashboard-jobs-table th.ship-date-col,
.dashboard-jobs-table td.ship-date-col{
  width:180px !important;
  min-width:180px !important;
}
.dashboard-jobs-table .inline-date{
  width:170px !important;
  min-width:170px !important;
}


/* Dashboard summary cards: centered at every screen width */
.dashboard-summary-cards{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-items:stretch !important;
  gap:10px !important;
  grid-template-columns:none !important;
}
.dashboard-summary-cards .card{
  flex:1 1 260px !important;
  max-width:360px !important;
  min-width:240px !important;
}
.pitch-eta{
  margin-top:2px;
  color:#facc15;
  font-size:11px;
  font-weight:900;
  line-height:1.15;
}
.dashboard-jobs-table th.ship-date-col,
.dashboard-jobs-table td.ship-date-col{
  width:165px !important;
  min-width:165px !important;
  overflow:visible !important;
}
.dashboard-jobs-table .inline-date{
  width:155px !important;
  min-width:155px !important;
}


/* Final dashboard card and Active Jobs table polish */
.pitch-breakdown{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-content:flex-start !important;
  gap:8px !important;
  width:100% !important;
}
.pitch-mini{
  flex:0 0 92px !important;
  width:92px !important;
  max-width:92px !important;
}
.inventory-block.spider h3{background:#d08db6 !important;}
.inventory-block.spider td{background:#edd4e2 !important;}

/* Active Jobs table: compact Status/Zoho/Packed and no Total Qty column */
.active-jobs-section .jobs-fit-table col.status-col{width:112px !important;min-width:112px !important;}
.active-jobs-section .jobs-fit-table th.status-col,
.active-jobs-section .jobs-fit-table td.status-col{width:112px !important;min-width:112px !important;text-align:center !important;}
.active-jobs-section .jobs-fit-table col.zoho-col{width:70px !important;min-width:70px !important;}
.active-jobs-section .jobs-fit-table th.zoho-col,
.active-jobs-section .jobs-fit-table td.zoho-col{width:70px !important;min-width:70px !important;text-align:center !important;}
.active-jobs-section .jobs-fit-table col.packed-col{width:86px !important;min-width:86px !important;}
.active-jobs-section .jobs-fit-table th.packed-col,
.active-jobs-section .jobs-fit-table td.packed-col{width:86px !important;min-width:86px !important;text-align:center !important;}
.active-jobs-section .jobs-fit-table .pill.confirmed{padding:4px 9px !important;}
.active-jobs-section .jobs-fit-table .inline-select{padding:4px 4px !important;}
.active-jobs-section .jobs-fit-table col.job-id-col{width:80px !important;min-width:80px !important;}
.active-jobs-section .jobs-fit-table col.job-name-col{width:220px !important;min-width:220px !important;}



/* Final dashboard pitch-card centering:
   3 cards per row, and any partial last row is centered. */
.pitch-breakdown{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(72px, 92px)) !important;
  justify-content:center !important;
  justify-items:center !important;
  gap:8px !important;
}
.pitch-mini{
  width:100% !important;
  max-width:92px !important;
}

/* Final Active Jobs column tuning */
.active-jobs-section .jobs-fit-table{
  table-layout:fixed !important;
  width:100% !important;
  min-width:0 !important;
}
.active-jobs-section .jobs-fit-table col.status-col{width:112px !important;min-width:112px !important;}
.active-jobs-section .jobs-fit-table th.status-col,
.active-jobs-section .jobs-fit-table td.status-col{
  width:112px !important;
  min-width:112px !important;
  text-align:center !important;
  overflow:visible !important;
}
.active-jobs-section .jobs-fit-table .pill.confirmed,
.active-jobs-section .jobs-fit-table .pill{
  padding:4px 9px !important;
  font-size:12px !important;
}
.active-jobs-section .jobs-fit-table col.job-id-col{width:78px !important;min-width:78px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(4),
.active-jobs-section .jobs-fit-table td:nth-child(4){
  width:78px !important;
  min-width:78px !important;
}
.active-jobs-section .jobs-fit-table col.job-name-col{width:260px !important;min-width:220px !important;}
.active-jobs-section .jobs-fit-table col.zoho-col,
.active-jobs-section .jobs-fit-table col.packed-col{
  width:86px !important;
  min-width:86px !important;
}
.active-jobs-section .jobs-fit-table th.zoho-col,
.active-jobs-section .jobs-fit-table td.zoho-col,
.active-jobs-section .jobs-fit-table th.packed-col,
.active-jobs-section .jobs-fit-table td.packed-col{
  width:86px !important;
  min-width:86px !important;
  text-align:center !important;
}
.active-jobs-section .jobs-fit-table .inline-select{
  width:100% !important;
  min-width:0 !important;
  padding:4px 4px !important;
}
.active-jobs-section .jobs-fit-table col.notes-col{width:auto !important;}
.active-jobs-section .jobs-fit-table .notes-cell{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.active-jobs-section .jobs-fit-table col.actions-col{width:78px !important;min-width:78px !important;}
.active-jobs-section .jobs-fit-table .action-btn{
  display:block !important;
  width:64px !important;
  margin:2px auto !important;
  padding:4px 5px !important;
  font-size:11px !important;
}

/* Dashboard cards always centered as a group */
.dashboard-summary-cards.dashboard-pitch-cards{
  justify-content:center !important;
}

/* Packing list pages */
.packing-year-cards{grid-template-columns:repeat(4,minmax(160px,1fr));justify-content:center;}
.packing-year-card{text-decoration:none;color:inherit;display:block;}
.packing-year-card.selected{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.35);}
.packing-generator-grid .span-2{grid-column:span 2;}
.packing-form textarea{min-height:180px;}
.packing-detail-body{padding:16px 18px;line-height:1.6;}
.packing-detail-body pre{white-space:pre-wrap;word-break:break-word;background:#111;border:1px solid #333;border-radius:6px;padding:14px;color:#fff;font-family:Arial,Helvetica,sans-serif;}
@media(max-width:900px){.packing-year-cards{grid-template-columns:1fr 1fr}.packing-generator-grid .span-2{grid-column:span 1}}


/* FINAL FIX: Active Jobs actions/flags alignment */
.active-jobs-section .table-wrap.jobs-fit-wrap{
  width:100% !important;
  overflow-x:auto !important;
}
.active-jobs-section .jobs-fit-table{
  width:100% !important;
  min-width:1280px !important;
  table-layout:fixed !important;
}
.active-jobs-section .jobs-fit-table th,
.active-jobs-section .jobs-fit-table td{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  vertical-align:middle !important;
}
.active-jobs-section .jobs-fit-table th:nth-child(1), .active-jobs-section .jobs-fit-table td:nth-child(1){width:70px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(2), .active-jobs-section .jobs-fit-table td:nth-child(2){width:120px !important; text-align:center !important;}
.active-jobs-section .jobs-fit-table th:nth-child(3), .active-jobs-section .jobs-fit-table td:nth-child(3){width:90px !important; text-align:center !important;}
.active-jobs-section .jobs-fit-table th:nth-child(4), .active-jobs-section .jobs-fit-table td:nth-child(4){width:88px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(5), .active-jobs-section .jobs-fit-table td:nth-child(5){width:300px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(6), .active-jobs-section .jobs-fit-table td:nth-child(6){width:56px !important; text-align:right !important;}
.active-jobs-section .jobs-fit-table th:nth-child(7), .active-jobs-section .jobs-fit-table td:nth-child(7){width:86px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(8), .active-jobs-section .jobs-fit-table td:nth-child(8){width:56px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(9), .active-jobs-section .jobs-fit-table td:nth-child(9){width:105px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(10), .active-jobs-section .jobs-fit-table td:nth-child(10){width:70px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(11), .active-jobs-section .jobs-fit-table td:nth-child(11){width:100px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(12), .active-jobs-section .jobs-fit-table td:nth-child(12){width:115px !important;}
.active-jobs-section .jobs-fit-table th:nth-child(13), .active-jobs-section .jobs-fit-table td:nth-child(13){width:72px !important; text-align:center !important;}
.active-jobs-section .jobs-fit-table th:nth-child(14), .active-jobs-section .jobs-fit-table td:nth-child(14){width:78px !important; text-align:center !important;}
.active-jobs-section .jobs-fit-table th:nth-child(15), .active-jobs-section .jobs-fit-table td:nth-child(15){width:96px !important; text-align:center !important;}
.active-jobs-section .jobs-fit-table .inline-flag-form{display:flex !important; justify-content:center !important; align-items:center !important; margin:0 !important; width:100% !important;}
.active-jobs-section .jobs-fit-table .inline-select{width:58px !important; min-width:58px !important; max-width:58px !important; padding:4px 4px !important; font-size:11px !important;}
.active-jobs-section .jobs-fit-table .action-cell{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px !important;
  overflow:visible !important;
  white-space:normal !important;
  padding-left:4px !important;
  padding-right:4px !important;
}
.active-jobs-section .jobs-fit-table .action-cell form{display:block !important;margin:0 !important;width:100% !important;text-align:center !important;}
.active-jobs-section .jobs-fit-table .action-btn{
  display:block !important;
  width:74px !important;
  margin:0 auto !important;
  padding:4px 6px !important;
  font-size:11px !important;
  line-height:1.15 !important;
  text-align:center !important;
}
.active-jobs-section .jobs-fit-table .pill{font-size:11px !important;padding:4px 9px !important;max-width:100% !important;}
@media(max-width:1350px){
  .active-jobs-section .table-wrap.jobs-fit-wrap{overflow-x:auto !important;}
  .active-jobs-section .jobs-fit-table{min-width:1280px !important;}
  .active-jobs-section .jobs-fit-table th,
  .active-jobs-section .jobs-fit-table td{font-size:11px !important;padding:6px 5px !important;}
  .active-jobs-section .jobs-fit-table .action-btn{font-size:11px !important;padding:4px 6px !important;}
  .active-jobs-section .jobs-fit-table .pill{font-size:11px !important;padding:4px 9px !important;}
  .active-jobs-section .jobs-fit-table .inline-select{font-size:11px !important;padding:4px !important;}
}

/* Packing list imported file links */
.packing-file-link{display:inline-block;margin-top:12px;}

/* Packing list archive: year/month/job breakdown */
.topbar-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.inline-year-form{display:flex;gap:8px;align-items:center;margin:0;background:transparent;border:0;padding:0}
.inline-year-form input{width:90px;min-width:90px;background:#111;color:#fff;border:1px solid #444;border-radius:6px;padding:9px 10px;font-weight:800}
.packing-year-cards{grid-template-columns:repeat(4,minmax(160px,1fr));gap:10px}
.packing-year-card{text-align:center;text-decoration:none;color:inherit}
.packing-year-card.selected{outline:2px solid #2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.25)}
.month-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.month-card{display:block;text-decoration:none;color:#fff;background:#171717;border:1px solid #444;border-radius:8px;padding:14px;text-align:center}
.month-card:hover{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.25)}
.month-title{font-weight:900;font-size:18px;margin-bottom:8px}.month-count{font-size:28px;font-weight:900;color:#5b6cff;line-height:1}
.packing-month-table th:nth-child(1),.packing-month-table td:nth-child(1){width:110px;min-width:110px}.packing-month-table th:nth-child(4),.packing-month-table td:nth-child(4),.packing-month-table th:nth-child(5),.packing-month-table td:nth-child(5){width:160px;min-width:160px;text-align:center}
@media(max-width:900px){.packing-year-cards{grid-template-columns:repeat(2,minmax(150px,1fr))}.topbar-actions{justify-content:flex-start}}

/* Completed Jobs archive layout matching Packing Lists page */
.completed-year-cards{grid-template-columns:repeat(4,minmax(160px,1fr));justify-content:center;gap:10px;}
.completed-archive-table th,
.completed-archive-table td{vertical-align:middle;}
.completed-archive-table .actions-cell{text-align:center;white-space:nowrap;}
.completed-archive-table .actions-cell form{display:inline-block;margin:0;}
.completed-archive-table .action-btn{display:inline-block;margin:0 auto;min-width:92px;text-align:center;}
@media(max-width:900px){.completed-year-cards{grid-template-columns:repeat(2,minmax(150px,1fr));}}

/* Completed job folders and upload view */
.completed-job-grid,
.packing-list-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:12px;
}
.packing-list-card.completed-job-card{
  background:#171717;
  border:1px solid #444;
  border-radius:10px;
  padding:16px;
  color:#fff;
  min-height:210px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.packing-list-title{font-weight:900;font-size:16px;margin-bottom:8px;color:#fff;}
.card-actions{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:12px;}
.card-actions form{margin:0;}
.completed-job-folder .detail-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
}
.completed-job-folder .detail-grid>div,
.notes-box{
  background:#111;
  border:1px solid #333;
  border-radius:8px;
  padding:12px;
}
.notes-box{margin-top:12px;}
.upload-doc-form{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.upload-doc-form input[type=file]{
  background:#111;
  border:1px solid #444;
  color:#fff;
  border-radius:8px;
  padding:10px;
  min-width:280px;
}
.document-list{display:grid;gap:8px;}
.document-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#111;
  border:1px solid #333;
  border-radius:8px;
  padding:10px 12px;
}
.document-row a{color:#77aaff;font-weight:900;text-decoration:none;}
.document-row a:hover{text-decoration:underline;}
@media(max-width:700px){.document-row{align-items:flex-start;flex-direction:column}.upload-doc-form input[type=file]{min-width:0;width:100%;}}

/* Packing Lists search/action polish */
.packing-list-table .actions-cell,
.packing-month-table .actions-cell{
  text-align:center !important;
  vertical-align:middle !important;
  padding:5px 6px !important;
  white-space:normal !important;
  overflow:visible !important;
}
.packing-list-table .actions-cell form,
.packing-month-table .actions-cell form{
  display:inline-flex !important;
  margin:0 0 0 6px !important;
  vertical-align:middle !important;
}
.packing-list-table .action-btn,
.packing-month-table .action-btn,
.btn-open{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:30px !important;
  min-width:74px !important;
  padding:5px 10px !important;
  margin:0 auto !important;
  line-height:1 !important;
  text-align:center !important;
}
.btn-move{min-width:145px !important;}
.packing-list-table td,
.packing-month-table td{vertical-align:middle !important;}
.packing-list-table tr,
.packing-month-table tr{height:42px;}
@media(max-width:900px){
  .packing-list-table .actions-cell form,
  .packing-month-table .actions-cell form{display:flex !important;margin:4px auto 0 !important;}
  .btn-move{min-width:120px !important;font-size:11px !important;}
}

/* Completed job document controls */
.upload-doc-form .btn{ margin-left:16px; }
.document-main{display:flex;flex-direction:column;gap:3px;min-width:0;}
.document-action-form{margin:0 24px 0 auto;display:flex;align-items:center;justify-content:center;}
.btn-return-doc{min-width:120px;text-align:center;}
@media(max-width:700px){.document-action-form{margin:8px 0 0 0;}.upload-doc-form .btn{margin-left:0;}}


/* Final fix: full processor item names and Sapphire 1.2 support */
.inventory-block.processors table{
  table-layout:fixed !important;
  width:100% !important;
  min-width:0 !important;
}
.inventory-block.processors th,
.inventory-block.processors td{
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.processors th:nth-child(1),
.inventory-block.processors td:nth-child(1){width:34% !important;min-width:0 !important;}
.inventory-block.processors th:nth-child(2),
.inventory-block.processors td:nth-child(2){width:10% !important;min-width:0 !important;}
.inventory-block.processors th:nth-child(3),
.inventory-block.processors td:nth-child(3){width:10% !important;min-width:0 !important;}
.inventory-block.processors th:nth-child(4),
.inventory-block.processors td:nth-child(4){width:11% !important;min-width:0 !important;}
.inventory-block.processors th:nth-child(5),
.inventory-block.processors td:nth-child(5){width:12% !important;min-width:0 !important;}
.inventory-block.processors th:nth-child(6),
.inventory-block.processors td:nth-child(6){width:8% !important;min-width:0 !important;}
.inventory-block.processors th:nth-child(7),
.inventory-block.processors td:nth-child(7){width:15% !important;min-width:0 !important;overflow:visible !important;}
.inventory-block.processors td.item-name-cell,
.inventory-block.processors .item-name-wrap,
.inventory-block.processors .item-name-wrap .item-label{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:normal !important;
  line-height:1.15 !important;
}
.inventory-block.processors .inline-input{width:52px !important;min-width:46px !important;}
.inventory-block.processors .mini-save{min-width:44px !important;padding:5px 5px !important;font-size:10px !important;}


/* Inventory table fixes: full item names, Spider pitch, Incoming header, and unclipped Save buttons */
.inventory-block .table-wrap{
  overflow-x:auto !important;
  overflow-y:visible !important;
}
.inventory-block table{
  width:100% !important;
  min-width:780px !important;
  table-layout:fixed !important;
}
.inventory-block.has-pitch table{min-width:820px !important;}
.inventory-block.no-pitch table{min-width:760px !important;}
.inventory-block th,
.inventory-block td{
  vertical-align:middle !important;
  text-overflow:clip !important;
}
.inventory-block th.num,
.inventory-block td.num{
  min-width:0 !important;
  text-align:center !important;
}
.inventory-block .item-name-cell{
  width:30% !important;
  min-width:190px !important;
  white-space:normal !important;
  overflow:visible !important;
}
.inventory-block .item-name-wrap .item-label{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  line-height:1.15 !important;
}
.inventory-block.panel-parts .item-name-cell{
  width:42% !important;
  min-width:330px !important;
}
.inventory-block.panel-parts .item-name-wrap .item-label{
  font-size:12px !important;
}
.inventory-block .pitch-col{
  width:70px !important;
  min-width:70px !important;
  text-align:center !important;
}
.inventory-block .reorder-save-cell{
  width:118px !important;
  min-width:118px !important;
  overflow:visible !important;
  white-space:normal !important;
}
.inventory-block .reorder-save-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  width:100% !important;
  min-width:108px !important;
}
.inventory-block .reorder-save-wrap .inline-input{
  width:54px !important;
  flex:0 0 54px !important;
  margin:0 !important;
}
.inventory-block .reorder-save-wrap .mini-save{
  width:52px !important;
  flex:0 0 52px !important;
  margin:0 !important;
  padding:6px 5px !important;
  font-size:10px !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
}
.inventory-block.processors .reorder-save-cell,
.inventory-block.panel-parts .reorder-save-cell{
  width:125px !important;
  min-width:125px !important;
}
.inventory-block.processors th,
.inventory-block.panel-parts th{
  white-space:normal !important;
  overflow:visible !important;
  line-height:1.1 !important;
}
.inventory-block.processors th:nth-child(6),
.inventory-block.panel-parts th:nth-child(6){
  width:82px !important;
  min-width:82px !important;
  text-align:center !important;
}
.inventory-block.spider.has-pitch th:nth-child(2),
.inventory-block.spider.has-pitch td:nth-child(2){
  width:70px !important;
  min-width:70px !important;
}
@media(max-width:1599px){
  .inventory-block .table-wrap{overflow-x:auto !important;}
  .inventory-block .reorder-save-wrap .inline-input{width:54px !important;flex-basis:54px !important;}
  .inventory-block .reorder-save-wrap .mini-save{width:52px !important;flex-basis:52px !important;}
}

/* FINAL NO-HORIZONTAL-SCROLL INVENTORY TABLE FIX
   Keeps every inventory table inside its card while allowing long item names to wrap. */
.inventory-block .table-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:hidden !important;
  overflow-y:visible !important;
}
.inventory-block table,
.inventory-block.has-pitch table,
.inventory-block.no-pitch table,
.inventory-block.panel-parts table{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.inventory-block th,
.inventory-block td{
  box-sizing:border-box !important;
  min-width:0 !important;
  padding:6px 5px !important;
  font-size:12px !important;
  line-height:1.15 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  vertical-align:middle !important;
}
.inventory-block th.num,
.inventory-block td.num{
  text-align:center !important;
  white-space:normal !important;
}
.inventory-block .item-name-cell,
.inventory-block .item-name-wrap,
.inventory-block .item-label,
.inventory-block.panel-parts .item-name-cell,
.inventory-block.panel-parts .item-name-wrap,
.inventory-block.panel-parts .item-label{
  min-width:0 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:normal !important;
  overflow-wrap:anywhere !important;
  line-height:1.15 !important;
}
.inventory-block .archive-icon{float:right !important;margin-left:4px !important;}
.inventory-block .inline-input{
  width:48px !important;
  min-width:0 !important;
  max-width:100% !important;
  padding:5px 3px !important;
  font-size:13px !important;
}
.inventory-block .reorder-save-cell{
  min-width:0 !important;
  overflow:visible !important;
  white-space:normal !important;
}
.inventory-block .reorder-save-wrap{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:3px !important;
  width:100% !important;
  min-width:0 !important;
}
.inventory-block .reorder-save-wrap .inline-input{
  width:46px !important;
  flex:0 1 46px !important;
  margin:0 !important;
}
.inventory-block .reorder-save-wrap .mini-save,
.inventory-block td:last-child .mini-save,
.inventory-block.processors .mini-save,
.inventory-block.panel-parts .mini-save{
  width:auto !important;
  min-width:40px !important;
  max-width:100% !important;
  flex:0 1 auto !important;
  margin:0 !important;
  padding:5px 5px !important;
  font-size:10px !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
}
.inventory-block .pitch-col{
  min-width:0 !important;
  text-align:center !important;
}

/* Tables with Pitch: Item, Pitch, Mech, Vegas, Reserved, Free, Incoming, Reorder/Save */
.inventory-block.has-pitch th:nth-child(1),
.inventory-block.has-pitch td:nth-child(1){width:21% !important;}
.inventory-block.has-pitch th:nth-child(2),
.inventory-block.has-pitch td:nth-child(2){width:8% !important;}
.inventory-block.has-pitch th:nth-child(3),
.inventory-block.has-pitch td:nth-child(3){width:10% !important;}
.inventory-block.has-pitch th:nth-child(4),
.inventory-block.has-pitch td:nth-child(4){width:10% !important;}
.inventory-block.has-pitch th:nth-child(5),
.inventory-block.has-pitch td:nth-child(5){width:13% !important;}
.inventory-block.has-pitch th:nth-child(6),
.inventory-block.has-pitch td:nth-child(6){width:13% !important;}
.inventory-block.has-pitch th:nth-child(7),
.inventory-block.has-pitch td:nth-child(7){width:10% !important;}
.inventory-block.has-pitch th:nth-child(8),
.inventory-block.has-pitch td:nth-child(8){width:15% !important;}

/* Tables without Pitch: Item, Mech, Vegas, Reserved, Free, Incoming, Reorder/Save */
.inventory-block.no-pitch th:nth-child(1),
.inventory-block.no-pitch td:nth-child(1){width:32% !important;}
.inventory-block.no-pitch th:nth-child(2),
.inventory-block.no-pitch td:nth-child(2){width:10% !important;}
.inventory-block.no-pitch th:nth-child(3),
.inventory-block.no-pitch td:nth-child(3){width:10% !important;}
.inventory-block.no-pitch th:nth-child(4),
.inventory-block.no-pitch td:nth-child(4){width:13% !important;}
.inventory-block.no-pitch th:nth-child(5),
.inventory-block.no-pitch td:nth-child(5){width:13% !important;}
.inventory-block.no-pitch th:nth-child(6),
.inventory-block.no-pitch td:nth-child(6){width:10% !important;}
.inventory-block.no-pitch th:nth-child(7),
.inventory-block.no-pitch td:nth-child(7){width:12% !important;}

/* Panel Parts needs the most room for wrapped names, but still no scrollbar. */
.inventory-block.panel-parts th:nth-child(1),
.inventory-block.panel-parts td:nth-child(1){width:34% !important;}
.inventory-block.panel-parts th:nth-child(2),
.inventory-block.panel-parts td:nth-child(2){width:9% !important;}
.inventory-block.panel-parts th:nth-child(3),
.inventory-block.panel-parts td:nth-child(3){width:9% !important;}
.inventory-block.panel-parts th:nth-child(4),
.inventory-block.panel-parts td:nth-child(4){width:13% !important;}
.inventory-block.panel-parts th:nth-child(5),
.inventory-block.panel-parts td:nth-child(5){width:13% !important;}
.inventory-block.panel-parts th:nth-child(6),
.inventory-block.panel-parts td:nth-child(6){width:9% !important;}
.inventory-block.panel-parts th:nth-child(7),
.inventory-block.panel-parts td:nth-child(7){width:13% !important;}

@media(max-width:1599px){
  .inventory-block th,.inventory-block td{font-size:11px !important;padding:5px 3px !important;}
  .inventory-block .inline-input{width:44px !important;font-size:12px !important;padding:4px 2px !important;}
  .inventory-block .reorder-save-wrap .inline-input{width:42px !important;flex-basis:42px !important;}
  .inventory-block .reorder-save-wrap .mini-save{min-width:38px !important;font-size:9px !important;padding:4px 4px !important;}
}


/* Center dashboard pitch tiles when a family only has 1 or 2 pitches */
.pitch-breakdown.pitch-count-1{
  grid-template-columns:repeat(1, minmax(72px, 92px)) !important;
  justify-content:center !important;
}
.pitch-breakdown.pitch-count-2{
  grid-template-columns:repeat(2, minmax(72px, 92px)) !important;
  justify-content:center !important;
}
.pitch-breakdown.pitch-count-3{
  grid-template-columns:repeat(3, minmax(72px, 92px)) !important;
  justify-content:center !important;
}

/* Older completed jobs: create folder panel */
.create-folder-panel{padding:14px;}
.create-folder-panel summary{display:inline-block;list-style:none;margin-bottom:12px;}
.create-folder-panel summary::-webkit-details-marker{display:none;}
.create-folder-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;margin-top:4px;}
.create-folder-form label{font-size:12px;font-weight:900;color:#ddd;margin:0;}
.create-folder-form input{margin-top:6px;}
.create-folder-form .report-actions{display:flex;align-items:end;justify-content:flex-start;padding:0;}
.create-folder-panel>.muted{margin-top:10px;}
@media(max-width:900px){.create-folder-form{grid-template-columns:1fr}.create-folder-form .report-actions .btn{width:100%;}}


/* Restored Refresh brand lockup: R logo + Refresh + Inventory System */
.brand-refresh-lockup{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  padding:16px 10px 18px !important;
  min-height:84px !important;
  text-align:left !important;
}
.brand-refresh-lockup .brand-r-logo{
  width:58px !important;
  height:58px !important;
  object-fit:contain !important;
  flex:0 0 auto !important;
  border-radius:0 !important;
  background:transparent !important;
}
.brand-refresh-lockup .brand-text-lockup{
  display:flex !important;
  flex-direction:column !important;
  line-height:1.0 !important;
  min-width:0 !important;
}
.brand-refresh-lockup .brand-refresh-word{
  color:#fff !important;
  font-size:28px !important;
  font-weight:900 !important;
  letter-spacing:.5px !important;
  text-transform:none !important;
  text-shadow:0 2px 0 #000 !important;
}
.brand-refresh-lockup .brand-system-word{
  color:#dff3ff !important;
  font-size:12px !important;
  font-weight:800 !important;
  letter-spacing:1.8px !important;
  text-transform:uppercase !important;
  margin-top:5px !important;
  white-space:nowrap !important;
}


/* v1 branding polish: blue Refresh word, consistent login lockup, app title/favicon support */
:root{--refresh-brand-blue:#00aeef;}
.brand-refresh-lockup .brand-refresh-word{
  color:var(--refresh-brand-blue) !important;
}
.login-page{
  background:radial-gradient(circle at top,#1c1c1d,#0f0f10) !important;
}
.login-card{
  width:min(440px,92vw) !important;
  background:#151515 !important;
  border:1px solid #333 !important;
  border-radius:10px !important;
  padding:30px 28px !important;
  box-shadow:0 25px 90px rgba(0,0,0,.50) !important;
}
.login-brand-lockup{
  justify-content:center !important;
  margin:0 0 24px !important;
  padding:10px 0 18px !important;
  min-height:92px !important;
  border-bottom:1px solid #2f2f2f !important;
}
.login-brand-lockup .brand-r-logo{
  width:72px !important;
  height:72px !important;
}
.login-brand-lockup .brand-refresh-word{
  font-size:34px !important;
}
.login-brand-lockup .brand-system-word{
  font-size:13px !important;
  letter-spacing:2.2px !important;
}
.login-card .login-brand,
.login-card .brand-image{
  overflow:visible !important;
}
.login-card .login-brand img{
  object-fit:contain !important;
}
@media(max-width:520px){
  .brand-refresh-lockup{gap:8px !important;}
  .brand-refresh-lockup .brand-r-logo{width:50px !important;height:50px !important;}
  .brand-refresh-lockup .brand-refresh-word{font-size:24px !important;}
  .brand-refresh-lockup .brand-system-word{font-size:10px !important;letter-spacing:1.5px !important;}
  .login-brand-lockup .brand-r-logo{width:62px !important;height:62px !important;}
  .login-brand-lockup .brand-refresh-word{font-size:30px !important;}
}

/* Drag-and-drop completed job upload */
.drag-upload-form{
  display:grid !important;
  grid-template-columns:1fr;
  gap:14px;
  align-items:stretch;
  margin-bottom:18px;
}
.drag-upload-input{
  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;
}
.drag-drop-zone{
  grid-column:1 / -1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:150px;
  padding:22px 18px;
  border:2px dashed #2f7dd1;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(47,125,209,.18), rgba(17,17,17,.95));
  color:#fff;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.drag-drop-zone:hover,
.drag-drop-zone.is-dragover{
  border-color:#5eb1ff;
  background:linear-gradient(180deg, rgba(47,125,209,.32), rgba(17,17,17,.98));
  box-shadow:0 0 0 3px rgba(47,125,209,.18);
  transform:translateY(-1px);
}
.drag-drop-zone.needs-files{
  border-color:#f59e0b;
  box-shadow:0 0 0 3px rgba(245,158,11,.2);
}
.drag-drop-icon{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#2f7dd1;
  color:#fff;
  font-size:26px;
  font-weight:900;
  line-height:1;
}
.drag-drop-title{font-size:18px;font-weight:900;color:#fff;}
.drag-drop-sub{font-size:14px;font-weight:800;color:#5eb1ff;}
.drag-drop-hint{font-size:12px;color:#aaa;max-width:520px;}
.upload-doc-actions{
  grid-column:1 / -1;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin-top:2px;
}
.upload-doc-actions[hidden]{display:none !important;}
.upload-doc-submit{white-space:nowrap;margin-left:0 !important;min-width:150px;}
.clear-selected-files{white-space:nowrap;min-width:120px;}
.selected-files-box{
  grid-column:1 / -1;
  background:#111;
  border:1px solid #333;
  border-radius:10px;
  padding:12px 14px;
}
.selected-files-title{font-weight:900;margin-bottom:6px;color:#fff;}
#selectedFilesList{margin:0;padding-left:20px;color:#ddd;}
#selectedFilesList li{margin:3px 0;overflow-wrap:anywhere;}
@media(max-width:700px){
  .drag-upload-form{grid-template-columns:1fr;}
  .upload-doc-actions{flex-direction:column;align-items:stretch;}
  .upload-doc-submit,.clear-selected-files{width:100%;}
}

/* Global Search page */
.global-search-form{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:end}.global-search-label{display:flex;flex-direction:column;gap:8px;font-weight:800}.global-search-label input{min-height:44px}.search-actions{display:flex;gap:10px;align-items:center}.search-summary{margin-top:12px;color:#e8f0ff}.search-results-section{margin-top:16px}.result-count-pill{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:5px 10px;border-radius:999px;background:#1d4ed8;color:white;font-weight:900}.search-result-list{display:grid;gap:10px}.search-result-card{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;border:1px solid #343434;background:#171717;border-radius:10px;padding:14px}.search-result-title{font-size:16px;font-weight:900;color:#fff;text-decoration:none}.search-result-title:hover{color:#4db8ff}.search-result-meta{margin-top:6px;color:#aab4c0;font-size:12px;word-break:break-word}.search-result-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.empty-state{border:1px dashed #3a3a3a;border-radius:10px;padding:18px;color:#9ca3af;background:#111}@media(max-width:900px){.global-search-form,.search-result-card{grid-template-columns:1fr}.search-result-actions{justify-content:flex-start}}


/* Search page alignment and live-search polish */
.search-page-section,
.search-results-section{margin-left:0 !important;width:100%;}
.global-search-form{grid-template-columns:minmax(260px,1fr) auto !important;align-items:end !important;}
.global-search-label input{width:100%;}
#liveSearchResults{width:100%;}

/* Inventory filter buttons */
.inventory-toolbar{gap:12px;align-items:center;flex-wrap:wrap;}
.inventory-filter-buttons{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.inventory-filter-btn{background:#242424;color:#fff;border:1px solid #555;border-radius:6px;padding:9px 13px;font-weight:900;cursor:pointer;}
.inventory-filter-btn:hover{filter:brightness(1.15);}
.inventory-filter-btn.active{background:linear-gradient(90deg,#2563eb,#5b35e8);border-color:#4b7cff;}
.inventory-filter-empty{border:1px dashed #555;border-radius:8px;background:#111;color:#b9c1cc;padding:14px;margin:12px;}
.inventory-block.rigging h3{background:#d6e4f0;}
.inventory-block.rigging td{background:#eef6fc;}
.inventory-block.rigging th,
.inventory-block.rigging td{font-size:12px !important;padding:6px 7px !important;}
.inventory-block.rigging .inline-input{width:64px !important;}
.inventory-block.rigging .mini-save{font-size:10px !important;padding:5px 6px !important;}
.inventory-block.rigging table{table-layout:fixed;width:100%;}
.inventory-block.rigging .item-name-cell,
.inventory-block.rigging .item-name-wrap,
.inventory-block.rigging .item-label{white-space:normal !important;overflow:visible !important;text-overflow:clip !important;word-break:break-word !important;}
.inventory-block.rigging .reorder-save-cell{min-width:0 !important;}
.inventory-block.rigging th:nth-child(1),
.inventory-block.rigging td:nth-child(1){width:34% !important;}
.inventory-block.rigging th:nth-child(2),
.inventory-block.rigging td:nth-child(2){width:9% !important;}
.inventory-block.rigging th:nth-child(3),
.inventory-block.rigging td:nth-child(3){width:9% !important;}
.inventory-block.rigging th:nth-child(4),
.inventory-block.rigging td:nth-child(4){width:13% !important;}
.inventory-block.rigging th:nth-child(5),
.inventory-block.rigging td:nth-child(5){width:13% !important;}
.inventory-block.rigging th:nth-child(6),
.inventory-block.rigging td:nth-child(6){width:9% !important;}
.inventory-block.rigging th:nth-child(7),
.inventory-block.rigging td:nth-child(7){width:13% !important;}
@media(max-width:900px){.inventory-toolbar{align-items:flex-start}.inventory-filter-buttons{width:100%;}.inventory-filter-btn{flex:1 1 130px}.global-search-form{grid-template-columns:1fr !important;}}


/* File preview buttons and Search page spacing update */
.document-file-name{color:#fff;font-weight:900;overflow-wrap:anywhere;}
.document-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
.document-action-form{display:inline-flex;margin:0;}
.btn-preview-doc{background:#1d4ed8 !important;color:#fff !important;border-color:#3b82f6 !important;}
.btn-download-doc{background:#242424 !important;color:#fff !important;}
.search-page-offset{margin-left:18px !important;width:calc(100% - 18px) !important;}
.search-page-offset .global-search-form{padding-left:10px;}
.search-page-offset .global-search-label input{padding-left:14px;}
@media(max-width:900px){.search-page-offset{margin-left:0 !important;width:100% !important;}.search-page-offset .global-search-form{padding-left:0;}}
@media(max-width:700px){.document-actions{justify-content:flex-start;width:100%;}.document-actions .btn,.document-action-form,.document-action-form .btn{width:100%;}.document-action-form{display:block;}}


/* Packing list preview pop-up */
.packing-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.packing-preview-modal{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:9999;align-items:center;justify-content:center;padding:24px;}
.packing-preview-card{width:min(920px,94vw);max-height:86vh;background:#151515;border:1px solid #444;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.55);overflow:hidden;display:flex;flex-direction:column;}
.modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid #333;background:#1d1d1d;}
.modal-header h2{margin:0;color:#fff;font-size:22px;}
.modal-close{background:#333;color:#fff;border:1px solid #666;border-radius:8px;font-size:24px;line-height:1;width:38px;height:38px;cursor:pointer;}
.modal-close:hover{background:#444;}
.modal-body{padding:18px;overflow:auto;color:#fff;}
.packing-preview-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 18px;margin-bottom:12px;}
.packing-preview-pre{white-space:pre-wrap;background:#fff;color:#000;border:1px solid #ddd;border-radius:8px;padding:16px;line-height:1.35;max-height:58vh;overflow:auto;}
.packing-preview-file{display:flex;flex-direction:column;gap:10px;}
.btn-preview{white-space:nowrap;}

/* When only Rigging is selected, move it into the left side of the inventory area */
.inventory-section.rigging-filter-active .inventory-columns{grid-template-columns:minmax(0,1fr) !important;}
.inventory-section.rigging-filter-active .inventory-col-left{display:none !important;}
.inventory-section.rigging-filter-active .inventory-col-right{max-width:980px;width:100%;align-self:start;}
.inventory-section.rigging-filter-active .inventory-block.rigging{margin-left:0;margin-right:auto;}

/* v1.0.2 polish: packing-list modal should look like the real sheet and action buttons should be tighter */
.packing-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  white-space:nowrap !important;
}
.packing-actions form{margin:0 !important;display:inline-flex !important;}
.packing-actions .action-btn{min-width:auto !important;padding:8px 14px !important;}
.packing-preview-card{width:min(760px,94vw) !important;max-height:92vh !important;}
.packing-preview-card .modal-body{padding:12px 14px 18px !important;overflow:auto !important;}
.packing-sheet-preview{background:#fff;color:#000;border:1px solid #aac4dc;overflow:auto;max-height:68vh;}
.packing-sheet-table{width:100%;border-collapse:collapse;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.05;color:#000;background:#fff;}
.packing-sheet-table td{border:1px solid #d6e4f1;padding:3px 7px;vertical-align:middle;color:#000;}
.packing-sheet-table .sheet-title-row td{background:#cfe0f1;font-weight:600;}
.packing-sheet-table .sheet-alt-row td{background:#cfe0f1;}
.packing-sheet-table .qty-col{width:58px;text-align:center;white-space:nowrap;}
.packing-sheet-table .initials-col{width:110px;text-align:center;white-space:nowrap;}
.packing-preview-file-actions{margin-top:12px;display:flex;gap:10px;align-items:center;}

/* Cleaner completed job folder cards */
.completed-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
.completed-job-id{font-weight:900;font-size:22px;line-height:1;color:#fff;letter-spacing:.2px;}
.completed-job-name{font-weight:800;font-size:17px;line-height:1.25;color:#fff;min-height:44px;margin-bottom:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.completed-card-meta{font-size:14px;line-height:1.55;color:#d6d6d6;margin-top:auto;margin-bottom:12px;}
.completed-card-badges{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.completed-card-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid #3a3a3a;background:#222;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800;color:#e8e8e8;white-space:nowrap;}
.completed-card-actions{justify-content:stretch;align-items:center;}
.completed-card-actions .open-folder-btn{flex:1;text-align:center;}
.completed-card-actions form{display:flex;}
.completed-card-actions .action-btn{min-width:0;}


/* Active Jobs action icons: horizontal pencil / green check / red X */
.active-jobs-section .jobs-fit-table th:nth-child(15),
.active-jobs-section .jobs-fit-table td:nth-child(15){
  width:132px !important;
}
.active-jobs-section .jobs-fit-table .action-cell{
  text-align:center !important;
  white-space:nowrap !important;
  overflow:visible !important;
}
.job-action-icons{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex-wrap:nowrap;
}
.job-icon-form{
  display:inline-flex;
  margin:0;
  padding:0;
}
.job-icon-btn{
  width:32px;
  height:30px;
  min-width:32px;
  padding:0;
  border:1px solid #555;
  border-radius:6px;
  background:#303030;
  color:#f5f5f5;
  font-size:20px;
  line-height:1;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:none;
  transition:transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.job-icon-btn:hover{
  transform:translateY(-1px);
  background:#3a3a3a;
  border-color:#777;
}
.job-icon-edit{color:#f2f2f2; font-size:18px;}
.job-icon-edit:hover{box-shadow:0 0 0 2px rgba(255,255,255,.12);}
.job-icon-complete{color:#35d16f; font-size:24px;}
.job-icon-complete:hover{border-color:#35d16f; box-shadow:0 0 0 2px rgba(53,209,111,.18);}
.job-icon-delete{color:#ff3030; font-size:26px;}
.job-icon-delete:hover{border-color:#ff3030; box-shadow:0 0 0 2px rgba(255,48,48,.18);}
.job-icon-approve{color:#ffd600; font-size:18px;}
.job-icon-approve:hover{border-color:#ffd600; box-shadow:0 0 0 2px rgba(255,214,0,.18);}
@media(max-width:1350px){
  .active-jobs-section .jobs-fit-table th:nth-child(15),
  .active-jobs-section .jobs-fit-table td:nth-child(15){width:124px !important;}
  .job-icon-btn{width:29px;height:28px;min-width:29px;font-size:18px;}
  .job-icon-complete{font-size:22px;}
  .job-icon-delete{font-size:24px;}
  .job-action-icons{gap:5px;}
}


/* Active Jobs action icon row - v1.1.3 fix */
.active-jobs-section .jobs-fit-table col.actions-col{
  width:130px !important;
  min-width:130px !important;
}
.active-jobs-section .jobs-fit-table th:nth-child(15),
.active-jobs-section .jobs-fit-table td:nth-child(15){
  width:130px !important;
  min-width:130px !important;
  max-width:130px !important;
}
.active-jobs-section .jobs-fit-table .action-cell{
  padding:4px 6px !important;
  text-align:center !important;
  white-space:nowrap !important;
  overflow:visible !important;
}
.active-jobs-section .horizontal-action-icons,
.active-jobs-section .job-action-icons{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  flex-wrap:nowrap !important;
  width:100% !important;
}
.active-jobs-section .job-icon-form{
  display:inline-flex !important;
  margin:0 !important;
  padding:0 !important;
}
.active-jobs-section .job-icon-btn{
  width:34px !important;
  height:32px !important;
  min-width:34px !important;
  max-width:34px !important;
  padding:0 !important;
  border:1px solid #555 !important;
  border-radius:7px !important;
  background:#303030 !important;
  color:#f5f5f5 !important;
  font-size:18px !important;
  line-height:1 !important;
  font-weight:900 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  text-indent:0 !important;
  overflow:hidden !important;
  box-shadow:none !important;
}
.active-jobs-section .job-icon-btn:hover{
  transform:translateY(-1px);
  background:#3a3a3a !important;
  border-color:#777 !important;
}
.active-jobs-section .job-icon-edit{
  color:#f2f2f2 !important;
  font-size:16px !important;
}
.active-jobs-section .job-icon-complete{
  color:#35d16f !important;
  font-size:24px !important;
}
.active-jobs-section .job-icon-delete{
  color:#ff3030 !important;
  font-size:26px !important;
}
.active-jobs-section .job-icon-edit:hover{
  box-shadow:0 0 0 2px rgba(255,255,255,.12) !important;
}
.active-jobs-section .job-icon-complete:hover{
  border-color:#35d16f !important;
  box-shadow:0 0 0 2px rgba(53,209,111,.18) !important;
}
.active-jobs-section .job-icon-delete:hover{
  border-color:#ff3030 !important;
  box-shadow:0 0 0 2px rgba(255,48,48,.18) !important;
}
/* Hide any older text-style action buttons if cached template remnants appear */
.active-jobs-section .action-cell .action-btn{
  width:34px !important;
  height:32px !important;
  padding:0 !important;
  font-size:0 !important;
}

/* Completed job document preview modal */
.completed-doc-preview-card{width:min(980px,94vw) !important;max-height:92vh !important;}
.doc-preview-frame{width:100%;height:70vh;border:1px solid #444;border-radius:8px;background:#fff;}
.image-preview-wrap{background:#111;border:1px solid #444;border-radius:8px;padding:12px;text-align:center;max-height:70vh;overflow:auto;}
.image-preview-wrap img{max-width:100%;height:auto;border-radius:6px;}
.document-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
.document-actions .btn{white-space:nowrap;}


/* v1.1.4 admin unit-price editing: show prices only on Inventory page for admins, keep Dashboard clean. */
.inventory-block .price-col{min-width:92px !important;}
.inventory-block .price-input{width:86px !important;}
.inventory-block .save-col{min-width:58px !important;text-align:center !important;}
.inventory-block .save-col .mini-save{margin-left:0 !important;white-space:nowrap !important;}
.inventory-block .reorder-save-cell{text-align:center !important;}
.inventory-block .reorder-save-cell .inline-input{width:62px !important;}
.inventory-block.has-pitch table{table-layout:fixed !important;width:100% !important;min-width:0 !important;}
.inventory-block.no-pitch table{table-layout:fixed !important;width:100% !important;min-width:0 !important;}
.inventory-block.has-pitch th:nth-child(1),.inventory-block.has-pitch td:nth-child(1){width:20% !important;}
.inventory-block.has-pitch th:nth-child(2),.inventory-block.has-pitch td:nth-child(2){width:8% !important;}
.inventory-block.has-pitch th:nth-child(3),.inventory-block.has-pitch td:nth-child(3),
.inventory-block.has-pitch th:nth-child(4),.inventory-block.has-pitch td:nth-child(4),
.inventory-block.has-pitch th:nth-child(5),.inventory-block.has-pitch td:nth-child(5),
.inventory-block.has-pitch th:nth-child(6),.inventory-block.has-pitch td:nth-child(6),
.inventory-block.has-pitch th:nth-child(7),.inventory-block.has-pitch td:nth-child(7){width:10% !important;}
.inventory-block.has-pitch th.price-col,.inventory-block.has-pitch td.price-col{width:12% !important;}
.inventory-block.has-pitch th:nth-last-child(2),.inventory-block.has-pitch td:nth-last-child(2){width:10% !important;}
.inventory-block.has-pitch th.save-col,.inventory-block.has-pitch td.save-col{width:10% !important;}
.inventory-block.no-pitch th:nth-child(1),.inventory-block.no-pitch td:nth-child(1){width:28% !important;}
.inventory-block.no-pitch th:nth-child(2),.inventory-block.no-pitch td:nth-child(2),
.inventory-block.no-pitch th:nth-child(3),.inventory-block.no-pitch td:nth-child(3),
.inventory-block.no-pitch th:nth-child(4),.inventory-block.no-pitch td:nth-child(4),
.inventory-block.no-pitch th:nth-child(5),.inventory-block.no-pitch td:nth-child(5),
.inventory-block.no-pitch th:nth-child(6),.inventory-block.no-pitch td:nth-child(6){width:10% !important;}
.inventory-block.no-pitch th.price-col,.inventory-block.no-pitch td.price-col{width:14% !important;}
.inventory-block.no-pitch th:nth-last-child(2),.inventory-block.no-pitch td:nth-last-child(2){width:10% !important;}
.inventory-block.no-pitch th.save-col,.inventory-block.no-pitch td.save-col{width:8% !important;}

/* v1.1.5 Packing list action icons and admin edit form */
.icon-action-row,
.packing-actions.icon-action-row{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
}
.icon-action-row form,
.packing-actions.icon-action-row form{margin:0 !important;display:inline-flex !important;}
.job-icon-btn{
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  padding:0 !important;
  border-radius:9px !important;
  border:1px solid #3b3b3b !important;
  background:#242424 !important;
  color:#fff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:17px !important;
  line-height:1 !important;
  text-decoration:none !important;
  cursor:pointer !important;
  box-shadow:none !important;
}
.job-icon-btn:hover{background:#303030 !important;transform:translateY(-1px);}
.job-icon-open{color:#dbeafe !important;border-color:#3b82f6 !important;}
.job-icon-edit{color:#fff !important;border-color:#64748b !important;}
.job-icon-preview{color:#bfdbfe !important;border-color:#2563eb !important;}
.job-icon-complete{background:#064e3b !important;border-color:#22c55e !important;color:#86efac !important;font-weight:900 !important;}
.job-icon-complete:hover{background:#065f46 !important;}
.job-icon-delete{background:#4c0519 !important;border-color:#ef4444 !important;color:#fecaca !important;font-weight:900 !important;font-size:24px !important;}
.job-icon-delete:hover{background:#7f1d1d !important;}
.edit-packing-form .form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;}
.edit-packing-form label{display:flex;flex-direction:column;gap:6px;color:#fff;font-weight:700;}
.edit-packing-form textarea{min-height:260px;resize:vertical;}


/* Panel Parts sub-filter buttons */
.panel-parts-subfilters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin:10px 0 4px;
  padding:8px 0 0;
}
.panel-parts-subfilter-btn{
  background:#1f2937;
  color:#fff;
  border:1px solid #4b5563;
  border-radius:6px;
  padding:8px 12px;
  font-weight:900;
  cursor:pointer;
}
.panel-parts-subfilter-btn:hover{filter:brightness(1.15);}
.panel-parts-subfilter-btn.active{
  background:linear-gradient(90deg,#2563eb,#5b35e8);
  border-color:#4b7cff;
}


/* Packing List page preview modal refinement */
.modal-header-actions{display:flex;align-items:center;gap:10px;}
.packing-sheet-table .sheet-column-header td{background:#bcd4ec;font-weight:800;text-align:center;}
.packing-sheet-table .sheet-meta-row td{background:#f7fbff;font-size:13px;}
.packing-sheet-table .alloc-col{width:70px;text-align:center;white-space:nowrap;}
.packing-sheet-readonly{border-radius:4px;}


/* Panel Parts cleanup: remove wrapping/duplicate-looking item names and fit all columns */
.inventory-block.panel-parts .item-name-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:6px !important;
  width:100% !important;
  min-width:0 !important;
}
.inventory-block.panel-parts .item-label{
  display:block !important;
  min-width:0 !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  word-break:normal !important;
}
.inventory-block.panel-parts th,
.inventory-block.panel-parts td{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-size:13px !important;
  padding:7px 8px !important;
}
.inventory-block.panel-parts table{table-layout:fixed !important;width:100% !important;min-width:780px !important;}
.inventory-block.panel-parts th:nth-child(1),.inventory-block.panel-parts td:nth-child(1){width:25% !important;}
.inventory-block.panel-parts th:nth-child(2),.inventory-block.panel-parts td:nth-child(2){width:9% !important;}
.inventory-block.panel-parts th:nth-child(3),.inventory-block.panel-parts td:nth-child(3){width:9% !important;}
.inventory-block.panel-parts th:nth-child(4),.inventory-block.panel-parts td:nth-child(4){width:9% !important;}
.inventory-block.panel-parts th:nth-child(5),.inventory-block.panel-parts td:nth-child(5){width:9% !important;}
.inventory-block.panel-parts th:nth-child(6),.inventory-block.panel-parts td:nth-child(6){width:9% !important;}
.inventory-block.panel-parts th:nth-child(7),.inventory-block.panel-parts td:nth-child(7){width:13% !important;}
.inventory-block.panel-parts th:nth-child(8),.inventory-block.panel-parts td:nth-child(8){width:10% !important;}
.inventory-block.panel-parts th:nth-child(9),.inventory-block.panel-parts td:nth-child(9){width:7% !important;}
.panel-parts-subfilter-btn[data-panel-parts-filter="tools-kits"],
.panel-parts-subfilter-btn[data-panel-parts-filter="other"]{display:none !important;}

/* Panel Parts item column now matches the rest of the inventory tables */
.inventory-block.panel-parts .item-name-cell{
  width:30% !important;
  min-width:190px !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.panel-parts .item-name-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
}
.inventory-block.panel-parts .item-name-wrap .item-label,
.inventory-block.panel-parts .item-label{
  display:inline !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:normal !important;
  line-height:1.15 !important;
  font-size:14px !important;
}
.inventory-block.panel-parts th,
.inventory-block.panel-parts td{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.panel-parts table{
  table-layout:fixed !important;
  width:100% !important;
  min-width:780px !important;
}

/* FIX: Panel Parts item names should match other inventory tables.
   Keep names on one line when possible, allow two lines for longer names,
   and prevent awkward letter-by-letter wrapping. */
.inventory-block.panel-parts th:first-child,
.inventory-block.panel-parts td.item-name-cell{
  width:34% !important;
  min-width:220px !important;
  max-width:280px !important;
  white-space:normal !important;
}
.inventory-block.panel-parts .item-name-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
}
.inventory-block.panel-parts .item-name-wrap .item-label{
  flex:1 1 auto !important;
  min-width:0 !important;
  max-width:100% !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:normal !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
  line-height:1.25 !important;
}
.inventory-block.panel-parts .archive-inline-form{
  flex:0 0 auto !important;
}

/* FIX: Panel Parts item names should show the full name like the other tables.
   Wrap naturally on spaces only, do not ellipsis/truncate, and allow row height to grow. */
.inventory-block.panel-parts th:first-child,
.inventory-block.panel-parts td.item-name-cell{
  width:34% !important;
  min-width:220px !important;
  max-width:none !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.panel-parts .item-name-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
  white-space:normal !important;
  overflow:visible !important;
}
.inventory-block.panel-parts .item-name-wrap .item-label,
.inventory-block.panel-parts .item-label{
  flex:1 1 auto !important;
  min-width:0 !important;
  max-width:none !important;
  display:block !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  line-height:1.2 !important;
  font-size:14px !important;
  -webkit-line-clamp:unset !important;
  -webkit-box-orient:initial !important;
}
.inventory-block.panel-parts .archive-inline-form{
  flex:0 0 auto !important;
}

/* FIX: Panel Parts item names must be fully visible on one line.
   Let the table scroll horizontally instead of wrapping or truncating item names. */
.inventory-block.panel-parts .table-wrap,
.inventory-block.panel-parts.table-wrap{
  overflow-x:auto !important;
}
.inventory-block.panel-parts table{
  width:max-content !important;
  min-width:1120px !important;
  table-layout:auto !important;
}
.inventory-block.panel-parts th:first-child,
.inventory-block.panel-parts td.item-name-cell{
  width:260px !important;
  min-width:260px !important;
  max-width:none !important;
  white-space:nowrap !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.inventory-block.panel-parts .item-name-wrap{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  width:100% !important;
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:visible !important;
}
.inventory-block.panel-parts .item-name-wrap .item-label,
.inventory-block.panel-parts .item-label{
  display:inline-block !important;
  flex:1 0 auto !important;
  min-width:0 !important;
  max-width:none !important;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  line-height:1.2 !important;
  font-size:14px !important;
  -webkit-line-clamp:unset !important;
  -webkit-box-orient:initial !important;
}
.inventory-block.panel-parts .archive-inline-form{
  flex:0 0 auto !important;
}
.inventory-block.panel-parts th:nth-child(n+2),
.inventory-block.panel-parts td:nth-child(n+2){
  min-width:78px !important;
  white-space:nowrap !important;
}
.inventory-block.panel-parts th:nth-child(7),
.inventory-block.panel-parts td:nth-child(7){
  min-width:110px !important;
}
.inventory-block.panel-parts th:nth-child(8),
.inventory-block.panel-parts td:nth-child(8){
  min-width:95px !important;
}
.inventory-block.panel-parts th:nth-child(9),
.inventory-block.panel-parts td:nth-child(9){
  min-width:70px !important;
}

/* Mobile inventory horizontal-scroll patch: keep desktop-style tables on phones */
@media (max-width: 760px){
  html,body{font-size:16px !important;}
  .layout{display:block !important;min-height:100vh !important;}
  .sidebar{position:relative !important;height:auto !important;width:100% !important;border-right:0 !important;border-bottom:1px solid #333 !important;padding:10px 12px !important;}
  .brand-image img{width:180px !important;}
  .nav{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px !important;margin-bottom:10px !important;}
  .nav a{padding:11px 10px !important;text-align:center !important;font-size:14px !important;}
  .side-card{display:none !important;}
  .main{padding:12px 10px 24px !important;overflow-x:hidden !important;}
  .topbar{display:block !important;padding:13px 12px !important;}
  .h1{font-size:28px !important;line-height:1.1 !important;}
  .sub{font-size:13px !important;}
  .topbar .btn{display:block !important;margin-top:10px !important;text-align:center !important;}

  .cards.dashboard-summary-cards,
  .dashboard-summary-cards,
  .dashboard-pitch-cards{grid-template-columns:1fr !important;gap:14px !important;}
  .pitch-breakdown{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;}
  .pitch-mini{min-width:0 !important;padding:12px 8px !important;}

  .inventory-section{padding:10px !important;border-radius:10px !important;overflow:hidden !important;}
  .inventory-section>.toolbar,
  .inventory-toolbar{display:block !important;margin:-10px -10px 10px -10px !important;padding:12px !important;}
  .inventory-toolbar h2{margin-bottom:10px !important;font-size:28px !important;}
  .inventory-toolbar .search,
  #inventorySearch{width:100% !important;min-width:0 !important;margin:10px 0 0 0 !important;font-size:18px !important;padding:13px 14px !important;border-radius:8px !important;}

  .inventory-filter-buttons,
  .panel-parts-subfilter-buttons,
  .panel-parts-subfilters{display:flex !important;flex-wrap:nowrap !important;overflow-x:auto !important;overflow-y:hidden !important;gap:8px !important;white-space:nowrap !important;-webkit-overflow-scrolling:touch !important;padding:2px 2px 8px !important;scrollbar-width:none !important;}
  .inventory-filter-buttons::-webkit-scrollbar,
  .panel-parts-subfilter-buttons::-webkit-scrollbar,
  .panel-parts-subfilters::-webkit-scrollbar{display:none !important;}
  .inventory-filter-btn,
  .panel-parts-subfilter-btn{flex:0 0 auto !important;min-height:44px !important;padding:11px 15px !important;font-size:15px !important;border-radius:7px !important;}
  .panel-parts-subfilter-label{display:none !important;}

  .inventory-columns{display:block !important;}
  .inventory-col{display:block !important;}
  .inventory-block{margin:0 0 16px 0 !important;border-radius:8px !important;overflow:hidden !important;}
  .inventory-block h3{font-size:34px !important;padding:16px 8px !important;letter-spacing:1px !important;}

  /* Keep normal table layout on mobile and let the user swipe left/right. */
  .inventory-block .table-wrap,
  .inventory-table-wrap,
  .table-wrap{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .inventory-block table,
  .inventory-block.panel-parts table,
  .inventory-block.processors table{
    display:table !important;
    width:auto !important;
    min-width:760px !important;
    table-layout:auto !important;
    border-collapse:collapse !important;
  }

  .inventory-block thead{display:table-header-group !important;}
  .inventory-block tbody{display:table-row-group !important;}
  .inventory-block tr{display:table-row !important;}
  .inventory-block th,
  .inventory-block td{
    display:table-cell !important;
    width:auto !important;
    max-width:none !important;
    vertical-align:middle !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    font-size:14px !important;
    padding:8px 7px !important;
    color:#000 !important;
    text-align:center !important;
  }

  .inventory-block th:first-child,
  .inventory-block td.item-name-cell{
    min-width:190px !important;
    max-width:none !important;
    text-align:left !important;
    font-size:16px !important;
  }

  .inventory-block .item-name-wrap{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    width:100% !important;
    white-space:nowrap !important;
  }
  .inventory-block .item-label{
    display:block !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    max-width:none !important;
    line-height:1.2 !important;
  }
  .inventory-block .archive-inline-form{flex:0 0 auto !important;margin-left:8px !important;}

  .inventory-block td::before{content:none !important;display:none !important;}

  .inventory-block .inline-input,
  .inventory-block.panel-parts .inline-input,
  .inventory-block.processors .inline-input{
    width:62px !important;
    min-width:62px !important;
    max-width:70px !important;
    height:36px !important;
    font-size:15px !important;
    padding:6px 5px !important;
    text-align:center !important;
  }
  .inventory-block .mini-save,
  .inventory-block.panel-parts .mini-save,
  .inventory-block.processors .mini-save{
    min-width:44px !important;
    min-height:34px !important;
    font-size:12px !important;
    padding:7px 8px !important;
    margin:0 !important;
  }

  .inventory-block th:nth-child(n+2),
  .inventory-block td:nth-child(n+2){min-width:64px !important;}
  .inventory-block th:nth-child(7),
  .inventory-block td:nth-child(7){min-width:88px !important;}
  .inventory-block th:nth-child(8),
  .inventory-block td:nth-child(8){min-width:82px !important;}
  .inventory-block th:nth-child(9),
  .inventory-block td:nth-child(9){min-width:58px !important;}

  .dashboard-jobs-table-wrap,
  .jobs-table-wrap{overflow-x:auto !important;-webkit-overflow-scrolling:touch !important;}
  .dashboard-jobs-table{min-width:720px !important;}
}

/* Panel Parts Sub Category dropdown */
.panel-parts-subfilters{
  align-items:center;
  gap:10px;
  padding:10px 14px;
}
.panel-parts-subfilter-label{
  color:#fff;
  font-weight:900;
  flex:0 0 auto;
}
.panel-parts-subfilter-select{
  background:#111;
  color:#fff;
  border:1px solid #666;
  border-radius:7px;
  padding:10px 12px;
  font-weight:900;
  min-width:220px;
  min-height:44px;
}
.panel-parts-subfilter-buttons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
@media(max-width:768px){
  .panel-parts-subfilters{
    display:flex !important;
    flex-wrap:wrap !important;
    overflow:visible !important;
    white-space:normal !important;
  }
  .panel-parts-subfilter-label{
    width:100%;
    display:block !important;
    margin-bottom:4px;
  }
  .panel-parts-subfilter-select{
    display:block !important;
    width:100%;
    max-width:100%;
    font-size:16px;
  }
  .panel-parts-subfilter-buttons{
    display:none !important;
  }
}

/* =========================================================
   MOBILE PORTRAIT HORIZONTAL SCROLL FIX
   Purpose: keep dashboard and inventory in the normal desktop/table layout on phones,
   and allow left/right swiping instead of stacking into mobile cards.
   ========================================================= */
@media (max-width: 760px) and (orientation: portrait){
  html,
  body{
    width:100% !important;
    max-width:none !important;
    overflow-x:auto !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
  }

  .layout{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    overflow-x:visible !important;
  }

  .main{
    width:100% !important;
    max-width:none !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  /* Dashboard top inventory cards should scroll left/right instead of stacking. */
  .dashboard-summary-cards,
  .cards.dashboard-summary-cards,
  .dashboard-pitch-cards{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:12px !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    scroll-snap-type:x proximity !important;
    padding-bottom:8px !important;
  }

  .dashboard-summary-cards .card,
  .dashboard-pitch-cards .card,
  .dashboard-summary-cards .pitch-card,
  .dashboard-pitch-cards .pitch-card{
    flex:0 0 285px !important;
    min-width:285px !important;
    max-width:285px !important;
    scroll-snap-align:start !important;
  }

  .pitch-breakdown{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  /* Active Jobs table on dashboard: keep the full table and swipe left/right. */
  .dashboard-jobs-table,
  table.dashboard-jobs-table{
    display:table !important;
    width:max-content !important;
    min-width:1100px !important;
    table-layout:auto !important;
  }

  /* Inventory page and dashboard inventory section: keep full tables and swipe. */
  .inventory-section,
  #dashboardInventorySection{
    width:100% !important;
    max-width:100% !important;
    overflow-x:visible !important;
  }

  .inventory-section .table-wrap,
  #dashboardInventorySection .table-wrap,
  .inventory-block .table-wrap,
  .table-wrap{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
  }

  .inventory-block table,
  .inventory-section .inventory-block table,
  #dashboardInventorySection .inventory-block table{
    display:table !important;
    width:max-content !important;
    min-width:980px !important;
    table-layout:auto !important;
    border-collapse:collapse !important;
  }

  .inventory-block thead{display:table-header-group !important;}
  .inventory-block tbody{display:table-row-group !important;}
  .inventory-block tr{display:table-row !important;}

  .inventory-block th,
  .inventory-block td{
    display:table-cell !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    width:auto !important;
    max-width:none !important;
    vertical-align:middle !important;
  }

  .inventory-block th:first-child,
  .inventory-block td.item-name-cell{
    min-width:245px !important;
    width:245px !important;
    text-align:left !important;
  }

  .inventory-block .item-name-wrap,
  .inventory-block .item-label{
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    max-width:none !important;
  }

  .inventory-block th:nth-child(n+2),
  .inventory-block td:nth-child(n+2){
    min-width:82px !important;
  }

  .inventory-block .inline-input{
    width:70px !important;
    min-width:70px !important;
  }

  .inventory-block .mini-save{
    min-width:52px !important;
  }

  /* Keep filter/subcategory controls on a horizontal swipe row too. */
  .inventory-filter-buttons,
  .panel-parts-subfilter-buttons{
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    white-space:nowrap !important;
    gap:8px !important;
    -webkit-overflow-scrolling:touch !important;
    padding-bottom:8px !important;
  }

  .inventory-filter-btn,
  .panel-parts-subfilter-btn{
    flex:0 0 auto !important;
    min-height:44px !important;
  }

  /* The Panel Parts subcategory select should remain visible on phone. */
  .panel-parts-subfilter-select,
  #panelPartsSubcategorySelect,
  #panelPartsSubcategorySelectDashboard,
  #panelPartsSubcategoryAdd,
  #panel_parts_subcategory,
  select[name="panel_parts_subcategory"]{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-height:44px !important;
    font-size:16px !important;
    margin:8px 0 10px 0 !important;
  }
}

/* =========================================================
   PHONE PORTRAIT - FORCE HORIZONTAL SCROLL ON EVERY INVENTORY TABLE
   This keeps all inventory category tables behaving like Panel Parts.
   ========================================================= */
@media (max-width: 760px) and (orientation: portrait){
  .inventory-section,
  #inventoryPage,
  #dashboardInventorySection{
    overflow-x:visible !important;
    max-width:100vw !important;
  }

  .inventory-columns,
  .inventory-col,
  .inventory-col-left,
  .inventory-col-right{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
  }

  .inventory-block,
  .inventory-block.diamond,
  .inventory-block.rzr,
  .inventory-block.rx41,
  .inventory-block.posters,
  .inventory-block.processors,
  .inventory-block.panel-parts,
  .inventory-block.rigging{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
  }

  .inventory-block .table-wrap,
  .inventory-block.diamond .table-wrap,
  .inventory-block.rzr .table-wrap,
  .inventory-block.rx41 .table-wrap,
  .inventory-block.posters .table-wrap,
  .inventory-block.processors .table-wrap,
  .inventory-block.panel-parts .table-wrap,
  .inventory-block.rigging .table-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
  }

  .inventory-block table,
  .inventory-block.diamond table,
  .inventory-block.rzr table,
  .inventory-block.rx41 table,
  .inventory-block.posters table,
  .inventory-block.processors table,
  .inventory-block.panel-parts table,
  .inventory-block.rigging table{
    display:table !important;
    width:980px !important;
    min-width:980px !important;
    max-width:none !important;
    table-layout:auto !important;
    border-collapse:collapse !important;
  }

  .inventory-block.processors table,
  .inventory-block.rigging table{
    width:900px !important;
    min-width:900px !important;
  }

  .inventory-block thead,
  .inventory-block.diamond thead,
  .inventory-block.rzr thead,
  .inventory-block.rx41 thead,
  .inventory-block.posters thead,
  .inventory-block.processors thead,
  .inventory-block.panel-parts thead,
  .inventory-block.rigging thead{display:table-header-group !important;}

  .inventory-block tbody{display:table-row-group !important;}
  .inventory-block tr{display:table-row !important;}

  .inventory-block th,
  .inventory-block td,
  .inventory-block.diamond th,
  .inventory-block.diamond td,
  .inventory-block.rzr th,
  .inventory-block.rzr td,
  .inventory-block.rx41 th,
  .inventory-block.rx41 td,
  .inventory-block.posters th,
  .inventory-block.posters td,
  .inventory-block.processors th,
  .inventory-block.processors td,
  .inventory-block.panel-parts th,
  .inventory-block.panel-parts td,
  .inventory-block.rigging th,
  .inventory-block.rigging td{
    display:table-cell !important;
    width:auto !important;
    max-width:none !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    vertical-align:middle !important;
    font-size:14px !important;
    padding:8px 8px !important;
  }

  .inventory-block th:first-child,
  .inventory-block td:first-child,
  .inventory-block td.item-name-cell{
    min-width:250px !important;
    width:250px !important;
    max-width:none !important;
    text-align:left !important;
  }

  .inventory-block .item-name-wrap,
  .inventory-block .item-label{
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    max-width:none !important;
  }

  .inventory-block td::before{display:none !important;content:none !important;}

  .inventory-block th:nth-child(n+2),
  .inventory-block td:nth-child(n+2){min-width:82px !important;}

  .inventory-block .inline-input{width:70px !important;min-width:70px !important;}
  .inventory-block .mini-save{min-width:52px !important;}

  /* Dashboard Active Jobs also swipes left/right on portrait phones. */
  .section > .table-wrap,
  .dashboard-jobs-table-wrap,
  .jobs-table-wrap{
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    max-width:100% !important;
  }

  table.dashboard-jobs-table,
  .dashboard-jobs-table{
    width:1150px !important;
    min-width:1150px !important;
    max-width:none !important;
    table-layout:auto !important;
  }
}

/* =========================================================
   FINAL MOBILE PORTRAIT HORIZONTAL SCROLL OVERRIDE
   Keeps Dashboard and Inventory tables as full desktop tables on phones.
   All inventory categories now behave like the working Panel Parts table:
   users swipe left/right inside each table in portrait view.
   ========================================================= */
@media (max-width: 820px) and (orientation: portrait){
  html,
  body{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
    -webkit-text-size-adjust:100% !important;
    touch-action:pan-x pan-y !important;
  }

  .layout,
  .main{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
  }

  .main{
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .section,
  .inventory-section,
  #inventoryPage,
  #dashboardInventorySection{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  .inventory-columns,
  .inventory-col,
  .inventory-col-left,
  .inventory-col-right{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
  }

  .inventory-block,
  .inventory-block.diamond,
  .inventory-block.rzr,
  .inventory-block.rx41,
  .inventory-block.spider,
  .inventory-block.posters,
  .inventory-block.processors,
  .inventory-block.panel-parts,
  .inventory-block.rigging{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    margin-bottom:16px !important;
  }

  .inventory-block .table-wrap,
  .inventory-block.diamond .table-wrap,
  .inventory-block.rzr .table-wrap,
  .inventory-block.rx41 .table-wrap,
  .inventory-block.spider .table-wrap,
  .inventory-block.posters .table-wrap,
  .inventory-block.processors .table-wrap,
  .inventory-block.panel-parts .table-wrap,
  .inventory-block.rigging .table-wrap,
  #dashboardInventorySection .inventory-block .table-wrap,
  #inventoryPage .inventory-block .table-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
    overscroll-behavior-x:contain !important;
    padding-bottom:8px !important;
  }

  .inventory-block table,
  .inventory-block.diamond table,
  .inventory-block.rzr table,
  .inventory-block.rx41 table,
  .inventory-block.spider table,
  .inventory-block.posters table,
  .inventory-block.processors table,
  .inventory-block.panel-parts table,
  .inventory-block.rigging table,
  #dashboardInventorySection .inventory-block table,
  #inventoryPage .inventory-block table{
    display:table !important;
    table-layout:auto !important;
    border-collapse:collapse !important;
    width:1120px !important;
    min-width:1120px !important;
    max-width:none !important;
  }

  .inventory-block.processors table,
  .inventory-block.rigging table{
    width:980px !important;
    min-width:980px !important;
  }

  .inventory-block thead,
  .inventory-block tbody,
  .inventory-block tr,
  .inventory-block th,
  .inventory-block td{
    float:none !important;
    position:static !important;
  }

  .inventory-block thead{display:table-header-group !important;}
  .inventory-block tbody{display:table-row-group !important;}
  .inventory-block tr{display:table-row !important;}

  .inventory-block th,
  .inventory-block td,
  #dashboardInventorySection .inventory-block th,
  #dashboardInventorySection .inventory-block td,
  #inventoryPage .inventory-block th,
  #inventoryPage .inventory-block td{
    display:table-cell !important;
    width:auto !important;
    max-width:none !important;
    min-width:82px !important;
    padding:8px 8px !important;
    font-size:14px !important;
    line-height:1.2 !important;
    vertical-align:middle !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  .inventory-block th:first-child,
  .inventory-block td:first-child,
  .inventory-block td.item-name-cell{
    width:265px !important;
    min-width:265px !important;
    max-width:none !important;
    text-align:left !important;
    white-space:nowrap !important;
  }

  .inventory-block .item-name-wrap{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    width:100% !important;
    max-width:none !important;
    white-space:nowrap !important;
    overflow:visible !important;
  }

  .inventory-block .item-label,
  .inventory-block .item-name-wrap .item-label{
    display:inline-block !important;
    flex:1 0 auto !important;
    min-width:0 !important;
    max-width:none !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    -webkit-line-clamp:unset !important;
    -webkit-box-orient:initial !important;
  }

  .inventory-block td::before,
  .inventory-block th::before{
    content:none !important;
    display:none !important;
  }

  .inventory-block .inline-input{
    width:72px !important;
    min-width:72px !important;
    max-width:72px !important;
    padding:6px 5px !important;
  }

  .inventory-block .price-input{
    width:90px !important;
    min-width:90px !important;
    max-width:90px !important;
  }

  .inventory-block .mini-save{
    min-width:58px !important;
    white-space:nowrap !important;
  }

  /* Horizontal scrolling on the Dashboard active jobs table too. */
  .section > .table-wrap,
  .dashboard-jobs-table-wrap,
  .jobs-table-wrap{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
    overscroll-behavior-x:contain !important;
  }

  table.dashboard-jobs-table,
  .dashboard-jobs-table,
  .jobs-fit-table{
    display:table !important;
    width:1180px !important;
    min-width:1180px !important;
    max-width:none !important;
    table-layout:auto !important;
    border-collapse:collapse !important;
  }

  .dashboard-jobs-table thead,
  .jobs-fit-table thead{display:table-header-group !important;}
  .dashboard-jobs-table tbody,
  .jobs-fit-table tbody{display:table-row-group !important;}
  .dashboard-jobs-table tr,
  .jobs-fit-table tr{display:table-row !important;}
  .dashboard-jobs-table th,
  .dashboard-jobs-table td,
  .jobs-fit-table th,
  .jobs-fit-table td{
    display:table-cell !important;
    white-space:nowrap !important;
    width:auto !important;
    max-width:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  /* The filter rows scroll horizontally instead of wrapping awkwardly. */
  .inventory-filter-buttons,
  .panel-parts-subfilter-buttons{
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    white-space:nowrap !important;
    -webkit-overflow-scrolling:touch !important;
    gap:8px !important;
    padding-bottom:8px !important;
  }

  .inventory-filter-btn,
  .panel-parts-subfilter-btn{
    flex:0 0 auto !important;
  }

  /* Dashboard summary cards swipe left/right on portrait phones. */
  .dashboard-summary-cards,
  .cards.dashboard-summary-cards,
  .dashboard-pitch-cards{
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    gap:12px !important;
    padding-bottom:8px !important;
  }

  .dashboard-summary-cards > .card,
  .dashboard-pitch-cards > .card,
  .dashboard-summary-cards > .pitch-card,
  .dashboard-pitch-cards > .pitch-card{
    flex:0 0 285px !important;
    min-width:285px !important;
    max-width:285px !important;
  }
}

/* =========================================================
   PHONE PORTRAIT TABLE SCROLL - PANEL PARTS BEHAVIOR FOR ALL TABLES
   This override intentionally makes every inventory table behave like the
   Panel Parts table on iPhone/Android portrait: the table stays wider than
   the screen and the user swipes left/right inside the table.
   ========================================================= */
@media (max-width: 820px) and (orientation: portrait){
  .inventory-section,
  #inventoryPage,
  #dashboardInventorySection{
    overflow:hidden !important;
    width:100% !important;
    max-width:100vw !important;
  }

  .inventory-block{
    overflow:hidden !important;
    width:100% !important;
    max-width:100% !important;
  }

  .inventory-block > .table-wrap,
  .inventory-block .table-wrap.force-mobile-scroll,
  .mobile-table-scroll-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
    overscroll-behavior-x:contain !important;
    padding-bottom:10px !important;
  }

  .inventory-block > .table-wrap > table,
  .inventory-block .table-wrap.force-mobile-scroll > table,
  .mobile-wide-inventory-table{
    display:table !important;
    table-layout:fixed !important;
    width:1120px !important;
    min-width:1120px !important;
    max-width:none !important;
    border-collapse:collapse !important;
  }

  .inventory-block.processors > .table-wrap > table,
  .inventory-block.rigging > .table-wrap > table{
    width:1040px !important;
    min-width:1040px !important;
  }

  .inventory-block thead{display:table-header-group !important;}
  .inventory-block tbody{display:table-row-group !important;}
  .inventory-block tr{display:table-row !important;}

  .inventory-block th,
  .inventory-block td{
    display:table-cell !important;
    float:none !important;
    position:static !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    vertical-align:middle !important;
    font-size:16px !important;
    line-height:1.2 !important;
    padding:10px 9px !important;
  }

  .inventory-block td::before,
  .inventory-block th::before{
    content:none !important;
    display:none !important;
  }

  .inventory-block th:first-child,
  .inventory-block td.item-name-cell{
    width:330px !important;
    min-width:330px !important;
    max-width:330px !important;
    text-align:left !important;
    white-space:nowrap !important;
  }

  .inventory-block th.pitch-col,
  .inventory-block td.pitch-col{width:82px !important;min-width:82px !important;max-width:82px !important;}
  .inventory-block th.num,
  .inventory-block td.num{width:100px !important;min-width:100px !important;max-width:100px !important;text-align:center !important;}
  .inventory-block th.price-col,
  .inventory-block td.price-col{width:125px !important;min-width:125px !important;max-width:125px !important;}
  .inventory-block th.save-col,
  .inventory-block td.save-col{width:80px !important;min-width:80px !important;max-width:80px !important;}

  .inventory-block .item-name-wrap{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    white-space:nowrap !important;
    overflow:visible !important;
  }

  .inventory-block .item-label{
    display:inline-block !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    max-width:none !important;
  }

  .inventory-block .archive-inline-form{flex:0 0 auto !important;margin-left:8px !important;}

  .inventory-block .inline-input{
    width:76px !important;
    min-width:76px !important;
    max-width:76px !important;
    height:38px !important;
    padding:6px 5px !important;
    font-size:16px !important;
  }
  .inventory-block .price-input{
    width:96px !important;
    min-width:96px !important;
    max-width:96px !important;
  }
  .inventory-block .mini-save{
    min-width:58px !important;
    min-height:36px !important;
    white-space:nowrap !important;
  }

  /* Make active jobs swipe the same way on the dashboard. */
  .dashboard-jobs-table-wrap,
  .jobs-table-wrap,
  .section > .table-wrap{
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
    max-width:100% !important;
  }
  .dashboard-jobs-table,
  .jobs-fit-table{
    display:table !important;
    width:1250px !important;
    min-width:1250px !important;
    max-width:none !important;
    table-layout:fixed !important;
  }
}

/* =========================================================
   PHONE PORTRAIT INVENTORY TABLE SCROLL - TRUE FINAL OVERRIDE
   Purpose: make EVERY inventory table behave like Panel Parts.
   It intentionally cancels older mobile "squeeze/card" rules.
   ========================================================= */
@media (max-width: 900px){
  html, body{overflow-x:hidden !important;}
  .main{overflow-x:hidden !important; max-width:100vw !important;}
  .inventory-section,
  .inventory-columns,
  .inventory-col,
  .inventory-block{min-width:0 !important; max-width:100% !important;}
  .inventory-columns{display:block !important; grid-template-columns:none !important;}
  .inventory-col{display:block !important; width:100% !important;}
  .inventory-block{width:100% !important; overflow:hidden !important; margin-bottom:16px !important;}

  .inventory-block > .table-wrap,
  .inventory-block .table-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-x pan-y !important;
    overscroll-behavior-x:contain !important;
  }

  .inventory-block > .table-wrap > table,
  .inventory-block .table-wrap > table{
    display:table !important;
    width:1120px !important;
    min-width:1120px !important;
    max-width:none !important;
    table-layout:fixed !important;
    border-collapse:collapse !important;
  }
  .inventory-block.has-pitch > .table-wrap > table{width:1160px !important; min-width:1160px !important;}
  .inventory-block.no-pitch > .table-wrap > table{width:1040px !important; min-width:1040px !important;}
  .inventory-block.processors > .table-wrap > table,
  .inventory-block.rigging > .table-wrap > table{width:1040px !important; min-width:1040px !important;}

  .inventory-block thead{display:table-header-group !important;}
  .inventory-block tbody{display:table-row-group !important;}
  .inventory-block tr{display:table-row !important;}
  .inventory-block th,
  .inventory-block td{
    display:table-cell !important;
    float:none !important;
    position:static !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    vertical-align:middle !important;
    font-size:16px !important;
    line-height:1.2 !important;
    padding:10px 9px !important;
  }
  .inventory-block td::before,
  .inventory-block th::before{content:none !important; display:none !important;}

  .inventory-block th:first-child,
  .inventory-block td.item-name-cell{width:330px !important; min-width:330px !important; max-width:330px !important; text-align:left !important;}
  .inventory-block th.pitch-col,
  .inventory-block td.pitch-col{width:80px !important; min-width:80px !important; max-width:80px !important; text-align:center !important;}
  .inventory-block th.num,
  .inventory-block td.num{width:105px !important; min-width:105px !important; max-width:105px !important; text-align:center !important;}
  .inventory-block th.price-col,
  .inventory-block td.price-col{width:130px !important; min-width:130px !important; max-width:130px !important;}
  .inventory-block th.save-col,
  .inventory-block td.save-col{width:85px !important; min-width:85px !important; max-width:85px !important;}

  .inventory-block .item-name-wrap{display:flex !important; align-items:center !important; justify-content:space-between !important; gap:8px !important; white-space:nowrap !important; width:100% !important;}
  .inventory-block .item-label{display:inline-block !important; flex:1 1 auto !important; white-space:nowrap !important; overflow:visible !important; text-overflow:clip !important; max-width:none !important;}
  .inventory-block .archive-inline-form{flex:0 0 auto !important; margin-left:8px !important;}
  .inventory-block .inline-input{width:76px !important; min-width:76px !important; max-width:76px !important; height:38px !important; font-size:16px !important; padding:6px 5px !important;}
  .inventory-block .price-input{width:96px !important; min-width:96px !important; max-width:96px !important;}
  .inventory-block .mini-save{min-width:58px !important; min-height:36px !important; white-space:nowrap !important;}

  .active-jobs-section .table-wrap,
  .section > .table-wrap{overflow-x:auto !important; -webkit-overflow-scrolling:touch !important;}
  .dashboard-jobs-table,
  .jobs-fit-table{width:1250px !important; min-width:1250px !important; max-width:none !important; table-layout:fixed !important;}
}

/* =========================================================
   RIGGING MOBILE ITEM NAME CONTAINMENT FIX
   Keeps long rigging item names inside the Item cell while
   preserving horizontal swipe behavior on phone portrait.
   ========================================================= */
@media (max-width: 900px){
  .inventory-block.rigging th:first-child,
  .inventory-block.rigging td.item-name-cell{
    width:380px !important;
    min-width:380px !important;
    max-width:380px !important;
    overflow:hidden !important;
    white-space:normal !important;
    text-align:left !important;
  }

  .inventory-block.rigging .item-name-wrap{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    white-space:normal !important;
  }

  .inventory-block.rigging .item-label{
    display:block !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    line-height:1.2 !important;
  }

  .inventory-block.rigging .archive-inline-form{
    flex:0 0 auto !important;
    margin-left:8px !important;
  }

  .inventory-block.rigging > .table-wrap > table,
  .inventory-block.rigging .table-wrap > table{
    width:1090px !important;
    min-width:1090px !important;
  }
}

/* =========================================================
   RIGGING ITEM CELL HARD CONTAINMENT - FINAL
   Prevents long rigging item names from spilling into Mech/Vegas cells
   while keeping phone portrait horizontal table scrolling.
   ========================================================= */
@media (max-width: 900px){
  .inventory-block.rigging > .table-wrap > table,
  .inventory-block.rigging .table-wrap > table{
    width:1260px !important;
    min-width:1260px !important;
    max-width:none !important;
    table-layout:fixed !important;
  }

  .inventory-block.rigging th:first-child,
  .inventory-block.rigging td:first-child,
  .inventory-block.rigging td.item-name-cell{
    width:520px !important;
    min-width:520px !important;
    max-width:520px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    white-space:normal !important;
    text-align:left !important;
  }

  .inventory-block.rigging td:first-child,
  .inventory-block.rigging td.item-name-cell{
    position:relative !important;
  }

  .inventory-block.rigging td:first-child .item-name-wrap,
  .inventory-block.rigging td.item-name-cell .item-name-wrap{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) auto !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    white-space:normal !important;
  }

  .inventory-block.rigging td:first-child .item-label,
  .inventory-block.rigging td.item-name-cell .item-label{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    line-height:1.2 !important;
  }

  .inventory-block.rigging td:first-child .archive-inline-form,
  .inventory-block.rigging td.item-name-cell .archive-inline-form{
    grid-column:2 !important;
    flex:none !important;
    margin-left:0 !important;
    white-space:nowrap !important;
  }

  .inventory-block.rigging th.num,
  .inventory-block.rigging td.num{
    width:105px !important;
    min-width:105px !important;
    max-width:105px !important;
    overflow:hidden !important;
    text-align:center !important;
  }

  .inventory-block.rigging td.num *,
  .inventory-block.rigging th.num *{
    max-width:100% !important;
  }
}


/* =========================================================
   TRUE FINAL RIGGING MOBILE FIX
   The previous fix still allowed text painting outside the first cell
   on iPhone Safari. This version clips the Item cell itself and makes
   the label wrap inside a fixed-width first column while the whole table
   keeps horizontal scrolling.
   ========================================================= */
@media (max-width: 900px){
  .inventory-block.rigging .table-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .inventory-block.rigging table{
    table-layout:fixed !important;
    width:1280px !important;
    min-width:1280px !important;
    max-width:none !important;
    border-collapse:collapse !important;
  }

  .inventory-block.rigging th,
  .inventory-block.rigging td{
    box-sizing:border-box !important;
    vertical-align:middle !important;
  }

  /* The actual first column is clipped, so text can never paint into Mech/Vegas. */
  .inventory-block.rigging th:first-child,
  .inventory-block.rigging td:first-child,
  .inventory-block.rigging td.item-name-cell{
    width:430px !important;
    min-width:430px !important;
    max-width:430px !important;
    overflow:hidden !important;
    white-space:normal !important;
    text-align:left !important;
    contain:paint !important;
  }

  .inventory-block.rigging td.item-name-cell .item-name-wrap,
  .inventory-block.rigging td:first-child .item-name-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    white-space:normal !important;
    box-sizing:border-box !important;
    contain:paint !important;
  }

  .inventory-block.rigging td.item-name-cell .item-label,
  .inventory-block.rigging td:first-child .item-label{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    text-overflow:clip !important;
    line-height:1.18 !important;
  }

  .inventory-block.rigging td.item-name-cell .archive-inline-form,
  .inventory-block.rigging td:first-child .archive-inline-form{
    float:right !important;
    display:block !important;
    margin:0 0 2px 8px !important;
    max-width:24px !important;
  }

  .inventory-block.rigging th.num,
  .inventory-block.rigging td.num{
    width:120px !important;
    min-width:120px !important;
    max-width:120px !important;
    overflow:hidden !important;
    text-align:center !important;
    contain:paint !important;
  }

  .inventory-block.rigging .inline-input{
    max-width:78px !important;
  }
}
