
:root{
  --bg:#f5f6f8;
  --panel:#ffffff;
  --ink:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --dark:#111827;
  --soft:#f3f4f6;
  --success:#0f766e;
  --warn:#b45309;
  --danger:#b91c1c;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--ink)}
button,input,select,textarea{font:inherit}
.app{display:grid;grid-template-columns:260px 1fr;min-height:100vh}
.sidebar{background:#111827;color:#fff;padding:22px 16px;display:flex;flex-direction:column;gap:18px}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px 18px;border-bottom:1px solid #293142}
.logo{width:42px;height:42px;border-radius:10px;background:#fff;color:#111827;display:grid;place-items:center;font-weight:800}
.brand h1{font-size:12px;margin:0;letter-spacing:.5px}.brand span{font-size:12px;color:#9ca3af}
nav{display:flex;flex-direction:column;gap:5px}
.nav-btn{border:0;background:transparent;color:#cbd5e1;text-align:left;padding:11px 12px;border-radius:8px;cursor:pointer}
.nav-btn:hover,.nav-btn.active{background:#1f2937;color:#fff}
.sidebar-footer{margin-top:auto;border-top:1px solid #293142;padding-top:14px}
.user-card{display:flex;align-items:center;gap:10px}.avatar{width:34px;height:34px;border-radius:50%;background:#374151;display:grid;place-items:center;font-size:12px}
.user-card strong,.user-card small{display:block}.user-card strong{font-size:12px}.user-card small{font-size:12px;color:#9ca3af}
.main{min-width:0}
.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:24px 28px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:3}
.topbar h2{margin:0 0 4px;font-size:12px}.topbar p{margin:0;color:var(--muted);font-size:12px}
.top-actions{display:flex;gap:8px;align-items:center}.top-actions input{width:260px}
input,select,textarea{border:1px solid #d1d5db;border-radius:7px;padding:9px 10px;background:#fff;min-height:38px}
textarea{min-height:88px;resize:vertical}
button{border-radius:7px;padding:9px 13px;border:1px solid transparent;cursor:pointer}
.primary{background:#111827;color:#fff}.secondary{background:#fff;border-color:#d1d5db;color:#111827}.danger{background:#fff;border-color:#fecaca;color:#b91c1c}
#content{padding:24px 28px}
.grid{display:grid;gap:16px}.grid.cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px}
.card{padding:18px}.card .label{font-size:12px;color:var(--muted)}.card .value{font-size:12px;font-weight:750;margin:7px 0}.card .note{font-size:12px;color:var(--muted)}
.panel{padding:18px;margin-top:16px}.panel-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.panel h3{margin:0;font-size:12px}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th{color:#6b7280;font-size:12px;text-transform:uppercase;letter-spacing:.04em;background:#fafafa}
.badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700;background:#eef2ff}
.badge.green{background:#dcfce7;color:#166534}.badge.amber{background:#fef3c7;color:#92400e}.badge.red{background:#fee2e2;color:#991b1b}.badge.gray{background:#f3f4f6;color:#4b5563}
.kpi-row{display:flex;gap:8px;flex-wrap:wrap}.pill{padding:6px 9px;background:#f3f4f6;border-radius:999px;font-size:12px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-group{display:flex;flex-direction:column;gap:6px}.form-group.full{grid-column:1/-1}.form-group label{font-size:12px;color:#4b5563;font-weight:700}
.modal{position:fixed;inset:0;background:rgba(17,24,39,.5);display:grid;place-items:center;padding:20px;z-index:20}.modal.hidden{display:none}.modal-card{width:min(720px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:14px;padding:18px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.modal-head h3{margin:0}.icon-btn{background:#f3f4f6;border:0;width:34px;height:34px;padding:0;font-size:12px}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.toolbar input,.toolbar select{min-width:180px}
.empty{padding:28px;text-align:center;color:#6b7280}
.progress{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:#111827}
.two-col{display:grid;grid-template-columns:2fr 1fr;gap:16px}
.style-card{display:grid;grid-template-columns:72px 1fr auto;gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.style-thumb{width:72px;height:72px;border-radius:9px;background:linear-gradient(135deg,#e5e7eb,#f9fafb);display:grid;place-items:center;font-weight:800;color:#6b7280}
.muted{color:var(--muted)}
.link-btn{padding:0;border:0;background:transparent;text-decoration:underline}
@media(max-width:980px){.app{grid-template-columns:210px 1fr}.grid.cards{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.top-actions input{width:180px}}
@media(max-width:720px){.app{display:block}.sidebar{position:relative}.topbar{position:relative;align-items:flex-start;flex-direction:column}.top-actions{width:100%;flex-wrap:wrap}.top-actions input{width:100%}.grid.cards{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-group.full{grid-column:auto}}
.database-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.db-panel{margin-top:0}.db-list{display:flex;flex-direction:column}.db-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 2px;border-bottom:1px solid var(--line)}.small-btn{padding:5px 8px;font-size:12px}.check-list{border:1px solid #d1d5db;border-radius:8px;padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:230px;overflow:auto;background:#fafafa}.check-option{display:flex;gap:8px;align-items:center;padding:7px 8px;border-radius:6px;background:#fff;border:1px solid #eee;font-size:12px;cursor:pointer}.check-option input{min-height:auto}.form-actions{display:flex;justify-content:flex-end;gap:8px}.description-cell{max-width:260px;white-space:normal;min-width:180px}@media(max-width:800px){.database-grid,.check-list{grid-template-columns:1fr}}

.section-title{
  margin-top:4px;
  padding:10px 12px;
  border-radius:8px;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  font-size:12px;
  font-weight:700;
}
.attributes-heading{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.attributes-heading strong{display:block;font-size:12px}
.attributes-heading span{display:block;font-weight:400;color:#6b7280;font-size:12px;margin-top:3px}
.attribute-field{padding:4px 0}
.check-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fafafa;
}
.check-option{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid #d1d5db;
  border-radius:7px;
  background:#fff;
  cursor:pointer;
  font-size:12px;
}
.check-option input{min-height:auto;margin:0}

.size-profile-panel{grid-column:1/-1}
.size-profile-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px 0;border-bottom:1px solid #e5e7eb}
.size-profile-row:last-child{border-bottom:0}
.size-profile-row .muted{margin-top:4px;line-height:1.5;white-space:normal}

.subnav{display:none;flex-direction:column;gap:3px;margin:-2px 0 4px 14px;padding-left:9px;border-left:1px solid #374151}
.subnav.open{display:flex}
.subnav-btn{border:0;background:transparent;color:#9ca3af;text-align:left;padding:8px 10px;border-radius:7px;font-size:12px;cursor:pointer}
.subnav-btn:hover,.subnav-btn.active{background:#1f2937;color:#fff}
.nav-expand{display:flex;justify-content:space-between}
.po-builder-panel{margin-top:18px}
.po-line{border:1px solid #e5e7eb;border-radius:10px;padding:14px;margin-bottom:14px;background:#fafafa}
.po-line-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.po-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.size-qty-table{overflow:auto;margin-top:12px}
.size-qty-table input{width:68px;min-width:68px;text-align:center}
.po-summary{display:flex;justify-content:flex-end;gap:28px;margin:16px 0;padding:14px;background:#111827;color:#fff;border-radius:10px}
.po-summary div{display:flex;gap:10px;align-items:center}.po-summary span{font-size:12px;font-weight:800}
.modal-card{width:min(1100px,96vw)}
@media(max-width:900px){.po-grid{grid-template-columns:repeat(2,1fr)}}

/* V1.5 compact UI */
body{font-size:12px} input,select,textarea{padding:7px 8px;min-height:32px;font-size:12px} button{padding:7px 10px;font-size:12px}
.topbar{padding:18px 22px}.topbar h2{font-size:12px}#content{padding:18px 22px}th,td{padding:8px 7px;font-size:12px}.panel{padding:14px}.form-group label{font-size:12px}
.user-switch{min-width:0;flex:1}.user-switch small{display:block;color:#9ca3af;margin-bottom:4px}.user-switch select{width:100%;background:#1f2937;color:#fff;border-color:#374151;min-height:30px;font-size:12px;padding:4px 5px}
.row-actions{display:flex;gap:9px;align-items:center}.danger-link{color:#b91c1c}.attribute-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
.po-modal-card{width:98vw!important;max-width:none!important;max-height:94vh!important;padding:12px!important}.po-modal-card .modal-head{margin-bottom:8px}.po-modal-card .form-grid{grid-template-columns:repeat(6,minmax(120px,1fr));gap:7px}
.po-builder-panel{padding:8px;margin-top:10px}.po-line{padding:6px;margin-bottom:7px;background:#fff;border-radius:7px}.po-line-head{display:none}.po-row-scroll{overflow-x:auto}.po-row{display:flex;gap:5px;align-items:flex-end;min-width:max-content}.po-cell{display:flex;flex-direction:column;gap:3px}.po-cell label,.po-size label{font-size:12px;color:#6b7280;font-weight:700;text-align:center}.po-cell input,.po-cell select{height:29px;min-height:29px;padding:4px 5px;font-size:12px}.po-code{width:112px}.po-name{width:155px}.po-colour-cell{width:95px}.po-cost-cell{width:70px}.po-totalqty{width:55px}.po-amount{width:82px}.po-remove{width:55px}.po-sizes{display:flex;gap:3px;align-items:flex-end}.po-size{display:flex;flex-direction:column;gap:3px;width:38px}.po-size input{width:38px;height:29px;min-height:29px;padding:3px;text-align:center;font-size:12px}.calc-box{height:29px;min-width:50px;padding:7px 4px;border:1px solid #d1d5db;background:#f9fafb;border-radius:6px;text-align:center;font-size:12px;font-weight:700;white-space:nowrap}.po-summary{padding:9px 12px;margin:9px 0;gap:18px}.po-summary span{font-size:12px}.po-summary strong{font-size:12px}
.preview-modal-card{width:min(900px,96vw)!important;max-height:94vh!important}.preview-toolbar{display:flex;justify-content:flex-end;gap:8px;margin-bottom:10px}.po-a4{background:white;width:210mm;min-height:297mm;max-width:100%;margin:auto;padding:10mm;box-shadow:0 0 0 1px #ddd;overflow:auto}.po-doc-head{display:flex;justify-content:space-between;border-bottom:2px solid #111;padding-bottom:8px;margin-bottom:12px}.po-doc-head h1{margin:0;font-size:12px}.po-doc-number{text-align:right}.po-doc-number span{display:block;color:#777;font-size:12px}.po-doc-number strong{font-size:12px}.po-doc-meta{display:grid;grid-template-columns:1.4fr 1fr;gap:25px;line-height:1.5;margin-bottom:15px}.po-doc-table{width:100%;border-collapse:collapse;font-size:12px}.po-doc-table th,.po-doc-table td{border:1px solid #aaa;padding:4px;text-align:center;white-space:nowrap}.po-doc-table th{background:#f2f2f2}.po-doc-notes{margin-top:15px;border:1px solid #bbb;padding:10px}.po-doc-notes p{margin:5px 0 0}@media(max-width:1000px){.po-modal-card .form-grid{grid-template-columns:repeat(3,1fr)}}

.confirm-overlay{position:fixed;inset:0;background:rgba(17,24,39,.48);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}.confirm-overlay.hidden{display:none}.confirm-box{width:min(420px,94vw);background:#fff;border-radius:12px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.24)}.confirm-box h3{font-size:12px;line-height:1.45;margin:0 0 18px;color:#111827}.confirm-actions{display:flex;justify-content:flex-end;gap:9px}
.fabric-modal-card{width:min(1250px,97vw);max-height:95vh}.fabric-table-wrap{overflow:auto}.fabric-table{min-width:2400px;font-size:12px}.fabric-table th,.fabric-table td{padding:7px 8px;white-space:nowrap}.fabric-name-cell{white-space:normal!important;min-width:380px;max-width:520px;line-height:1.35}.fabric-form-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.fabric-comp-grid{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:8px;margin-top:9px}.lower-fabric-fields{grid-template-columns:2fr 1fr 1fr;margin-top:12px}.fabric-id-input{display:flex;align-items:center;border:1px solid #d1d5db;border-radius:7px;background:#fff;overflow:hidden}.fabric-id-input span{padding:7px 8px;background:#f3f4f6;font-weight:800;border-right:1px solid #d1d5db}.fabric-id-input input{border:0;border-radius:0;min-width:0}.percent-field>div{display:flex;align-items:center;border:1px solid #d1d5db;border-radius:7px;background:#fff;overflow:hidden}.percent-field input{border:0;border-radius:0;min-width:0}.percent-field span{padding-right:7px;font-weight:700;color:#6b7280}.fabric-total{height:31px;border-radius:7px;display:flex;align-items:center;padding:0 10px;font-weight:800;border:1px solid}.total-ok{background:#ecfdf5!important;color:#047857!important;border-color:#a7f3d0!important}.total-bad{background:#fef2f2!important;color:#b91c1c!important;border-color:#fecaca!important}.fabric-warning{margin:10px 0;padding:9px 11px;background:#fef2f2;border:1px solid #fecaca;border-radius:7px;color:#b91c1c;font-size:12px;font-weight:700}@media(max-width:1000px){.fabric-form-grid{grid-template-columns:repeat(2,1fr)}.fabric-comp-grid{grid-template-columns:repeat(3,1fr)}}

.fabric-full-card{width:98.5vw!important;max-width:98.5vw!important;height:auto;max-height:96vh}
.fabric-entry-scroll{overflow-x:auto;padding-bottom:6px;margin-top:2px}
.fabric-entry-line{display:flex;align-items:flex-end;gap:6px;min-width:max-content}
.fabric-entry-line .form-group{width:105px;min-width:105px;margin:0}
.fabric-entry-line .fabric-id-col{width:112px;min-width:112px}
.fabric-entry-line .fabric-mini-field{width:91px;min-width:91px}
.fabric-entry-line .fabric-gsm-col{width:80px;min-width:80px}
.fabric-entry-line .fabric-total-col{width:100px;min-width:100px}
.fabric-entry-line label{font-size:12px;line-height:1.1;margin-bottom:4px;min-height:22px;display:flex;align-items:flex-end}
.fabric-entry-line input,.fabric-entry-line select{font-size:12px;padding:6px 6px;height:30px}
.fabric-entry-line .fabric-id-input input{height:28px}
.fabric-entry-line .fabric-id-input span{padding:6px 6px;font-size:12px}
.fabric-entry-line .percent-field>div{height:30px}
.fabric-entry-line .percent-field input{height:28px;padding:5px}
.fabric-entry-line .percent-field span{font-size:12px;padding-right:4px}
.fabric-entry-line .fabric-total{height:30px;padding:0 6px;font-size:12px}
.fabric-name-row{display:flex;align-items:flex-end;gap:8px;margin-top:14px}
.fabric-name-preview-group{flex:1;margin:0}
.fabric-name-preview-group textarea{min-height:64px;font-size:12px;line-height:1.35}
.fabric-copy-btn{height:34px;min-width:72px;margin-bottom:1px}

.fabric-full-card{width:96vw!important;max-width:96vw!important}
.fabric-row{display:flex;align-items:flex-end;gap:6px;flex-wrap:nowrap;margin-bottom:10px}
.fabric-row .form-group{margin:0;min-width:0}
.fabric-row-one .form-group{width:145px}
.fabric-row-one .fabric-id-col{width:112px}
.fabric-row-two{gap:4px}
.fabric-row-two .fabric-mini-field{width:68px;min-width:68px}
.fabric-row-two .fabric-total-col{width:88px;min-width:88px;margin-left:4px}
.fabric-row-three .form-group{width:150px}
.fabric-row-three .fabric-gsm-col{width:82px}
.fabric-row label{font-size:12px;line-height:1.05;margin-bottom:3px;min-height:18px;display:flex;align-items:flex-end}
.fabric-row input,.fabric-row select{font-size:12px;padding:5px 5px;height:28px}
.fabric-row .fabric-id-input input{height:27px}
.fabric-row .fabric-id-input span{padding:5px 5px;font-size:12px}
.fabric-row .percent-field>div{height:28px}
.fabric-row .percent-field input{height:26px;padding:4px;width:100%}
.fabric-row .percent-field span{font-size:12px;padding-right:3px}
.fabric-row .fabric-total{height:28px;padding:0 5px;font-size:12px}
.fabric-name-row{margin-top:4px}
@media(max-width:1100px){
 .fabric-row-one .form-group{width:128px}
 .fabric-row-two .fabric-mini-field{width:60px;min-width:60px}
 .fabric-row-two .fabric-total-col{width:80px;min-width:80px}
}


/* V1.8 dashboard, colour Pantone and Critical Path */
.dashboard-po-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.dashboard-po-row:last-child{border-bottom:0}
.colour-db-item span{display:flex;flex-direction:column;gap:3px}
.colour-db-item small{color:var(--muted);font-size:12px}
.po-line-number{width:34px;min-width:34px;display:flex;flex-direction:column;gap:3px;align-items:center}
.po-line-number label{font-size:12px;color:#6b7280;font-weight:700}
.po-line-number span{height:29px;width:29px;border-radius:6px;background:#111827;color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800}
.critical-cards{grid-template-columns:repeat(3,minmax(0,1fr));max-width:900px}
.critical-panel{margin-top:16px}
.critical-table{font-size:12px}
.critical-table th,.critical-table td{padding:8px 7px}
.critical-status{min-width:110px;min-height:29px;height:29px;padding:4px 7px;font-size:12px;font-weight:700}
.critical-status.status-progress{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.critical-status.status-transit{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.critical-status.status-complete{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.critical-late-row td{background:#fff7f7}
@media(max-width:800px){.critical-cards{grid-template-columns:1fr}}


/* V1.8.1 Fabric simplification and Critical Path sample workflow */
.pantone-missing{color:#c62828!important;font-weight:700}
.sample-status{min-width:92px;min-height:29px;height:29px;padding:4px 6px;font-size:12px;font-weight:700}
.sample-status.sample-waiting{background:#f3f4f6;color:#374151;border-color:#d1d5db}
.sample-status.sample-approved{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.sample-status.sample-rejected{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.critical-note-btn{border:0;background:transparent;font-size:12px;line-height:1;cursor:pointer;padding:4px;border-radius:5px}
.critical-note-btn:hover{background:#f3f4f6}
.critical-note-btn.has-note{background:#fff7ed}
.critical-table th{white-space:nowrap}


/* V1.8.2 Critical Path production stages */
.production-status,.ready-status{min-width:96px;min-height:29px;height:29px;padding:4px 6px;font-size:12px;font-weight:700}
.production-status.prod-progress{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.production-status.prod-waiting{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.production-status.prod-complete{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.ready-status.ready-yes{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.ready-status.ready-no{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.critical-table th{
 white-space:normal!important;
 line-height:1.15;
 max-width:92px;
 min-width:58px;
 word-break:normal;
 overflow-wrap:break-word;
 text-align:left;
 vertical-align:bottom;
}
.critical-table th:nth-child(2),
.critical-table th:nth-child(5){max-width:120px}


/* V1.8.3 Critical Path date extensions and note metadata */
.overdue-date{color:#c62828!important;font-weight:800}
.critical-new-date{min-width:118px;height:29px;padding:4px 6px;font-size:12px}
.critical-note-btn[title]{white-space:pre-line}


/* V1.8.4 QC workflow */
.qc-result{display:inline-block;min-width:62px;text-align:center;padding:5px 8px;border-radius:6px;font-size:12px;font-weight:800}
.qc-result.qc-pending{background:#f3f4f6;color:#4b5563}
.qc-result.qc-pass{background:#dcfce7;color:#166534}
.qc-result.qc-fail{background:#fee2e2;color:#991b1b}
.qc-status-select{min-width:88px;min-height:29px;height:29px;padding:4px 6px;font-size:12px;font-weight:700}
.qc-status-select.qc-select-pass{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.qc-status-select.qc-select-fail{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.qc-photo-cell{display:flex;align-items:center;gap:6px}
.photo-icon-btn{position:relative;border:0;background:#f3f4f6;border-radius:6px;padding:5px 8px;cursor:pointer;font-size:12px}
.photo-icon-btn.has-photos{background:#e0f2fe}
.photo-icon-btn span{position:absolute;right:-5px;top:-5px;background:#111827;color:#fff;border-radius:10px;min-width:16px;height:16px;display:grid;place-items:center;font-size:12px;font-weight:800}
.upload-photo-btn{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border:1px solid var(--line);border-radius:6px;cursor:pointer;font-size:12px;font-weight:700;background:#fff}
.upload-photo-btn input{display:none}
.qc-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.qc-gallery-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.qc-gallery-card img{width:120px;height:90px;object-fit:cover;cursor:zoom-in;display:block;border-radius:6px}
.qc-gallery-card div{padding:9px;display:flex;flex-direction:column;gap:3px}
.qc-gallery-card small{color:var(--muted)}
.qc-photo-large{text-align:center}
.qc-photo-large img{max-width:100%;max-height:68vh;object-fit:contain;cursor:zoom-in;transition:.15s}
.qc-photo-large img.zoomed{max-width:none;max-height:none;width:auto;height:auto;cursor:zoom-out}
.qc-table th{white-space:normal;line-height:1.15}


/* V1.8.5 Shipping + QC warning */
.critical-qc-warning{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 16px;margin-bottom:14px;border:2px solid #dc2626;background:#fff1f2;color:#b91c1c;font-weight:800;border-radius:9px}
.critical-qc-warning button{background:#b91c1c;color:#fff;border:0;border-radius:6px;padding:7px 14px;font-weight:800;cursor:pointer}
.shipping-btn{min-width:78px;border:1px solid #cbd5e1;background:#fff;border-radius:6px;padding:6px 9px;font-size:12px;font-weight:700;cursor:pointer}
.shipping-btn.has-shipping{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.received-check{width:18px;height:18px;cursor:pointer}
.critical-status-display{display:inline-block;min-width:82px;text-align:center;border-radius:6px;padding:6px 8px;font-size:12px;font-weight:800}
.critical-status-display.status-progress{background:#fee2e2;color:#991b1b}
.critical-status-display.status-transit{background:#ffedd5;color:#9a3412}
.critical-status-display.status-complete{background:#dcfce7;color:#166534}
.qc-gallery{display:flex;flex-wrap:wrap;gap:12px}
.qc-gallery-card{display:flex;align-items:center;gap:10px;padding:8px}
.qc-gallery-card div{padding:0}


/* V1.8.6 User Database + Activity Log */
.activity-list{display:flex;flex-direction:column}
.activity-item{display:grid;grid-template-columns:130px 1fr 180px;gap:14px;align-items:center;padding:11px 4px;border-bottom:1px solid var(--line)}
.activity-user{font-weight:800}
.activity-action{font-size:12px}
.activity-time{text-align:right;color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:760px){.activity-item{grid-template-columns:1fr}.activity-time{text-align:left}}

/* V1.8.8 in-page Shipping modal */
.shipping-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.shipping-url-row{display:flex;gap:6px}.shipping-url-row input{flex:1}
.bl-saved{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bl-saved small{color:var(--muted)}
@media(max-width:800px){.shipping-form-grid{grid-template-columns:1fr}}

.datasheet-icon{font-size:12px;line-height:1;padding:4px 7px}
.datasheet-preview{width:100%;height:72vh;min-height:520px}
.datasheet-preview iframe{width:100%;height:100%;border:1px solid #d9dde3;border-radius:8px;background:#fff}

/* Product Datasheet */
.datasheet-upload-field input[type="file"]{width:100%;padding:10px;border:1px solid var(--border);border-radius:8px;background:#fff}
.datasheet-current{display:flex;align-items:center;gap:12px;margin-top:8px}
.datasheet-cell{text-align:center}
.datasheet-pdf-btn{border:0;background:transparent;font-size:12px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:6px}
.datasheet-pdf-btn:hover{background:#f0f2f5}
.datasheet-preview-box{height:72vh;min-height:500px;width:100%}
.datasheet-preview-box iframe{width:100%;height:100%;border:1px solid var(--border);border-radius:8px;background:#fff}

#airlineField.hidden,#vesselField.hidden,#urlField.hidden,#trackingField.hidden,#blField.hidden{display:none!important}

/* V1.8.9.5 Shipping conditional fields */
#shipping-airline-wrap.hidden,
#shipping-vessel-wrap.hidden,
#shipping-url-wrap.hidden,
#shipping-tracking-wrap.hidden,
#shipping-bl-wrap.hidden{display:none!important}

/* V1.8.9.6 Shipping modal layout */
.shipping-form-grid{
  display:grid;
  grid-template-columns:1fr!important;
  gap:14px;
}
.shipping-form-grid .form-group,
.shipping-form-grid .form-group.full{
  width:100%;
  grid-column:1 / -1!important;
}
.shipping-form-grid label{
  display:block;
  margin-bottom:6px;
}
.shipping-form-grid input,
.shipping-form-grid select{
  width:100%;
  box-sizing:border-box;
}
.shipping-url-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:end;
}
.shipping-method-badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#f3f4f6;
  font-weight:700;
  white-space:nowrap;
}


/* V1.8.9.14 PO UI reverted to morning V1.8.9.6 layout */

:root{
  --bg:#f5f6f8;
  --panel:#ffffff;
  --ink:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --dark:#111827;
  --soft:#f3f4f6;
  --success:#0f766e;
  --warn:#b45309;
  --danger:#b91c1c;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--ink)}
button,input,select,textarea{font:inherit}
.app{display:grid;grid-template-columns:260px 1fr;min-height:100vh}
.sidebar{background:#111827;color:#fff;padding:22px 16px;display:flex;flex-direction:column;gap:18px}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px 18px;border-bottom:1px solid #293142}
.logo{width:42px;height:42px;border-radius:10px;background:#fff;color:#111827;display:grid;place-items:center;font-weight:800}
.brand h1{font-size:12px;margin:0;letter-spacing:.5px}.brand span{font-size:12px;color:#9ca3af}
nav{display:flex;flex-direction:column;gap:5px}
.nav-btn{border:0;background:transparent;color:#cbd5e1;text-align:left;padding:11px 12px;border-radius:8px;cursor:pointer}
.nav-btn:hover,.nav-btn.active{background:#1f2937;color:#fff}
.sidebar-footer{margin-top:auto;border-top:1px solid #293142;padding-top:14px}
.user-card{display:flex;align-items:center;gap:10px}.avatar{width:34px;height:34px;border-radius:50%;background:#374151;display:grid;place-items:center;font-size:12px}
.user-card strong,.user-card small{display:block}.user-card strong{font-size:12px}.user-card small{font-size:12px;color:#9ca3af}
.main{min-width:0}
.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:24px 28px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:3}
.topbar h2{margin:0 0 4px;font-size:12px}.topbar p{margin:0;color:var(--muted);font-size:12px}
.top-actions{display:flex;gap:8px;align-items:center}.top-actions input{width:260px}
input,select,textarea{border:1px solid #d1d5db;border-radius:7px;padding:9px 10px;background:#fff;min-height:38px}
textarea{min-height:88px;resize:vertical}
button{border-radius:7px;padding:9px 13px;border:1px solid transparent;cursor:pointer}
.primary{background:#111827;color:#fff}.secondary{background:#fff;border-color:#d1d5db;color:#111827}.danger{background:#fff;border-color:#fecaca;color:#b91c1c}
#content{padding:24px 28px}
.grid{display:grid;gap:16px}.grid.cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px}
.card{padding:18px}.card .label{font-size:12px;color:var(--muted)}.card .value{font-size:12px;font-weight:750;margin:7px 0}.card .note{font-size:12px;color:var(--muted)}
.panel{padding:18px;margin-top:16px}.panel-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.panel h3{margin:0;font-size:12px}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th{color:#6b7280;font-size:12px;text-transform:uppercase;letter-spacing:.04em;background:#fafafa}
.badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700;background:#eef2ff}
.badge.green{background:#dcfce7;color:#166534}.badge.amber{background:#fef3c7;color:#92400e}.badge.red{background:#fee2e2;color:#991b1b}.badge.gray{background:#f3f4f6;color:#4b5563}
.kpi-row{display:flex;gap:8px;flex-wrap:wrap}.pill{padding:6px 9px;background:#f3f4f6;border-radius:999px;font-size:12px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-group{display:flex;flex-direction:column;gap:6px}.form-group.full{grid-column:1/-1}.form-group label{font-size:12px;color:#4b5563;font-weight:700}
.modal{position:fixed;inset:0;background:rgba(17,24,39,.5);display:grid;place-items:center;padding:20px;z-index:20}.modal.hidden{display:none}.modal-card{width:min(720px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:14px;padding:18px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.modal-head h3{margin:0}.icon-btn{background:#f3f4f6;border:0;width:34px;height:34px;padding:0;font-size:12px}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.toolbar input,.toolbar select{min-width:180px}
.empty{padding:28px;text-align:center;color:#6b7280}
.progress{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:#111827}
.two-col{display:grid;grid-template-columns:2fr 1fr;gap:16px}
.style-card{display:grid;grid-template-columns:72px 1fr auto;gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.style-thumb{width:72px;height:72px;border-radius:9px;background:linear-gradient(135deg,#e5e7eb,#f9fafb);display:grid;place-items:center;font-weight:800;color:#6b7280}
.muted{color:var(--muted)}
.link-btn{padding:0;border:0;background:transparent;text-decoration:underline}
@media(max-width:980px){.app{grid-template-columns:210px 1fr}.grid.cards{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.top-actions input{width:180px}}
@media(max-width:720px){.app{display:block}.sidebar{position:relative}.topbar{position:relative;align-items:flex-start;flex-direction:column}.top-actions{width:100%;flex-wrap:wrap}.top-actions input{width:100%}.grid.cards{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-group.full{grid-column:auto}}
.database-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.db-panel{margin-top:0}.db-list{display:flex;flex-direction:column}.db-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 2px;border-bottom:1px solid var(--line)}.small-btn{padding:5px 8px;font-size:12px}.check-list{border:1px solid #d1d5db;border-radius:8px;padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:230px;overflow:auto;background:#fafafa}.check-option{display:flex;gap:8px;align-items:center;padding:7px 8px;border-radius:6px;background:#fff;border:1px solid #eee;font-size:12px;cursor:pointer}.check-option input{min-height:auto}.form-actions{display:flex;justify-content:flex-end;gap:8px}.description-cell{max-width:260px;white-space:normal;min-width:180px}@media(max-width:800px){.database-grid,.check-list{grid-template-columns:1fr}}

.section-title{
  margin-top:4px;
  padding:10px 12px;
  border-radius:8px;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  font-size:12px;
  font-weight:700;
}
.attributes-heading{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.attributes-heading strong{display:block;font-size:12px}
.attributes-heading span{display:block;font-weight:400;color:#6b7280;font-size:12px;margin-top:3px}
.attribute-field{padding:4px 0}
.check-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fafafa;
}
.check-option{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid #d1d5db;
  border-radius:7px;
  background:#fff;
  cursor:pointer;
  font-size:12px;
}
.check-option input{min-height:auto;margin:0}

.size-profile-panel{grid-column:1/-1}
.size-profile-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px 0;border-bottom:1px solid #e5e7eb}
.size-profile-row:last-child{border-bottom:0}
.size-profile-row .muted{margin-top:4px;line-height:1.5;white-space:normal}

.subnav{display:none;flex-direction:column;gap:3px;margin:-2px 0 4px 14px;padding-left:9px;border-left:1px solid #374151}
.subnav.open{display:flex}
.subnav-btn{border:0;background:transparent;color:#9ca3af;text-align:left;padding:8px 10px;border-radius:7px;font-size:12px;cursor:pointer}
.subnav-btn:hover,.subnav-btn.active{background:#1f2937;color:#fff}
.nav-expand{display:flex;justify-content:space-between}
.po-builder-panel{margin-top:18px}
.po-line{border:1px solid #e5e7eb;border-radius:10px;padding:14px;margin-bottom:14px;background:#fafafa}
.po-line-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.po-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.size-qty-table{overflow:auto;margin-top:12px}
.size-qty-table input{width:68px;min-width:68px;text-align:center}
.po-summary{display:flex;justify-content:flex-end;gap:28px;margin:16px 0;padding:14px;background:#111827;color:#fff;border-radius:10px}
.po-summary div{display:flex;gap:10px;align-items:center}.po-summary span{font-size:12px;font-weight:800}
.modal-card{width:min(1100px,96vw)}
@media(max-width:900px){.po-grid{grid-template-columns:repeat(2,1fr)}}

/* V1.5 compact UI */
body{font-size:12px} input,select,textarea{padding:7px 8px;min-height:32px;font-size:12px} button{padding:7px 10px;font-size:12px}
.topbar{padding:18px 22px}.topbar h2{font-size:12px}#content{padding:18px 22px}th,td{padding:8px 7px;font-size:12px}.panel{padding:14px}.form-group label{font-size:12px}
.user-switch{min-width:0;flex:1}.user-switch small{display:block;color:#9ca3af;margin-bottom:4px}.user-switch select{width:100%;background:#1f2937;color:#fff;border-color:#374151;min-height:30px;font-size:12px;padding:4px 5px}
.row-actions{display:flex;gap:9px;align-items:center}.danger-link{color:#b91c1c}.attribute-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
.po-modal-card{width:98vw!important;max-width:none!important;max-height:94vh!important;padding:12px!important}.po-modal-card .modal-head{margin-bottom:8px}.po-modal-card .form-grid{grid-template-columns:repeat(6,minmax(120px,1fr));gap:7px}
.po-builder-panel{padding:8px;margin-top:10px}.po-line{padding:6px;margin-bottom:7px;background:#fff;border-radius:7px}.po-line-head{display:none}.po-row-scroll{overflow-x:auto}.po-row{display:flex;gap:5px;align-items:flex-end;min-width:max-content}.po-cell{display:flex;flex-direction:column;gap:3px}.po-cell label,.po-size label{font-size:12px;color:#6b7280;font-weight:700;text-align:center}.po-cell input,.po-cell select{height:29px;min-height:29px;padding:4px 5px;font-size:12px}.po-code{width:112px}.po-name{width:155px}.po-colour-cell{width:95px}.po-cost-cell{width:70px}.po-totalqty{width:55px}.po-amount{width:82px}.po-remove{width:55px}.po-sizes{display:flex;gap:3px;align-items:flex-end}.po-size{display:flex;flex-direction:column;gap:3px;width:38px}.po-size input{width:38px;height:29px;min-height:29px;padding:3px;text-align:center;font-size:12px}.calc-box{height:29px;min-width:50px;padding:7px 4px;border:1px solid #d1d5db;background:#f9fafb;border-radius:6px;text-align:center;font-size:12px;font-weight:700;white-space:nowrap}.po-summary{padding:9px 12px;margin:9px 0;gap:18px}.po-summary span{font-size:12px}.po-summary strong{font-size:12px}
.preview-modal-card{width:min(900px,96vw)!important;max-height:94vh!important}.preview-toolbar{display:flex;justify-content:flex-end;gap:8px;margin-bottom:10px}.po-a4{background:white;width:210mm;min-height:297mm;max-width:100%;margin:auto;padding:10mm;box-shadow:0 0 0 1px #ddd;overflow:auto}.po-doc-head{display:flex;justify-content:space-between;border-bottom:2px solid #111;padding-bottom:8px;margin-bottom:12px}.po-doc-head h1{margin:0;font-size:12px}.po-doc-number{text-align:right}.po-doc-number span{display:block;color:#777;font-size:12px}.po-doc-number strong{font-size:12px}.po-doc-meta{display:grid;grid-template-columns:1.4fr 1fr;gap:25px;line-height:1.5;margin-bottom:15px}.po-doc-table{width:100%;border-collapse:collapse;font-size:12px}.po-doc-table th,.po-doc-table td{border:1px solid #aaa;padding:4px;text-align:center;white-space:nowrap}.po-doc-table th{background:#f2f2f2}.po-doc-notes{margin-top:15px;border:1px solid #bbb;padding:10px}.po-doc-notes p{margin:5px 0 0}@media(max-width:1000px){.po-modal-card .form-grid{grid-template-columns:repeat(3,1fr)}}

.confirm-overlay{position:fixed;inset:0;background:rgba(17,24,39,.48);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}.confirm-overlay.hidden{display:none}.confirm-box{width:min(420px,94vw);background:#fff;border-radius:12px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.24)}.confirm-box h3{font-size:12px;line-height:1.45;margin:0 0 18px;color:#111827}.confirm-actions{display:flex;justify-content:flex-end;gap:9px}
.fabric-modal-card{width:min(1250px,97vw);max-height:95vh}.fabric-table-wrap{overflow:auto}.fabric-table{min-width:2400px;font-size:12px}.fabric-table th,.fabric-table td{padding:7px 8px;white-space:nowrap}.fabric-name-cell{white-space:normal!important;min-width:380px;max-width:520px;line-height:1.35}.fabric-form-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.fabric-comp-grid{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:8px;margin-top:9px}.lower-fabric-fields{grid-template-columns:2fr 1fr 1fr;margin-top:12px}.fabric-id-input{display:flex;align-items:center;border:1px solid #d1d5db;border-radius:7px;background:#fff;overflow:hidden}.fabric-id-input span{padding:7px 8px;background:#f3f4f6;font-weight:800;border-right:1px solid #d1d5db}.fabric-id-input input{border:0;border-radius:0;min-width:0}.percent-field>div{display:flex;align-items:center;border:1px solid #d1d5db;border-radius:7px;background:#fff;overflow:hidden}.percent-field input{border:0;border-radius:0;min-width:0}.percent-field span{padding-right:7px;font-weight:700;color:#6b7280}.fabric-total{height:31px;border-radius:7px;display:flex;align-items:center;padding:0 10px;font-weight:800;border:1px solid}.total-ok{background:#ecfdf5!important;color:#047857!important;border-color:#a7f3d0!important}.total-bad{background:#fef2f2!important;color:#b91c1c!important;border-color:#fecaca!important}.fabric-warning{margin:10px 0;padding:9px 11px;background:#fef2f2;border:1px solid #fecaca;border-radius:7px;color:#b91c1c;font-size:12px;font-weight:700}@media(max-width:1000px){.fabric-form-grid{grid-template-columns:repeat(2,1fr)}.fabric-comp-grid{grid-template-columns:repeat(3,1fr)}}

.fabric-full-card{width:98.5vw!important;max-width:98.5vw!important;height:auto;max-height:96vh}
.fabric-entry-scroll{overflow-x:auto;padding-bottom:6px;margin-top:2px}
.fabric-entry-line{display:flex;align-items:flex-end;gap:6px;min-width:max-content}
.fabric-entry-line .form-group{width:105px;min-width:105px;margin:0}
.fabric-entry-line .fabric-id-col{width:112px;min-width:112px}
.fabric-entry-line .fabric-mini-field{width:91px;min-width:91px}
.fabric-entry-line .fabric-gsm-col{width:80px;min-width:80px}
.fabric-entry-line .fabric-total-col{width:100px;min-width:100px}
.fabric-entry-line label{font-size:12px;line-height:1.1;margin-bottom:4px;min-height:22px;display:flex;align-items:flex-end}
.fabric-entry-line input,.fabric-entry-line select{font-size:12px;padding:6px 6px;height:30px}
.fabric-entry-line .fabric-id-input input{height:28px}
.fabric-entry-line .fabric-id-input span{padding:6px 6px;font-size:12px}
.fabric-entry-line .percent-field>div{height:30px}
.fabric-entry-line .percent-field input{height:28px;padding:5px}
.fabric-entry-line .percent-field span{font-size:12px;padding-right:4px}
.fabric-entry-line .fabric-total{height:30px;padding:0 6px;font-size:12px}
.fabric-name-row{display:flex;align-items:flex-end;gap:8px;margin-top:14px}
.fabric-name-preview-group{flex:1;margin:0}
.fabric-name-preview-group textarea{min-height:64px;font-size:12px;line-height:1.35}
.fabric-copy-btn{height:34px;min-width:72px;margin-bottom:1px}

.fabric-full-card{width:96vw!important;max-width:96vw!important}
.fabric-row{display:flex;align-items:flex-end;gap:6px;flex-wrap:nowrap;margin-bottom:10px}
.fabric-row .form-group{margin:0;min-width:0}
.fabric-row-one .form-group{width:145px}
.fabric-row-one .fabric-id-col{width:112px}
.fabric-row-two{gap:4px}
.fabric-row-two .fabric-mini-field{width:68px;min-width:68px}
.fabric-row-two .fabric-total-col{width:88px;min-width:88px;margin-left:4px}
.fabric-row-three .form-group{width:150px}
.fabric-row-three .fabric-gsm-col{width:82px}
.fabric-row label{font-size:12px;line-height:1.05;margin-bottom:3px;min-height:18px;display:flex;align-items:flex-end}
.fabric-row input,.fabric-row select{font-size:12px;padding:5px 5px;height:28px}
.fabric-row .fabric-id-input input{height:27px}
.fabric-row .fabric-id-input span{padding:5px 5px;font-size:12px}
.fabric-row .percent-field>div{height:28px}
.fabric-row .percent-field input{height:26px;padding:4px;width:100%}
.fabric-row .percent-field span{font-size:12px;padding-right:3px}
.fabric-row .fabric-total{height:28px;padding:0 5px;font-size:12px}
.fabric-name-row{margin-top:4px}
@media(max-width:1100px){
 .fabric-row-one .form-group{width:128px}
 .fabric-row-two .fabric-mini-field{width:60px;min-width:60px}
 .fabric-row-two .fabric-total-col{width:80px;min-width:80px}
}


/* V1.8 dashboard, colour Pantone and Critical Path */
.dashboard-po-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.dashboard-po-row:last-child{border-bottom:0}
.colour-db-item span{display:flex;flex-direction:column;gap:3px}
.colour-db-item small{color:var(--muted);font-size:12px}
.po-line-number{width:34px;min-width:34px;display:flex;flex-direction:column;gap:3px;align-items:center}
.po-line-number label{font-size:12px;color:#6b7280;font-weight:700}
.po-line-number span{height:29px;width:29px;border-radius:6px;background:#111827;color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800}
.critical-cards{grid-template-columns:repeat(3,minmax(0,1fr));max-width:900px}
.critical-panel{margin-top:16px}
.critical-table{font-size:12px}
.critical-table th,.critical-table td{padding:8px 7px}
.critical-status{min-width:110px;min-height:29px;height:29px;padding:4px 7px;font-size:12px;font-weight:700}
.critical-status.status-progress{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.critical-status.status-transit{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.critical-status.status-complete{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.critical-late-row td{background:#fff7f7}
@media(max-width:800px){.critical-cards{grid-template-columns:1fr}}


/* V1.8.1 Fabric simplification and Critical Path sample workflow */
.pantone-missing{color:#c62828!important;font-weight:700}
.sample-status{min-width:92px;min-height:29px;height:29px;padding:4px 6px;font-size:12px;font-weight:700}
.sample-status.sample-waiting{background:#f3f4f6;color:#374151;border-color:#d1d5db}
.sample-status.sample-approved{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.sample-status.sample-rejected{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.critical-note-btn{border:0;background:transparent;font-size:12px;line-height:1;cursor:pointer;padding:4px;border-radius:5px}
.critical-note-btn:hover{background:#f3f4f6}
.critical-note-btn.has-note{background:#fff7ed}
.critical-table th{white-space:nowrap}


/* V1.8.2 Critical Path production stages */
.production-status,.ready-status{min-width:96px;min-height:29px;height:29px;padding:4px 6px;font-size:12px;font-weight:700}
.production-status.prod-progress{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.production-status.prod-waiting{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.production-status.prod-complete{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.ready-status.ready-yes{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.ready-status.ready-no{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.critical-table th{
 white-space:normal!important;
 line-height:1.15;
 max-width:92px;
 min-width:58px;
 word-break:normal;
 overflow-wrap:break-word;
 text-align:left;
 vertical-align:bottom;
}
.critical-table th:nth-child(2),
.critical-table th:nth-child(5){max-width:120px}


/* V1.8.3 Critical Path date extensions and note metadata */
.overdue-date{color:#c62828!important;font-weight:800}
.critical-new-date{min-width:118px;height:29px;padding:4px 6px;font-size:12px}
.critical-note-btn[title]{white-space:pre-line}


/* V1.8.4 QC workflow */
.qc-result{display:inline-block;min-width:62px;text-align:center;padding:5px 8px;border-radius:6px;font-size:12px;font-weight:800}
.qc-result.qc-pending{background:#f3f4f6;color:#4b5563}
.qc-result.qc-pass{background:#dcfce7;color:#166534}
.qc-result.qc-fail{background:#fee2e2;color:#991b1b}
.qc-status-select{min-width:88px;min-height:29px;height:29px;padding:4px 6px;font-size:12px;font-weight:700}
.qc-status-select.qc-select-pass{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.qc-status-select.qc-select-fail{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.qc-photo-cell{display:flex;align-items:center;gap:6px}
.photo-icon-btn{position:relative;border:0;background:#f3f4f6;border-radius:6px;padding:5px 8px;cursor:pointer;font-size:12px}
.photo-icon-btn.has-photos{background:#e0f2fe}
.photo-icon-btn span{position:absolute;right:-5px;top:-5px;background:#111827;color:#fff;border-radius:10px;min-width:16px;height:16px;display:grid;place-items:center;font-size:12px;font-weight:800}
.upload-photo-btn{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border:1px solid var(--line);border-radius:6px;cursor:pointer;font-size:12px;font-weight:700;background:#fff}
.upload-photo-btn input{display:none}
.qc-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.qc-gallery-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.qc-gallery-card img{width:120px;height:90px;object-fit:cover;cursor:zoom-in;display:block;border-radius:6px}
.qc-gallery-card div{padding:9px;display:flex;flex-direction:column;gap:3px}
.qc-gallery-card small{color:var(--muted)}
.qc-photo-large{text-align:center}
.qc-photo-large img{max-width:100%;max-height:68vh;object-fit:contain;cursor:zoom-in;transition:.15s}
.qc-photo-large img.zoomed{max-width:none;max-height:none;width:auto;height:auto;cursor:zoom-out}
.qc-table th{white-space:normal;line-height:1.15}


/* V1.8.5 Shipping + QC warning */
.critical-qc-warning{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 16px;margin-bottom:14px;border:2px solid #dc2626;background:#fff1f2;color:#b91c1c;font-weight:800;border-radius:9px}
.critical-qc-warning button{background:#b91c1c;color:#fff;border:0;border-radius:6px;padding:7px 14px;font-weight:800;cursor:pointer}
.shipping-btn{min-width:78px;border:1px solid #cbd5e1;background:#fff;border-radius:6px;padding:6px 9px;font-size:12px;font-weight:700;cursor:pointer}
.shipping-btn.has-shipping{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.received-check{width:18px;height:18px;cursor:pointer}
.critical-status-display{display:inline-block;min-width:82px;text-align:center;border-radius:6px;padding:6px 8px;font-size:12px;font-weight:800}
.critical-status-display.status-progress{background:#fee2e2;color:#991b1b}
.critical-status-display.status-transit{background:#ffedd5;color:#9a3412}
.critical-status-display.status-complete{background:#dcfce7;color:#166534}
.qc-gallery{display:flex;flex-wrap:wrap;gap:12px}
.qc-gallery-card{display:flex;align-items:center;gap:10px;padding:8px}
.qc-gallery-card div{padding:0}


/* V1.8.6 User Database + Activity Log */
.activity-list{display:flex;flex-direction:column}
.activity-item{display:grid;grid-template-columns:130px 1fr 180px;gap:14px;align-items:center;padding:11px 4px;border-bottom:1px solid var(--line)}
.activity-user{font-weight:800}
.activity-action{font-size:12px}
.activity-time{text-align:right;color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:760px){.activity-item{grid-template-columns:1fr}.activity-time{text-align:left}}

/* V1.8.8 in-page Shipping modal */
.shipping-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.shipping-url-row{display:flex;gap:6px}.shipping-url-row input{flex:1}
.bl-saved{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bl-saved small{color:var(--muted)}
@media(max-width:800px){.shipping-form-grid{grid-template-columns:1fr}}

.datasheet-icon{font-size:12px;line-height:1;padding:4px 7px}
.datasheet-preview{width:100%;height:72vh;min-height:520px}
.datasheet-preview iframe{width:100%;height:100%;border:1px solid #d9dde3;border-radius:8px;background:#fff}

/* Product Datasheet */
.datasheet-upload-field input[type="file"]{width:100%;padding:10px;border:1px solid var(--border);border-radius:8px;background:#fff}
.datasheet-current{display:flex;align-items:center;gap:12px;margin-top:8px}
.datasheet-cell{text-align:center}
.datasheet-pdf-btn{border:0;background:transparent;font-size:12px;line-height:1;cursor:pointer;padding:4px 8px;border-radius:6px}
.datasheet-pdf-btn:hover{background:#f0f2f5}
.datasheet-preview-box{height:72vh;min-height:500px;width:100%}
.datasheet-preview-box iframe{width:100%;height:100%;border:1px solid var(--border);border-radius:8px;background:#fff}

#airlineField.hidden,#vesselField.hidden,#urlField.hidden,#trackingField.hidden,#blField.hidden{display:none!important}

/* V1.8.9.5 Shipping conditional fields */
#shipping-airline-wrap.hidden,
#shipping-vessel-wrap.hidden,
#shipping-url-wrap.hidden,
#shipping-tracking-wrap.hidden,
#shipping-bl-wrap.hidden{display:none!important}

/* V1.8.9.6 Shipping modal layout */
.shipping-form-grid{
  display:grid;
  grid-template-columns:1fr!important;
  gap:14px;
}
.shipping-form-grid .form-group,
.shipping-form-grid .form-group.full{
  width:100%;
  grid-column:1 / -1!important;
}
.shipping-form-grid label{
  display:block;
  margin-bottom:6px;
}
.shipping-form-grid input,
.shipping-form-grid select{
  width:100%;
  box-sizing:border-box;
}
.shipping-url-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:end;
}
.shipping-method-badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#f3f4f6;
  font-weight:700;
  white-space:nowrap;
}

/* V1.8.9.17 — Modern, tidy Create/Edit Purchase Order */
.modal-card.po-clean-modal{
  width:min(1320px,97vw)!important;
  max-width:1320px!important;
  max-height:94vh!important;
  padding:0!important;
  border:1px solid #e5e7eb!important;
  border-radius:18px!important;
  overflow:hidden!important;
  background:#f7f9fc!important;
  box-shadow:0 24px 70px rgba(15,23,42,.20)!important;
}
.po-clean-modal .modal-head{
  margin:0!important;
  padding:18px 22px!important;
  background:#fff!important;
  border-bottom:1px solid #e5e7eb!important;
}
.po-clean-modal .modal-head h3{
  margin:0!important;
  font-size:12px!important;
  font-weight:800!important;
  color:#111827!important;
}
.po-clean-modal #modal-body{
  padding:18px 22px 22px!important;
  overflow:auto!important;
  background:#f7f9fc!important;
}
.po-clean-form{
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
}

/* PO details card */
.po-details-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px 14px!important;
  padding:16px!important;
  margin:0!important;
  border:1px solid #e5e7eb!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
}
.po-details-grid .form-group{
  min-width:0!important;
  margin:0!important;
}
.po-details-grid label,
.po-supplier-notes label{
  display:block!important;
  margin:0 0 6px!important;
  font-size:12px!important;
  font-weight:750!important;
  color:#4b5563!important;
}
.po-details-grid input,
.po-details-grid select{
  width:100%!important;
  height:38px!important;
  box-sizing:border-box!important;
  padding:7px 9px!important;
  border:1px solid #d1d5db!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#111827!important;
  font-size:12px!important;
}
.po-details-grid input:focus,
.po-details-grid select:focus{
  outline:none!important;
  border-color:#94a3b8!important;
  box-shadow:0 0 0 3px rgba(148,163,184,.15)!important;
}

/* Products area */
.po-products-card{
  margin:0!important;
  padding:0!important;
  border:1px solid #e5e7eb!important;
  border-radius:14px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
}
.po-products-card .panel-head{
  margin:0!important;
  padding:13px 15px!important;
  background:#fff!important;
  border-bottom:1px solid #e5e7eb!important;
}
.po-products-card .panel-head h3{
  margin:0!important;
  font-size:12px!important;
  font-weight:800!important;
  color:#111827!important;
}
.po-products-card .panel-head button{
  padding:7px 11px!important;
  border-radius:8px!important;
  font-size:12px!important;
}
.po-products-card #po-lines{
  padding:0!important;
}
.po-products-card .po-line{
  margin:0!important;
  border:0!important;
  border-bottom:1px solid #e5e7eb!important;
  border-radius:0!important;
  background:#fff!important;
  padding:0!important;
}
.po-products-card .po-line:last-child{
  border-bottom:0!important;
}
.po-products-card .po-row{
  padding:12px!important;
  gap:9px!important;
  background:#fff!important;
}
.po-products-card .po-row label{
  margin-bottom:5px!important;
  font-size:12px!important;
  font-weight:800!important;
  color:#6b7280!important;
  text-transform:uppercase!important;
  letter-spacing:.035em!important;
}
.po-products-card .po-row input,
.po-products-card .po-row select{
  height:35px!important;
  border:1px solid #d1d5db!important;
  border-radius:8px!important;
  padding:5px 7px!important;
  font-size:12px!important;
  background:#fff!important;
}
.po-products-card .po-row input:focus,
.po-products-card .po-row select:focus{
  outline:none!important;
  border-color:#94a3b8!important;
  box-shadow:0 0 0 2px rgba(148,163,184,.14)!important;
}
.po-products-card .calc-box{
  min-height:35px!important;
  border:1px solid #e5e7eb!important;
  border-radius:8px!important;
  background:#f8fafc!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:12px!important;
  font-weight:700!important;
}
.po-products-card .po-size{
  width:48px!important;
}
.po-products-card .po-size input{
  width:48px!important;
  height:33px!important;
  padding:3px!important;
  text-align:center!important;
}
.po-products-card .po-size label{
  text-align:center!important;
  font-size:12px!important;
}
.po-products-card .small-btn{
  min-height:35px!important;
  border-radius:8px!important;
  padding:6px 9px!important;
  font-size:12px!important;
}

/* Totals */
.po-clean-summary{
  margin:0!important;
  padding:12px 16px!important;
  border:1px solid #dce5ee!important;
  border-radius:12px!important;
  background:#eef4f8!important;
}
.po-clean-summary>div{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
}
.po-clean-summary strong{
  font-size:12px!important;
  color:#4b5563!important;
}
.po-clean-summary span{
  font-size:12px!important;
  font-weight:800!important;
  color:#111827!important;
}

/* Notes */
.po-supplier-notes{
  margin:0!important;
  padding:14px!important;
  border:1px solid #e5e7eb!important;
  border-radius:12px!important;
  background:#fff!important;
}
.po-supplier-notes textarea{
  width:100%!important;
  min-height:125px!important;
  box-sizing:border-box!important;
  padding:10px 11px!important;
  border:1px solid #d1d5db!important;
  border-radius:9px!important;
  font-size:12px!important;
  resize:vertical!important;
}

/* Footer menu/actions */
.po-clean-actions{
  margin:0!important;
  padding:13px 14px!important;
  border:1px solid #e5e7eb!important;
  border-radius:12px!important;
  background:#fff!important;
}
.po-clean-actions button{
  min-height:36px!important;
  border-radius:9px!important;
  padding:8px 12px!important;
  font-size:12px!important;
  font-weight:700!important;
}

@media(max-width:900px){
  .po-details-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:620px){
  .po-details-grid{
    grid-template-columns:1fr!important;
  }
}

/* V1.8.9.18 — PO fit-to-width + dashboard refresh */

/* PO modal uses available screen width */
.modal-card.po-clean-modal,
.modal-card.po-modal-card{
  width:min(1460px,98vw)!important;
  max-width:1460px!important;
}

/* Requested top layout:
   Row 1 = PO Number | Supplier | Raised By User
   Row 2 = Order Date | ETC | ETD */
.po-details-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px 14px!important;
  padding:16px!important;
  margin:0!important;
  background:#fff!important;
  border:1px solid #e5e7eb!important;
  border-radius:14px!important;
}
.po-details-grid .form-group,
.po-details-grid .form-group.full{
  grid-column:auto!important;
  min-width:0!important;
  margin:0!important;
}
.po-details-grid label{
  display:block!important;
  margin:0 0 6px!important;
  font-size:12px!important;
  font-weight:750!important;
  color:#4b5563!important;
}
.po-details-grid input,
.po-details-grid select{
  width:100%!important;
  height:38px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:7px 9px!important;
  border:1px solid #d1d5db!important;
  border-radius:9px!important;
  background:#fff!important;
  font-size:12px!important;
}

/* Product row fits inside the PO window — no left/right toggle */
.po-products-card .po-row-scroll{
  overflow-x:hidden!important;
  width:100%!important;
}
.po-products-card .po-row{
  display:grid!important;
  grid-template-columns:
    38px
    minmax(115px,1.0fr)
    minmax(145px,1.25fr)
    minmax(90px,.75fr)
    minmax(285px,2.45fr)
    62px
    72px
    90px
    64px!important;
  gap:7px!important;
  align-items:end!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.po-products-card .po-row > *{
  min-width:0!important;
  box-sizing:border-box!important;
}
.po-products-card .po-line-number{
  width:auto!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
}
.po-products-card .po-code,
.po-products-card .po-name,
.po-products-card .po-colour-cell,
.po-products-card .po-totalqty,
.po-products-card .po-cost-cell,
.po-products-card .po-amount,
.po-products-card .po-remove{
  width:auto!important;
  min-width:0!important;
}
.po-products-card .po-row input,
.po-products-card .po-row select{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.po-products-card .po-sizes{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:4px!important;
  align-items:flex-end!important;
  min-width:0!important;
}
.po-products-card .po-size{
  width:40px!important;
  min-width:40px!important;
}
.po-products-card .po-size input{
  width:40px!important;
  min-width:40px!important;
  box-sizing:border-box!important;
}
.po-clean-actions{
  margin-top:0!important;
}

/* Dashboard */
.dashboard-modern{
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
}
.dashboard-order-summary{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
.dashboard-order-card{
  position:relative!important;
  overflow:hidden!important;
  min-height:138px!important;
  padding:20px 22px!important;
  border:1px solid #e5e7eb!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 5px 18px rgba(15,23,42,.055)!important;
}
.dashboard-order-card.open{
  border-top:4px solid #d97706!important;
}
.dashboard-order-card.closed{
  border-top:4px solid #15803d!important;
}
.dashboard-order-card::after{
  content:""!important;
  position:absolute!important;
  width:120px!important;
  height:120px!important;
  right:-40px!important;
  top:-42px!important;
  border-radius:50%!important;
  background:rgba(148,163,184,.10)!important;
}
.dashboard-order-top{
  position:relative!important;
  z-index:1!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
}
.dashboard-order-top span{
  font-size:12px!important;
  font-weight:800!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
  color:#4b5563!important;
}
.dashboard-order-top strong{
  font-size:12px!important;
  line-height:1!important;
  color:#111827!important;
}
.dashboard-order-value{
  position:relative!important;
  z-index:1!important;
  margin-top:16px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:850!important;
  color:#111827!important;
}
.dashboard-order-note{
  position:relative!important;
  z-index:1!important;
  margin-top:7px!important;
  font-size:12px!important;
  color:#6b7280!important;
}

.dashboard-record-cards{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
.dashboard-record-card{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:14px 16px!important;
  border:1px solid #e5e7eb!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
}
.dashboard-record-card>div{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}
.dashboard-record-card span{
  font-size:12px!important;
  font-weight:750!important;
  color:#4b5563!important;
}
.dashboard-record-card small{
  font-size:12px!important;
  color:#9ca3af!important;
}
.dashboard-record-card strong{
  font-size:12px!important;
  color:#111827!important;
}

.dashboard-lower-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
.dashboard-list-panel{
  margin:0!important;
  border:1px solid #e5e7eb!important;
  border-radius:14px!important;
  overflow:hidden!important;
  background:#fff!important;
}
.dashboard-list-panel .panel-head{
  padding:13px 15px!important;
  border-bottom:1px solid #e5e7eb!important;
}
.dashboard-list-panel .panel-head h3{
  font-size:12px!important;
  font-weight:800!important;
}
.dashboard-po-row.modern{
  padding:12px 15px!important;
  border-bottom:1px solid #f0f2f5!important;
}
.dashboard-po-row.modern:last-child{
  border-bottom:0!important;
}
.dashboard-po-info{
  min-width:0!important;
}
.dashboard-po-side{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.dashboard-po-side>strong{
  min-width:88px!important;
  text-align:right!important;
  font-size:12px!important;
  color:#111827!important;
}

@media(max-width:1150px){
  .po-products-card .po-row{
    grid-template-columns:
      34px
      minmax(105px,.95fr)
      minmax(125px,1.1fr)
      minmax(82px,.7fr)
      minmax(245px,2.15fr)
      55px
      64px
      78px
      58px!important;
    gap:5px!important;
  }
  .po-products-card .po-size{
    width:36px!important;
    min-width:36px!important;
  }
  .po-products-card .po-size input{
    width:36px!important;
    min-width:36px!important;
  }
}
@media(max-width:900px){
  .dashboard-record-cards{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:760px){
  .po-details-grid{
    grid-template-columns:1fr!important;
  }
  .dashboard-order-summary,
  .dashboard-lower-grid{
    grid-template-columns:1fr!important;
  }
}

/* V1.8.9.19 — PO product row spacing refinement */

/* Give Qty by Size more room by reducing the first three data columns */
.po-products-card .po-row{
  grid-template-columns:
    38px
    minmax(110px,.88fr)   /* Product Code */
    minmax(135px,1.05fr)  /* Product Name */
    minmax(82px,.62fr)    /* Colour */
    minmax(390px,3.15fr)  /* Qty by Size */
    62px                  /* Total Qty */
    72px                  /* Cost USD */
    90px                  /* Total Amount */
    64px!important;       /* Remove */
  gap:7px!important;
}

/* Keep size boxes neatly in the allocated Qty by Size area */
.po-products-card .po-sizes{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(38px,1fr))!important;
  gap:4px!important;
  align-items:end!important;
  width:100%!important;
  min-width:0!important;
}
.po-products-card .po-size{
  width:auto!important;
  min-width:0!important;
}
.po-products-card .po-size label{
  width:100%!important;
  text-align:center!important;
  margin-bottom:4px!important;
}
.po-products-card .po-size input{
  width:100%!important;
  min-width:0!important;
  height:33px!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

/* Cost USD should visually match Total Amount, but remain editable and not bold */
.po-products-card .po-cost-display{
  height:35px!important;
  border:1px solid #e5e7eb!important;
  border-radius:8px!important;
  background:#f8fafc!important;
  text-align:center!important;
  font-size:12px!important;
  font-weight:400!important;
  color:#111827!important;
  padding:5px 6px!important;
  box-shadow:none!important;
}
.po-products-card .po-cost-display:focus{
  background:#fff!important;
  border-color:#94a3b8!important;
  box-shadow:0 0 0 2px rgba(148,163,184,.14)!important;
}

/* Make Total Amount box styling consistent */
.po-products-card .po-amount .calc-box,
.po-products-card .line-total-amount{
  height:35px!important;
  min-height:35px!important;
  border:1px solid #e5e7eb!important;
  border-radius:8px!important;
  background:#f8fafc!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:12px!important;
  font-weight:700!important;
  color:#111827!important;
}

/* Keep Total Qty consistent too */
.po-products-card .po-totalqty .calc-box,
.po-products-card .line-total-qty{
  height:35px!important;
  min-height:35px!important;
  border:1px solid #e5e7eb!important;
  border-radius:8px!important;
  background:#f8fafc!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* On smaller desktop widths, preserve Qty by Size priority */
@media(max-width:1250px){
  .po-products-card .po-row{
    grid-template-columns:
      34px
      minmax(98px,.82fr)
      minmax(120px,.98fr)
      minmax(75px,.58fr)
      minmax(330px,2.8fr)
      56px
      66px
      82px
      58px!important;
    gap:5px!important;
  }
}

/* V1.8.9.20 — Professional operational dashboard */
.dashboard-report{
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
}
.dashboard-report-head{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:16px!important;
}
.dashboard-report-head h2{
  margin:0!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:850!important;
  letter-spacing:-.02em!important;
  color:#111827!important;
}
.dashboard-report-head p{
  margin:5px 0 0!important;
  font-size:12px!important;
  color:#6b7280!important;
}
.dashboard-total-po{
  padding:7px 11px!important;
  border:1px solid #dbe1e8!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#4b5563!important;
  font-size:12px!important;
  font-weight:750!important;
  white-space:nowrap!important;
}

/* Equal operational cards */
.dashboard-status-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
}
.status-report-card{
  --status-accent:#64748b;
  --status-bg:#f8fafc;
  min-height:148px!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  padding:17px 18px!important;
  border:1px solid #e5e7eb!important;
  border-top:4px solid var(--status-accent)!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,var(--status-bg) 0%,#fff 72%)!important;
  box-shadow:0 4px 15px rgba(15,23,42,.055)!important;
}
.status-card-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  color:#4b5563!important;
  font-size:12px!important;
  font-weight:850!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
}
.status-dot{
  width:9px!important;
  height:9px!important;
  flex:0 0 9px!important;
  border-radius:50%!important;
  background:var(--status-accent)!important;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--status-accent) 14%,transparent)!important;
}
.status-card-count{
  margin-top:11px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:850!important;
  color:#111827!important;
}
.status-card-value{
  margin-top:9px!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:800!important;
  color:#1f2937!important;
}
.status-card-note{
  margin-top:auto!important;
  padding-top:7px!important;
  font-size:12px!important;
  color:#6b7280!important;
}

/* Colours follow the operational / Critical Path meaning */
.status-open{
  --status-accent:#dc2626;
  --status-bg:#fff7f7;
}
.status-complete-card{
  --status-accent:#16a34a;
  --status-bg:#f3fcf6;
}
.status-production{
  --status-accent:#d97706;
  --status-bg:#fffaf0;
}
.status-qc{
  --status-accent:#7c3aed;
  --status-bg:#faf7ff;
}
.status-transit-card{
  --status-accent:#ea580c;
  --status-bg:#fff8f3;
}
.status-late{
  --status-accent:#b91c1c;
  --status-bg:#fff5f5;
}

.dashboard-master-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
.dashboard-master-card{
  min-height:62px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  box-sizing:border-box!important;
  padding:12px 15px!important;
  border:1px solid #e5e7eb!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:0 2px 7px rgba(15,23,42,.03)!important;
}
.dashboard-master-card span{
  font-size:12px!important;
  font-weight:700!important;
  color:#6b7280!important;
}
.dashboard-master-card strong{
  font-size:12px!important;
  color:#111827!important;
}

.dashboard-report-lower{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
.dashboard-report-panel{
  margin:0!important;
  overflow:hidden!important;
  border:1px solid #e5e7eb!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
}
.dashboard-report-panel .panel-head{
  padding:12px 14px!important;
  border-bottom:1px solid #edf0f3!important;
}
.dashboard-report-panel .panel-head h3{
  margin:0!important;
  font-size:12px!important;
  font-weight:800!important;
}
.dashboard-po-row.report-row{
  padding:11px 14px!important;
  border-bottom:1px solid #f0f2f5!important;
}
.dashboard-po-row.report-row:last-child{
  border-bottom:0!important;
}

@media(max-width:1050px){
  .dashboard-status-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .dashboard-master-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:700px){
  .dashboard-status-grid,
  .dashboard-report-lower{
    grid-template-columns:1fr!important;
  }
}

/* V1.8.9.21 — Dashboard de-duplication */
.dashboard-clean .dashboard-total-po,
.dashboard-clean .dashboard-master-grid,
.dashboard-clean .dashboard-record-cards,
.dashboard-clean .dashboard-order-summary{
  display:none!important;
}
.dashboard-clean .dashboard-report-head{
  margin-bottom:0!important;
}
.dashboard-clean .dashboard-status-grid{
  margin-top:0!important;
}

/* V1.8.9.22 — Slimmer left navigation to give the main workspace more room */
.app{
  grid-template-columns:180px minmax(0,1fr)!important;
}
.sidebar{
  width:180px!important;
  min-width:180px!important;
  padding:16px 8px!important;
  gap:12px!important;
  box-sizing:border-box!important;
}
.sidebar .brand{
  gap:8px!important;
}
.sidebar .brand-badge{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
}
.sidebar .brand h1{
  font-size:12px!important;
}
.sidebar .brand p{
  font-size:12px!important;
}
.sidebar .nav-item,
.sidebar .nav-btn{
  padding-left:9px!important;
  padding-right:9px!important;
  font-size:12px!important;
}
.sidebar .nav-subitem{
  padding-left:18px!important;
  font-size:12px!important;
}
.sidebar .operator-box,
.sidebar .user-box{
  padding-left:7px!important;
  padding-right:7px!important;
}
@media(max-width:900px){
  .app{
    grid-template-columns:165px minmax(0,1fr)!important;
  }
  .sidebar{
    width:165px!important;
    min-width:165px!important;
  }
}

/* V1.8.9.23 — Critical Path keeps horizontal position after status changes */
.critical-path-scroll{
  scroll-behavior:auto!important;
}

/* V1.8.9.25 — Compact, smarter dashboard cards */
.dashboard-clean{
  gap:12px!important;
}
.dashboard-clean .dashboard-report-head h2{
  font-size:12px!important;
}
.dashboard-clean .dashboard-report-head p{
  margin-top:3px!important;
  font-size:12px!important;
}
.dashboard-clean .dashboard-status-grid{
  gap:10px!important;
}
.dashboard-clean .status-report-card{
  min-height:112px!important;
  padding:12px 14px!important;
  border-radius:12px!important;
  border-top-width:3px!important;
  box-shadow:0 2px 8px rgba(15,23,42,.045)!important;
}
.dashboard-clean .status-card-head{
  font-size:12px!important;
  letter-spacing:.04em!important;
}
.dashboard-clean .status-dot{
  width:7px!important;
  height:7px!important;
  min-width:7px!important;
  flex-basis:7px!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--status-accent) 12%,transparent)!important;
}
.dashboard-clean .status-card-count{
  margin-top:8px!important;
  font-size:12px!important;
}
.dashboard-clean .status-card-value{
  margin-top:6px!important;
  font-size:12px!important;
}
.dashboard-clean .status-card-note{
  padding-top:5px!important;
  font-size:12px!important;
}
.dashboard-clean .dashboard-report-lower{
  gap:10px!important;
}
.dashboard-clean .dashboard-report-panel{
  border-radius:11px!important;
}
.dashboard-clean .dashboard-report-panel .panel-head{
  padding:10px 12px!important;
}

/* V1.8.9.26 — Branding, menu typography, six-card dashboard row */

/* Brand */
.sidebar .brand h1{
  font-size:12px!important;
  line-height:1.2!important;
}
.sidebar .brand span{
  display:block!important;
  margin-top:3px!important;
  font-size:12px!important;
  line-height:1.2!important;
  font-weight:700!important;
  color:#9ca3af!important;
  letter-spacing:.04em!important;
}

/* Navigation font restored to normal application size */
.sidebar .nav-btn,
.sidebar .nav-item{
  font-size:12px!important;
  line-height:1.35!important;
  padding-top:9px!important;
  padding-bottom:9px!important;
}
.sidebar .subnav-btn,
.sidebar .nav-subitem{
  font-size:12px!important;
  line-height:1.35!important;
}

/* Dashboard: all six status boxes on one row, compact boxes but readable type */
.dashboard-clean .dashboard-status-grid{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:8px!important;
}
.dashboard-clean .status-report-card{
  min-height:104px!important;
  padding:10px 11px!important;
  border-radius:11px!important;
  border-top-width:3px!important;
}
.dashboard-clean .status-card-head{
  font-size:12px!important;
  line-height:1.25!important;
  letter-spacing:.025em!important;
}
.dashboard-clean .status-card-count{
  margin-top:7px!important;
  font-size:12px!important;
  line-height:1!important;
}
.dashboard-clean .status-card-value{
  margin-top:5px!important;
  font-size:12px!important;
  line-height:1.15!important;
}
.dashboard-clean .status-card-note{
  padding-top:5px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
.dashboard-clean .dashboard-report-head h2{
  font-size:12px!important;
}
.dashboard-clean .dashboard-report-head p{
  font-size:12px!important;
}

/* Keep six cards together on normal desktop widths */
@media(max-width:1150px){
  .dashboard-clean .dashboard-status-grid{
    grid-template-columns:repeat(6,minmax(130px,1fr))!important;
    overflow-x:auto!important;
    padding-bottom:3px!important;
  }
}

/* V1.8.9.27 — Navy navigation + clearer Critical Path table */
:root{
  --riman-navy:#10233f;
  --riman-navy-hover:#183455;
  --riman-navy-border:#29445f;
}
.sidebar{
  background:var(--riman-navy)!important;
  color:#ffffff!important;
}
.sidebar .brand{
  border-bottom-color:rgba(255,255,255,.16)!important;
}
.sidebar .brand h1{
  color:#ffffff!important;
}
.sidebar .brand span{
  color:#dbe7f3!important;
}
.sidebar .nav-btn,
.sidebar .nav-item,
.sidebar .subnav-btn,
.sidebar .nav-subitem{
  color:#ffffff!important;
}
.sidebar .nav-btn:hover,
.sidebar .nav-item:hover,
.sidebar .subnav-btn:hover,
.sidebar .nav-subitem:hover{
  background:var(--riman-navy-hover)!important;
  color:#ffffff!important;
}
.sidebar .nav-btn.active,
.sidebar .nav-item.active,
.sidebar .subnav-btn.active,
.sidebar .nav-subitem.active{
  background:#ffffff!important;
  color:var(--riman-navy)!important;
}
.sidebar .subnav{
  border-left-color:rgba(255,255,255,.22)!important;
}
.sidebar-footer,
.sidebar .operator-box,
.sidebar .user-box{
  color:#ffffff!important;
}
.sidebar-footer .muted,
.sidebar .operator-box .muted,
.sidebar .user-box .muted{
  color:#cbd8e6!important;
}
.critical-panel{
  overflow:hidden!important;
}
.critical-path-scroll{
  overflow:auto!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#ffffff!important;
}
.critical-table{
  width:max-content!important;
  min-width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:#ffffff!important;
}
.critical-table th,
.critical-table td{
  border-right:1px solid #d8e0e8!important;
  border-bottom:1px solid #d8e0e8!important;
  padding:9px 10px!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}
.critical-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:4!important;
  background:var(--riman-navy)!important;
  color:#ffffff!important;
  font-size:12px!important;
  font-weight:700!important;
  text-align:left!important;
  letter-spacing:.01em!important;
  border-right:1px solid var(--riman-navy-border)!important;
  border-bottom:1px solid var(--riman-navy-border)!important;
}
.critical-table thead th:last-child,
.critical-table tbody td:last-child{
  border-right:0!important;
}
.critical-table tbody td{
  background:#ffffff!important;
  color:#111827!important;
  font-size:12px!important;
}
.critical-table tbody tr:nth-child(even) td{
  background:#f8fafc!important;
}
.critical-table tbody tr:hover td{
  background:#eef4f9!important;
}
.critical-table tbody tr:last-child td{
  border-bottom:0!important;
}
.critical-table tbody tr.critical-late-row td{
  background:#fff7f7!important;
}
.critical-table tbody tr.critical-late-row:hover td{
  background:#feecec!important;
}
.critical-table select,
.critical-table input[type="date"],
.critical-table input[type="text"]{
  min-height:32px!important;
  border:1px solid #cbd5e1!important;
  border-radius:6px!important;
  background:#ffffff!important;
  font-size:12px!important;
}
.critical-panel > .panel-head{
  background:var(--riman-navy)!important;
  color:#ffffff!important;
  padding:11px 14px!important;
  margin:0!important;
}
.critical-panel > .panel-head h3{
  color:#ffffff!important;
}
.critical-panel > .panel-head .secondary{
  background:#ffffff!important;
  color:var(--riman-navy)!important;
  border-color:#ffffff!important;
}

/* V1.8.9.28 — PO date row supports Order Date / ETC / ETD / ETA */
.po-details-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
/* Keep first row PO Number / Supplier / Raised By across sensible widths */
.po-details-grid > .form-group:nth-child(1),
.po-details-grid > .form-group:nth-child(2),
.po-details-grid > .form-group:nth-child(3){
  grid-column:auto!important;
}
@media(max-width:950px){
  .po-details-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* V1.8.9.29 — PO form back to 3 columns; ETA is managed in Critical Path */
.po-details-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
@media(max-width:950px){
  .po-details-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* V1.8.9.30 — Compact Critical Path headings with wrapping */
.critical-table thead th{
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  line-height:1.25!important;
  vertical-align:middle!important;
  padding:8px 7px!important;
  font-size:12px!important; /* retain existing font size */
  max-width:105px!important;
}
.critical-table thead th:nth-child(1){
  min-width:70px!important;
}
.critical-table thead th:nth-child(2){
  min-width:105px!important;
}
.critical-table thead th:nth-child(3),
.critical-table thead th:nth-child(4),
.critical-table thead th:nth-child(5){
  max-width:100px!important;
}
.critical-table tbody td{
  padding:8px 7px!important;
}

/* V1.8.9.31 — Visually group Critical Path product lines by Purchase Order */
.critical-table tbody tr.po-group-0 td{
  background:#ffffff!important;
}
.critical-table tbody tr.po-group-1 td{
  background:#f4f7fb!important;
}
.critical-table tbody tr.po-group-start td{
  border-top:3px solid var(--riman-navy)!important;
}
.critical-table tbody tr.po-group-end td{
  border-bottom:2px solid #aebdcc!important;
}
.critical-table tbody tr.po-group-multi td:first-child{
  border-left:4px solid var(--riman-navy)!important;
}
.critical-table tbody tr.po-group-0:hover td,
.critical-table tbody tr.po-group-1:hover td{
  background:#eaf1f8!important;
}
.critical-table tbody tr.critical-late-row td{
  background:#fff7f7!important;
}
.critical-table tbody tr.critical-late-row:hover td{
  background:#feecec!important;
}
.critical-po-cell{
  min-width:92px!important;
}
.critical-po-cell strong{
  display:block!important;
}
.po-group-count{
  display:inline-block!important;
  margin-top:4px!important;
  padding:2px 6px!important;
  border-radius:999px!important;
  background:#dbe7f3!important;
  color:var(--riman-navy)!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}

/* V1.8.9.32 — Fit Sample, per-product activity log, late status and text branding */
.status-late{
  color:#b91c1c!important;
  background:#fee2e2!important;
  border-color:#fecaca!important;
  font-weight:800!important;
}
.activity-log-btn{
  border:1px solid #cbd5e1!important;
  background:#ffffff!important;
  color:var(--riman-navy)!important;
  border-radius:7px!important;
  padding:6px 8px!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
.activity-log-btn.has-activity{
  background:#e8f0f8!important;
  border-color:#b9cade!important;
}
.critical-activity-list{
  display:flex;
  flex-direction:column;
  gap:0;
  border:1px solid #d8e0e8;
  border-radius:10px;
  overflow:hidden;
}
.critical-activity-row{
  display:grid;
  grid-template-columns:110px 80px minmax(240px,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  background:#ffffff;
}
.critical-activity-row:last-child{border-bottom:0}
.critical-activity-row:nth-child(even){background:#f8fafc}
.critical-activity-user{font-weight:700;color:#111827}
.critical-activity-date{white-space:nowrap;color:#475569}
.critical-activity-desc{color:#111827;line-height:1.35}
.brand.brand-text-only{
  display:block!important;
  padding-left:4px!important;
}
.brand-text-logo{width:100%!important}
.sidebar .brand-text-logo h1{
  margin:0!important;
  color:#ffffff!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:800!important;
  letter-spacing:.035em!important;
  white-space:nowrap!important;
}
.sidebar .brand-text-logo span{
  display:block!important;
  margin-top:4px!important;
  color:#dbe7f3!important;
  font-size:12px!important;
  line-height:1.2!important;
  font-weight:600!important;
  letter-spacing:.03em!important;
}
@media(max-width:700px){
  .critical-activity-row{grid-template-columns:1fr;gap:4px}
}

/* V1.8.9.33 — Modern RIMAN TEXTILE sidebar identity */
.sidebar .brand.brand-modern{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:4px 4px 14px 4px!important;
  border-bottom:1px solid rgba(255,255,255,.15)!important;
}
.sidebar .brand-mark{
  position:relative!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:11px!important;
  background:linear-gradient(145deg,#ffffff 0%,#dce7f3 100%)!important;
  box-shadow:0 6px 18px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.65)!important;
  overflow:hidden!important;
}
.sidebar .brand-mark-r,
.sidebar .brand-mark-t{
  position:absolute!important;
  font-weight:900!important;
  line-height:1!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
.sidebar .brand-mark-r{
  left:8px!important;
  top:7px!important;
  font-size:12px!important;
  color:var(--riman-navy)!important;
}
.sidebar .brand-mark-t{
  right:7px!important;
  bottom:6px!important;
  font-size:12px!important;
  color:#6f87a3!important;
}
.sidebar .brand-modern-copy{
  min-width:0!important;
}
.sidebar .brand-modern-copy h1{
  margin:0!important;
  color:#ffffff!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:800!important;
  letter-spacing:.045em!important;
  white-space:nowrap!important;
}
.sidebar .brand-modern-copy span{
  display:block!important;
  margin-top:4px!important;
  color:#cbd8e6!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:600!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

/* V1.8.9.34 — Same Product Code grouped as one Critical Path row */
.critical-colour-count{
  display:block!important;
  margin-top:3px!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}

/* V1.8.9.35 — Preserve exact per-colour PO costing inside one Critical Path product row */
.critical-breakdown{
  display:flex!important;
  flex-direction:column!important;
  min-width:100%!important;
}
.critical-breakdown-line{
  display:flex!important;
  align-items:center!important;
  min-height:28px!important;
  padding:4px 0!important;
  border-bottom:1px solid #e5e7eb!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
.critical-breakdown-line:last-child{
  border-bottom:0!important;
}
.critical-table td:has(.critical-breakdown){
  padding-top:4px!important;
  padding-bottom:4px!important;
  vertical-align:middle!important;
}

/* V1.8.9.36 — Text-only RIMAN TEXTILE wordmark */
.sidebar .brand.brand-wordmark{
  display:flex!important;
  align-items:center!important;
  min-height:48px!important;
  padding:5px 5px 16px 5px!important;
  border-bottom:1px solid rgba(255,255,255,.18)!important;
}
.sidebar .brand-wordmark-text{
  position:relative!important;
  display:inline-block!important;
  color:#ffffff!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:12px!important;
  line-height:1.1!important;
  font-weight:800!important;
  letter-spacing:.07em!important;
  white-space:nowrap!important;
}
.sidebar .brand-wordmark-text::after{
  content:""!important;
  position:absolute!important;
  left:0!important;
  bottom:-7px!important;
  width:34px!important;
  height:2px!important;
  border-radius:2px!important;
  background:#ffffff!important;
  opacity:.72!important;
}

/* Hide any legacy monogram/subtitle elements if old markup is ever loaded */
.sidebar .brand-mark,
.sidebar .brand-mark-r,
.sidebar .brand-mark-t,
.sidebar .brand-modern-copy span,
.sidebar .brand-text-logo span{
  display:none!important;
}

/* V1.8.9.36 — Solid Dashboard status cards with white typography */
.dashboard-clean .status-report-card{
  border:0!important;
  box-shadow:0 5px 14px rgba(15,23,42,.14)!important;
}
.dashboard-clean .status-report-card,
.dashboard-clean .status-report-card .status-card-head,
.dashboard-clean .status-report-card .status-card-count,
.dashboard-clean .status-report-card .status-card-value,
.dashboard-clean .status-report-card .status-card-note{
  color:#ffffff!important;
}
.dashboard-clean .status-report-card .status-card-note{
  border-top-color:rgba(255,255,255,.30)!important;
}
.dashboard-clean .status-report-card .status-dot{
  background:#ffffff!important;
  opacity:.88!important;
}

/* Amber = active/open work */
.dashboard-clean .status-open,
.dashboard-clean .status-production,
.dashboard-clean .status-transit-card{
  background:#d97706!important;
}

/* Green = successfully completed */
.dashboard-clean .status-complete-card{
  background:#15803d!important;
}

/* Red = attention / risk */
.dashboard-clean .status-qc,
.dashboard-clean .status-late{
  background:#b91c1c!important;
}

/* Prevent older per-card styles from overriding solid backgrounds */
.dashboard-clean .status-open::before,
.dashboard-clean .status-complete-card::before,
.dashboard-clean .status-production::before,
.dashboard-clean .status-qc::before,
.dashboard-clean .status-transit-card::before,
.dashboard-clean .status-late::before{
  display:none!important;
}

/* V1.8.9.37 — Calibri throughout; Open Orders solid blue */
html,body,button,input,select,textarea,table,th,td,label,
.sidebar,.main,.modal,.panel,.card{
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
}
.dashboard-clean .status-open{
  background:#2563eb!important;
  color:#ffffff!important;
}
.dashboard-clean .status-open .status-card-head,
.dashboard-clean .status-open .status-card-count,
.dashboard-clean .status-open .status-card-value,
.dashboard-clean .status-open .status-card-note{
  color:#ffffff!important;
}

/* V1.8.9.38 — Compress Critical Path columns; wrap headings only */
.critical-table{
  table-layout:auto!important;
  width:max-content!important;
  min-width:100%!important;
}
.critical-table thead th{
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  line-height:1.1!important;
  padding:6px 5px!important;
  font-size:12px!important;
  max-width:82px!important;
  min-width:54px!important;
  vertical-align:middle!important;
}
.critical-table tbody td{
  white-space:nowrap!important;
  padding:5px 5px!important;
  font-size:12px!important;
  line-height:1.15!important;
  vertical-align:middle!important;
}
.critical-table select,
.critical-table input,
.critical-table button{
  font-size:12px!important;
}
.critical-table select{
  min-width:72px!important;
  max-width:92px!important;
  padding:4px 20px 4px 5px!important;
}
.critical-table input[type="date"]{
  width:108px!important;
  min-width:108px!important;
  padding:3px 4px!important;
}
.critical-table .critical-breakdown-line{
  min-height:24px!important;
  padding:3px 0!important;
}

/* V1.8.9.39 — Slightly larger application typography */
body{
  font-size:12px!important;
}
button,input,select,textarea{
  font-size:12px!important;
}
.sidebar .nav-btn,
.sidebar .nav-item,
.sidebar .subnav-btn,
.sidebar .nav-subitem{
  font-size:12px!important;
}
table,th,td{
  font-size:12px!important;
}

/* Critical Path: compact columns by wrapping headings only */
.critical-table thead th{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.08!important;
  font-size:12px!important;
  padding:5px 4px!important;
  min-width:44px!important;
  max-width:72px!important;
}
.critical-table tbody td{
  white-space:nowrap!important;
  font-size:12px!important;
  padding:5px 4px!important;
}
.critical-table select,
.critical-table input,
.critical-table button{
  font-size:12px!important;
}

/* V1.8.9.40 — Critical Path centred headings and compact controls */
.critical-table thead th{
  text-align:center!important;
  vertical-align:middle!important;
}

/* Compact pill-style dropdowns: sized for their longest option */
.critical-table select{
  appearance:none!important;
  -webkit-appearance:none!important;
  height:27px!important;
  min-height:27px!important;
  padding:3px 20px 3px 7px!important;
  border-radius:999px!important;
  border-width:1px!important;
  font-weight:700!important;
  line-height:1!important;
  background-repeat:no-repeat!important;
  background-position:right 7px center!important;
  background-size:8px 5px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%235b6777' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
}
.critical-table .sample-status{
  width:82px!important;
  min-width:82px!important;
  max-width:82px!important;
}
.critical-table .production-status{
  width:94px!important;
  min-width:94px!important;
  max-width:94px!important;
}
.critical-table .ready-status{
  width:66px!important;
  min-width:66px!important;
  max-width:66px!important;
}
.critical-table .qc-status-select{
  width:70px!important;
  min-width:70px!important;
  max-width:70px!important;
}

/* Compact calendar/date pill. Native calendar remains clickable but does not set column width. */
.critical-date-pill{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:4px!important;
  width:84px!important;
  min-width:84px!important;
  height:27px!important;
  padding:0 7px!important;
  box-sizing:border-box!important;
  border:1px solid #cbd5e1!important;
  border-radius:999px!important;
  background:#ffffff!important;
  color:#334155!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:1!important;
  cursor:pointer!important;
  overflow:hidden!important;
}
.critical-date-text{
  white-space:nowrap!important;
}
.critical-date-icon{
  flex:0 0 auto!important;
  font-size:12px!important;
  line-height:1!important;
  color:#64748b!important;
}
.critical-date-native{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  opacity:0!important;
  cursor:pointer!important;
  padding:0!important;
  border:0!important;
}

/* Keep body values unwrapped */
.critical-table tbody td{
  white-space:nowrap!important;
}

/* V1.8.9.41 — tighter Critical Path + rectangular controls */
select{
  border-radius:4px!important;
}

/* Explicit compact wrapping for key Critical Path headings */
.critical-table thead th.critical-th-totalqty,
.critical-table thead th.critical-th-bulk{
  white-space:normal!important;
  line-height:1.02!important;
  min-width:46px!important;
  max-width:64px!important;
  width:64px!important;
}

/* All Critical Path selects use compact rectangle shape */
.critical-table select{
  appearance:none!important;
  -webkit-appearance:none!important;
  height:26px!important;
  min-height:26px!important;
  border-radius:4px!important;
  padding:3px 18px 3px 5px!important;
  font-weight:700!important;
  background-position:right 5px center!important;
  background-size:7px 4px!important;
}

/* Widths sized to longest visible option, without unused space */
.critical-table .sample-status{
  width:70px!important;
  min-width:70px!important;
  max-width:70px!important;
}
.critical-table .production-status{
  width:78px!important;
  min-width:78px!important;
  max-width:78px!important;
}
.critical-table .ready-status{
  width:58px!important;
  min-width:58px!important;
  max-width:58px!important;
}
.critical-table .qc-status-select{
  width:60px!important;
  min-width:60px!important;
  max-width:60px!important;
}

/* Compact rectangular date picker */
.critical-date-pill{
  width:76px!important;
  min-width:76px!important;
  height:26px!important;
  border-radius:4px!important;
  padding:0 5px!important;
  gap:2px!important;
}
.critical-date-text{
  font-size:12px!important;
}
.critical-date-icon{
  font-size:12px!important;
}

/* Current workflow stage: whole cell clearly highlighted */
.critical-table td.critical-current-stage{
  background:#2563eb!important;
  color:#ffffff!important;
  box-shadow:inset 0 0 0 1px #1d4ed8!important;
}
.critical-table td.critical-current-stage select,
.critical-table td.critical-current-stage .critical-date-pill,
.critical-table td.critical-current-stage button{
  border-color:rgba(255,255,255,.75)!important;
}
.critical-table td.critical-current-stage .muted,
.critical-table td.critical-current-stage span,
.critical-table td.critical-current-stage strong{
  color:#ffffff!important;
}

/* V1.8.9.42 — stronger current-stage fill and readable QC text */
.critical-table tbody td.critical-current-stage{
  background-color:#2563eb!important;
  background-image:none!important;
  color:#ffffff!important;
  box-shadow:none!important;
  outline:none!important;
}
.critical-table tbody td.critical-current-stage,
.critical-table tbody td.critical-current-stage *,
.critical-table tbody td.critical-current-stage .muted,
.critical-table tbody td.critical-current-stage a,
.critical-table tbody td.critical-current-stage label,
.critical-table tbody td.critical-current-stage span,
.critical-table tbody td.critical-current-stage strong{
  color:#ffffff!important;
}

/* Controls inside the blue stage cell remain readable but the entire TD stays blue */
.critical-table tbody td.critical-current-stage select{
  color:#0f172a!important;
  background-color:#ffffff!important;
  border-color:#ffffff!important;
}
.critical-table tbody td.critical-current-stage button{
  color:#0f172a!important;
  background:#ffffff!important;
  border-color:#ffffff!important;
}
.critical-table tbody td.critical-current-stage .critical-date-pill{
  color:#0f172a!important;
  background:#ffffff!important;
  border-color:#ffffff!important;
}
.critical-table tbody td.critical-current-stage .critical-date-pill *{
  color:#0f172a!important;
}

/* QC cells: use the same dark foreground as normal Critical Path body cells */
.critical-table .qc-status-select,
.critical-table td .qc-status,
.critical-table td .qc-status-badge,
.critical-table td .qc-display,
.critical-table td .qc-cell,
.critical-table td [class*="qc-"]{
  color:#0f172a!important;
}
.critical-table .qc-status-select{
  background-color:#ffffff!important;
}

/* Blue current-stage rule takes precedence over normal QC foreground */
.critical-table tbody td.critical-current-stage [class*="qc-"]:not(select){
  color:#ffffff!important;
}

/* V1.8.9.43 — definitive current-stage fill and QC readability */

/* ID specificity ensures active stage beats zebra, late-row and hover backgrounds */
#critical-path-table tbody tr td.critical-current-stage,
#critical-path-table tbody tr:nth-child(even) td.critical-current-stage,
#critical-path-table tbody tr:hover td.critical-current-stage,
#critical-path-table tbody tr.critical-late-row td.critical-current-stage,
#critical-path-table tbody tr.critical-late-row:hover td.critical-current-stage,
#critical-path-table tbody tr.po-group-0:hover td.critical-current-stage,
#critical-path-table tbody tr.po-group-1:hover td.critical-current-stage{
  background:#2563eb!important;
  background-color:#2563eb!important;
  background-image:none!important;
  color:#ffffff!important;
  box-shadow:none!important;
  outline:none!important;
}

/* Any plain text / status text in the current blue cell is white */
#critical-path-table tbody tr td.critical-current-stage .qc-result,
#critical-path-table tbody tr td.critical-current-stage .muted,
#critical-path-table tbody tr td.critical-current-stage > span,
#critical-path-table tbody tr td.critical-current-stage > strong,
#critical-path-table tbody tr td.critical-current-stage > label:not(.critical-date-pill){
  color:#ffffff!important;
}

/* QC has no dropdown in Critical Path: remove the inner badge colour on current stage */
#critical-path-table tbody tr td.critical-current-stage .qc-result{
  background:transparent!important;
  border-color:transparent!important;
}

/* Controls stay usable inside the blue cell */
#critical-path-table tbody tr td.critical-current-stage select,
#critical-path-table tbody tr td.critical-current-stage button,
#critical-path-table tbody tr td.critical-current-stage .critical-date-pill{
  background-color:#ffffff!important;
  color:#111827!important;
  border-color:#ffffff!important;
}

/* Normal QC text matches standard Critical Path body text */
#critical-path-table tbody td .qc-result,
#critical-path-table tbody td .qc-result.qc-pending,
#critical-path-table tbody td .qc-result.qc-pass,
#critical-path-table tbody td .qc-result.qc-fail{
  color:#111827!important;
}

/* Re-assert current blue QC text after normal QC rule */
#critical-path-table tbody tr td.critical-current-stage .qc-result{
  color:#ffffff!important;
}

/* V1.8.9.44 — Critical Path QC status colours match Dashboard */
#critical-path-table tbody td .qc-result.qc-pass{
  background:#15803d!important;
  background-color:#15803d!important;
  border-color:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table tbody td .qc-result.qc-pending{
  background:#d97706!important;
  background-color:#d97706!important;
  border-color:#d97706!important;
  color:#ffffff!important;
}

/* Keep active-stage QC whole-cell blue rule authoritative */
#critical-path-table tbody tr td.critical-current-stage .qc-result{
  background:transparent!important;
  background-color:transparent!important;
  border-color:transparent!important;
  color:#ffffff!important;
}

/* V1.8.9.45 — QC whole-cell status colours + readable current-stage dropdowns */

/* QC status badge fills the entire QC table cell visually */
#critical-path-table tbody td:has(.qc-result){
  padding:0!important;
}
#critical-path-table tbody td .qc-result{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:100%!important;
  height:100%!important;
  min-height:38px!important;
  box-sizing:border-box!important;
  margin:0!important;
  border-radius:0!important;
  border:0!important;
  font-weight:700!important;
}
#critical-path-table tbody td .qc-result.qc-pass{
  background:#15803d!important;
  background-color:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table tbody td .qc-result.qc-pending{
  background:#d97706!important;
  background-color:#d97706!important;
  color:#ffffff!important;
}

/* QC status colour takes priority over generic current-stage blue */
#critical-path-table tbody tr td.critical-current-stage:has(.qc-result.qc-pass){
  background:#15803d!important;
  background-color:#15803d!important;
}
#critical-path-table tbody tr td.critical-current-stage:has(.qc-result.qc-pending){
  background:#d97706!important;
  background-color:#d97706!important;
}
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-pass{
  background:#15803d!important;
  background-color:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-pending{
  background:#d97706!important;
  background-color:#d97706!important;
  color:#ffffff!important;
}

/* Current-stage dropdowns: explicitly readable dark text on white control */
#critical-path-table tbody td.critical-current-stage select,
#critical-path-table tbody td.critical-current-stage select.sample-status,
#critical-path-table tbody td.critical-current-stage select.production-status,
#critical-path-table tbody td.critical-current-stage select.ready-status,
#critical-path-table tbody td.critical-current-stage select.qc-status-select{
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
  background-color:#ffffff!important;
  opacity:1!important;
}
#critical-path-table tbody td.critical-current-stage select option{
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
  background:#ffffff!important;
}

/* V1.8.9.46 — QC compact status badge inside blue current-stage cell */

/* Restore normal QC cell padding */
#critical-path-table tbody td:has(.qc-result){
  padding:5px 4px!important;
}

/* QC status shown as compact rectangular badge */
#critical-path-table tbody td .qc-result{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:54px!important;
  height:22px!important;
  min-height:22px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:3px 7px!important;
  border-radius:3px!important;
  border:0!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  white-space:nowrap!important;
}

/* QC result colours */
#critical-path-table tbody td .qc-result.qc-pass{
  background:#15803d!important;
  background-color:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table tbody td .qc-result.qc-pending{
  background:#d97706!important;
  background-color:#d97706!important;
  color:#ffffff!important;
}
#critical-path-table tbody td .qc-result.qc-fail{
  background:#b91c1c!important;
  background-color:#b91c1c!important;
  color:#ffffff!important;
}

/* If QC is the current workflow stage, the entire TD stays blue */
#critical-path-table tbody tr td.critical-current-stage{
  background:#2563eb!important;
  background-color:#2563eb!important;
  background-image:none!important;
  color:#ffffff!important;
}

/* Do not let the QC badge replace the blue TD background */
#critical-path-table tbody tr td.critical-current-stage:has(.qc-result.qc-pass),
#critical-path-table tbody tr td.critical-current-stage:has(.qc-result.qc-pending),
#critical-path-table tbody tr td.critical-current-stage:has(.qc-result.qc-fail){
  background:#2563eb!important;
  background-color:#2563eb!important;
}

/* Keep badge colours visible inside the blue QC stage */
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-pass{
  background:#15803d!important;
  background-color:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-pending{
  background:#d97706!important;
  background-color:#d97706!important;
  color:#ffffff!important;
}
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-fail{
  background:#b91c1c!important;
  background-color:#b91c1c!important;
  color:#ffffff!important;
}

/* V1.8.9.47 — Critical Path status-chip controls, status badges, working dates, locked history */

/* Dropdowns use the same compact rectangular status style as QC */
#critical-path-table select.status-chip-select{
  border-radius:3px!important;
  border:0!important;
  min-height:22px!important;
  height:22px!important;
  padding:3px 18px 3px 7px!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  box-shadow:none!important;
}

/* V2.0.21 — R&D / New Development workspace. */
.rd-page{display:flex;flex-direction:column;gap:14px}
.rd-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.rd-kpis button{min-width:0;text-align:left;background:var(--panel);border:1px solid #aebdce;border-top:3px solid #2563eb;border-radius:10px;padding:14px 16px;color:var(--ink)}
.rd-kpis button:hover{border-color:#2563eb;background:#f5f9ff}
.rd-kpis span,.rd-kpis small,.rd-kpis strong{display:block;white-space:normal;overflow-wrap:anywhere}
.rd-kpis span{font-size:12px;font-weight:700;color:#52647a}.rd-kpis strong{font-size:24px;line-height:1.15;margin:5px 0;color:#10233f}.rd-kpis small{font-size:12px;color:#63758c}
.rd-list-panel{margin-top:0}.rd-toolbar{display:flex;align-items:center;gap:8px}.rd-toolbar select{min-width:165px}
.rd-table td{vertical-align:middle}.rd-table td strong,.rd-table td small{display:block}.rd-table td small{margin-top:3px;color:#61738a}
.rd-status{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:4px 9px;border:1px solid;border-radius:5px;font-size:12px;font-weight:800;white-space:nowrap}
.rd-status-active{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}.rd-status-approved{background:#dcfce7;color:#166534;border-color:#86efac}.rd-status-rejected{background:#fee2e2;color:#991b1b;border-color:#fca5a5}.rd-status-hold{background:#fef3c7;color:#92400e;border-color:#fcd34d}
.rd-progress{width:92px;height:8px;border-radius:20px;background:#dbe2ea;overflow:hidden}.rd-progress span{display:block;height:100%;border-radius:inherit;background:#2563eb}.rd-linked-records{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.modal-card.rd-modal-card{width:min(1480px,calc(100vw - 28px));max-width:none;height:min(94vh,1080px);display:flex;flex-direction:column}.rd-modal-card #modal-body{overflow:auto;padding:14px;background:#eef2f6}.rd-modal-card #modal-title{font-size:20px}
#rd-form{display:flex;flex-direction:column;gap:12px}.rd-section{background:#fff;border:1px solid #aebdce;border-radius:9px;overflow:hidden;padding:14px}.rd-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-14px -14px 14px;padding:11px 14px;background:#dfe6ee;border-bottom:1px solid #aebdce}.rd-section-head>div{min-width:0}.rd-section-head strong,.rd-section-head span{display:block}.rd-section-head strong{font-size:15px;color:#10233f}.rd-section-head span{font-size:12px;color:#52647a;margin-top:3px}
.rd-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.rd-title-field{grid-column:span 2}.rd-attribute-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:10px}.rd-attribute-grid>div{min-width:0}.rd-attribute-grid .form-group{margin:0}.rd-notes-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.rd-notes-grid textarea{min-height:80px}
.rd-fabric-choice{display:flex;align-items:center;gap:22px;margin-bottom:12px}.rd-fabric-choice label{display:flex;align-items:center;gap:7px;font-weight:700}.rd-fabric-choice input{min-height:auto}.rd-existing-fabric{max-width:520px}.rd-fabric-top{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.rd-composition-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-top:10px}.rd-composition-grid input{text-align:center}.rd-composition-total{margin-top:9px;padding:8px 10px;border-radius:6px;background:#fee2e2;color:#991b1b;font-weight:800}.rd-composition-total.valid{background:#dcfce7;color:#166534}
.rd-entry-table{table-layout:fixed}.rd-entry-table th,.rd-entry-table td{padding:0;border:1px solid #bac7d6}.rd-entry-table th{padding:8px;background:#dfe6ee;color:#24364d}.rd-entry-table input,.rd-entry-table select{width:100%;min-width:0;border:0;border-radius:0;background:transparent;box-shadow:none}.rd-entry-table td:last-child{width:38px;text-align:center}.rd-entry-table .danger-link{padding:6px}
.rd-cost-grid{display:grid;grid-template-columns:160px 180px 180px minmax(240px,1fr);gap:10px;align-items:end}.rd-techpack-choice{min-height:38px;display:flex;align-items:center;gap:8px;border:1px solid #aebdce;border-radius:7px;padding:8px 10px;font-weight:700}.rd-techpack-choice input{min-height:auto}.rd-file-upload{display:flex;align-items:center;gap:10px;margin-top:12px}.rd-files-list{display:flex;flex-direction:column;gap:6px;margin-top:9px}.rd-file-row{display:flex;align-items:center;gap:8px;border:1px solid #bac7d6;border-radius:7px;padding:7px 10px}.rd-file-row>div{min-width:0;flex:1}.rd-file-row strong,.rd-file-row small{display:block;overflow-wrap:anywhere}.rd-file-row small{color:#61738a;margin-top:2px}
.rd-history{display:grid;gap:7px}.rd-history>div{display:grid;grid-template-columns:160px 240px minmax(0,1fr);gap:10px;border-left:3px solid #2563eb;background:#f5f8fc;padding:8px 10px}.rd-history span,.rd-history small{color:#52647a}.rd-converted-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #86efac;background:#dcfce7;color:#166534;border-radius:8px}.rd-converted-banner strong,.rd-converted-banner span{display:block}.rd-form-actions{position:sticky;bottom:-14px;z-index:2;margin:0 -14px -14px;padding:12px 14px;background:#fff;border-top:1px solid #aebdce}.rd-convert-btn{background:#047857}
body.dark-theme .rd-kpis button,body.dark-theme .rd-section{background:#172033;border-color:#526176;color:#f8fafc}body.dark-theme .rd-kpis button:hover{background:#20304a}body.dark-theme .rd-kpis strong,body.dark-theme .rd-section-head strong{color:#f8fafc}body.dark-theme .rd-kpis span,body.dark-theme .rd-kpis small,body.dark-theme .rd-section-head span{color:#cbd5e1}body.dark-theme .rd-modal-card #modal-body{background:#101827}body.dark-theme .rd-section-head,body.dark-theme .rd-entry-table th{background:#24344b;border-color:#526176}body.dark-theme .rd-entry-table input,body.dark-theme .rd-entry-table select{color:#f8fafc}body.dark-theme .rd-history>div{background:#172033}body.dark-theme .rd-form-actions{background:#172033;border-color:#526176}
@media(max-width:1200px){.rd-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.rd-overview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rd-fabric-top{grid-template-columns:repeat(3,minmax(0,1fr))}.rd-composition-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.rd-attribute-grid{grid-template-columns:1fr}.rd-cost-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rd-techpack-choice{grid-column:1/-1}}
@media(max-width:760px){.rd-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.rd-toolbar{align-items:stretch;flex-direction:column}.rd-overview-grid,.rd-notes-grid,.rd-fabric-top,.rd-composition-grid,.rd-cost-grid{grid-template-columns:1fr}.rd-title-field{grid-column:auto}.rd-history>div{grid-template-columns:1fr}.rd-form-actions{flex-wrap:wrap}.rd-form-actions button{flex:1}.rd-file-upload{align-items:flex-start;flex-direction:column}}

/* V2.0.15 — reportable Order Status completion date and matching Shipment Control states. */
#critical-path-table tbody td.critical-status-cell-complete,
#critical-path-table tbody tr:hover td.critical-status-cell-complete{
  background:transparent!important;
  color:inherit!important;
}
#critical-path-table .critical-order-status-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  width:100%!important;
}
#critical-path-table .critical-order-status-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:60px!important;
  min-height:22px!important;
  padding:3px 7px!important;
  border:1px solid #bbf7d0!important;
  border-radius:4px!important;
  background:#dcfce7!important;
  color:#166534!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-order-status-stack>small{
  color:#475569!important;
  font-size:11px!important;
  font-weight:600!important;
  line-height:1!important;
  white-space:nowrap!important;
}

/* Shipment Control status display now matches Critical Path semantic colours. */
.shipment-status-control-stack.received .shipment-received-state,
.shipment-control-status.shipment-received,
.shipment-control-status.shipment-landed{
  border:1px solid #bbf7d0!important;
  border-radius:4px!important;
  background:#dcfce7!important;
  background-color:#dcfce7!important;
  color:#166534!important;
  -webkit-text-fill-color:#166534!important;
  box-shadow:none!important;
}
body.dark-theme #critical-path-table .critical-order-status-stack>small,
body.dark-theme .shipment-status-control-stack>small{color:#cbd5e1!important;}

/* V2.0.16 — supplier-linked compliance management and drill-down. */
.supplier-modal-card{width:min(1040px,95vw)!important;max-width:95vw!important;}
.supplier-compliance-panel{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid #cbd5e1;border-radius:7px;background:#f8fafc;}
.supplier-compliance-panel.supplier-compliance-empty{min-height:72px;justify-content:center;}
.supplier-compliance-panel.supplier-compliance-empty>div,.supplier-compliance-head>div{display:flex;flex-direction:column;gap:3px;min-width:0;}
.supplier-compliance-panel strong{color:#172033;}
.supplier-compliance-panel span{color:#64748b;}
.supplier-compliance-head{display:flex;align-items:center;justify-content:space-between;gap:14px;}
.supplier-compliance-head>button{flex:0 0 auto;}
.supplier-compliance-summary{display:flex;align-items:center;gap:7px;flex-wrap:wrap;}
.supplier-compliance-summary>span{display:inline-flex;align-items:center;gap:3px;padding:4px 7px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;color:#475569;}
.supplier-compliance-summary>span.is-current{border-color:#bbf7d0;background:#dcfce7;color:#166534;}
.supplier-compliance-summary>span.has-expiring{border-color:#fde68a;background:#fef3c7;color:#92400e;}
.supplier-compliance-summary>span.has-expired{border-color:#fecaca;background:#fee2e2;color:#991b1b;}
.supplier-compliance-summary>span b{color:inherit;}
.supplier-compliance-list{display:flex;flex-direction:column;border:1px solid #d7dde5;border-radius:5px;background:#fff;overflow:hidden;}
.supplier-compliance-row{display:grid;grid-template-columns:minmax(220px,1fr) 145px auto;align-items:center;gap:12px;padding:9px 10px;border-bottom:1px solid #e2e8f0;}
.supplier-compliance-row:last-child{border-bottom:0;}
.supplier-compliance-row>div:first-child,.supplier-compliance-row>div:nth-child(2){display:flex;flex-direction:column;gap:3px;min-width:0;}
.supplier-compliance-row>div:first-child span,.supplier-compliance-row small{font-size:11px;color:#64748b;white-space:normal;overflow-wrap:anywhere;}
.supplier-compliance-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;white-space:nowrap;}
.supplier-compliance-none{padding:14px;color:#64748b;text-align:center;}
.supplier-perf-compliance-link,.supplier-db-compliance-link{cursor:pointer;border:1px solid transparent;border-radius:4px;font:inherit;box-shadow:none;}
.supplier-perf-compliance-link:hover,.supplier-db-compliance-link:hover{box-shadow:0 0 0 2px rgba(37,99,235,.15);}
.supplier-db-compliance-link{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:3px 7px;font-size:12px;font-weight:700;white-space:nowrap;}
.supplier-db-compliance-link.is-current{border-color:#bbf7d0;background:#dcfce7;color:#166534;}
.supplier-db-compliance-link.has-expiring{border-color:#fde68a;background:#fef3c7;color:#92400e;}
.supplier-db-compliance-link.has-expired{border-color:#fecaca;background:#fee2e2;color:#991b1b;}
body.dark-theme .supplier-compliance-panel{border-color:#526176;background:#172033;}
body.dark-theme .supplier-compliance-panel strong{color:#f8fafc;}
body.dark-theme .supplier-compliance-panel span,body.dark-theme .supplier-compliance-row>div:first-child span,body.dark-theme .supplier-compliance-row small{color:#cbd5e1;}
body.dark-theme .supplier-compliance-list{border-color:#526176;background:#101827;}
body.dark-theme .supplier-compliance-row{border-color:#435168;}
@media(max-width:760px){.supplier-compliance-head{align-items:flex-start;flex-direction:column;}.supplier-compliance-row{grid-template-columns:1fr;}.supplier-compliance-actions{justify-content:flex-start;flex-wrap:wrap;}}

/* Sample / Fit / PPS */
#critical-path-table select.sample-waiting{
  background-color:#d97706!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#critical-path-table select.sample-approved{
  background-color:#15803d!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#critical-path-table select.sample-rejected{
  background-color:#b91c1c!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}

/* Bulk Production */
#critical-path-table select.prod-waiting{
  background-color:#d97706!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#critical-path-table select.prod-progress{
  background-color:#2563eb!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#critical-path-table select.prod-complete{
  background-color:#15803d!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}

/* Ready to Ship */
#critical-path-table select.ready-no{
  background-color:#d97706!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
#critical-path-table select.ready-yes{
  background-color:#15803d!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}

/* Native dropdown list itself remains readable */
#critical-path-table select.status-chip-select option{
  background:#ffffff!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
}

/* Locked previous stages keep their colour rather than looking faded */
#critical-path-table select.status-chip-select:disabled{
  opacity:1!important;
  cursor:not-allowed!important;
  filter:none!important;
}

/* Status column uses matching compact badges */
#critical-path-table .critical-status-display{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:70px!important;
  min-height:22px!important;
  padding:3px 7px!important;
  border-radius:3px!important;
  border:0!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-status-display.status-progress{
  background:#2563eb!important;
  color:#ffffff!important;
}
#critical-path-table .critical-status-display.status-transit{
  background:#d97706!important;
  color:#ffffff!important;
}
#critical-path-table .critical-status-display.status-complete{
  background:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table .critical-status-display.status-late{
  background:#b91c1c!important;
  color:#ffffff!important;
}

/* Compact date button + real native picker */
#critical-path-table .critical-date-control{
  position:relative!important;
  display:inline-block!important;
  width:76px!important;
}
#critical-path-table .critical-date-button{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:3px!important;
  width:76px!important;
  min-width:76px!important;
  height:26px!important;
  padding:0 5px!important;
  border:1px solid #cbd5e1!important;
  border-radius:4px!important;
  background:#ffffff!important;
  color:#111827!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:1!important;
  cursor:pointer!important;
}
#critical-path-table .critical-date-button span{
  color:#111827!important;
}
#critical-path-table .critical-date-native{
  position:absolute!important;
  left:0!important;
  top:0!important;
  width:1px!important;
  min-width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  border:0!important;
  padding:0!important;
}

/* Current-stage cell stays solid blue, while its coloured status control remains visible */
#critical-path-table tbody tr td.critical-current-stage{
  background:#2563eb!important;
  background-color:#2563eb!important;
  color:#ffffff!important;
}

/* V1.8.9.49 — PO top row: PO Number | Agent | Supplier | Raised By */
.po-details-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.po-details-grid > .form-group:nth-child(1),
.po-details-grid > .form-group:nth-child(2),
.po-details-grid > .form-group:nth-child(3),
.po-details-grid > .form-group:nth-child(4){
  grid-column:auto!important;
}
@media(max-width:1100px){
  .po-details-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* V1.8.9.50 — historical workflow becomes read-only only after QC Pass */
#critical-path-table .stage-view-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:62px!important;
  min-height:22px!important;
  padding:3px 7px!important;
  border-radius:3px!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  white-space:nowrap!important;
  color:#ffffff!important;
}
#critical-path-table .stage-view-waiting{
  background:#d97706!important;
}
#critical-path-table .stage-view-approved{
  background:#15803d!important;
}
#critical-path-table .stage-view-rejected{
  background:#b91c1c!important;
}
#critical-path-table .stage-view-progress{
  background:#2563eb!important;
}

/* V1.8.9.51 — compact status date beneath Critical Path workflow stages */
#critical-path-table .critical-stage-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  width:100%!important;
  min-width:0!important;
}
#critical-path-table .critical-stage-date{
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  color:#64748b!important;
  white-space:nowrap!important;
}
#critical-path-table td.critical-current-stage .critical-stage-date{
  color:#ffffff!important;
}
#critical-path-table td:has(.qc-result) .critical-stage-stack{
  padding:2px 0!important;
}

/* V1.8.9.52 — larger Critical Path Notes modal with compact note history */
#modal.critical-notes-modal-open .modal{
  width:min(760px,94vw)!important;
  max-width:760px!important;
}
#modal.critical-notes-modal-open #modal-body{
  max-height:76vh!important;
  overflow:auto!important;
}
.critical-notes-modal{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
.critical-notes-history{
  border:1px solid #e2e8f0!important;
  border-radius:7px!important;
  background:#f8fafc!important;
  padding:9px!important;
}
.critical-notes-section-title{
  font-size:12px!important;
  font-weight:700!important;
  color:#334155!important;
  margin-bottom:7px!important;
}
.critical-notes-log{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  max-height:300px!important;
  overflow:auto!important;
}
.critical-notes-log-row{
  background:#ffffff!important;
  border:1px solid #e5e7eb!important;
  border-radius:5px!important;
  padding:7px 8px!important;
}
.critical-notes-log-meta{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:3px!important;
  font-size:12px!important;
  line-height:1.1!important;
}
.critical-notes-log-user{
  font-weight:700!important;
  color:#10233f!important;
}
.critical-notes-log-date{
  color:#64748b!important;
  white-space:nowrap!important;
}
.critical-notes-log-text{
  font-size:12px!important;
  line-height:1.3!important;
  color:#1f2937!important;
  overflow-wrap:anywhere!important;
}
.critical-notes-empty{
  padding:12px!important;
  text-align:center!important;
  font-size:12px!important;
  color:#64748b!important;
}
.critical-notes-form textarea{
  min-height:150px!important;
  height:150px!important;
  resize:vertical!important;
}
.critical-note-btn{
  position:relative!important;
}
.critical-note-count{
  position:absolute!important;
  right:-5px!important;
  top:-5px!important;
  min-width:15px!important;
  height:15px!important;
  padding:0 3px!important;
  border-radius:8px!important;
  background:#10233f!important;
  color:#ffffff!important;
  font-size:12px!important;
  line-height:15px!important;
  text-align:center!important;
  font-weight:700!important;
}

/* V1.8.9.53 — Critical Path Notes table layout */
#modal.critical-notes-modal-open .modal{
  width:min(820px,95vw)!important;
  max-width:820px!important;
}
#modal.critical-notes-modal-open #modal-body{
  max-height:80vh!important;
  overflow:auto!important;
}
.critical-notes-modal{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
.critical-notes-history{
  border:1px solid #cbd5e1!important;
  border-radius:6px!important;
  background:#ffffff!important;
  padding:0!important;
  overflow:hidden!important;
}
.critical-notes-table-head{
  display:grid!important;
  grid-template-columns:120px 105px minmax(0,1fr)!important;
  gap:0!important;
  background:#10233f!important;
  color:#ffffff!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.2!important;
}
.critical-notes-table-head > div{
  padding:9px 10px!important;
  border-right:1px solid rgba(255,255,255,.18)!important;
}
.critical-notes-table-head > div:last-child{
  border-right:0!important;
}
.critical-notes-table-body{
  max-height:390px!important;
  min-height:180px!important;
  overflow:auto!important;
}
.critical-notes-table-row{
  display:grid!important;
  grid-template-columns:120px 105px minmax(0,1fr)!important;
  gap:0!important;
  background:#ffffff!important;
  border:0!important;
  border-bottom:1px solid #dbe2ea!important;
  border-radius:0!important;
  padding:0!important;
}
.critical-notes-table-row:last-child{
  border-bottom:0!important;
}
.critical-notes-cell{
  padding:9px 10px!important;
  font-size:12px!important;
  line-height:1.35!important;
  color:#1f2937!important;
  border-right:1px solid #eef2f7!important;
  overflow-wrap:anywhere!important;
}
.critical-notes-cell:last-child{
  border-right:0!important;
}
.critical-notes-user{
  font-weight:700!important;
  color:#10233f!important;
}
.critical-notes-date{
  font-weight:600!important;
  color:#475569!important;
  white-space:nowrap!important;
}
.critical-notes-time{
  display:block!important;
  margin-top:2px!important;
  font-size:12px!important;
  font-weight:400!important;
  color:#64748b!important;
}
.critical-notes-text{
  font-size:12px!important;
}
.critical-notes-empty{
  min-height:180px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:20px!important;
  font-size:12px!important;
  color:#64748b!important;
}
.critical-notes-form{
  margin-top:0!important;
}
.critical-notes-form label{
  font-size:12px!important;
  font-weight:700!important;
}
.critical-notes-form textarea{
  min-height:58px!important;
  height:58px!important;
  max-height:120px!important;
  resize:vertical!important;
  font-size:12px!important;
  line-height:1.35!important;
}

/* V1.8.9.54 — note time inline with date at matching size */
.critical-notes-time{
  display:inline!important;
  margin:0!important;
  font-size:12px!important;
  font-weight:600!important;
  color:#475569!important;
}

#critical-path-table .received-check:disabled{
  cursor:not-allowed!important;
  opacity:.42!important;
}

/* V1.8.9.55 — Shipment Control */
.shipment-control-wrap{overflow:auto!important;max-width:100%!important;}
.shipment-control-table{min-width:1180px!important;width:100%!important;border-collapse:collapse!important;}
.shipment-control-table thead th{
  background:#f8fafc!important;color:#334155!important;font-size:12px!important;font-weight:700!important;
  white-space:nowrap!important;padding:8px 7px!important;border-bottom:1px solid #cbd5e1!important;
}
.shipment-control-table tbody td{
  font-size:12px!important;padding:8px 7px!important;vertical-align:middle!important;
  border-bottom:1px solid #e5e7eb!important;white-space:nowrap!important;
}
.shipment-control-table tbody tr:hover td{background:#f8fafc!important;}
.shipment-control-status{
  min-width:92px!important;height:26px!important;border:0!important;border-radius:4px!important;
  padding:0 8px!important;font-size:12px!important;font-weight:700!important;color:#ffffff!important;cursor:pointer!important;
}
.shipment-control-status.shipment-loading{background:#d97706!important;}
.shipment-control-status.shipment-transit{background:#2563eb!important;}
.shipment-control-status.shipment-landed{background:#15803d!important;}
.shipment-control-status option{background:#ffffff!important;color:#111827!important;}
.shipment-control-form .form-group.full{grid-column:1/-1!important;}

/* V1.8.9.56 — Shipment Control search, report actions and inline editing */
.shipment-control-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:12px 12px 4px!important;
}
.shipment-control-search-wrap{
  position:relative!important;
  width:min(360px,48vw)!important;
}
.shipment-search-icon{
  position:absolute!important;
  left:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  color:#64748b!important;
  font-size:12px!important;
  pointer-events:none!important;
}
.shipment-control-search{
  width:100%!important;
  height:34px!important;
  padding:0 10px 0 30px!important;
  border:1px solid #cbd5e1!important;
  border-radius:5px!important;
  background:#ffffff!important;
  font-size:12px!important;
}
.shipment-control-toolbar-actions{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
}
.shipment-report-btn{
  min-width:68px!important;
  height:32px!important;
  padding:0 13px!important;
}
.shipment-inline-date{
  width:112px!important;
  min-width:112px!important;
  height:28px!important;
  padding:2px 5px!important;
  border:1px solid #cbd5e1!important;
  border-radius:4px!important;
  background:#ffffff!important;
  font-size:12px!important;
}
.shipment-current-stop{
  width:190px!important;
  min-width:190px!important;
  height:28px!important;
  padding:3px 6px!important;
  border:1px solid #cbd5e1!important;
  border-radius:4px!important;
  background:#ffffff!important;
  font-size:12px!important;
}
@media(max-width:800px){
  .shipment-control-toolbar{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .shipment-control-search-wrap{
    width:100%!important;
  }
}
@media print{
  @page{size:A4 landscape;margin:10mm}
}

/* V1.8.9.57 — immutable PO dates and Shipment-Control-authoritative Critical Path dates */
#critical-path-table .critical-final-date{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:70px!important;
  min-height:26px!important;
  padding:3px 6px!important;
  border:1px solid #cbd5e1!important;
  border-radius:4px!important;
  background:#f8fafc!important;
  color:#111827!important;
  font-size:12px!important;
  font-weight:600!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-final-date.no-date{
  color:#94a3b8!important;
  background:#f8fafc!important;
}
#po-form input[type="date"]:disabled{
  background:#f1f5f9!important;
  color:#475569!important;
  cursor:not-allowed!important;
}

/* V1.8.9.58 — Shipment Control tighter competitor-style table */
.shipment-page-shell{
  background:#ffffff!important;border:1px solid #d7dde5!important;border-radius:4px!important;
  overflow:hidden!important;box-shadow:0 1px 2px rgba(15,23,42,.05)!important;
}
.shipment-control-toolbar{
  padding:10px!important;background:#fbfbfc!important;border-bottom:1px solid #d7dde5!important;
}
.shipment-control-titlebar{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:8px 10px!important;background:#f4f5f7!important;border-bottom:1px solid #d7dde5!important;
}
.shipment-control-title{font-size:12px!important;font-weight:700!important;color:#334155!important;}
.shipment-control-count{font-size:12px!important;color:#64748b!important;}
.shipment-control-wrap{overflow:auto!important;max-width:100%!important;background:#fff!important;}
.shipment-control-table{
  width:100%!important;min-width:1450px!important;border-collapse:collapse!important;table-layout:auto!important;background:#fff!important;
}
.shipment-control-table thead th{
  background:#f2f3f5!important;color:#374151!important;font-size:12px!important;font-weight:700!important;
  line-height:1.15!important;padding:7px 6px!important;border-right:1px solid #d7dde5!important;
  border-bottom:1px solid #cfd6de!important;text-align:left!important;white-space:nowrap!important;
}
.shipment-control-table tbody td{
  background:#fff!important;color:#374151!important;font-size:12px!important;line-height:1.25!important;
  padding:6px!important;border-right:1px solid #e0e4e8!important;border-bottom:1px solid #e0e4e8!important;
  vertical-align:middle!important;white-space:nowrap!important;
}
.shipment-control-table tbody tr:hover td{background:#fafbfc!important;}
.shipment-po-cell strong{color:#10233f!important;font-weight:700!important;}
.shipment-qty-cell{text-align:right!important;font-variant-numeric:tabular-nums!important;}
.shipment-inline-date{
  width:108px!important;min-width:108px!important;height:25px!important;border:1px solid #d2d8df!important;
  border-radius:2px!important;background:#fff!important;font-size:12px!important;padding:1px 4px!important;
}
.shipment-current-stop{
  width:210px!important;min-width:210px!important;height:25px!important;border:1px solid #d2d8df!important;
  border-radius:2px!important;background:#fff!important;font-size:12px!important;padding:2px 5px!important;
}
.shipment-control-status{min-width:86px!important;height:25px!important;border-radius:3px!important;font-size:12px!important;}
.shipment-icon-col{width:48px!important;min-width:48px!important;text-align:center!important;}
.shipment-icon-cell{text-align:center!important;padding-left:4px!important;padding-right:4px!important;}
.shipment-icon-btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;width:27px!important;height:27px!important;
  border:1px solid #cbd5e1!important;border-radius:3px!important;background:#fff!important;color:#334155!important;
  cursor:pointer!important;font-size:12px!important;line-height:1!important;
}
.shipment-icon-btn:hover{background:#f1f5f9!important;border-color:#94a3b8!important;}
.shipment-doc-empty{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;width:27px!important;height:27px!important;
  opacity:.28!important;filter:grayscale(1)!important;
}
.shipment-edit-icon{font-size:12px!important;}
.shipment-bol-upload{margin-top:4px!important;padding-top:10px!important;border-top:1px solid #e2e8f0!important;}
.shipment-bol-upload-row{display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important;}
.shipment-bol-file-name{
  font-size:12px!important;color:#475569!important;max-width:330px!important;overflow:hidden!important;
  text-overflow:ellipsis!important;white-space:nowrap!important;
}

/* V1.8.9.60 — Shipment Control save locks Ready to Ship */
.shipment-lock-note{
  margin-bottom:10px!important;
  padding:8px 10px!important;
  border:1px solid #bbf7d0!important;
  border-radius:5px!important;
  background:#f0fdf4!important;
  color:#166534!important;
  font-size:12px!important;
  font-weight:600!important;
}

/* V1.8.9.61 — Critical Path Shipment Status from Shipment Control */
#critical-path-table .shipment-status-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:72px!important;
  min-height:24px!important;
  padding:3px 7px!important;
  border-radius:4px!important;
  color:#ffffff!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
#critical-path-table .shipment-status-badge.shipment-loading{background:#d97706!important;}
#critical-path-table .shipment-status-badge.shipment-transit{background:#2563eb!important;}
#critical-path-table .shipment-status-badge.shipment-landed{background:#15803d!important;}

/* V1.8.9.63 — Critical Path Status is only Open / Complete */
#critical-path-table .critical-status-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:68px!important;
  min-height:24px!important;
  padding:3px 8px!important;
  border-radius:4px!important;
  color:#ffffff!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-status-open{
  background:#2563eb!important;
}
#critical-path-table .critical-status-complete{
  background:#15803d!important;
}

/* V1.8.9.64 — Received + Status line-specific */
#critical-path-table td.critical-received-cell{
  background:inherit!important;
  color:inherit!important;
}
#critical-path-table td.critical-received-cell:hover{
  background:inherit!important;
}
#critical-path-table .critical-received-cell .received-check{
  accent-color:auto!important;
}
#critical-path-table td.critical-status-cell{
  text-align:center!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
#critical-path-table td.critical-status-cell-open{
  background:#ffffff!important;
  color:#374151!important;
}
#critical-path-table td.critical-status-cell-complete{
  background:#dcfce7!important;
  color:#166534!important;
}
#critical-path-table tr:hover td.critical-status-cell-complete{
  background:#dcfce7!important;
  color:#166534!important;
}
#critical-path-table tr:hover td.critical-status-cell-open{
  background:#ffffff!important;
  color:#374151!important;
}

/* V1.8.9.65 — Current stage highlight flow */
#critical-path-table td.critical-received-cell{
  background:inherit!important;
  color:inherit!important;
}
#critical-path-table td.critical-received-cell.critical-current-stage{
  background:#2563eb!important;
  color:#ffffff!important;
}
#critical-path-table td.critical-current-stage{
  background:#2563eb!important;
  color:#ffffff!important;
}
#critical-path-table td.critical-current-stage .shipment-status-badge,
#critical-path-table td.critical-current-stage .stage-view-badge,
#critical-path-table td.critical-current-stage select{
  box-shadow:none!important;
}

/* V1.8.9.68 — Shipment Status colours aligned across Shipment Control and Critical Path */
.shipment-control-status.shipment-loading{
  background:#d97706!important;
  color:#ffffff!important;
}
.shipment-control-status.shipment-transit{
  background:#2563eb!important;
  color:#ffffff!important;
}
.shipment-control-status.shipment-landed{
  background:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table .shipment-status-badge.shipment-loading{
  background:#d97706!important;
  color:#ffffff!important;
}
#critical-path-table .shipment-status-badge.shipment-transit{
  background:#2563eb!important;
  color:#ffffff!important;
}
#critical-path-table .shipment-status-badge.shipment-landed{
  background:#15803d!important;
  color:#ffffff!important;
}

/* V1.8.9.71 — Smart Critical Path save control */
.critical-save-bar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:10px 12px 8px;
  border-bottom:1px solid #e5e7eb;
  background:#ffffff;
  position:sticky;
  left:0;
  z-index:7;
}
.critical-save-btn{
  min-width:132px;
  height:36px;
  border-radius:8px;
  border:1px solid transparent;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-family:Calibri,"Segoe UI",Arial,sans-serif;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(15,35,63,.12);
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.critical-save-btn.dirty{
  background:#10233f;
  color:#ffffff;
  border-color:#10233f;
}
.critical-save-btn.dirty:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(15,35,63,.2);
}
.critical-save-btn.saved{
  background:#ecfdf3;
  color:#166534;
  border-color:#bbf7d0;
  cursor:default;
  box-shadow:none;
}
.critical-save-btn:disabled{
  opacity:1;
}
.critical-save-icon{
  font-size:12px;
  line-height:1;
}

/* V1.8.9.72 — compact always-clickable Critical Path Save button */
.critical-save-bar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding:6px 8px 6px;
  border-bottom:1px solid #e5e7eb;
  background:#ffffff;
}
.critical-save-btn,
.critical-save-btn.saved,
.critical-save-btn.dirty{
  min-width:0!important;
  width:auto!important;
  height:28px!important;
  padding:0 12px!important;
  border-radius:5px!important;
  border:1px solid #10233f!important;
  background:#10233f!important;
  color:#ffffff!important;
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:700!important;
  cursor:pointer!important;
  box-shadow:none!important;
  opacity:1!important;
}
.critical-save-btn:hover{
  background:#183455!important;
}

/* V1.8.9.73 compact Save button */
#critical-path-save-btn{min-width:0!important;width:auto!important;height:28px!important;padding:0 12px!important;font-size:12px!important;}
#critical-path-save-btn:disabled{cursor:wait!important;opacity:.7!important;}

/* V1.8.9.74 — Received checkbox green when checked */
#critical-path-table .received-check{
  accent-color:#15803d!important;
}
#critical-path-table .received-check.received-check-checked{
  accent-color:#15803d!important;
}

/* V1.8.9.75 — locked Bulk Production */
#critical-path-table .stage-view-badge{
  user-select:none;
}

/* V1.8.9.76 — Shipment Control is item-specific */
.shipment-control-table{
  min-width:1560px!important;
}
.shipment-item-code strong{
  color:#10233f!important;
  font-weight:700!important;
}
.shipment-item-banner{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:9px 11px;
  margin:0 0 12px;
  border:1px solid #dbe3ec;
  border-radius:6px;
  background:#f8fafc;
  color:#10233f;
}
.shipment-item-banner strong{
  font-size:12px;
}
.shipment-item-banner span{
  font-size:12px;
  color:#475569;
}

/* V1.8.9.77 — multi-item shipment allocation */
.shipment-ready-panel{
  margin:10px 12px 14px!important;
  border:1px solid #dbe3ec!important;
  border-radius:6px!important;
  background:#fff!important;
  overflow:hidden!important;
}
.shipment-ready-head{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  padding:10px 12px!important;
  background:#f8fafc!important;
  border-bottom:1px solid #e2e8f0!important;
}
.shipment-ready-head strong{
  display:block!important;
  color:#10233f!important;
  font-size:12px!important;
}
.shipment-ready-head span{
  display:block!important;
  margin-top:2px!important;
  color:#64748b!important;
  font-size:12px!important;
}
.shipment-consolidated-create{flex:0 0 auto!important;white-space:nowrap!important}
.consolidated-shipment-banner{border-color:#93c5fd!important;background:#eff6ff!important}
.shipment-allocation-po-badge{
  display:inline-flex!important;align-items:center!important;width:max-content!important;margin-bottom:3px!important;
  padding:2px 6px!important;border:1px solid #93c5fd!important;border-radius:4px!important;
  background:#dbeafe!important;color:#1e40af!important;font-weight:800!important;font-size:12px!important
}
.shipment-ready-po{
  display:grid!important;
  grid-template-columns:160px minmax(240px,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:9px 12px!important;
  border-bottom:1px solid #edf1f5!important;
}
.shipment-ready-po:last-child{border-bottom:0!important;}
.shipment-ready-po-main strong{
  display:block!important;
  color:#10233f!important;
  font-size:12px!important;
}
.shipment-ready-po-main span{
  display:block!important;
  color:#64748b!important;
  font-size:12px!important;
  margin-top:2px!important;
}
.shipment-ready-codes{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
}
.shipment-ready-codes span{
  display:inline-block!important;
  padding:3px 7px!important;
  border-radius:12px!important;
  background:#eef2f7!important;
  color:#334155!important;
  font-size:12px!important;
  font-weight:700!important;
}
.shipment-open-po-btn{
  height:29px!important;
  padding:0 12px!important;
  font-size:12px!important;
}
.shipment-ready-empty{
  padding:12px!important;
  color:#64748b!important;
  font-size:12px!important;
}
.shipment-item-selector{
  padding:10px!important;
  border:1px solid #dbe3ec!important;
  border-radius:6px!important;
  background:#f8fafc!important;
}
.shipment-item-select-list{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  margin-top:6px!important;
}
.shipment-item-select-row{
  display:grid!important;
  grid-template-columns:24px 110px minmax(160px,1fr) 120px 90px!important;
  align-items:center!important;
  gap:8px!important;
  padding:7px 8px!important;
  border:1px solid #e2e8f0!important;
  border-radius:5px!important;
  background:#fff!important;
  cursor:pointer!important;
}
.shipment-item-select-row input[type="checkbox"]{
  width:16px!important;
  height:16px!important;
}
.shipment-item-select-code{
  color:#10233f!important;
  font-weight:700!important;
}
.shipment-item-select-name,.shipment-item-select-colour,.shipment-item-select-qty{
  font-size:12px!important;
  color:#475569!important;
}
.shipment-item-select-qty{text-align:right!important;}
.shipment-membership-lock{
  margin:5px 0 7px!important;
  padding:6px 8px!important;
  border-radius:4px!important;
  background:#fff7ed!important;
  color:#9a3412!important;
  font-size:12px!important;
}
.shipment-control-table{
  min-width:1650px!important;
}
.shipment-number-cell strong{
  color:#10233f!important;
}

/* V1.8.9.78 — Shipment Control one-screen compact layout */
.shipment-control-wrap{
  overflow-x:hidden!important;
  overflow-y:visible!important;
  width:100%!important;
}
.shipment-control-table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}
.shipment-control-table thead th{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.05!important;
  font-size:12px!important;
  padding:6px 3px!important;
}
.shipment-control-table tbody td{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  line-height:1.15!important;
  font-size:12px!important;
  padding:6px 3px!important;
}
.shipment-control-table th:nth-child(1),
.shipment-control-table td:nth-child(1){width:5.5%!important;}
.shipment-control-table th:nth-child(2),
.shipment-control-table td:nth-child(2){width:5.5%!important;}
.shipment-control-table th:nth-child(3),
.shipment-control-table td:nth-child(3){width:3.2%!important;text-align:center!important;}
.shipment-control-table th:nth-child(4),
.shipment-control-table td:nth-child(4){width:7%!important;}
.shipment-control-table th:nth-child(5),
.shipment-control-table td:nth-child(5){width:9%!important;}
.shipment-control-table th:nth-child(6),
.shipment-control-table td:nth-child(6){width:4%!important;}
.shipment-control-table th:nth-child(7),
.shipment-control-table td:nth-child(7){width:6%!important;}
.shipment-control-table th:nth-child(8),
.shipment-control-table td:nth-child(8){width:6%!important;}
.shipment-control-table th:nth-child(9),
.shipment-control-table td:nth-child(9){width:8%!important;}
.shipment-control-table th:nth-child(10),
.shipment-control-table td:nth-child(10){width:6%!important;}
.shipment-control-table th:nth-child(11),
.shipment-control-table td:nth-child(11){width:6%!important;}
.shipment-control-table th:nth-child(12),
.shipment-control-table td:nth-child(12){width:6.5%!important;}
.shipment-control-table th:nth-child(13),
.shipment-control-table td:nth-child(13){width:6.5%!important;}
.shipment-control-table th:nth-child(14),
.shipment-control-table td:nth-child(14){width:4.5%!important;}
.shipment-control-table th:nth-child(15),
.shipment-control-table td:nth-child(15){width:6.5%!important;}
.shipment-control-table th:nth-child(16),
.shipment-control-table td:nth-child(16){width:8%!important;}
.shipment-control-table th:nth-child(17),
.shipment-control-table td:nth-child(17){width:3%!important;}
.shipment-control-table th:nth-child(18),
.shipment-control-table td:nth-child(18){width:3%!important;}

.shipment-vertical-list{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}
.shipment-vertical-list>div{
  display:block!important;
  padding-bottom:2px!important;
  border-bottom:1px solid #eef2f7!important;
}
.shipment-vertical-list>div:last-child{
  padding-bottom:0!important;
  border-bottom:0!important;
}
.shipment-product-names{
  white-space:normal!important;
}
.shipment-code-list{
  font-weight:700!important;
  color:#10233f!important;
}
.shipment-name-list{
  color:#334155!important;
}
.shipment-carrier-cell{
  white-space:normal!important;
}
.shipment-inline-date{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:24px!important;
  font-size:12px!important;
  padding:1px 2px!important;
}
.shipment-current-stop{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:24px!important;
  font-size:12px!important;
  padding:2px 3px!important;
}
.shipment-control-status{
  width:100%!important;
  min-width:0!important;
  height:24px!important;
  padding:0 3px!important;
  font-size:12px!important;
}
.shipment-icon-col{
  width:auto!important;
  min-width:0!important;
}
.shipment-icon-btn,
.shipment-doc-empty{
  width:24px!important;
  height:24px!important;
}

/* V1.8.9.79 — Shipment Control typography aligned with Critical Path */
.shipment-control-table thead th{
  font-size:12px!important;
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
}
.shipment-control-table tbody td{
  font-size:12px!important;
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
}
.shipment-inline-date,
.shipment-current-stop,
.shipment-control-status{
  font-size:12px!important;
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
}
.shipment-vertical-list,
.shipment-vertical-list>div,
.shipment-product-codes,
.shipment-product-names,
.shipment-carrier-cell,
.shipment-number-cell,
.shipment-po-cell,
.shipment-item-count,
.shipment-qty-cell{
  font-size:12px!important;
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
}

/* V1.8.9.80 — every visible element uses exactly 12px */
html,
body,
*,
*::before,
*::after{
  font-size:12px!important;
}

/* V1.8.9.81 — user permissions */
.master-admin-note{display:flex!important;flex-direction:column!important;gap:5px!important;padding:10px!important;border:1px solid #bbf7d0!important;border-radius:6px!important;background:#f0fdf4!important;color:#166534!important}
.permissions-modal-open .modal-card{width:min(1080px,94vw)!important;max-width:1080px!important}
.permissions-modal-open .modal-body{max-height:76vh!important;overflow:auto!important}
.user-permissions-form{display:flex!important;flex-direction:column!important;gap:12px!important}
.permission-summary-bar{display:flex!important;align-items:center!important;gap:10px!important;padding:10px!important;border:1px solid #dbe3ec!important;border-radius:6px!important;background:#f8fafc!important}
.permission-summary-bar>button{margin-left:auto!important}
.permission-section{border:1px solid #dbe3ec!important;border-radius:6px!important;padding:12px!important;background:#fff!important}
.permission-section h3,.permission-column-group h4{margin:0 0 8px!important}
.permission-page-grid{display:grid!important;grid-template-columns:repeat(2,minmax(280px,1fr))!important;gap:6px 12px!important}
.permission-page-row{display:grid!important;grid-template-columns:1fr 145px!important;align-items:center!important;gap:8px!important;padding:5px 0!important;border-bottom:1px solid #eef2f7!important}
.permission-column-group{margin-top:10px!important;border-top:1px solid #e5e7eb!important;padding-top:10px!important}
.permission-column-head,.permission-column-row{display:grid!important;grid-template-columns:minmax(180px,1fr) 70px 70px!important;align-items:center!important;gap:8px!important;padding:4px 0!important}
.permission-column-head{font-weight:700!important;color:#475569!important;border-bottom:1px solid #cbd5e1!important}
.permission-column-row{border-bottom:1px solid #f1f5f9!important}
.permission-column-row label,.permission-column-head span:not(:first-child){text-align:center!important}
.permission-action-grid{display:grid!important;grid-template-columns:repeat(2,minmax(280px,1fr))!important;gap:5px 12px!important}
.permission-action-row{display:flex!important;align-items:center!important;gap:8px!important;padding:5px 0!important}
.permission-scope-grid{display:grid!important;grid-template-columns:repeat(3,minmax(180px,1fr))!important;gap:10px!important}
.permission-po-scope{display:grid!important;grid-template-columns:repeat(3,minmax(180px,1fr))!important;gap:6px 10px!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important}
.permission-sticky-actions{position:sticky!important;bottom:-1px!important;background:#fff!important;padding-top:10px!important;border-top:1px solid #dbe3ec!important;z-index:3!important}
.user-permission-table td,.user-permission-table th{vertical-align:middle!important}
@media(max-width:900px){.permission-page-grid,.permission-action-grid,.permission-po-scope,.permission-scope-grid{grid-template-columns:1fr!important}}

/* V1.8.9.83 — Product CSV import */
.product-import-panel{margin-bottom:14px!important}
.product-import-meta{display:flex!important;align-items:center!important;gap:12px!important;padding:0 14px 12px!important;color:#475569!important}
.product-import-meta .link-btn{margin-left:auto!important}
.csv-import-modal-open .modal-card{width:min(1080px,94vw)!important;max-width:1080px!important}
.csv-import-modal-open .modal-body{max-height:78vh!important;overflow:auto!important}
.csv-import-start,.product-csv-map-form{display:flex!important;flex-direction:column!important;gap:12px!important}
.csv-import-help,.csv-import-summary{display:flex!important;flex-direction:column!important;gap:4px!important;padding:10px!important;border:1px solid #dbe3ec!important;border-radius:6px!important;background:#f8fafc!important}
.csv-import-note{padding:8px 10px!important;border-radius:5px!important;background:#fff7ed!important;color:#9a3412!important;border:1px solid #fed7aa!important}
.csv-mapping-grid{border:1px solid #dbe3ec!important;border-radius:6px!important;overflow:hidden!important}
.csv-mapping-head,.csv-mapping-row{display:grid!important;grid-template-columns:220px minmax(260px,1fr)!important;gap:10px!important;align-items:center!important;padding:7px 10px!important}
.csv-mapping-head{font-weight:700!important;background:#f8fafc!important;border-bottom:1px solid #dbe3ec!important}
.csv-mapping-row{border-bottom:1px solid #eef2f7!important}
.csv-mapping-row:last-child{border-bottom:0!important}
.csv-required{color:#b91c1c!important}
.csv-duplicate-option{max-width:480px!important}
.csv-preview-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:6px!important}
.csv-preview-wrap{max-height:280px!important;overflow:auto!important;border:1px solid #e2e8f0!important;border-radius:5px!important}
.csv-preview-table{min-width:900px!important}
.csv-status{display:inline-block!important;padding:3px 7px!important;border-radius:10px!important;font-weight:700!important;white-space:nowrap!important}
.csv-new{background:#dcfce7!important;color:#166534!important}
.csv-duplicate{background:#fef3c7!important;color:#92400e!important}
.csv-invalid{background:#fee2e2!important;color:#991b1b!important}
.csv-import-result{display:grid!important;grid-template-columns:repeat(4,minmax(120px,1fr))!important;gap:10px!important;margin-bottom:14px!important}
.csv-import-result>div{display:flex!important;flex-direction:column!important;gap:4px!important;padding:12px!important;border:1px solid #dbe3ec!important;border-radius:6px!important;background:#f8fafc!important}
@media(max-width:800px){
 .csv-mapping-head,.csv-mapping-row{grid-template-columns:1fr!important}
 .csv-import-result{grid-template-columns:repeat(2,1fr)!important}
}

/* V1.8.9.85 — show every Product CSV row in preview */
.csv-preview-wrap{
  max-height:520px!important;
  overflow:auto!important;
}

/* V1.8.9.86 — wide Purchase Order editor with a single aligned product row */
.po-modal-card{
  width:98vw!important;
  max-width:98vw!important;
  max-height:96vh!important;
  padding:8px!important;
  border-radius:7px!important;
}
.po-modal-card .modal-head{margin-bottom:7px!important}
.po-modal-card .modal-body,
.po-modal-card #po-form,
.po-modal-card .po-products-card,
.po-modal-card #po-lines,
.po-modal-card .po-line{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
.po-modal-card .po-products-card{
  padding:7px!important;
  overflow:hidden!important;
}
.po-modal-card .po-line{
  padding:5px!important;
  margin-bottom:6px!important;
  overflow:hidden!important;
}
.po-modal-card .po-row-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
.po-modal-card .po-row{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:flex-end!important;
  gap:4px!important;
  width:100%!important;
  min-width:0!important;
}
.po-modal-card .po-line-number{
  flex:0 0 32px!important;
  width:32px!important;
  min-width:32px!important;
}
.po-modal-card .po-cell{min-width:0!important}
.po-modal-card .po-code{
  flex:0 1 118px!important;
  width:118px!important;
}
.po-modal-card .po-name{
  flex:1 1 160px!important;
  width:auto!important;
  min-width:110px!important;
}
.po-modal-card .po-colour-cell{
  flex:0 1 95px!important;
  width:95px!important;
}
.po-modal-card .po-sizes{
  display:flex!important;
  flex:1 1 auto!important;
  flex-wrap:nowrap!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  gap:2px!important;
  min-width:0!important;
}
.po-modal-card .po-size{
  flex:1 1 34px!important;
  width:34px!important;
  min-width:28px!important;
  max-width:44px!important;
}
.po-modal-card .po-size input{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:29px!important;
  padding:2px!important;
  text-align:center!important;
}
.po-modal-card .po-totalqty{
  flex:0 0 58px!important;
  width:58px!important;
}
.po-modal-card .po-cost-cell{
  flex:0 0 68px!important;
  width:68px!important;
}
.po-modal-card .po-amount{
  flex:0 0 82px!important;
  width:82px!important;
}
.po-modal-card .po-remove{
  flex:0 0 54px!important;
  width:54px!important;
}
.po-modal-card .po-cell input,
.po-modal-card .po-cell select{
  width:100%!important;
  min-width:0!important;
}
.po-modal-card .po-cell>label,
.po-modal-card .po-line-number>label,
.po-modal-card .po-size>label{
  min-height:26px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  line-height:1.05!important;
  white-space:nowrap!important;
}
.po-modal-card .po-code>label,
.po-modal-card .po-name>label,
.po-modal-card .po-colour-cell>label{
  justify-content:flex-start!important;
}

/* V1.8.9.87 — professional PO product line widths and alignment */
.po-modal-card{
  width:98vw!important;
  max-width:98vw!important;
  padding:10px!important;
}
.po-modal-card .po-products-card{
  overflow:hidden!important;
}
.po-modal-card .po-row-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding-bottom:3px!important;
}
.po-modal-card .po-row{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:flex-end!important;
  gap:5px!important;
  width:max-content!important;
  min-width:100%!important;
}
.po-modal-card .po-line-number{
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
}
.po-modal-card .po-code{
  flex:0 0 150px!important;
  width:150px!important;
  min-width:150px!important;
}
.po-modal-card .po-name{
  flex:0 0 220px!important;
  width:220px!important;
  min-width:220px!important;
}
.po-modal-card .po-colour-cell{
  flex:0 0 125px!important;
  width:125px!important;
  min-width:125px!important;
}
.po-modal-card .po-sizes{
  display:flex!important;
  flex:0 0 auto!important;
  flex-wrap:nowrap!important;
  align-items:flex-end!important;
  gap:3px!important;
}
.po-modal-card .po-size{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
}
.po-modal-card .po-size input{
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:30px!important;
  padding:3px!important;
  text-align:center!important;
}
.po-modal-card .po-totalqty{
  flex:0 0 66px!important;
  width:66px!important;
  min-width:66px!important;
}
.po-modal-card .po-cost-cell{
  flex:0 0 82px!important;
  width:82px!important;
  min-width:82px!important;
}
.po-modal-card .po-amount{
  flex:0 0 100px!important;
  width:100px!important;
  min-width:100px!important;
}
.po-modal-card .po-remove{
  flex:0 0 66px!important;
  width:66px!important;
  min-width:66px!important;
}
.po-modal-card .po-code select,
.po-modal-card .po-colour-cell select,
.po-modal-card .po-name input,
.po-modal-card .po-cost-cell input{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.po-modal-card .po-code select,
.po-modal-card .po-colour-cell select{
  text-overflow:ellipsis!important;
}
.po-modal-card .po-cell>label,
.po-modal-card .po-line-number>label,
.po-modal-card .po-size>label{
  min-height:28px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
.po-modal-card .po-code>label,
.po-modal-card .po-name>label,
.po-modal-card .po-colour-cell>label{
  justify-content:flex-start!important;
}
.po-modal-card .po-row::-webkit-scrollbar,
.po-modal-card .po-row-scroll::-webkit-scrollbar{
  height:8px!important;
}
.po-modal-card .po-row-scroll::-webkit-scrollbar-thumb{
  background:#cbd5e1!important;
  border-radius:999px!important;
}
.po-modal-card .po-row-scroll::-webkit-scrollbar-track{
  background:#f1f5f9!important;
}

/* V1.8.9.88 — Purchase Order product rows styled like Shipment Control */
.po-modal-card .po-products-card{
  padding:0!important;
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
  background:#ffffff!important;
  overflow:hidden!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.po-modal-card .po-products-card>.panel-head{
  margin:0!important;
  padding:8px 10px!important;
  background:#f4f5f7!important;
  border-bottom:1px solid #d7dde5!important;
}
.po-modal-card #po-lines{
  padding:0!important;
  background:#ffffff!important;
}
.po-modal-card .po-line{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:#ffffff!important;
}
.po-modal-card .po-line+.po-line{
  border-top:1px solid #cfd6de!important;
}
.po-modal-card .po-row-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:0!important;
  background:#ffffff!important;
}
.po-modal-card .po-row{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:0!important;
  width:max-content!important;
  min-width:100%!important;
  background:#ffffff!important;
}
.po-modal-card .po-line-number,
.po-modal-card .po-cell,
.po-modal-card .po-size{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  margin:0!important;
  padding:0!important;
  border-right:1px solid #d7dde5!important;
  background:#ffffff!important;
  box-sizing:border-box!important;
}
.po-modal-card .po-remove{
  border-right:0!important;
}
.po-modal-card .po-sizes{
  display:flex!important;
  flex:0 0 auto!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:0!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
.po-modal-card .po-line-number>label,
.po-modal-card .po-cell>label,
.po-modal-card .po-size>label{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:28px!important;
  min-height:28px!important;
  margin:0!important;
  padding:5px 6px!important;
  background:#f2f3f5!important;
  color:#374151!important;
  border-bottom:1px solid #cfd6de!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-sizing:border-box!important;
}
.po-modal-card .po-code>label,
.po-modal-card .po-name>label,
.po-modal-card .po-colour-cell>label{
  justify-content:flex-start!important;
}
.po-modal-card .po-line-number>span{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:31px!important;
  min-height:31px!important;
  padding:0 5px!important;
  background:#ffffff!important;
  color:#374151!important;
  box-sizing:border-box!important;
}
.po-modal-card .po-cell input,
.po-modal-card .po-cell select,
.po-modal-card .po-size input{
  width:100%!important;
  height:31px!important;
  min-height:31px!important;
  margin:0!important;
  padding:4px 6px!important;
  border:0!important;
  border-radius:0!important;
  background:#ffffff!important;
  color:#374151!important;
  font-size:12px!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}
.po-modal-card .po-size input{
  padding:4px 2px!important;
  text-align:center!important;
}
.po-modal-card .po-cell input:focus,
.po-modal-card .po-cell select:focus,
.po-modal-card .po-size input:focus{
  outline:2px solid #94a3b8!important;
  outline-offset:-2px!important;
}
.po-modal-card .calc-box{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:31px!important;
  min-height:31px!important;
  min-width:0!important;
  margin:0!important;
  padding:4px 5px!important;
  border:0!important;
  border-radius:0!important;
  background:#fafbfc!important;
  color:#374151!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
  box-sizing:border-box!important;
}
.po-modal-card .po-remove .small-btn{
  height:31px!important;
  min-height:31px!important;
  margin:0!important;
  padding:0 8px!important;
  border:0!important;
  border-radius:0!important;
  background:#ffffff!important;
  color:#b91c1c!important;
  text-decoration:underline!important;
  box-shadow:none!important;
}
.po-modal-card .po-remove .small-btn:hover{
  background:#fef2f2!important;
}
.po-modal-card .po-line-number{flex:0 0 42px!important;width:42px!important;min-width:42px!important}
.po-modal-card .po-code{flex:0 0 150px!important;width:150px!important;min-width:150px!important}
.po-modal-card .po-name{flex:0 0 220px!important;width:220px!important;min-width:220px!important}
.po-modal-card .po-colour-cell{flex:0 0 125px!important;width:125px!important;min-width:125px!important}
.po-modal-card .po-size{flex:0 0 40px!important;width:40px!important;min-width:40px!important;max-width:40px!important}
.po-modal-card .po-totalqty{flex:0 0 68px!important;width:68px!important;min-width:68px!important}
.po-modal-card .po-cost-cell{flex:0 0 82px!important;width:82px!important;min-width:82px!important}
.po-modal-card .po-amount{flex:0 0 102px!important;width:102px!important;min-width:102px!important}
.po-modal-card .po-remove{flex:0 0 66px!important;width:66px!important;min-width:66px!important}

/* Fallback if an older browser/storage snapshot still contains number inputs. */
.po-modal-card .size-qty[type="number"]{
  -moz-appearance:textfield!important;
  appearance:textfield!important;
}
.po-modal-card .size-qty[type="number"]::-webkit-outer-spin-button,
.po-modal-card .size-qty[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance:none!important;
  margin:0!important;
}

/* V1.8.9.90 — Ready to Ship workflow dependency */
#critical-path-table .ready-status:disabled{
  cursor:not-allowed!important;
  opacity:.55!important;
  background:#f1f5f9!important;
  color:#64748b!important;
}

/* V1.8.9.92 — Shipment Control delete action */
.shipment-delete-col,
.shipment-delete-cell{
  width:64px!important;
  min-width:64px!important;
  text-align:center!important;
}
.shipment-delete-btn{
  height:25px!important;
  min-height:25px!important;
  padding:0 7px!important;
  border:1px solid #fecaca!important;
  border-radius:3px!important;
  background:#fff!important;
  color:#b91c1c!important;
  font-size:12px!important;
  font-weight:600!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
.shipment-delete-btn:hover{
  background:#fef2f2!important;
  border-color:#fca5a5!important;
}

/* V1.8.9.93 — Ready to Ship checkbox and date alignment */
#critical-path-table .ready-check,
#critical-path-table .received-check{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  cursor:pointer!important;
  vertical-align:middle!important;
}
#critical-path-table .ready-check:disabled,
#critical-path-table .received-check:disabled{
  cursor:not-allowed!important;
  opacity:.55!important;
}
#critical-path-table td:has(.ready-check),
#critical-path-table td.critical-received-cell{
  text-align:center!important;
  vertical-align:middle!important;
}
#critical-path-table .critical-stage-stack:has(.ready-check){
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  min-height:43px!important;
}
#critical-path-table .critical-stage-stack:has(.ready-check) .critical-stage-date{
  margin:0!important;
  line-height:1!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* V1.8.9.94 — two-stage QC feedback + Critical Path review workflow */
.qc-feedback-cell{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:4px!important;
}
.qc-feedback-btn,.qc-review-btn{
  min-width:86px!important;
  white-space:nowrap!important;
}
.qc-feedback-date,.qc-feedback-received-date,.qc-awaiting-feedback{
  font-size:12px!important;
  line-height:1.1!important;
  color:#64748b!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.modal.qc-feedback-modal-open .modal-card,
.modal.qc-review-modal-open .modal-card{
  width:min(1180px,96vw)!important;
  max-width:96vw!important;
  max-height:94vh!important;
}
.qc-feedback-grid{
  display:grid!important;
  grid-template-columns:240px minmax(320px,1fr)!important;
  border:1px solid #d7dde5!important;
  border-radius:5px!important;
  overflow:hidden!important;
  background:#fff!important;
}
.qc-feedback-grid-head,
.qc-review-grid-head{
  padding:8px!important;
  background:#f2f3f5!important;
  border-bottom:1px solid #cfd6de!important;
  font-weight:700!important;
  color:#374151!important;
}
.qc-feedback-grid-head:nth-child(1){border-right:1px solid #d7dde5!important}
.qc-feedback-photo{
  padding:10px!important;
  border-right:1px solid #d7dde5!important;
  border-bottom:1px solid #e0e4e8!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
}
.qc-feedback-photo img,.qc-review-photo img{
  width:150px!important;
  height:105px!important;
  object-fit:cover!important;
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
  cursor:zoom-in!important;
}
.qc-feedback-photo small{color:#64748b!important}
.qc-feedback-note-cell{
  padding:10px!important;
  border-bottom:1px solid #e0e4e8!important;
}
.qc-feedback-note-cell textarea,.qc-feedback-overall textarea,
.qc-review-note-cell textarea{
  width:100%!important;
  min-height:96px!important;
  resize:vertical!important;
}
.qc-feedback-overall{
  margin-top:12px!important;
  padding:12px!important;
  border:1px solid #d7dde5!important;
  border-radius:5px!important;
  background:#fafbfc!important;
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
}
.qc-feedback-overall label{font-weight:700!important}
.qc-inline-photo-preview{
  position:fixed!important;
  inset:0!important;
  z-index:1000!important;
  background:rgba(15,23,42,.78)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
}
.qc-inline-photo-card{
  position:relative!important;
  max-width:92vw!important;
  max-height:90vh!important;
  background:#fff!important;
  padding:12px!important;
  border-radius:7px!important;
  box-shadow:0 16px 50px rgba(0,0,0,.28)!important;
  text-align:center!important;
}
.qc-inline-photo-card img{
  display:block!important;
  max-width:88vw!important;
  max-height:78vh!important;
  object-fit:contain!important;
  margin:0 auto 8px!important;
}
.qc-inline-close{
  position:absolute!important;
  right:8px!important;
  top:8px!important;
  z-index:2!important;
}
.qc-review-meta{
  margin-bottom:10px!important;
  padding:8px 10px!important;
  background:#f8fafc!important;
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
  color:#475569!important;
}
.qc-review-grid{
  display:grid!important;
  grid-template-columns:230px minmax(280px,1fr) minmax(300px,1fr)!important;
  border:1px solid #d7dde5!important;
  border-radius:5px!important;
  overflow:hidden!important;
  background:#fff!important;
}
.qc-review-grid-head{
  border-right:1px solid #d7dde5!important;
}
.qc-review-grid-head:nth-child(3){border-right:0!important}
.qc-review-photo,.qc-review-qc-note,.qc-review-note-cell,.qc-review-overall-label{
  padding:10px!important;
  border-right:1px solid #e0e4e8!important;
  border-bottom:1px solid #e0e4e8!important;
  min-height:122px!important;
}
.qc-review-note-cell{border-right:0!important}
.qc-review-photo{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
}
.qc-review-qc-note{
  white-space:pre-wrap!important;
  line-height:1.4!important;
  background:#fafbfc!important;
}
.qc-review-overall-label{
  display:flex!important;
  align-items:flex-start!important;
  background:#f8fafc!important;
}
.qc-review-overall-qc{font-weight:600!important}
.qc-review-result-row{
  display:flex!important;
  justify-content:flex-end!important;
  margin-top:12px!important;
}
.qc-review-result-row .form-group{
  width:220px!important;
}
.qc-review-result-row select{
  font-weight:700!important;
}
.qc-review-stage{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
}
@media(max-width:850px){
  .qc-feedback-grid{grid-template-columns:170px minmax(260px,1fr)!important}
  .qc-review-grid{grid-template-columns:170px 260px 280px!important;overflow:auto!important}
}

/* V1.8.9.95 — corrected two-stage QC workflow */
.qc-review-result-section{
  margin-top:14px!important;
  padding:14px!important;
  border-top:1px solid #d7dde5!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  text-align:center!important;
}
.qc-review-choice-row{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
}
.qc-review-choice{
  min-width:120px!important;
  min-height:40px!important;
  padding:8px 18px!important;
  border-radius:5px!important;
  font-weight:800!important;
  font-size:12px!important;
  cursor:pointer!important;
}
.qc-review-choice-fail{
  background:#fee2e2!important;
  border:2px solid #fca5a5!important;
  color:#991b1b!important;
}
.qc-review-choice-pass{
  background:#dcfce7!important;
  border:2px solid #86efac!important;
  color:#166534!important;
}
.qc-review-choice.selected{
  box-shadow:0 0 0 3px rgba(15,23,42,.14)!important;
  transform:translateY(-1px)!important;
}
.qc-review-choice:disabled:not(.selected){
  opacity:.38!important;
}
.qc-review-submit-row,.qc-centered-actions{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
}
.qc-result-action{
  border:0!important;
  cursor:pointer!important;
  font-family:inherit!important;
}
.qc-result-action:hover{
  box-shadow:0 0 0 2px rgba(15,23,42,.12)!important;
}
#critical-path-table td.critical-current-stage{
  background:#dbeafe!important;
}
#critical-path-table td.critical-current-stage .qc-result,
#critical-path-table td.critical-current-stage .qc-review-btn{
  position:relative!important;
  z-index:1!important;
}
.qc-table th{
  vertical-align:middle!important;
}

/* V1.8.9.96 — QC side can view Critical Path review feedback */
.qc-side-reviewed-report{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
.qc-side-review-grid{
  display:grid!important;
  grid-template-columns:230px minmax(280px,1fr) minmax(300px,1fr)!important;
  border:1px solid #d7dde5!important;
  border-radius:5px!important;
  overflow:hidden!important;
  background:#ffffff!important;
}
.qc-side-review-grid .qc-review-grid-head{
  border-right:1px solid #d7dde5!important;
}
.qc-side-review-grid .qc-review-grid-head:nth-child(3){
  border-right:0!important;
}
.qc-side-review-note{
  padding:10px!important;
  border-right:0!important;
  border-bottom:1px solid #e0e4e8!important;
  min-height:122px!important;
  background:#ffffff!important;
  color:#374151!important;
  white-space:pre-wrap!important;
  line-height:1.4!important;
}
.qc-side-review-overall{
  font-weight:600!important;
}
.qc-side-review-result{
  width:240px!important;
  align-self:center!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  padding:10px 16px!important;
  border-radius:6px!important;
  font-weight:800!important;
  text-align:center!important;
}
.qc-side-review-result span{
  font-size:12px!important;
  font-weight:800!important;
}
.qc-side-review-result small{
  font-size:12px!important;
  font-weight:600!important;
}
.qc-side-result-pass{
  background:#dcfce7!important;
  border:1px solid #86efac!important;
  color:#166534!important;
}
.qc-side-result-fail{
  background:#fee2e2!important;
  border:1px solid #fca5a5!important;
  color:#991b1b!important;
}
@media(max-width:850px){
  .qc-side-review-grid{
    grid-template-columns:170px 260px 280px!important;
    overflow:auto!important;
  }
}

/* V1.8.9.97 — QC table aligned to Shipment Control */
.qc-page-shell{
  background:#ffffff!important;
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
  overflow:hidden!important;
  box-shadow:0 1px 2px rgba(15,23,42,.05)!important;
}
.qc-titlebar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:8px 10px!important;
  background:#f4f5f7!important;
  border-bottom:1px solid #d7dde5!important;
}
.qc-title{
  font-weight:700!important;
  color:#334155!important;
}
.qc-subtitle,.qc-count{
  color:#64748b!important;
}
.qc-table-wrap{
  overflow:auto!important;
  max-width:100%!important;
  background:#ffffff!important;
}
.qc-table{
  width:100%!important;
  min-width:1100px!important;
  border-collapse:collapse!important;
  table-layout:auto!important;
  background:#ffffff!important;
}
.qc-table thead th{
  background:#f2f3f5!important;
  color:#374151!important;
  font-weight:700!important;
  line-height:1.15!important;
  padding:7px 6px!important;
  border-right:1px solid #d7dde5!important;
  border-bottom:1px solid #cfd6de!important;
  text-align:left!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
}
.qc-table tbody td{
  background:#ffffff!important;
  color:#374151!important;
  line-height:1.25!important;
  padding:6px!important;
  border-right:1px solid #e0e4e8!important;
  border-bottom:1px solid #e0e4e8!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}
.qc-table tbody tr:hover td{
  background:#fafbfc!important;
}
.qc-table .qc-po-cell strong{
  color:#10233f!important;
  font-weight:700!important;
}
.qc-table .qc-code-cell{
  font-weight:700!important;
  color:#10233f!important;
}
.qc-group-head{
  text-align:center!important;
  background:#e9edf2!important;
}
.qc-group-first,
.qc-first-section-start{
  border-left:2px solid #b9c3cf!important;
}
.qc-first-section-end{
  border-right:2px solid #b9c3cf!important;
}
.qc-group-second,
.qc-second-section-start{
  border-left:2px solid #b9c3cf!important;
}
.qc-second-section-end{
  border-right:2px solid #b9c3cf!important;
}
.qc-sub-head-row th{
  text-align:center!important;
  background:#f7f8fa!important;
}
.qc-table .qc-photo-cell,
.qc-table .qc-feedback-cell{
  justify-content:center!important;
}
.qc-table .photo-icon-btn,
.qc-table .upload-photo-btn,
.qc-table .qc-feedback-btn{
  min-height:25px!important;
  border-radius:3px!important;
  padding:4px 7px!important;
}
.qc-note-user{
  margin-bottom:5px!important;
  padding-bottom:4px!important;
  border-bottom:1px solid #e5e7eb!important;
  color:#475569!important;
  font-weight:700!important;
  line-height:1.2!important;
}
.qc-review-result-meta{
  padding:6px 10px!important;
  border-radius:4px!important;
  background:#f8fafc!important;
  border:1px solid #d7dde5!important;
  color:#475569!important;
  text-align:center!important;
}
.qc-side-review-result>div{
  font-weight:700!important;
}

/* V1.8.9.98 — APP-WIDE DEFAULT TABLE SYSTEM */
table{
  width:100%!important;
  border-collapse:collapse!important;
  border-spacing:0!important;
  background:#ffffff!important;
  color:#374151!important;
  font-family:Calibri,"Segoe UI",Arial,sans-serif!important;
}
table thead th{
  background:#f2f3f5!important;
  color:#374151!important;
  font-weight:700!important;
  line-height:1.15!important;
  padding:7px 6px!important;
  border-right:1px solid #d7dde5!important;
  border-bottom:1px solid #cfd6de!important;
  text-align:left!important;
  vertical-align:middle!important;
}
table thead th:last-child{border-right:0!important}
table tbody td{
  background:#ffffff!important;
  color:#374151!important;
  line-height:1.25!important;
  padding:6px!important;
  border-right:1px solid #e0e4e8!important;
  border-bottom:1px solid #e0e4e8!important;
  vertical-align:middle!important;
}
table tbody td:last-child{border-right:0!important}
table tbody tr:hover td{background:#fafbfc!important}
table tbody tr:last-child td{border-bottom:0!important}

.table-wrap,
.critical-path-scroll,
.qc-table-wrap,
.shipment-control-wrap{
  max-width:100%!important;
  background:#ffffff!important;
  overflow:auto!important;
}
.panel>.table-wrap,
.panel .table-wrap:not(.critical-path-scroll),
.csv-preview-wrap{
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
  background:#ffffff!important;
  overflow:auto!important;
}
.qc-page-shell .qc-table-wrap,
.shipment-page-shell .shipment-control-wrap{
  border:0!important;
  border-radius:0!important;
}

/* Critical Path uses the same default table style. */
#critical-path-table{
  border-collapse:collapse!important;
  background:#ffffff!important;
}
#critical-path-table thead th{
  background:#f2f3f5!important;
  color:#374151!important;
  padding:7px 6px!important;
  border-right:1px solid #d7dde5!important;
  border-bottom:1px solid #cfd6de!important;
  text-align:left!important;
  vertical-align:middle!important;
  line-height:1.15!important;
}
#critical-path-table tbody td{
  background:#ffffff!important;
  color:#374151!important;
  padding:6px!important;
  border-right:1px solid #e0e4e8!important;
  border-bottom:1px solid #e0e4e8!important;
  vertical-align:middle!important;
}
#critical-path-table tbody tr:nth-child(even) td,
#critical-path-table tbody tr.po-group-0 td,
#critical-path-table tbody tr.po-group-1 td{
  background:#ffffff!important;
}
#critical-path-table tbody tr:hover td,
#critical-path-table tbody tr.po-group-0:hover td,
#critical-path-table tbody tr.po-group-1:hover td{
  background:#fafbfc!important;
}
#critical-path-table tbody tr.po-group-start td{
  border-top:1px solid #cfd6de!important;
}
#critical-path-table tbody tr.po-group-end td{
  border-bottom:1px solid #cfd6de!important;
}
#critical-path-table tbody tr.po-group-multi td:first-child{
  border-left:0!important;
}
#critical-path-table tbody tr.critical-late-row td{
  background:#fff7f7!important;
}
#critical-path-table tbody tr.critical-late-row:hover td{
  background:#fef2f2!important;
}
#critical-path-table tbody tr td.critical-current-stage,
#critical-path-table tbody tr:nth-child(even) td.critical-current-stage,
#critical-path-table tbody tr:hover td.critical-current-stage,
#critical-path-table tbody tr.po-group-0 td.critical-current-stage,
#critical-path-table tbody tr.po-group-1 td.critical-current-stage,
#critical-path-table tbody tr.po-group-0:hover td.critical-current-stage,
#critical-path-table tbody tr.po-group-1:hover td.critical-current-stage,
#critical-path-table tbody tr.critical-late-row td.critical-current-stage,
#critical-path-table tbody tr.critical-late-row:hover td.critical-current-stage{
  background:#2563eb!important;
  background-color:#2563eb!important;
  color:#ffffff!important;
}

/* QC grouped headers retain their joined structure. */
.qc-table .qc-group-head{
  text-align:center!important;
  background:#e9edf2!important;
}
.qc-table .qc-sub-head-row th{
  text-align:center!important;
  background:#f7f8fa!important;
}

.user-permission-table,
.csv-preview-table,
.po-doc-table{
  border-collapse:collapse!important;
  background:#ffffff!important;
}
table .row-actions{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
table td input:not([type="checkbox"]):not([type="radio"]),
table td select{
  min-height:25px!important;
  box-sizing:border-box!important;
}

/* V1.8.9.99 — Settings hub */
#settings-nav-holder{margin-bottom:10px!important}
.settings-nav-btn{width:100%!important;text-align:left!important;margin:0!important}
.settings-page{display:flex!important;flex-direction:column!important;gap:14px!important}
.settings-section{background:#fff!important;border:1px solid #d7dde5!important;border-radius:4px!important;overflow:hidden!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important}
.settings-section-head{padding:9px 11px!important;background:#f4f5f7!important;border-bottom:1px solid #d7dde5!important}
.settings-section-head h3{margin:0 0 3px!important;color:#334155!important}
.settings-section-head span{color:#64748b!important}
.settings-action-grid,.settings-transfer-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:10px!important}
.settings-action-card,.settings-transfer-card{border:1px solid #d7dde5!important;border-radius:4px!important;background:#fff!important;padding:12px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:8px!important}
.settings-action-card>span,.settings-transfer-card>div>span{color:#64748b!important;line-height:1.4!important}
.settings-transfer-card>div:first-child{display:flex!important;flex-direction:column!important;gap:3px!important}
.settings-button-row{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:7px!important}
.settings-link-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:10px!important}
.settings-link-card{min-height:72px!important;text-align:left!important;background:#fff!important;border:1px solid #d7dde5!important;border-radius:4px!important;color:#334155!important;display:flex!important;flex-direction:column!important;justify-content:center!important;gap:4px!important}
.settings-link-card:hover{background:#fafbfc!important;border-color:#b9c3cf!important}
.settings-link-card span{color:#64748b!important;line-height:1.3!important}
.settings-server-backup-note{margin:0 10px 10px!important;padding:9px 10px!important;border:1px solid #bfdbfe!important;border-radius:4px!important;background:#eff6ff!important;color:#1e3a5f!important;display:flex!important;flex-direction:column!important;gap:3px!important}
.settings-empty{padding:18px!important;color:#64748b!important}
@media(max-width:850px){.settings-action-grid,.settings-transfer-grid,.settings-link-grid{grid-template-columns:1fr!important}}

/* V1.8.9.100 — Settings must remain visible in the sidebar */
@media(min-width:721px){
  .sidebar{
    position:sticky!important;
    top:0!important;
    height:100vh!important;
    min-height:100vh!important;
    max-height:100vh!important;
    overflow:hidden!important;
    align-self:start!important;
  }

  .sidebar #nav,
  .sidebar nav{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-right:2px!important;
  }

  .sidebar-footer{
    flex:0 0 auto!important;
    margin-top:0!important;
    background:var(--riman-navy)!important;
  }

  #settings-nav-holder{
    display:block!important;
    visibility:visible!important;
  }
}

@media(max-width:720px){
  .sidebar{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  .sidebar #nav,
  .sidebar nav{
    overflow:visible!important;
  }
}

/* V1.8.9.101 — professional Purchase Order size-range grouping */
.po-modal-card .po-products-card{overflow:hidden!important}
.po-modal-card #po-lines{display:flex!important;flex-direction:column!important;gap:10px!important;padding:10px!important;background:#f8fafc!important}
.po-size-group{border:1px solid #cfd6de!important;border-radius:4px!important;background:#fff!important;overflow:hidden!important}
.po-size-group-label{display:flex!important;align-items:center!important;gap:10px!important;padding:6px 8px!important;background:#e9edf2!important;border-bottom:1px solid #cfd6de!important;color:#374151!important}
.po-size-group-label span{color:#64748b!important;white-space:normal!important}
.po-group-table-wrap{width:100%!important;overflow-x:auto!important;background:#fff!important}
.po-group-table{width:100%!important;min-width:1160px!important;table-layout:fixed!important;border-collapse:collapse!important;background:#fff!important}
.po-group-table thead th{background:#f2f3f5!important;color:#374151!important;font-weight:700!important;text-align:center!important;vertical-align:middle!important;white-space:normal!important;line-height:1.1!important;padding:7px 4px!important;border-right:1px solid #d7dde5!important;border-bottom:1px solid #cfd6de!important}
.po-group-table tbody td{padding:5px 4px!important;border-right:1px solid #e0e4e8!important;border-bottom:1px solid #e0e4e8!important;vertical-align:middle!important;background:#fff!important;text-align:center!important}
.po-group-table tbody tr:last-child td{border-bottom:0!important}.po-group-table th:last-child,.po-group-table td:last-child{border-right:0!important}
.po-group-table .po-code select,.po-group-table .po-name input,.po-group-table .po-colour-cell select,.po-group-table .po-cost-cell input{width:100%!important;min-width:0!important;height:29px!important;min-height:29px!important;padding:3px 5px!important;box-sizing:border-box!important}
.po-group-table .po-name input{background:#f8fafc!important}.po-group-table .po-size-cell input{width:100%!important;min-width:0!important;height:29px!important;min-height:29px!important;padding:2px!important;text-align:center!important;box-sizing:border-box!important}
.po-group-table .po-size-placeholder{color:#94a3b8!important;font-style:italic!important}.po-group-table .calc-box{width:100%!important;min-width:0!important;height:29px!important;min-height:29px!important;padding:5px 2px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#f8fafc!important;border:1px solid #d1d5db!important;border-radius:3px!important}.po-group-table .po-line-number{font-weight:700!important;color:#10233f!important}.po-group-table .po-remove .small-btn{padding:5px 6px!important;min-height:27px!important}
.po-doc-groups{display:flex!important;flex-direction:column!important;gap:12px!important}.po-doc-size-group{break-inside:avoid!important}.po-doc-size-label{display:flex!important;align-items:center!important;gap:10px!important;padding:6px 8px!important;background:#e9edf2!important;border:1px solid #aeb8c4!important;border-bottom:0!important;color:#374151!important}.po-doc-size-label span{color:#64748b!important}.po-doc-group-table{width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}.po-doc-group-table th,.po-doc-group-table td{padding:4px 3px!important;text-align:center!important;vertical-align:middle!important;overflow-wrap:anywhere!important}.po-doc-group-table .po-doc-code,.po-doc-group-table .po-doc-name{text-align:left!important}.po-doc-grand-totals{display:flex!important;justify-content:flex-end!important;gap:8px!important;margin-top:12px!important}.po-doc-grand-totals>div{min-width:170px!important;display:flex!important;justify-content:space-between!important;gap:10px!important;padding:7px 9px!important;border:1px solid #cfd6de!important;background:#f4f5f7!important}.po-doc-grand-totals span,.po-doc-grand-totals strong{font-weight:700!important;white-space:nowrap!important}

/* V1.8.9.103 — large landscape Purchase Order preview */
.modal-card.preview-modal-card.po-preview-modal{
  width:min(1640px,99vw)!important;
  max-width:99vw!important;
  height:auto!important;
  max-height:97vh!important;
  margin:0!important;
}
.modal-card.po-preview-modal #modal-body{
  max-height:calc(97vh - 54px)!important;
  overflow:hidden!important;
  padding:12px!important;
}
.modal-card.po-preview-modal .preview-toolbar{
  position:sticky!important;top:0!important;z-index:3!important;
  display:flex!important;justify-content:flex-end!important;gap:8px!important;
  margin:0 0 10px!important;padding:0!important;background:#ffffff!important;
}
.po-preview-scroll{
  width:100%!important;max-height:calc(97vh - 112px)!important;
  overflow:auto!important;padding:10px!important;background:#e9edf2!important;
  border:1px solid #d7dde5!important;border-radius:4px!important;
}
.modal-card.po-preview-modal .po-a4{
  width:1420px!important;min-width:1420px!important;max-width:none!important;min-height:194mm!important;
  margin:0 auto!important;padding:18px!important;background:#ffffff!important;
  box-shadow:0 1px 5px rgba(15,23,42,.18)!important;overflow:visible!important;box-sizing:border-box!important;
}
.modal-card.po-preview-modal .po-doc-head{padding-bottom:10px!important;margin-bottom:12px!important}
.modal-card.po-preview-modal .po-doc-meta{grid-template-columns:1.45fr 1fr!important;gap:30px!important;margin-bottom:12px!important;line-height:1.45!important}
.modal-card.po-preview-modal .po-doc-groups{gap:12px!important}
.modal-card.po-preview-modal .po-doc-size-group{width:100%!important;overflow:visible!important}
.modal-card.po-preview-modal .po-doc-group-table{width:100%!important;min-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}
.modal-card.po-preview-modal .po-doc-group-table th,
.modal-card.po-preview-modal .po-doc-group-table td{
  padding:7px 5px!important;white-space:normal!important;overflow-wrap:anywhere!important;
  word-break:normal!important;line-height:1.2!important;vertical-align:middle!important;box-sizing:border-box!important;
}
.modal-card.po-preview-modal .po-doc-group-table .po-doc-size-heading{white-space:nowrap!important;overflow-wrap:normal!important}
.modal-card.po-preview-modal .po-doc-group-table .po-doc-totalqty,
.modal-card.po-preview-modal .po-doc-group-table .po-doc-price,
.modal-card.po-preview-modal .po-doc-group-table .po-doc-totalprice{white-space:nowrap!important}
.modal-card.po-preview-modal .po-doc-code,
.modal-card.po-preview-modal .po-doc-name{text-align:left!important}
.modal-card.po-preview-modal .po-doc-grand-totals{margin-top:12px!important}
.po-size-group-label,.po-doc-size-label{display:none!important}
.po-clean-summary{justify-content:flex-end!important}.po-clean-summary>div{min-width:180px!important}

/* V1.8.9.104 — Critical Path filters + top print/alerts */
.critical-filter-area{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:8px!important;
  margin:-2px 0 10px!important;
  padding:0!important;
}
.critical-search-filter{
  width:min(680px,100%)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:4px!important;
}
.critical-search-filter label{
  font-weight:700!important;
  color:#374151!important;
}
.critical-search-filter input{
  width:100%!important;
  min-height:32px!important;
  height:32px!important;
  padding:5px 9px!important;
  border:1px solid #cfd6de!important;
  border-radius:4px!important;
  background:#ffffff!important;
}
.critical-order-filter-row{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  flex-wrap:wrap!important;
}
.critical-order-filter-checks{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  flex-wrap:wrap!important;
}
.critical-order-filter-checks label{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  color:#374151!important;
  font-weight:600!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
.critical-order-filter-checks input{
  width:15px!important;
  height:15px!important;
  min-width:15px!important;
  min-height:15px!important;
  margin:0!important;
}
.critical-order-filter-checks label span{
  min-width:18px!important;
  padding:1px 5px!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  color:#475569!important;
  text-align:center!important;
}
.critical-filter-result-count{
  color:#64748b!important;
  white-space:nowrap!important;
}
.critical-filter-empty{
  border-top:1px solid #e0e4e8!important;
}
#critical-path-table tbody tr.critical-cancelled-row td{
  background:#f8fafc!important;
  color:#64748b!important;
}
#critical-path-table tbody tr.critical-cancelled-row:hover td{
  background:#f1f5f9!important;
}
.critical-status-cell-cancelled{
  background:#f1f5f9!important;
  color:#64748b!important;
  font-weight:700!important;
}

/* Top-right icon actions */
.top-icon-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.top-icon-btn{
  position:relative!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  padding:7px!important;
  border:1px solid #d1d5db!important;
  border-radius:5px!important;
  background:#ffffff!important;
  color:#10233f!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.top-icon-btn:hover{
  background:#f8fafc!important;
  border-color:#b9c3cf!important;
}
.top-icon-btn svg{
  width:19px!important;
  height:19px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.top-alert-count{
  position:absolute!important;
  top:-6px!important;
  right:-6px!important;
  min-width:18px!important;
  height:18px!important;
  padding:0 4px!important;
  border-radius:999px!important;
  background:#dc2626!important;
  color:#ffffff!important;
  border:2px solid #ffffff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-weight:700!important;
  line-height:1!important;
}
.top-alert-count[hidden]{
  display:none!important;
}

/* Print Purchase Order picker */
.modal.po-print-modal-open .modal-card{
  width:min(980px,94vw)!important;
  max-width:94vw!important;
}
.po-print-picker{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
}
.po-print-search input{
  width:min(520px,100%)!important;
  height:32px!important;
  min-height:32px!important;
  padding:5px 9px!important;
}
.po-print-picker-table td:last-child,
.po-print-picker-table th:last-child{
  text-align:center!important;
}

/* Order Updates notification window */
.modal.order-updates-modal-open .modal-card{
  width:min(1200px,96vw)!important;
  max-width:96vw!important;
  max-height:94vh!important;
}
.order-updates-summary{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:8px 10px!important;
  margin-bottom:10px!important;
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
  background:#f8fafc!important;
}
.order-updates-summary span{
  color:#64748b!important;
}
.order-updates-table-wrap{
  max-height:70vh!important;
  overflow:auto!important;
  border:1px solid #d7dde5!important;
  border-radius:4px!important;
}
.order-updates-table{
  min-width:900px!important;
}
.order-updates-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:1!important;
}
.order-update-description{
  min-width:320px!important;
  white-space:normal!important;
  line-height:1.35!important;
}

@media(max-width:720px){
  .critical-order-filter-row{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  .top-icon-btn{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
  }
}

/* V1.8.9.105 — actionable notifications only */
.order-action-table .order-action-product-name{
  margin-top:2px!important;
  color:#64748b!important;
  font-weight:400!important;
  white-space:normal!important;
  line-height:1.25!important;
}
.order-action-area{
  display:inline-block!important;
  padding:3px 7px!important;
  border-radius:999px!important;
  background:#eef2f7!important;
  color:#334155!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.order-action-table tbody tr.order-action-high td{
  background:#fff7ed!important;
}
.order-action-table tbody tr.order-action-high:hover td{
  background:#ffedd5!important;
}
.order-action-table .order-update-description{
  min-width:360px!important;
  white-space:normal!important;
}

/* V1.8.9.106 — Packing & Logistics / Container Planning */
.packing-heading{margin-top:4px!important}
.packing-heading>div{display:flex!important;flex-direction:column!important;gap:2px!important}
.packing-heading span{color:#64748b!important;font-weight:400!important}
.packing-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:10px!important;border:1px solid #d7dde5!important;border-radius:4px!important;background:#f8fafc!important}
.packing-grid .form-group{margin:0!important}
.packing-profile-check{display:flex!important;flex-direction:column!important;gap:4px!important;padding:8px 10px!important;border:1px solid #d7dde5!important;border-radius:4px!important;background:#fff!important}
.packing-weight-warning{color:#991b1b!important;font-weight:700!important}
.packing-weight-ok{color:#166534!important}
.product-packing-cell{min-width:160px!important;white-space:normal!important;line-height:1.3!important}

.container-settings-wrap{padding:10px!important}
.container-settings-note{padding:8px 10px!important;margin-bottom:9px!important;background:#fffbeb!important;border:1px solid #fde68a!important;border-radius:4px!important;color:#854d0e!important;line-height:1.35!important}
.container-settings-table{min-width:900px!important}
.container-settings-table input{width:100%!important;min-width:85px!important;height:29px!important;min-height:29px!important;padding:3px 5px!important}
.container-settings-table .container-internal-cbm{font-weight:700!important;text-align:center!important;background:#f8fafc!important}
.container-settings-actions{justify-content:flex-end!important;margin-top:9px!important}

.po-container-planning-panel{margin-top:10px!important;overflow:hidden!important}
.container-plan-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,320px))!important;gap:10px!important;padding:10px 10px 0!important}
.container-plan-controls .form-group{margin:0!important}
.container-planning-results{padding:10px!important;display:flex!important;flex-direction:column!important;gap:10px!important}
.container-plan-metrics{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important}
.container-plan-metrics>div,.container-capacity-grid>div{border:1px solid #d7dde5!important;border-radius:4px!important;background:#fff!important;padding:8px!important;display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
.container-plan-metrics span,.container-capacity-grid span{color:#64748b!important}
.container-plan-metrics strong,.container-capacity-grid strong{color:#10233f!important;white-space:normal!important;overflow-wrap:anywhere!important}
.container-capacity-card{border:1px solid #bfdbfe!important;border-radius:4px!important;background:#eff6ff!important;padding:9px!important}
.container-capacity-card.container-over-capacity{border-color:#fca5a5!important;background:#fef2f2!important}
.container-capacity-title{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:center!important;margin-bottom:8px!important}
.container-over-capacity .container-capacity-title{color:#991b1b!important}
.container-capacity-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.container-adjust-suggestion{display:flex!important;flex-direction:column!important;gap:4px!important;padding:9px 10px!important;border:1px solid #d7dde5!important;border-radius:4px!important;background:#f8fafc!important;line-height:1.35!important}
.container-adjust-add{background:#f0fdf4!important;border-color:#86efac!important;color:#166534!important}
.container-adjust-reduce,.container-adjust-warn{background:#fef2f2!important;border-color:#fca5a5!important;color:#991b1b!important}
.container-adjust-full{background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}
.container-plan-warning{padding:8px 10px!important;border:1px solid #fde68a!important;border-radius:4px!important;background:#fffbeb!important;color:#854d0e!important;line-height:1.35!important}
.container-planning-footnote{padding:0 10px 10px!important;color:#64748b!important;line-height:1.35!important}
@media(max-width:1100px){.packing-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.container-plan-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}.container-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:720px){.packing-grid,.container-plan-controls,.container-plan-metrics,.container-capacity-grid{grid-template-columns:1fr!important}}

/* V1.8.9.107 — Create/Edit PO full-height scrolling fix */
.modal-card.po-clean-modal.po-modal-card{
  display:flex!important;
  flex-direction:column!important;
  width:min(1460px,98vw)!important;
  max-width:1460px!important;
  height:min(96vh,1100px)!important;
  max-height:96vh!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:0!important;
}

.modal-card.po-clean-modal.po-modal-card .modal-head{
  flex:0 0 auto!important;
  margin:0!important;
}

.modal-card.po-clean-modal.po-modal-card #modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:14px 16px 18px!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}

.modal-card.po-clean-modal.po-modal-card #po-form{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  max-width:100%!important;
  min-height:max-content!important;
  overflow:visible!important;
  padding-bottom:8px!important;
}

.modal-card.po-clean-modal.po-modal-card .po-clean-actions{
  position:sticky!important;
  bottom:-18px!important;
  z-index:6!important;
  margin:2px -16px -18px!important;
  padding:10px 16px!important;
  background:#ffffff!important;
  border-top:1px solid #d7dde5!important;
  box-shadow:0 -4px 10px rgba(15,23,42,.05)!important;
}

@media(max-width:720px){
  .modal-card.po-clean-modal.po-modal-card{
    width:100vw!important;
    max-width:100vw!important;
    height:100vh!important;
    max-height:100vh!important;
    border-radius:0!important;
  }
  .modal-card.po-clean-modal.po-modal-card #modal-body{
    padding:10px 10px 16px!important;
  }
  .modal-card.po-clean-modal.po-modal-card .po-clean-actions{
    margin:2px -10px -16px!important;
    padding:10px!important;
  }
}

/* V1.8.9.108 — Product form alignment + compact Product Master */
.modal-card.product-modal-card{display:flex!important;flex-direction:column!important;width:min(1360px,97vw)!important;max-width:1360px!important;max-height:95vh!important;overflow:hidden!important;padding:0!important}
.modal-card.product-modal-card .modal-head{flex:0 0 auto!important;padding:14px 16px!important;margin:0!important;border-bottom:1px solid #d7dde5!important;background:#fff!important}
.modal-card.product-modal-card .modal-head h3{font-size:14px!important;color:#10233f!important;margin:0!important}
.modal-card.product-modal-card #modal-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:14px 16px 16px!important;background:#f6f8fa!important;scrollbar-gutter:stable!important}
.product-edit-form{display:flex!important;flex-direction:column!important;gap:12px!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}
.product-form-intro{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;padding:0 2px!important}
.product-form-intro>div{display:flex!important;flex-direction:column!important;gap:2px!important}.product-form-intro strong{color:#10233f!important;font-weight:700!important}.product-form-intro span{color:#64748b!important}
.product-form-section{width:100%!important;max-width:100%!important;display:block!important;border:1px solid #d7dde5!important;border-radius:5px!important;background:#fff!important;overflow:hidden!important;box-sizing:border-box!important;grid-column:1/-1!important}
.product-section-head{min-height:46px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:9px 11px!important;border-bottom:1px solid #d7dde5!important;background:#f4f5f7!important}
.product-section-head>div{display:flex!important;flex-direction:column!important;gap:2px!important}.product-section-head strong{color:#334155!important;font-weight:700!important}.product-section-head span{color:#64748b!important;font-weight:400!important;line-height:1.3!important}
.product-basic-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;padding:11px!important}.product-basic-grid .form-group{margin:0!important;min-width:0!important}.product-basic-grid input,.product-basic-grid select{width:100%!important;min-width:0!important;box-sizing:border-box!important}
.product-standards-row{padding:0 11px 11px!important}.product-standards-row .form-group{margin:0!important}
.product-attributes-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;padding:11px!important}.product-attribute-box{min-width:0!important;margin:0!important;padding:0!important}.product-attribute-box .form-group,.product-attribute-box.form-group{margin:0!important}.product-attribute-box .check-list{min-height:84px!important;align-content:flex-start!important}
.product-packing-section{overflow:hidden!important}.product-packing-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:11px!important;background:#fff!important;box-sizing:border-box!important}.product-packing-grid .form-group{margin:0!important;min-width:0!important}.product-packing-grid label{min-height:30px!important;display:flex!important;align-items:flex-end!important;gap:3px!important;line-height:1.2!important;color:#334155!important}.product-packing-grid label span{color:#64748b!important;font-weight:600!important}.product-packing-grid input{width:100%!important;min-width:0!important;height:36px!important;min-height:36px!important;box-sizing:border-box!important}.product-packing-grid input[readonly]{background:#f8fafc!important;color:#334155!important;font-weight:700!important}
.product-packing-check{margin:0 11px 11px!important;padding:9px 10px!important;min-height:42px!important;justify-content:center!important;box-sizing:border-box!important}.product-datasheet-section .datasheet-upload-field{margin:0!important;padding:11px!important}
.product-form-actions{position:sticky!important;bottom:-16px!important;z-index:5!important;display:flex!important;justify-content:flex-end!important;gap:8px!important;margin:0 -16px -16px!important;padding:10px 16px!important;border-top:1px solid #d7dde5!important;background:#fff!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}
.product-master-panel>.product-master-table-wrap{width:100%!important;max-width:100%!important;overflow-x:hidden!important;overflow-y:visible!important}.product-master-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important}
.product-master-table col.pc-brand{width:6%}.product-master-table col.pc-code{width:10%}.product-master-table col.pc-name{width:15%}.product-master-table col.pc-speciality{width:7%}.product-master-table col.pc-category{width:7%}.product-master-table col.pc-fabric{width:7%}.product-master-table col.pc-standard{width:12%}.product-master-table col.pc-colours{width:9%}.product-master-table col.pc-sizes{width:8%}.product-master-table col.pc-packing{width:11%}.product-master-table col.pc-datasheet{width:3%}.product-master-table col.pc-actions{width:5%}
.product-master-table th,.product-master-table td{min-width:0!important;max-width:none!important;padding:6px 5px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.25!important;vertical-align:middle!important}.product-master-table th{font-size:12px!important}.product-master-table .product-name-cell{font-weight:600!important}.product-master-table .product-wrap-cell,.product-master-table .product-sizes-cell{color:#475569!important}.product-packing-cell{min-width:0!important}.product-packing-compact{display:flex!important;flex-direction:column!important;gap:1px!important;white-space:normal!important;color:#475569!important}.product-row-actions{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important}.product-row-actions .link-btn{line-height:1.1!important}.product-master-table .datasheet-cell{text-align:center!important}.product-master-table .datasheet-pdf-btn{padding:3px!important;min-width:25px!important;min-height:25px!important}
@media(max-width:1050px){.product-basic-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.product-packing-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.product-attributes-grid{grid-template-columns:1fr!important}}
@media(max-width:720px){.modal-card.product-modal-card{width:100vw!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important}.product-basic-grid,.product-packing-grid{grid-template-columns:1fr!important}.product-master-panel>.product-master-table-wrap{overflow-x:auto!important}.product-master-table{min-width:980px!important}}

.panel.product-master-panel>.table-wrap.product-master-table-wrap{overflow-x:hidden!important;overflow-y:visible!important;}
@media(max-width:720px){.panel.product-master-panel>.table-wrap.product-master-table-wrap{overflow-x:auto!important;overflow-y:visible!important;}}

/* V1.8.9.109 — collapsible icon sidebar */
.sidebar-brand-row{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-width:0!important;
}
.sidebar-brand-row .brand{
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
}
.sidebar-collapse-btn{
  flex:0 0 auto!important;
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  min-height:30px!important;
  padding:6px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:5px!important;
  background:rgba(255,255,255,.06)!important;
  color:#ffffff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
}
.sidebar-collapse-btn:hover{background:rgba(255,255,255,.12)!important}
.sidebar-collapse-btn svg{
  width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;
  stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important;
}
.sidebar .nav-btn{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:36px!important;
  color:#ffffff!important;
  background:transparent!important;
}
.sidebar .nav-btn .nav-icon{
  width:20px!important;min-width:20px!important;height:20px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;color:inherit!important;
}
.sidebar .nav-btn .nav-icon svg{
  width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;
  stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;
}
.sidebar .nav-btn .nav-label{
  display:inline!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}

/* Selected page: blue background, white label/icon. */
.sidebar .nav-btn.active,
.sidebar .nav-btn.active:hover{
  background:#2563eb!important;
  color:#ffffff!important;
}
.sidebar .nav-btn:hover:not(.active){
  background:rgba(255,255,255,.10)!important;
  color:#ffffff!important;
}

/* Collapsed desktop sidebar. */
body.sidebar-collapsed .app{
  grid-template-columns:58px minmax(0,1fr)!important;
}
body.sidebar-collapsed .sidebar{
  width:58px!important;
  min-width:58px!important;
  padding-left:7px!important;
  padding-right:7px!important;
}
body.sidebar-collapsed .sidebar-brand-row{justify-content:center!important}
body.sidebar-collapsed .sidebar .brand{display:none!important}
body.sidebar-collapsed .sidebar-collapse-btn{transform:rotate(180deg)!important}
body.sidebar-collapsed .sidebar #nav,
body.sidebar-collapsed .sidebar nav{align-items:center!important}
body.sidebar-collapsed .sidebar .nav-btn{
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  justify-content:center!important;
  gap:0!important;
  border-radius:6px!important;
}
body.sidebar-collapsed .sidebar .nav-btn .nav-label{display:none!important}
body.sidebar-collapsed .sidebar .nav-btn .nav-icon{
  width:22px!important;min-width:22px!important;height:22px!important;
}
body.sidebar-collapsed .sidebar .nav-btn .nav-icon svg{width:20px!important;height:20px!important}
body.sidebar-collapsed .sidebar-footer{
  display:flex!important;flex-direction:column!important;align-items:center!important;
}
body.sidebar-collapsed #settings-nav-holder{width:42px!important}
body.sidebar-collapsed #current-user .user-card{justify-content:center!important}
body.sidebar-collapsed #current-user .user-switch{display:none!important}
body.sidebar-collapsed #current-user .avatar{
  width:34px!important;height:34px!important;min-width:34px!important;
}
body.sidebar-collapsed .main{min-width:0!important}

@media(max-width:720px){
  .sidebar-collapse-btn{display:none!important}
  body.sidebar-collapsed .app{display:block!important}
  body.sidebar-collapsed .sidebar{width:auto!important;min-width:0!important}
  body.sidebar-collapsed .sidebar .brand{display:flex!important}
  body.sidebar-collapsed .sidebar .nav-btn{
    width:100%!important;max-width:none!important;justify-content:flex-start!important;padding:11px 12px!important;
  }
  body.sidebar-collapsed .sidebar .nav-btn .nav-label{display:inline!important}
  body.sidebar-collapsed #current-user .user-switch{display:block!important}
}

/* V1.8.9.110 — compact Critical Path to minimise horizontal scrolling */
.critical-path-scroll{
  overflow-x:auto!important;
  overflow-y:auto!important;
}

#critical-path-table{
  width:max-content!important;
  min-width:100%!important;
  table-layout:auto!important;
}

#critical-path-table thead th{
  min-width:0!important;
  max-width:74px!important;
  padding:5px 3px!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  line-height:1.05!important;
}

#critical-path-table tbody td{
  padding:4px 3px!important;
  line-height:1.1!important;
}

/* Main identifying columns */
#critical-path-table .cp-col-po,
#critical-path-table .cp-cell-po{width:70px!important;min-width:70px!important;max-width:70px!important}
#critical-path-table .cp-col-agent,
#critical-path-table .cp-cell-agent{width:74px!important;min-width:74px!important;max-width:74px!important}
#critical-path-table .cp-col-supplier,
#critical-path-table .cp-cell-supplier{width:92px!important;min-width:92px!important;max-width:92px!important}
#critical-path-table .cp-col-orderdate,
#critical-path-table .cp-cell-orderdate{width:62px!important;min-width:62px!important;max-width:62px!important;text-align:center!important}
#critical-path-table .cp-col-code,
#critical-path-table .cp-cell-code{width:82px!important;min-width:82px!important;max-width:82px!important}
#critical-path-table .cp-col-name,
#critical-path-table .cp-cell-name{width:112px!important;min-width:112px!important;max-width:112px!important}
#critical-path-table .cp-col-colour,
#critical-path-table .cp-cell-colour{width:62px!important;min-width:62px!important;max-width:62px!important}
#critical-path-table .cp-col-qty,
#critical-path-table .cp-cell-qty{width:48px!important;min-width:48px!important;max-width:48px!important;text-align:right!important}
#critical-path-table .cp-col-cost,
#critical-path-table .cp-cell-cost{width:67px!important;min-width:67px!important;max-width:67px!important;text-align:right!important}
#critical-path-table .cp-col-amount,
#critical-path-table .cp-cell-amount{width:78px!important;min-width:78px!important;max-width:78px!important;text-align:right!important}

/* Two-line text instead of expanding the whole column. */
#critical-path-table .cp-two-line{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.15!important;
  max-height:2.3em!important;
}

#critical-path-table .cp-cell-agent,
#critical-path-table .cp-cell-supplier,
#critical-path-table .cp-cell-code,
#critical-path-table .cp-cell-name{
  white-space:normal!important;
}

/* Compact number breakdowns */
#critical-path-table .cp-cell-qty .critical-breakdown-line,
#critical-path-table .cp-cell-cost .critical-breakdown-line,
#critical-path-table .cp-cell-amount .critical-breakdown-line{
  justify-content:flex-end!important;
  font-variant-numeric:tabular-nums!important;
}
#critical-path-table .critical-breakdown-line{
  min-height:22px!important;
  padding:2px 0!important;
}

/* Workflow controls take the smallest practical width. */
#critical-path-table select.status-chip-select{
  min-width:60px!important;
  max-width:70px!important;
  height:21px!important;
  min-height:21px!important;
  padding:2px 14px 2px 4px!important;
}
#critical-path-table .stage-view-badge{
  min-width:52px!important;
  min-height:21px!important;
  padding:2px 5px!important;
}
#critical-path-table .qc-review-btn{
  min-width:68px!important;
  max-width:72px!important;
  min-height:24px!important;
  padding:3px 5px!important;
  white-space:normal!important;
  line-height:1.05!important;
}
#critical-path-table .qc-result{
  min-width:54px!important;
  padding-left:5px!important;
  padding-right:5px!important;
}
#critical-path-table .critical-stage-stack{
  gap:2px!important;
}
#critical-path-table .critical-stage-date,
#critical-path-table .qc-feedback-date,
#critical-path-table .qc-feedback-received-date,
#critical-path-table .qc-awaiting-feedback{
  font-size:11px!important;
}

/* Dates and final logistics columns */
#critical-path-table .cp-col-date,
#critical-path-table .cp-cell-date{width:69px!important;min-width:69px!important;max-width:69px!important;text-align:center!important}
#critical-path-table .critical-date-control,
#critical-path-table .critical-date-button{
  width:67px!important;
  min-width:67px!important;
}
#critical-path-table .critical-date-button{
  padding:0 3px!important;
  font-size:11px!important;
}
#critical-path-table .cp-col-shipment,
#critical-path-table .cp-cell-shipment{width:72px!important;min-width:72px!important;max-width:72px!important;text-align:center!important}
#critical-path-table .shipment-status-badge{
  min-width:62px!important;
  padding:2px 4px!important;
}
#critical-path-table .cp-col-received,
#critical-path-table .cp-cell-received{width:54px!important;min-width:54px!important;max-width:54px!important;text-align:center!important}
#critical-path-table .cp-col-status,
#critical-path-table .cp-cell-status{width:60px!important;min-width:60px!important;max-width:60px!important;text-align:center!important}
#critical-path-table .critical-status-badge,
#critical-path-table .critical-status-display{
  min-width:54px!important;
  padding:2px 4px!important;
}
#critical-path-table .cp-col-icon,
#critical-path-table .cp-cell-icon{width:42px!important;min-width:42px!important;max-width:42px!important;text-align:center!important}

/* Notes columns and workflow headings remain narrow. */
#critical-path-table th:not(.cp-col-po):not(.cp-col-agent):not(.cp-col-supplier):not(.cp-col-orderdate):not(.cp-col-code):not(.cp-col-name):not(.cp-col-colour):not(.cp-col-qty):not(.cp-col-cost):not(.cp-col-amount):not(.cp-col-date):not(.cp-col-shipment):not(.cp-col-received):not(.cp-col-status):not(.cp-col-icon):not(.cp-col-activity){
  min-width:58px!important;
  max-width:72px!important;
}

/* V1.8.9.111 — supplier full wrapping + compact numeric/activity columns */
#critical-path-table .cp-col-supplier,
#critical-path-table .cp-cell-supplier{
  width:88px!important;
  min-width:88px!important;
  max-width:88px!important;
}
#critical-path-table .cp-cell-supplier{
  white-space:normal!important;
  vertical-align:middle!important;
}
#critical-path-table .cp-wrap-all{
  display:block!important;
  width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.12!important;
  max-height:none!important;
  -webkit-line-clamp:unset!important;
}

#critical-path-table .cp-col-qty,
#critical-path-table .cp-cell-qty{
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
}
#critical-path-table .cp-col-cost,
#critical-path-table .cp-cell-cost{
  width:60px!important;
  min-width:60px!important;
  max-width:60px!important;
}
#critical-path-table .cp-col-amount,
#critical-path-table .cp-cell-amount{
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important;
}
#critical-path-table .cp-cell-qty,
#critical-path-table .cp-cell-cost,
#critical-path-table .cp-cell-amount{
  font-size:11px!important;
  letter-spacing:-.05px!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums!important;
}
#critical-path-table .cp-cell-qty .critical-breakdown-line,
#critical-path-table .cp-cell-cost .critical-breakdown-line,
#critical-path-table .cp-cell-amount .critical-breakdown-line{
  min-height:20px!important;
  padding:1px 0!important;
}

#critical-path-table thead th.cp-col-activity,
#critical-path-table tbody td.cp-cell-activity{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  padding-left:2px!important;
  padding-right:2px!important;
  text-align:center!important;
}
#critical-path-table .cp-activity-head-icon{
  display:block!important;
  width:16px!important;
  height:16px!important;
  margin:0 auto!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#critical-path-table .activity-log-icon-btn{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  padding:4px!important;
  border:1px solid #cbd5e1!important;
  border-radius:5px!important;
  background:#ffffff!important;
  color:#475569!important;
  cursor:pointer!important;
  overflow:visible!important;
}
#critical-path-table .activity-log-icon-btn:hover{
  background:#f8fafc!important;
  border-color:#94a3b8!important;
}
#critical-path-table .activity-log-icon-btn.has-activity{
  color:#2563eb!important;
  border-color:#93c5fd!important;
  background:#eff6ff!important;
}
#critical-path-table .activity-log-icon-btn svg{
  width:16px!important;
  height:16px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#critical-path-table .activity-log-count{
  position:absolute!important;
  top:-6px!important;
  right:-6px!important;
  min-width:16px!important;
  height:16px!important;
  padding:0 3px!important;
  border-radius:999px!important;
  border:1.5px solid #ffffff!important;
  background:#2563eb!important;
  color:#ffffff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:1!important;
}
#critical-path-table .activity-log-icon-btn:not(.has-activity) .activity-log-count{
  background:#94a3b8!important;
}
#critical-path-table .cp-col-icon,
#critical-path-table .cp-cell-icon{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
}

/* V1.8.9.112 — Critical Path starts directly with filters */
.critical-panel{
  margin-top:0!important;
}

/* V1.8.9.113 — Operations Control Centre dashboard */
.ops-dashboard{
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
  width:100%!important;
  max-width:none!important;
}

.ops-dashboard-heading{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:2px 1px 0!important;
}
.ops-dashboard-heading h2{
  margin:0!important;
  font-size:16px!important;
  line-height:1.15!important;
  color:#10233f!important;
  font-weight:800!important;
}
.ops-dashboard-heading p{
  margin:4px 0 0!important;
  color:#64748b!important;
}
.ops-dashboard-date{
  color:#64748b!important;
  font-weight:700!important;
  white-space:nowrap!important;
}

/* White KPI cards with subtle operational accents. */
.ops-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:9px!important;
}
.ops-kpi-card{
  --kpi-accent:#64748b;
  min-width:0!important;
  min-height:105px!important;
  padding:12px!important;
  border:1px solid #dce2e8!important;
  border-top:3px solid var(--kpi-accent)!important;
  border-radius:8px!important;
  background:#ffffff!important;
  color:#1f2937!important;
  box-shadow:0 2px 7px rgba(15,23,42,.035)!important;
  display:flex!important;
  align-items:flex-start!important;
  gap:9px!important;
  text-align:left!important;
  cursor:pointer!important;
}
.ops-kpi-card:hover{
  transform:translateY(-1px)!important;
  border-color:#c6d0da!important;
  box-shadow:0 5px 12px rgba(15,23,42,.07)!important;
}
.ops-kpi-icon{
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  border-radius:7px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:color-mix(in srgb,var(--kpi-accent) 10%,#fff)!important;
  color:var(--kpi-accent)!important;
}
.ops-kpi-icon svg,
.ops-panel-icon svg{
  width:17px!important;
  height:17px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.ops-kpi-content{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
}
.ops-kpi-label{
  color:#64748b!important;
  font-weight:700!important;
  line-height:1.15!important;
}
.ops-kpi-content strong{
  margin-top:5px!important;
  color:#10233f!important;
  font-size:17px!important;
  line-height:1.05!important;
  font-weight:800!important;
  overflow-wrap:anywhere!important;
}
.ops-kpi-sub{
  margin-top:5px!important;
  color:#64748b!important;
  line-height:1.2!important;
}
.kpi-blue{--kpi-accent:#2563eb}
.kpi-navy{--kpi-accent:#10233f}
.kpi-amber{--kpi-accent:#d97706}
.kpi-purple{--kpi-accent:#7c3aed}
.kpi-teal{--kpi-accent:#0f766e}
.kpi-orange{--kpi-accent:#ea580c}
.kpi-red{--kpi-accent:#dc2626}

.ops-panel{
  min-width:0!important;
  border:1px solid #dce2e8!important;
  border-radius:8px!important;
  background:#ffffff!important;
  overflow:hidden!important;
  box-shadow:0 2px 7px rgba(15,23,42,.03)!important;
}
.ops-panel-head{
  min-height:54px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:10px 12px!important;
  border-bottom:1px solid #e5e9ee!important;
  background:#fbfcfd!important;
}
.ops-panel-head>div{
  min-width:0!important;
}
.ops-panel-head h3{
  margin:0!important;
  color:#10233f!important;
  font-size:13px!important;
  font-weight:800!important;
}
.ops-panel-head p{
  margin:3px 0 0!important;
  color:#64748b!important;
  line-height:1.2!important;
}
.ops-panel-icon{
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#475569!important;
  background:#f1f5f9!important;
  border-radius:7px!important;
}
.ops-link-btn{
  flex:0 0 auto!important;
  border:1px solid #cfd6de!important;
  border-radius:5px!important;
  background:#ffffff!important;
  color:#334155!important;
  padding:6px 9px!important;
  font-weight:700!important;
  cursor:pointer!important;
}
.ops-link-btn:hover{
  background:#f8fafc!important;
  border-color:#94a3b8!important;
}

/* Pipeline */
.ops-pipeline{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:0!important;
  padding:14px!important;
}
.ops-pipeline-step{
  --pipe:#94a3b8;
  position:relative!important;
  min-width:0!important;
  min-height:76px!important;
  padding:9px 6px!important;
  border:0!important;
  border-top:3px solid var(--pipe)!important;
  border-bottom:1px solid #e2e8f0!important;
  border-left:1px solid #e2e8f0!important;
  background:#ffffff!important;
  color:#334155!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
}
.ops-pipeline-step:first-child{border-radius:6px 0 0 6px!important}
.ops-pipeline-step:last-child{
  border-right:1px solid #e2e8f0!important;
  border-radius:0 6px 6px 0!important;
}
.ops-pipeline-step:hover{
  background:#f8fafc!important;
  z-index:1!important;
}
.ops-pipeline-count{
  color:#10233f!important;
  font-size:18px!important;
  font-weight:800!important;
  line-height:1!important;
}
.ops-pipeline-label{
  margin-top:6px!important;
  color:#64748b!important;
  font-weight:700!important;
  text-align:center!important;
  line-height:1.15!important;
}
.pipe-sample{--pipe:#64748b}
.pipe-fit{--pipe:#2563eb}
.pipe-pps{--pipe:#4f46e5}
.pipe-bulk{--pipe:#d97706}
.pipe-qc{--pipe:#7c3aed}
.pipe-ready{--pipe:#0f766e}
.pipe-transit{--pipe:#ea580c}
.pipe-complete{--pipe:#16a34a}

/* Middle and lower dashboard panels */
.ops-dashboard-main-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.75fr) minmax(320px,.85fr)!important;
  gap:12px!important;
}
.ops-dashboard-bottom-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.55fr) minmax(330px,.75fr)!important;
  gap:12px!important;
}

.ops-action-list,
.ops-date-list,
.ops-utilisation-list{
  display:flex!important;
  flex-direction:column!important;
}
.ops-action-row{
  display:grid!important;
  grid-template-columns:8px 82px minmax(120px,.9fr) 100px minmax(230px,1.5fr) 18px!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  min-height:48px!important;
  padding:7px 11px!important;
  border:0!important;
  border-bottom:1px solid #edf0f3!important;
  background:#ffffff!important;
  color:#334155!important;
  text-align:left!important;
  cursor:pointer!important;
}
.ops-action-row:hover{background:#f8fafc!important}
.ops-action-row:last-child{border-bottom:0!important}
.ops-action-marker{
  width:6px!important;
  height:24px!important;
  border-radius:4px!important;
  background:#f59e0b!important;
}
.ops-action-row.is-high .ops-action-marker{background:#dc2626!important}
.ops-action-po{font-weight:800!important;color:#10233f!important}
.ops-action-product{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
}
.ops-action-product strong{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.ops-action-product small{
  margin-top:2px!important;
  color:#64748b!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.ops-action-area{
  justify-self:start!important;
  padding:3px 6px!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  color:#475569!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.ops-action-text{
  line-height:1.25!important;
  color:#334155!important;
  font-weight:650!important;
}
.ops-row-arrow{
  color:#94a3b8!important;
  font-size:18px!important;
  text-align:center!important;
}

.ops-date-row{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 78px!important;
  align-items:center!important;
  gap:8px!important;
  min-height:51px!important;
  padding:7px 10px!important;
  border:0!important;
  border-bottom:1px solid #edf0f3!important;
  background:#ffffff!important;
  color:#334155!important;
  text-align:left!important;
  cursor:pointer!important;
}
.ops-date-row:hover{background:#f8fafc!important}
.ops-date-row:last-child{border-bottom:0!important}
.ops-date-row.is-overdue{background:#fffafa!important}
.ops-date-row.is-overdue:hover{background:#fff4f4!important}
.ops-date-type{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  padding:3px 5px!important;
  border-radius:4px!important;
  background:#eef2f7!important;
  color:#475569!important;
  font-weight:800!important;
}
.ops-date-row.is-overdue .ops-date-type{
  background:#fee2e2!important;
  color:#991b1b!important;
}
.ops-date-main,
.ops-date-value{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
.ops-date-main strong{color:#10233f!important}
.ops-date-main small{
  margin-top:2px!important;
  color:#64748b!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.ops-date-value{
  text-align:right!important;
}
.ops-date-value strong{color:#334155!important}
.ops-date-value small{
  margin-top:2px!important;
  color:#64748b!important;
}
.ops-date-row.is-overdue .ops-date-value small{
  color:#b91c1c!important;
  font-weight:700!important;
}

.ops-shipping-summary{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  padding:10px 10px 8px!important;
}
.ops-shipping-summary>div{
  min-width:0!important;
  min-height:70px!important;
  padding:9px!important;
  border:1px solid #e2e8f0!important;
  border-radius:6px!important;
  background:#fbfcfd!important;
  display:flex!important;
  flex-direction:column!important;
}
.ops-shipping-summary span{color:#64748b!important;font-weight:700!important}
.ops-shipping-summary strong{
  margin-top:5px!important;
  color:#10233f!important;
  font-size:16px!important;
}
.ops-shipping-summary small{
  margin-top:4px!important;
  color:#64748b!important;
  line-height:1.2!important;
}

.ops-utilisation-list{
  padding:0 10px 10px!important;
  gap:6px!important;
}
.ops-util-row{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(150px,1.2fr) 72px 72px 72px 90px!important;
  align-items:center!important;
  gap:8px!important;
  min-height:54px!important;
  padding:7px 9px 10px!important;
  border:1px solid #e2e8f0!important;
  border-radius:6px!important;
  background:#ffffff!important;
  color:#334155!important;
  text-align:left!important;
  cursor:pointer!important;
  overflow:hidden!important;
}
.ops-util-row:hover{background:#f8fafc!important}
.ops-util-row.is-over{border-color:#fecaca!important;background:#fffafa!important}
.ops-util-po,
.ops-util-metric,
.ops-util-remaining{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
.ops-util-po strong{color:#10233f!important}
.ops-util-po small{
  margin-top:2px!important;
  color:#64748b!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.ops-util-container{
  font-weight:800!important;
  color:#334155!important;
  text-align:center!important;
}
.ops-util-metric,
.ops-util-remaining{text-align:right!important}
.ops-util-metric small,
.ops-util-remaining small{color:#64748b!important}
.ops-util-remaining strong{color:#0f766e!important}
.ops-util-row.is-over .ops-util-remaining strong{color:#b91c1c!important}
.ops-util-bar{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  height:4px!important;
  background:#e2e8f0!important;
}
.ops-util-bar i{
  display:block!important;
  height:100%!important;
  background:#0f766e!important;
}
.ops-util-row.is-over .ops-util-bar i{background:#dc2626!important}

.ops-health-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  padding:10px!important;
}
.ops-health-card{
  --health:#64748b;
  min-height:76px!important;
  border:1px solid #e2e8f0!important;
  border-left:4px solid var(--health)!important;
  border-radius:6px!important;
  background:#ffffff!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding:9px 11px!important;
  color:#334155!important;
  cursor:pointer!important;
}
.ops-health-card:hover{background:#f8fafc!important}
.ops-health-card strong{
  color:#10233f!important;
  font-size:18px!important;
  line-height:1!important;
}
.ops-health-card span{
  margin-top:6px!important;
  color:#64748b!important;
  font-weight:700!important;
}
.health-good{--health:#16a34a}
.health-warn{--health:#d97706}
.health-bad{--health:#dc2626}
.health-muted{--health:#94a3b8}

.ops-empty-state{
  padding:18px 12px!important;
  color:#64748b!important;
  text-align:center!important;
}

/* Dashboard-origin Critical Path filter indicator */
.critical-dashboard-filter-chip{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  padding:5px 7px!important;
  border:1px solid #bfdbfe!important;
  border-radius:5px!important;
  background:#eff6ff!important;
  color:#1e40af!important;
  font-weight:700!important;
}
.critical-dashboard-filter-chip button{
  border:0!important;
  background:transparent!important;
  color:#1d4ed8!important;
  padding:0 2px!important;
  font-weight:800!important;
  cursor:pointer!important;
}

@media(max-width:1380px){
  .ops-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:1120px){
  .ops-dashboard-main-grid,
  .ops-dashboard-bottom-grid{grid-template-columns:1fr!important}
  .ops-pipeline{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
  .ops-pipeline-step{
    border:1px solid #e2e8f0!important;
    border-top:3px solid var(--pipe)!important;
    border-radius:6px!important;
  }
}
@media(max-width:820px){
  .ops-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ops-action-row{
    grid-template-columns:8px 70px minmax(110px,1fr) 18px!important;
  }
  .ops-action-area,.ops-action-text{grid-column:3 / 4!important}
  .ops-shipping-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ops-util-row{grid-template-columns:minmax(130px,1fr) 64px 64px 78px!important}
  .ops-util-metric:nth-of-type(4){display:none!important}
}
@media(max-width:560px){
  .ops-kpi-grid{grid-template-columns:1fr!important}
  .ops-pipeline{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ops-health-grid{grid-template-columns:1fr 1fr!important}
}

/* V1.9.0.0 — Purchase Order Revision Control */
.po-rev-chip{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:42px!important;height:24px!important;padding:2px 7px!important;border:1px solid #bfdbfe!important;border-radius:999px!important;background:#eff6ff!important;color:#1d4ed8!important;font-weight:800!important;cursor:pointer!important;white-space:nowrap!important}
.po-rev-chip:hover{background:#dbeafe!important;border-color:#93c5fd!important}
.po-editor-revision-banner{display:grid!important;grid-template-columns:150px 170px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;padding:9px 11px!important;border:1px solid #bfdbfe!important;border-radius:6px!important;background:#f8fbff!important}
.po-editor-revision-banner>div{display:flex!important;flex-direction:column!important}.po-editor-revision-banner span{color:#64748b!important;font-weight:700!important}.po-editor-revision-banner strong{margin-top:2px!important;color:#10233f!important}.po-editor-revision-banner button{justify-self:end!important}
.po-revision-page{display:flex!important;flex-direction:column!important;gap:12px!important}
.po-revision-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.po-revision-summary>div{min-height:68px!important;padding:9px 10px!important;border:1px solid #dce2e8!important;border-radius:6px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}
.po-revision-summary span{color:#64748b!important;font-weight:700!important}.po-revision-summary strong{margin-top:5px!important;color:#10233f!important;font-size:15px!important}
.po-revision-list{border:1px solid #dce2e8!important;border-radius:6px!important;overflow:hidden!important}
.po-revision-row{display:grid!important;grid-template-columns:74px minmax(260px,1fr) 180px 120px!important;align-items:center!important;gap:10px!important;min-height:62px!important;padding:9px 10px!important;border-bottom:1px solid #e9edf2!important;background:#fff!important}
.po-revision-row:last-child{border-bottom:0!important}.po-revision-row.is-current{background:#f0fdf4!important}
.po-revision-badge{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:56px!important;height:28px!important;padding:3px 7px!important;border-radius:999px!important;background:#eef2f7!important;color:#334155!important;font-weight:800!important}
.po-revision-row.is-current .po-revision-badge{background:#dcfce7!important;color:#166534!important}
.po-revision-info{min-width:0!important;display:flex!important;flex-direction:column!important}.po-revision-info strong{color:#10233f!important}.po-revision-info span{margin-top:3px!important;color:#64748b!important;line-height:1.3!important;white-space:normal!important}
.po-revision-meta{color:#64748b!important;line-height:1.3!important}.po-revision-actions{display:flex!important;justify-content:flex-end!important;gap:5px!important}
.po-doc-revision{margin-top:5px!important}.po-doc-revision-value{font-size:10px!important}
@media(max-width:900px){.po-revision-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.po-revision-row{grid-template-columns:64px minmax(180px,1fr) 110px!important}.po-revision-actions{grid-column:2/4!important;justify-content:flex-start!important}}

/* V1.9.1.0 — Complete Tech Pack Builder + controlled Trim/Label/Packaging Library */
.tp-page{display:flex!important;flex-direction:column!important;gap:12px!important}.tp-page-head{display:flex!important;justify-content:space-between!important;align-items:flex-end!important;gap:12px!important}.tp-page-head h2{margin:0!important;color:#10233f!important;font-size:16px!important}.tp-page-head p{margin:4px 0 0!important;color:#64748b!important}.tp-page-actions{display:flex!important;gap:7px!important;flex-wrap:wrap!important}.tp-page-actions .secondary.active{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important}
.tp-summary-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}.tp-summary-grid>div{background:#fff!important;border:1px solid #dce2e8!important;border-radius:7px!important;padding:10px 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important}.tp-summary-grid span{color:#64748b!important;font-weight:700!important}.tp-summary-grid strong{font-size:17px!important;color:#10233f!important}.tp-status{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:23px!important;padding:3px 7px!important;border-radius:999px!important;font-weight:800!important;white-space:nowrap!important}.tp-status-draft{background:#f1f5f9!important;color:#475569!important}.tp-status-review{background:#fef3c7!important;color:#92400e!important}.tp-status-approved{background:#dcfce7!important;color:#166534!important}.tp-status-superseded{background:#e5e7eb!important;color:#6b7280!important}.tp-library-rev{font-weight:800!important;color:#1d4ed8!important}.tp-file-icons{display:flex!important;gap:4px!important}.tp-file-icons button{font-size:10px!important;padding:3px 5px!important;border:1px solid #cbd5e1!important;background:#fff!important;border-radius:4px!important}
.modal-card.tp-modal-card{display:flex!important;flex-direction:column!important;width:min(1500px,98vw)!important;max-width:1500px!important;height:min(96vh,1100px)!important;max-height:96vh!important;min-height:0!important;overflow:hidden!important;padding:0!important}.modal-card.tp-modal-card .modal-head{flex:0 0 auto!important;margin:0!important}.modal-card.tp-modal-card #modal-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:12px 14px 16px!important;background:#f6f8fa!important;scrollbar-gutter:stable!important}.tp-form{display:flex!important;flex-direction:column!important;gap:10px!important}.tp-revision-banner{display:grid!important;grid-template-columns:110px 160px 150px 1fr!important;align-items:center!important;gap:8px!important;padding:8px 10px!important;background:#eff6ff!important;border:1px solid #bfdbfe!important;border-radius:6px!important}.tp-revision-banner>div{display:flex!important;flex-direction:column!important}.tp-revision-banner span{color:#64748b!important;font-weight:700!important}.tp-revision-banner button{justify-self:end!important}.tp-form-section{background:#fff!important;border:1px solid #dce2e8!important;border-radius:6px!important;overflow:hidden!important}.tp-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-height:48px!important;padding:8px 10px!important;background:#f4f6f8!important;border-bottom:1px solid #dce2e8!important}.tp-section-head>div:first-child{display:flex!important;flex-direction:column!important}.tp-section-head strong{color:#10233f!important}.tp-section-head span{margin-top:2px!important;color:#64748b!important}.tp-section-head>div:last-child{display:flex!important;gap:5px!important;flex-wrap:wrap!important}.tp-overview-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;padding:10px!important}.tp-overview-grid .form-group{margin:0!important;min-width:0!important}.tp-overview-grid .full{grid-column:1/-1!important}.tp-two-grid{display:grid!important;grid-template-columns:1.2fr .8fr!important;gap:10px!important;padding:10px!important}.tp-two-grid .form-group{margin:0!important}.tp-fabric-card{height:100%!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important;padding:10px!important}.tp-fabric-card>strong{display:block!important;color:#10233f!important;font-size:15px!important}.tp-fabric-card>span{display:block!important;margin-top:3px!important;color:#64748b!important}.tp-fabric-card dl{display:grid!important;grid-template-columns:90px 1fr!important;gap:5px 8px!important;margin:10px 0 0!important}.tp-fabric-card dt{color:#64748b!important;font-weight:700!important}.tp-fabric-card dd{margin:0!important;color:#334155!important}
.tp-measure-wrap,.tp-form-section>.table-wrap{overflow-x:auto!important}.tp-measure-table,.tp-construction-table,.tp-branding-table,.tp-attached-table{width:100%!important;border-collapse:collapse!important;background:#fff!important}.tp-measure-table th,.tp-measure-table td,.tp-construction-table th,.tp-construction-table td,.tp-branding-table th,.tp-branding-table td,.tp-attached-table th,.tp-attached-table td{border:1px solid #e0e5eb!important;padding:5px!important;vertical-align:middle!important}.tp-measure-table th,.tp-construction-table th,.tp-branding-table th,.tp-attached-table th{background:#f2f4f6!important;color:#334155!important;font-weight:800!important;white-space:nowrap!important}.tp-measure-table input,.tp-construction-table input,.tp-branding-table input,.tp-attached-table input{width:100%!important;min-width:0!important;box-sizing:border-box!important;height:29px!important}.tp-measure-table td:first-child,.tp-construction-table td:first-child,.tp-branding-table td:first-child{width:34px!important;text-align:center!important}.tp-measure-table .tp-pom{min-width:150px!important}.tp-library-picker{display:grid!important;grid-template-columns:minmax(280px,1fr) auto auto!important;gap:7px!important;padding:10px!important}.tp-library-picker select{min-width:0!important}.tp-attached-table{min-width:1050px!important}.tp-packing-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important;padding:10px!important}.tp-packing-grid>div{padding:8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.tp-packing-grid span{color:#64748b!important;font-weight:700!important}.tp-packing-grid strong{margin-top:4px!important;color:#10233f!important}.tp-packaging-notes{margin:0!important;padding:0 10px 10px!important}.tp-file-add{position:relative!important;overflow:hidden!important;cursor:pointer!important}.tp-file-add input{position:absolute!important;inset:0!important;opacity:0!important;cursor:pointer!important}.tp-files-list{display:flex!important;flex-direction:column!important;gap:5px!important;padding:10px!important}.tp-file-row{display:grid!important;grid-template-columns:minmax(200px,1fr) 140px auto auto!important;align-items:center!important;gap:7px!important;padding:7px 9px!important;border:1px solid #e2e8f0!important;border-radius:5px!important}.tp-file-row small{color:#64748b!important}.tp-approval-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;padding:10px!important}.tp-approval-grid>div{padding:8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.tp-approval-grid span{color:#64748b!important;font-weight:700!important}.tp-approval-grid strong{margin-top:4px!important;color:#10233f!important}.tp-form-actions{position:sticky!important;bottom:-16px!important;z-index:6!important;display:flex!important;justify-content:space-between!important;gap:10px!important;margin:0 -14px -16px!important;padding:10px 14px!important;border-top:1px solid #dce2e8!important;background:#fff!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}.tp-form-actions>div{display:flex!important;gap:7px!important;flex-wrap:wrap!important}
.modal-card.tp-library-modal{width:min(1000px,95vw)!important;max-width:1000px!important}.tp-library-form{display:flex!important;flex-direction:column!important;gap:10px!important}.tp-library-files{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}.tp-library-files .form-group{margin:0!important}.tp-library-files small{display:block!important;margin-top:4px!important;color:#64748b!important}.tp-revision-page{display:flex!important;flex-direction:column!important;gap:10px!important}.tp-revision-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}.tp-revision-summary>div{padding:9px!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.tp-revision-summary span{color:#64748b!important;font-weight:700!important}.tp-revision-summary strong{margin-top:4px!important}.tp-revision-list{border:1px solid #dce2e8!important;border-radius:6px!important;overflow:hidden!important}.tp-revision-row{display:grid!important;grid-template-columns:110px minmax(260px,1fr) 190px 130px!important;gap:8px!important;align-items:center!important;padding:9px!important;border-bottom:1px solid #e6ebf0!important}.tp-revision-row:last-child{border-bottom:0!important}.tp-revision-row.current{background:#f0fdf4!important}.tp-revision-row>div:first-child{display:flex!important;flex-direction:column!important}.tp-revision-row small{color:#64748b!important}.tp-revision-row>div:last-child{display:flex!important;gap:5px!important;justify-content:flex-end!important}
.modal-card.tp-preview-modal{width:min(1200px,98vw)!important;max-width:1200px!important;max-height:97vh!important}.tp-preview-scroll{overflow:auto!important;background:#e5e7eb!important;padding:12px!important}.tp-document{display:flex!important;flex-direction:column!important;gap:14px!important}.tp-doc-page{width:210mm!important;min-height:297mm!important;margin:0 auto!important;padding:12mm!important;background:#fff!important;box-shadow:0 2px 9px rgba(15,23,42,.12)!important;color:#111!important;font-family:Arial,sans-serif!important;font-size:10px!important;box-sizing:border-box!important}.tp-doc-running{display:grid!important;grid-template-columns:1fr auto 1fr!important;align-items:center!important;border-bottom:1px solid #111!important;padding-bottom:5px!important;margin-bottom:14px!important;font-size:9px!important}.tp-doc-running strong{text-align:center!important}.tp-doc-running span:last-child{text-align:right!important}.tp-doc-page h2{font-size:17px!important;margin:0 0 14px!important}.tp-doc-page h3{font-size:12px!important;margin:18px 0 7px!important}.tp-doc-cover{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:7px!important}.tp-doc-cover>div{border:1px solid #bbb!important;padding:8px!important}.tp-doc-cover span{display:block!important;color:#666!important}.tp-doc-cover strong{display:block!important;margin-top:4px!important;font-size:13px!important}.tp-doc-page table{width:100%!important;border-collapse:collapse!important;table-layout:fixed!important}.tp-doc-page th,.tp-doc-page td{border:1px solid #aaa!important;padding:5px!important;vertical-align:top!important;overflow-wrap:anywhere!important}.tp-doc-page th{background:#eee!important;font-weight:700!important}.po-techpack-cell select{min-width:105px!important;max-width:135px!important;font-size:11px!important}
@media(max-width:1100px){.tp-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tp-packing-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.tp-approval-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tp-revision-row{grid-template-columns:90px minmax(180px,1fr) 140px!important}.tp-revision-row>div:last-child{grid-column:2/4!important;justify-content:flex-start!important}}
@media(max-width:720px){.tp-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tp-overview-grid,.tp-two-grid{grid-template-columns:1fr!important}.tp-packing-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tp-library-files{grid-template-columns:1fr!important}}

/* V1.9.2.0 — QC / AQL Inspection Reports */
.qc-aql-page{display:flex!important;flex-direction:column!important;gap:10px!important}
.qc-aql-summary{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important}
.qc-aql-summary>div{min-height:76px!important;padding:10px 11px!important;border:1px solid #dce2e8!important;border-top:3px solid #64748b!important;border-radius:7px!important;background:#fff!important;display:flex!important;flex-direction:column!important;box-shadow:0 2px 6px rgba(15,23,42,.03)!important}
.qc-aql-summary span{color:#64748b!important;font-weight:700!important}.qc-aql-summary strong{margin-top:4px!important;color:#10233f!important;font-size:18px!important;line-height:1!important}.qc-aql-summary small{margin-top:5px!important;color:#64748b!important}.qc-aql-pass-card{border-top-color:#16a34a!important}.qc-aql-fail-card{border-top-color:#dc2626!important}
.qc-aql-table{min-width:1320px!important}.qc-aql-cell{display:flex!important;align-items:center!important;gap:4px!important;white-space:nowrap!important}.aql-status-badge{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:58px!important;height:23px!important;padding:2px 7px!important;border-radius:999px!important;font-size:11px!important;font-weight:800!important;border:1px solid #cbd5e1!important;background:#f8fafc!important;color:#475569!important}.aql-pass{background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}.aql-fail{background:#fee2e2!important;border-color:#fca5a5!important;color:#991b1b!important}.aql-draft{background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}.aql-incomplete{background:#f1f5f9!important;color:#64748b!important}
.modal-card.qc-aql-modal-card{width:min(1500px,98vw)!important;max-width:1500px!important;height:min(96vh,1100px)!important;max-height:96vh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important}.modal.qc-aql-modal-open #modal-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:12px!important}.modal-card.qc-aql-report-card{width:min(1450px,98vw)!important;max-width:1450px!important;height:96vh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important}.modal.qc-aql-report-modal-open #modal-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding:10px!important}
.aql-form-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:9px 10px!important;border:1px solid #dce2e8!important;border-radius:6px!important;background:#f8fafc!important}.aql-form-toolbar>div{display:flex!important;flex-direction:column!important}.aql-form-toolbar strong{color:#10233f!important}.aql-form-toolbar span{margin-top:2px!important;color:#64748b!important}
.aql-form-section{margin-top:10px!important;border:1px solid #dce2e8!important;border-radius:6px!important;background:#fff!important;overflow:hidden!important}.aql-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:8px 10px!important;background:#f4f6f8!important;border-bottom:1px solid #dce2e8!important}.aql-section-head>div{display:flex!important;flex-direction:column!important}.aql-section-head strong{color:#10233f!important}.aql-section-head span{color:#64748b!important;margin-top:2px!important}.aql-grid{display:grid!important;gap:8px!important;padding:10px!important}.aql-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.aql-span-2{grid-column:span 2!important}.aql-plan-table-wrap,.aql-table-scroll{overflow:auto!important;padding:0 10px 10px!important}.aql-plan-table,.aql-edit-table{width:100%!important;border-collapse:collapse!important}.aql-plan-table th,.aql-plan-table td,.aql-edit-table th,.aql-edit-table td{border:1px solid #d7dde5!important;padding:5px!important;vertical-align:middle!important}.aql-plan-table th,.aql-edit-table th{background:#f2f3f5!important;color:#374151!important;font-weight:700!important}.aql-plan-table input,.aql-edit-table input,.aql-edit-table select{width:100%!important;min-height:28px!important}.aql-plan-table td:last-child{font-weight:800!important;text-align:center!important}.aql-standard-note{margin:0 10px 10px!important;padding:7px 9px!important;border-left:3px solid #2563eb!important;background:#eff6ff!important;color:#475569!important;line-height:1.35!important}.aql-check-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:10px!important}.aql-check-row{display:grid!important;grid-template-columns:minmax(130px,.8fr) 90px minmax(180px,1.5fr)!important;align-items:center!important;gap:6px!important;padding:6px!important;border:1px solid #e2e8f0!important;border-radius:5px!important}.aql-check-row strong{color:#334155!important}.aql-notes-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:10px!important}.aql-form-actions{position:sticky!important;bottom:-12px!important;z-index:6!important;display:flex!important;justify-content:flex-end!important;gap:7px!important;margin:10px -12px -12px!important;padding:10px 12px!important;border-top:1px solid #d7dde5!important;background:#fff!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}
.aql-review-banner{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:8px 10px!important;margin:8px 0!important;border:1px solid #bfdbfe!important;border-radius:5px!important;background:#eff6ff!important}.aql-review-banner>div{display:flex!important;flex-direction:column!important}.aql-review-banner strong{color:#1e3a8a!important}.aql-review-banner span{margin-top:2px!important;color:#475569!important}
.aql-report-toolbar{position:sticky!important;top:0!important;z-index:5!important;display:flex!important;justify-content:flex-end!important;gap:7px!important;padding:8px!important;background:#fff!important;border-bottom:1px solid #dce2e8!important}.aql-report-preview{max-width:900px!important;margin:10px auto!important}.aql-print-report{font-family:Arial,sans-serif;color:#1f2937;font-size:10px}.aql-doc-page{position:relative;min-height:1120px;padding:22px 22px 45px!important;margin-bottom:12px!important;background:#fff!important;border:1px solid #d7dde5!important;box-shadow:0 2px 8px rgba(15,23,42,.08)!important}.aql-doc-head{display:flex!important;justify-content:space-between!important;border-bottom:2px solid #10233f!important;padding-bottom:7px!important;margin-bottom:6px!important}.aql-doc-head>div{display:flex!important;flex-direction:column!important}.aql-doc-head strong{font-size:18px!important;color:#10233f!important}.aql-doc-head span{color:#64748b!important}.aql-doc-head b{font-size:13px!important}.aql-doc-sub{display:flex!important;gap:16px!important;flex-wrap:wrap!important;background:#f1f5f9!important;padding:7px!important;margin-bottom:8px!important}.aql-doc-result-box{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:8px 10px!important;border:1px solid #d1d5db!important;margin:7px 0!important}.aql-doc-result-box.pass{background:#f0fdf4!important;border-color:#86efac!important}.aql-doc-result-box.fail{background:#fef2f2!important;border-color:#fca5a5!important}.aql-doc-result-box strong{font-size:16px!important}.aql-doc-meta-grid{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:5px 12px!important;margin-bottom:8px!important}.aql-doc-meta-grid>div{display:flex!important;justify-content:space-between!important;border-bottom:1px solid #e5e7eb!important;padding:4px 0!important}.aql-doc-meta-grid span{color:#64748b!important}.aql-doc-page h3{font-size:11px!important;color:#10233f!important;margin:10px 0 4px!important}.aql-doc-table{width:100%!important;border-collapse:collapse!important}.aql-doc-table th{background:#e9edf2!important;color:#334155!important}.aql-doc-table th,.aql-doc-table td{border:1px solid #cbd5e1!important;padding:4px!important;vertical-align:top!important}.aql-doc-result.pass,.pass-text{color:#166534!important;font-weight:700!important}.aql-doc-result.fail,.fail-text{color:#b91c1c!important;font-weight:700!important}.aql-doc-photo-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important}.aql-doc-photo-grid>div{border:1px solid #d1d5db!important;padding:5px!important;display:flex!important;flex-direction:column!important;gap:3px!important}.aql-doc-photo-grid img{width:100%!important;height:170px!important;object-fit:contain!important;background:#f8fafc!important}.aql-doc-photo-grid span{color:#64748b!important;font-size:9px!important}.aql-doc-note{min-height:72px!important;border:1px solid #d1d5db!important;padding:7px!important}.aql-doc-signoff{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:6px 12px!important;margin-top:10px!important}.aql-doc-signoff>div{display:flex!important;justify-content:space-between!important;border-bottom:1px solid #d1d5db!important;padding:4px!important}.aql-doc-signoff span{color:#64748b!important}.aql-doc-footer{position:absolute!important;bottom:15px!important;left:22px!important;right:22px!important;border-top:1px solid #cbd5e1!important;padding-top:4px!important;text-align:center!important;color:#64748b!important}.aql-doc-empty{grid-column:1/-1!important;padding:20px!important;text-align:center!important;color:#64748b!important}
@media(max-width:1000px){.qc-aql-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.aql-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}.aql-check-grid{grid-template-columns:1fr!important}.aql-notes-grid{grid-template-columns:1fr!important}}

/* V1.9.2.1 — AQL reports made prominent on the QC page */
.qc-aql-page{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
.qc-aql-page-head{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:14px!important;
}
.qc-aql-page-head h2{
  margin:0!important;
  color:#10233f!important;
  font-size:17px!important;
  font-weight:800!important;
}
.qc-aql-page-head p{
  margin:4px 0 0!important;
  color:#64748b!important;
  line-height:1.3!important;
}
.qc-aql-head-actions{
  display:flex!important;
  gap:7px!important;
}

.qc-aql-report-section{
  border:1px solid #cbd5e1!important;
  border-radius:8px!important;
  background:#ffffff!important;
  overflow:hidden!important;
  box-shadow:0 2px 8px rgba(15,23,42,.04)!important;
}
.qc-aql-section-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:11px 13px!important;
  border-bottom:1px solid #dce2e8!important;
  background:#f8fafc!important;
}
.qc-aql-section-head h3{
  margin:0!important;
  color:#10233f!important;
  font-size:14px!important;
  font-weight:800!important;
}
.qc-aql-section-head p{
  margin:3px 0 0!important;
  color:#64748b!important;
}
.qc-aql-section-count{
  flex:0 0 auto!important;
  padding:4px 8px!important;
  border:1px solid #bfdbfe!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-weight:800!important;
}

.qc-aql-overview-list{
  display:flex!important;
  flex-direction:column!important;
}
.qc-aql-overview-head{
  display:grid!important;
  grid-template-columns:110px minmax(160px,1.05fr) 105px 125px minmax(190px,1.2fr) minmax(190px,1.2fr)!important;
  gap:9px!important;
  align-items:center!important;
  padding:7px 11px!important;
  border-bottom:1px solid #cbd5e1!important;
  background:#e8eef5!important;
  color:#10233f!important;
  font-weight:800!important;
}
.qc-aql-overview-head>div{min-width:0!important}
.qc-aql-overview-head strong{display:block!important}
.qc-aql-overview-head small{display:block!important;margin-top:2px!important;color:#475569!important;font-weight:600!important;line-height:1.25!important}
.qc-aql-overview-row{
  display:grid!important;
  grid-template-columns:110px minmax(160px,1.05fr) 105px 125px minmax(190px,1.2fr) minmax(190px,1.2fr)!important;
  gap:9px!important;
  align-items:stretch!important;
  padding:7px 11px!important;
  border-bottom:1px solid #e8edf2!important;
}
.qc-aql-overview-row:last-child{border-bottom:0!important}
.qc-aql-overview-row:hover{background:#fbfcfd!important}
.qc-aql-overview-id,
.qc-aql-overview-product,
.qc-aql-overview-bulk,
.qc-aql-overview-pack{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  justify-content:center!important;
}
.qc-aql-overview-id strong,
.qc-aql-overview-product strong{
  color:#10233f!important;
  font-weight:800!important;
}
.qc-aql-overview-id span,
.qc-aql-overview-product span,
.qc-aql-overview-product small{
  margin-top:2px!important;
  color:#64748b!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.qc-aql-overview-bulk span,
.qc-aql-overview-pack>span{
  color:#64748b!important;
  font-weight:700!important;
}
.qc-aql-overview-bulk strong{
  margin-top:4px!important;
  color:#92400e!important;
}
.qc-aql-techpack{
  margin-top:4px!important;
  color:#1d4ed8!important;
  font-weight:800!important;
}
.qc-aql-no-techpack{
  margin-top:4px!important;
  color:#94a3b8!important;
  font-weight:700!important;
}

.qc-aql-round-card{
  min-width:0!important;
  padding:6px!important;
  border:1px solid #dce2e8!important;
  border-radius:6px!important;
  background:#ffffff!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  gap:4px!important;
}
.qc-aql-row-review{font-weight:800!important;color:#475569!important;line-height:1.2!important}
.qc-aql-row-review.is-pass{color:#166534!important}
.qc-aql-row-review.is-fail{color:#991b1b!important}
.qc-aql-row-review.is-required{color:#9a3412!important}
.qc-aql-round-card.is-secondary{
  background:#fafafa!important;
}
.qc-aql-round-card.is-required{
  border-color:#fecaca!important;
  background:#fffafa!important;
}
.qc-aql-round-title{
  display:flex!important;
  flex-direction:column!important;
}
.qc-aql-round-title span{
  color:#10233f!important;
  font-weight:800!important;
}
.qc-aql-round-title small{
  margin-top:2px!important;
  color:#64748b!important;
  line-height:1.2!important;
}

.qc-aql-primary-btn{
  width:100%!important;
  min-height:36px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  padding:7px 9px!important;
  text-align:left!important;
}
.qc-aql-primary-btn>span:last-child{
  display:flex!important;
  flex-direction:column!important;
}
.qc-aql-primary-btn small{
  margin-top:1px!important;
  opacity:.86!important;
}
.qc-aql-primary-icon{
  width:24px!important;
  min-width:24px!important;
  height:24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.2)!important;
  font-size:17px!important;
  font-weight:800!important;
}
.qc-aql-overview-action{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  flex-wrap:wrap!important;
}
.qc-aql-open-btn{
  min-height:28px!important;
  font-weight:700!important;
}
.qc-aql-pdf-btn{
  min-width:40px!important;
  min-height:28px!important;
}
.qc-aql-unavailable{
  color:#94a3b8!important;
  font-size:11px!important;
  line-height:1.25!important;
}

.qc-aql-empty{
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:18px!important;
}
.qc-aql-empty-icon{
  width:44px!important;
  height:44px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:9px!important;
  background:#eef2f7!important;
  color:#475569!important;
  font-weight:900!important;
}
.qc-aql-empty strong{color:#10233f!important}
.qc-aql-empty p{margin:3px 0 0!important;color:#64748b!important}

.qc-aql-help-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
.qc-aql-help-strip>div{
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  gap:2px 7px!important;
  padding:8px 9px!important;
  border:1px solid #e2e8f0!important;
  border-radius:6px!important;
  background:#fbfcfd!important;
}
.qc-aql-help-strip strong{
  grid-row:1/3!important;
  width:24px!important;
  height:24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  background:#10233f!important;
  color:#ffffff!important;
}
.qc-aql-help-strip span{
  color:#10233f!important;
  font-weight:800!important;
}
.qc-aql-help-strip small{
  color:#64748b!important;
  line-height:1.2!important;
}

.qc-support-section{
  margin-top:0!important;
}
.qc-support-table{
  min-width:900px!important;
}

/* Keep AQL report itself scrollable on short displays. */
.modal.qc-aql-modal-open .modal-card.qc-aql-modal-card{
  display:flex!important;
  flex-direction:column!important;
  width:min(1500px,98vw)!important;
  max-width:1500px!important;
  height:min(96vh,1100px)!important;
  max-height:96vh!important;
  min-height:0!important;
  overflow:hidden!important;
}
.modal.qc-aql-modal-open .modal-card.qc-aql-modal-card #modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:18px!important;
}
.modal.qc-aql-modal-open #qc-aql-form{
  min-height:max-content!important;
}
.modal.qc-aql-modal-open .aql-form-actions{
  position:sticky!important;
  bottom:-18px!important;
  z-index:7!important;
  margin:8px -16px -18px!important;
  padding:10px 16px!important;
  background:#ffffff!important;
  border-top:1px solid #d7dde5!important;
  box-shadow:0 -4px 10px rgba(15,23,42,.05)!important;
}

@media(max-width:1250px){
  .qc-aql-overview-head{display:none!important}
  .qc-aql-overview-row{
    grid-template-columns:100px minmax(150px,1fr) 95px minmax(170px,1.1fr) minmax(180px,1fr)!important;
  }
  .qc-aql-overview-pack{display:none!important}
}
@media(max-width:950px){
  .qc-aql-overview-row{
    grid-template-columns:100px minmax(150px,1fr) minmax(180px,1.1fr)!important;
  }
  .qc-aql-overview-bulk{display:none!important}
  .qc-aql-round-card{grid-column:auto!important}
  .qc-aql-help-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:650px){
  .qc-aql-page-head{align-items:flex-start!important;flex-direction:column!important}
  .qc-aql-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .qc-aql-overview-row{grid-template-columns:1fr!important}
  .qc-aql-round-card{grid-column:1!important}
  .qc-aql-help-strip{grid-template-columns:1fr!important}
  .qc-aql-empty{grid-template-columns:44px 1fr!important}
  .qc-aql-empty button{grid-column:1/3!important}
}

/* V1.9.2.2 — always-visible Start QC Inspection workflow */
.qc-start-inspection-btn{
  min-width:190px!important;
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  padding:7px 11px!important;
  text-align:left!important;
  box-shadow:0 3px 9px rgba(37,99,235,.16)!important;
}
.qc-start-inspection-btn>span:last-child{
  display:flex!important;
  flex-direction:column!important;
}
.qc-start-inspection-btn small{
  margin-top:1px!important;
  opacity:.88!important;
}
.qc-start-inspection-icon{
  width:27px!important;
  min-width:27px!important;
  height:27px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.2)!important;
  font-size:19px!important;
  font-weight:900!important;
}
.qc-aql-empty-actions{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
}

.qc-start-page{
  display:flex!important;
  flex-direction:column!important;
  gap:11px!important;
}
.qc-start-intro{
  padding:10px 11px!important;
  border:1px solid #bfdbfe!important;
  border-radius:6px!important;
  background:#eff6ff!important;
  display:flex!important;
  flex-direction:column!important;
}
.qc-start-intro strong{color:#1e3a8a!important}
.qc-start-intro span{margin-top:3px!important;color:#475569!important}

.qc-start-list{
  display:flex!important;
  flex-direction:column!important;
  border:1px solid #dce2e8!important;
  border-radius:6px!important;
  overflow:hidden!important;
}
.qc-start-row{
  display:grid!important;
  grid-template-columns:110px minmax(190px,1fr) 100px 100px minmax(220px,auto)!important;
  align-items:center!important;
  gap:9px!important;
  min-height:66px!important;
  padding:8px 10px!important;
  border-bottom:1px solid #e8edf2!important;
  background:#ffffff!important;
}
.qc-start-row:last-child{border-bottom:0!important}
.qc-start-row:hover{background:#fbfcfd!important}
.qc-start-po,
.qc-start-product,
.qc-start-status{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
.qc-start-po strong,
.qc-start-product strong{color:#10233f!important;font-weight:800!important}
.qc-start-po span,
.qc-start-product span,
.qc-start-product small{margin-top:2px!important;color:#64748b!important}
.qc-start-product span{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.qc-start-status span{color:#64748b!important;font-weight:700!important}
.qc-start-status strong{margin-top:3px!important;color:#334155!important}
.qc-start-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
.qc-start-action-btn{
  min-height:32px!important;
  font-weight:700!important;
}

.qc-start-empty{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
.qc-start-empty-icon{
  width:48px!important;
  height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:9px!important;
  background:#eef2f7!important;
  color:#475569!important;
  font-weight:900!important;
}
.qc-start-empty h3{
  margin:0!important;
  color:#10233f!important;
}
.qc-start-empty p{
  margin:5px 0 0!important;
  color:#64748b!important;
  line-height:1.35!important;
}
.qc-start-upcoming{
  border:1px solid #e2e8f0!important;
  border-radius:6px!important;
  overflow:hidden!important;
}
.qc-start-upcoming-head{
  padding:7px 9px!important;
  background:#f8fafc!important;
  border-bottom:1px solid #e2e8f0!important;
  color:#475569!important;
  font-weight:800!important;
}
.qc-start-upcoming-row{
  display:grid!important;
  grid-template-columns:100px minmax(180px,1fr) 90px 100px!important;
  gap:8px!important;
  padding:7px 9px!important;
  border-bottom:1px solid #edf0f3!important;
  align-items:center!important;
}
.qc-start-upcoming-row:last-child{border-bottom:0!important}
.qc-start-upcoming-row strong{color:#10233f!important}
.qc-start-upcoming-row span{color:#64748b!important}
.qc-start-upcoming-row b{color:#92400e!important}

@media(max-width:900px){
  .qc-aql-head-actions{
    width:100%!important;
    flex-wrap:wrap!important;
  }
  .qc-start-inspection-btn{
    flex:1 1 220px!important;
  }
  .qc-start-row{
    grid-template-columns:100px minmax(150px,1fr) 90px!important;
  }
  .qc-start-actions{
    grid-column:2/4!important;
    justify-content:flex-start!important;
  }
}
@media(max-width:600px){
  .qc-start-row{
    grid-template-columns:1fr!important;
  }
  .qc-start-actions{
    grid-column:1!important;
    justify-content:flex-start!important;
  }
  .qc-start-upcoming-row{
    grid-template-columns:1fr!important;
  }
}

/* V1.9.2.3 — consolidated AQL-only QC workflow */
.aql-photo-upload-btn{display:inline-flex!important;align-items:center!important;cursor:pointer!important}
.aql-photo-upload-btn input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.aql-photo-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;margin-top:9px!important}
.aql-photo-card{min-width:0!important;padding:7px!important;border:1px solid #dce2e8!important;border-radius:6px!important;background:#fff!important;display:flex!important;flex-direction:column!important;gap:4px!important}
.aql-photo-image-wrap{position:relative!important;height:150px!important;border-radius:5px!important;overflow:hidden!important;background:#f1f5f9!important}
.aql-photo-image-wrap img{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important}
.aql-photo-remove{position:absolute!important;right:5px!important;top:5px!important;width:24px!important;height:24px!important;border:0!important;border-radius:50%!important;background:rgba(185,28,28,.92)!important;color:#fff!important;font-size:17px!important;font-weight:800!important;cursor:pointer!important}
.aql-photo-card strong{color:#10233f!important;overflow-wrap:anywhere!important}
.aql-photo-card small{color:#64748b!important}.aql-photo-card label{margin-top:3px!important;color:#475569!important;font-weight:700!important}
.aql-photo-caption{width:100%!important;box-sizing:border-box!important;resize:vertical!important}
.aql-general-notes{margin-top:10px!important}
.aql-photo-preview-caption{margin:8px auto!important;max-width:900px!important;padding:9px 11px!important;border:1px solid #dce2e8!important;border-radius:5px!important;background:#f8fafc!important;color:#334155!important;white-space:pre-wrap!important}
.qc-aql-review-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;margin:9px 0!important}
.qc-aql-review-summary>div{padding:8px 9px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}
.qc-aql-review-summary span{color:#64748b!important;font-weight:700!important}.qc-aql-review-summary strong{margin-top:3px!important;color:#10233f!important}
.qc-aql-review-notes-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:10px 0!important}
.qc-aql-review-notes-grid>div{min-width:0!important;padding:9px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#fff!important}
.qc-aql-review-notes-grid strong{color:#10233f!important}.qc-aql-review-notes-grid p{margin:5px 0 0!important;color:#475569!important;white-space:normal!important;line-height:1.35!important}
.qc-review-overall-input textarea{margin-top:6px!important;width:100%!important;box-sizing:border-box!important}
.qc-review-no-photos{margin:9px 0!important;padding:10px!important;border:1px dashed #cbd5e1!important;border-radius:5px!important;color:#64748b!important;background:#f8fafc!important}
.aql-doc-photo-grid>div p{margin:4px 0!important;color:#374151!important;line-height:1.25!important;white-space:normal!important}
@media(max-width:1100px){.aql-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:800px){.aql-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.qc-aql-review-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.qc-aql-review-notes-grid{grid-template-columns:1fr!important}}
@media(max-width:520px){.aql-photo-grid{grid-template-columns:1fr!important}}

/* V1.9.2.4 — automatic Sampling / AQL planner */
.aql-auto-section{
  border-color:#bfdbfe!important;
}
.aql-auto-section>.aql-section-head{
  background:#f8fbff!important;
}
.aql-auto-badge{
  flex:0 0 auto!important;
  padding:4px 8px!important;
  border:1px solid #93c5fd!important;
  border-radius:999px!important;
  background:#dbeafe!important;
  color:#1d4ed8!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.04em!important;
}
.aql-auto-plan-note{
  margin:9px 0!important;
  padding:8px 10px!important;
  border:1px solid #bfdbfe!important;
  border-radius:5px!important;
  background:#eff6ff!important;
  color:#334155!important;
  line-height:1.35!important;
}
.aql-auto-plan-note.aql-plan-full{
  border-color:#fed7aa!important;
  background:#fff7ed!important;
}
.aql-auto-plan-note.aql-plan-manual{
  border-color:#d7dde5!important;
  background:#f8fafc!important;
}
.aql-plan-explainer{
  min-height:31px!important;
  display:flex!important;
  align-items:center!important;
  padding:5px 7px!important;
  border:1px solid #e2e8f0!important;
  border-radius:4px!important;
  background:#f8fafc!important;
  color:#64748b!important;
}
.aql-auto-field{
  background:#f1f5f9!important;
  color:#334155!important;
  font-weight:700!important;
}
.aql-plan-table td:first-child{
  min-width:125px!important;
}
.aql-class-help{
  display:block!important;
  margin-top:2px!important;
  color:#64748b!important;
  font-weight:400!important;
}
.aql-plan-table select{
  min-width:112px!important;
}
.aql-sample-status{
  display:block!important;
  margin-top:3px!important;
  color:#64748b!important;
  font-size:10px!important;
  line-height:1.2!important;
}
.aql-sample-status.aql-sample-ok{
  color:#166534!important;
  font-weight:700!important;
}
.aql-sample-status.aql-sample-short{
  color:#b91c1c!important;
  font-weight:800!important;
}

/* V1.9.2.5 — inspector-only defect classification guide + practical default sample */
.aql-defect-head-actions{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
.aql-defect-mini-reminder{
  display:flex!important;
  gap:7px!important;
  flex-wrap:wrap!important;
  margin:8px 0!important;
}
.aql-defect-mini-reminder span{
  padding:5px 7px!important;
  border:1px solid #e2e8f0!important;
  border-radius:999px!important;
  background:#f8fafc!important;
  color:#475569!important;
  font-size:11px!important;
}
.aql-defect-mini-reminder span:nth-child(1){
  border-color:#fecaca!important;
  background:#fff7f7!important;
}
.aql-defect-mini-reminder span:nth-child(2){
  border-color:#fed7aa!important;
  background:#fffaf3!important;
}
.aql-defect-mini-reminder span:nth-child(3){
  border-color:#bfdbfe!important;
  background:#f8fbff!important;
}

.aql-defect-guide{
  margin:8px 0 10px!important;
  border:1px solid #cbd5e1!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:0 8px 20px rgba(15,23,42,.08)!important;
  overflow:hidden!important;
}
.aql-defect-guide.hidden{display:none!important}
.aql-defect-guide-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:9px 10px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:#f8fafc!important;
}
.aql-defect-guide-head>div{
  display:flex!important;
  flex-direction:column!important;
}
.aql-defect-guide-head strong{
  color:#10233f!important;
}
.aql-defect-guide-head span{
  margin-top:2px!important;
  color:#64748b!important;
  font-size:11px!important;
}
.aql-defect-guide-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  padding:9px!important;
}
.aql-defect-guide-card{
  min-width:0!important;
  padding:9px!important;
  border:1px solid #e2e8f0!important;
  border-radius:6px!important;
  background:#fff!important;
}
.aql-defect-guide-card.critical{
  border-top:3px solid #dc2626!important;
  background:#fffafa!important;
}
.aql-defect-guide-card.major{
  border-top:3px solid #d97706!important;
  background:#fffdf8!important;
}
.aql-defect-guide-card.minor{
  border-top:3px solid #2563eb!important;
  background:#fbfdff!important;
}
.aql-defect-guide-title{
  display:flex!important;
  flex-direction:column!important;
}
.aql-defect-guide-title strong{
  color:#10233f!important;
  font-size:13px!important;
}
.aql-defect-guide-title span{
  margin-top:2px!important;
  color:#64748b!important;
  font-weight:700!important;
}
.aql-defect-guide-card p{
  margin:7px 0!important;
  color:#475569!important;
  line-height:1.3!important;
}
.aql-defect-guide-card ul{
  margin:0!important;
  padding-left:17px!important;
  color:#334155!important;
}
.aql-defect-guide-card li{
  margin:3px 0!important;
  line-height:1.25!important;
}
.aql-defect-guide-foot{
  padding:8px 10px!important;
  border-top:1px solid #e2e8f0!important;
  background:#f8fafc!important;
  color:#64748b!important;
  line-height:1.3!important;
}

.aql-random-sample-reminder{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  margin:8px 0!important;
  padding:8px 10px!important;
  border-left:3px solid #0f766e!important;
  background:#f0fdfa!important;
  color:#334155!important;
}
.aql-random-sample-reminder strong{color:#0f766e!important}
.aql-random-sample-reminder span{line-height:1.3!important}

@media(max-width:900px){
  .aql-defect-guide-grid{
    grid-template-columns:1fr!important;
  }
}

/* V1.9.2.6 — protected RIMAN standard Ac/Re defaults */
.aql-riman-standard-box{
  display:grid!important;
  grid-template-columns:minmax(170px,.9fr) minmax(320px,1.6fr) minmax(230px,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  margin:8px 0!important;
  padding:9px 10px!important;
  border:1px solid #bbf7d0!important;
  border-radius:6px!important;
  background:#f0fdf4!important;
}
.aql-riman-standard-box.inactive{
  opacity:.6!important;
  background:#f8fafc!important;
  border-color:#e2e8f0!important;
}
.aql-riman-standard-box>div:first-child{
  display:flex!important;
  flex-direction:column!important;
}
.aql-riman-standard-box>div:first-child strong{
  color:#166534!important;
  font-weight:900!important;
}
.aql-riman-standard-mode{
  margin-top:2px!important;
  color:#64748b!important;
  font-size:10px!important;
}
.aql-riman-standard-values{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
.aql-riman-standard-values span{
  padding:4px 7px!important;
  border:1px solid #dcfce7!important;
  border-radius:999px!important;
  background:#ffffff!important;
  color:#334155!important;
  white-space:nowrap!important;
}
.aql-riman-override-wrap{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  justify-content:flex-end!important;
  color:#475569!important;
  font-weight:700!important;
  cursor:pointer!important;
}
.aql-riman-override-wrap input{
  width:16px!important;
  height:16px!important;
}
@media(max-width:1000px){
  .aql-riman-standard-box{
    grid-template-columns:1fr!important;
  }
  .aql-riman-override-wrap{
    justify-content:flex-start!important;
  }
}

/* V1.9.2.7 — clearer RIMAN internal inspection vs formal AQL */
.aql-riman-standard-box>div:first-child strong{
  color:#166534!important;
}
.aql-auto-section .aql-section-head .aql-auto-badge{
  min-width:86px!important;
  text-align:center!important;
}

/* V1.9.2.8 — Fabric Composition terminology */
.tp-fabric-composition{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.35!important;
}

/* V1.9.2.9 — resilient Product -> Fabric -> Tech Pack linkage */
.tp-fabric-card.tp-fabric-missing{
  border-color:#fed7aa!important;
  background:#fff7ed!important;
}
.tp-fabric-card.tp-fabric-missing span{
  color:#9a3412!important;
  line-height:1.35!important;
}

/* V1.9.3.0 — Packing Lists & Shipping Documents */
.shipment-doc-cell{white-space:nowrap!important}
.shipment-doc-pill{min-height:26px!important;padding:3px 7px!important;border:1px solid #cbd5e1!important;border-radius:999px!important;background:#fff!important;color:#334155!important;font-weight:800!important;cursor:pointer!important;font-size:10px!important}
.shipment-doc-pill.packing-final{border-color:#bbf7d0!important;background:#f0fdf4!important;color:#166534!important}
.shipment-doc-pill.packing-draft{border-color:#fde68a!important;background:#fffbeb!important;color:#92400e!important}
.shipment-doc-pill.packing-none{border-color:#cbd5e1!important;background:#f8fafc!important;color:#64748b!important}
.shipment-doc-pill.shipment-doc-count{border-color:#bfdbfe!important;background:#eff6ff!important;color:#1d4ed8!important}
.shipment-linked-doc-actions{display:flex!important;align-items:center!important;gap:7px!important;padding:9px 10px!important;border:1px solid #dbeafe!important;border-radius:6px!important;background:#f8fbff!important}
.shipment-linked-doc-actions>div{display:flex!important;flex-direction:column!important;margin-right:auto!important}.shipment-linked-doc-actions strong{color:#10233f!important}.shipment-linked-doc-actions span{margin-top:2px!important;color:#64748b!important;font-size:11px!important}

.modal-card.packing-list-modal-card{display:flex!important;flex-direction:column!important;width:min(1600px,98vw)!important;max-width:1600px!important;height:min(96vh,1100px)!important;max-height:96vh!important;min-height:0!important;overflow:hidden!important}
.modal-card.packing-list-modal-card #modal-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding-bottom:18px!important}
#packing-list-form{min-width:1260px!important}
.packing-list-head{display:flex!important;justify-content:space-between!important;gap:10px!important;align-items:flex-start!important}
.packing-list-identity{display:grid!important;grid-template-columns:repeat(7,minmax(100px,1fr))!important;gap:6px!important;flex:1 1 auto!important}
.packing-list-identity>div{padding:7px 8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}
.packing-list-identity span{color:#64748b!important;font-size:10px!important}.packing-list-identity strong{margin-top:2px!important;color:#10233f!important}
.packing-list-actions-top{display:flex!important;gap:6px!important}.packing-status.packing-final{color:#166534!important}.packing-status.packing-draft{color:#92400e!important}
.packing-list-lock{margin:9px 0!important;padding:8px 10px!important;border:1px solid #bbf7d0!important;border-radius:5px!important;background:#f0fdf4!important;color:#166534!important;font-weight:700!important}
.packing-list-table-wrap{margin-top:10px!important;overflow:auto!important;border:1px solid #d7dde5!important;border-radius:6px!important}
.packing-list-edit-table{width:100%!important;min-width:1450px!important;border-collapse:collapse!important}
.packing-list-edit-table th,.packing-list-edit-table td{padding:5px!important;border:1px solid #e1e5ea!important;vertical-align:top!important}
.packing-list-edit-table th{background:#f3f4f6!important;color:#10233f!important;white-space:nowrap!important}
.packing-list-edit-table td:nth-child(2){min-width:130px!important}.packing-list-edit-table td:nth-child(2) small{display:block!important;margin-top:2px!important;color:#64748b!important}
.packing-list-edit-table .pl-size-breakdown{min-width:150px!important;white-space:normal!important}.packing-list-edit-table input{min-width:70px!important;width:80px!important}
.packing-list-edit-table textarea{min-width:135px!important;width:100%!important;resize:vertical!important}.packing-list-edit-table .pl-shipping-mark{min-width:160px!important}
.pl-carton-range{white-space:nowrap!important;font-weight:800!important;color:#334155!important}.packing-list-remarks{margin-top:10px!important}
.packing-list-form-actions{position:sticky!important;bottom:-18px!important;z-index:5!important;margin:10px -16px -18px!important;padding:10px 16px!important;border-top:1px solid #d7dde5!important;background:#fff!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}

.modal-card.packing-preview-modal{width:min(1500px,98vw)!important;max-width:1500px!important;height:min(96vh,1100px)!important;max-height:96vh!important;overflow:hidden!important}
.modal-card.packing-preview-modal #modal-body{height:100%!important;overflow:auto!important}.packing-preview-scroll{min-width:1200px!important;padding:10px!important;background:#eef2f7!important}
.packing-doc{width:1120px!important;margin:0 auto!important;padding:24px!important;background:#fff!important;color:#111827!important;box-shadow:0 2px 10px rgba(15,23,42,.12)!important}
.packing-doc-head{display:flex!important;justify-content:space-between!important;border-bottom:2px solid #10233f!important;padding-bottom:7px!important;margin-bottom:8px!important}.packing-doc-head>div{display:flex!important;flex-direction:column!important}.packing-doc-head strong{font-size:18px!important;color:#10233f!important}
.packing-doc-meta{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:5px!important;margin-bottom:8px!important}.packing-doc-meta>div{border:1px solid #d1d5db!important;padding:5px!important}.packing-doc-meta span{display:block!important;color:#6b7280!important;font-size:9px!important}
.packing-doc-table{width:100%!important;border-collapse:collapse!important;font-size:9px!important}.packing-doc-table th,.packing-doc-table td{border:1px solid #9ca3af!important;padding:4px!important;vertical-align:top!important}.packing-doc-table th{background:#f3f4f6!important;color:#10233f!important}
.packing-doc-mark small{display:block!important;margin-top:3px!important;color:#64748b!important}.packing-doc-remarks{margin-top:8px!important;border:1px solid #d1d5db!important;padding:6px!important}
.packing-doc-signoff{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:5px!important;margin-top:8px!important}.packing-doc-signoff>div{border-top:1px solid #9ca3af!important;padding-top:4px!important}.packing-doc-signoff span{display:block!important;color:#64748b!important;font-size:9px!important}

.modal-card.shipment-docs-modal-card{width:min(1050px,96vw)!important;max-width:1050px!important;max-height:94vh!important;overflow:hidden!important}.modal-card.shipment-docs-modal-card #modal-body{max-height:calc(94vh - 58px)!important;overflow:auto!important}
.shipment-docs-summary{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important;margin-bottom:10px!important}.shipment-docs-summary>div{padding:8px 9px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.shipment-docs-summary span{color:#64748b!important;font-size:10px!important}.shipment-docs-summary strong{margin-top:2px!important;color:#10233f!important}
.shipment-docs-list{border:1px solid #dce2e8!important;border-radius:6px!important;overflow:hidden!important}
.shipment-doc-row{display:grid!important;grid-template-columns:minmax(240px,1.3fr) minmax(230px,1fr) minmax(170px,auto)!important;gap:10px!important;align-items:center!important;padding:9px 10px!important;border-bottom:1px solid #e8edf2!important;background:#fff!important}.shipment-doc-row:last-child{border-bottom:0!important}
.shipment-doc-row>div:first-child{display:flex!important;flex-direction:column!important}.shipment-doc-row>div:first-child strong{color:#10233f!important}.shipment-doc-row>div:first-child span{margin-top:2px!important;color:#64748b!important;font-size:11px!important}
.shipment-doc-upload{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}.shipment-doc-upload input{max-width:100%!important}.shipment-doc-upload span{color:#64748b!important;overflow-wrap:anywhere!important}
.shipment-doc-actions{display:flex!important;justify-content:flex-end!important;gap:5px!important;align-items:center!important}.shipment-doc-status{font-weight:800!important;color:#475569!important}
@media(max-width:800px){.shipment-linked-doc-actions{align-items:flex-start!important;flex-direction:column!important}.shipment-doc-row{grid-template-columns:1fr!important}.shipment-doc-actions{justify-content:flex-start!important}.shipment-docs-summary{grid-template-columns:1fr!important}}

/* V1.9.3.1 — Critical Path stage-filter visibility fix */
.shipment-ready-empty-help{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  padding:12px!important;
  border:1px dashed #cbd5e1!important;
  border-radius:6px!important;
  background:#f8fafc!important;
  color:#475569!important;
}
.shipment-ready-empty-help strong{color:#10233f!important}
.shipment-ready-empty-help span{line-height:1.4!important}
.shipment-created-empty{line-height:1.45!important}

/* V1.9.4.0 — Task Assignment / My Tasks */
.nav-btn{position:relative!important}
.task-nav-badge{
  position:absolute!important;
  right:8px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  min-width:18px!important;
  height:18px!important;
  padding:0 5px!important;
  border-radius:999px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#dc2626!important;
  color:#fff!important;
  font-size:9px!important;
  font-weight:900!important;
}
.sidebar-collapsed .task-nav-badge{right:2px!important;top:5px!important;transform:none!important;min-width:14px!important;height:14px!important;font-size:8px!important;padding:0 3px!important}

.tasks-page{display:flex!important;flex-direction:column!important;gap:10px!important}
.tasks-topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
.tasks-view-tabs{display:flex!important;gap:4px!important;padding:3px!important;border:1px solid #dbe1e8!important;border-radius:6px!important;background:#f8fafc!important}
.tasks-view-tabs button{padding:6px 11px!important;border:0!important;border-radius:4px!important;background:transparent!important;color:#64748b!important;font-weight:800!important;cursor:pointer!important}
.tasks-view-tabs button.active{background:#10233f!important;color:#fff!important}

.task-summary-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.task-summary-grid>div,.task-summary-grid>button{
  min-height:70px!important;padding:10px 12px!important;border:1px solid #dce2e8!important;border-radius:7px!important;background:#fff!important;text-align:left!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;cursor:default!important
}
.task-summary-grid>button{cursor:pointer!important}
.task-summary-grid span{color:#64748b!important;font-size:11px!important;font-weight:700!important}.task-summary-grid strong{margin-top:4px!important;color:#10233f!important;font-size:23px!important}
.task-summary-due{border-left:4px solid #f59e0b!important}.task-summary-overdue{border-left:4px solid #dc2626!important}.task-summary-overdue strong{color:#b91c1c!important}

.task-filterbar{display:grid!important;grid-template-columns:minmax(260px,1fr) 155px 150px auto!important;gap:7px!important;align-items:center!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important}
.task-filterbar input,.task-filterbar select{height:34px!important}.task-filter-count{color:#64748b!important;font-weight:800!important;white-space:nowrap!important}

.task-list{display:flex!important;flex-direction:column!important;gap:7px!important}
.task-card{display:grid!important;grid-template-columns:82px minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;padding:10px 11px!important;border:1px solid #dfe4ea!important;border-radius:7px!important;background:#fff!important}
.task-card.task-overdue{border-left:4px solid #dc2626!important}.task-card.task-complete{opacity:.72!important;background:#f8fafc!important}
.task-card-priority span{display:inline-flex!important;min-width:64px!important;justify-content:center!important;padding:4px 7px!important;border-radius:999px!important;font-size:10px!important;font-weight:900!important}
.task-priority-low{background:#f1f5f9!important;color:#475569!important}.task-priority-normal{background:#dbeafe!important;color:#1d4ed8!important}.task-priority-high{background:#ffedd5!important;color:#c2410c!important}.task-priority-urgent{background:#fee2e2!important;color:#b91c1c!important}
.task-card-title-row{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}.task-card-title-row>strong{color:#10233f!important;font-size:13px!important}.task-card-main p{margin:5px 0!important;color:#475569!important;line-height:1.35!important}
.task-status{padding:3px 6px!important;border-radius:999px!important;font-size:9px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.02em!important}
.task-status-to-do{background:#f1f5f9!important;color:#475569!important}.task-status-in-progress{background:#dbeafe!important;color:#1d4ed8!important}.task-status-blocked{background:#fee2e2!important;color:#b91c1c!important}.task-status-complete{background:#dcfce7!important;color:#166534!important}
.task-card-meta{display:flex!important;gap:10px!important;flex-wrap:wrap!important;color:#64748b!important;font-size:10px!important}.task-card-meta b{color:#475569!important}.task-due-overdue{color:#b91c1c!important;font-weight:900!important}.task-due-today{color:#b45309!important;font-weight:900!important}
.task-card-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;flex-wrap:wrap!important;max-width:330px!important}
.task-empty{padding:34px!important;border:1px dashed #cbd5e1!important;border-radius:7px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important}.task-empty strong{color:#10233f!important}.task-empty span{margin-top:4px!important;color:#64748b!important}

.modal-card.task-modal-card{width:min(1050px,96vw)!important;max-width:1050px!important;max-height:94vh!important;overflow:hidden!important}
.modal-card.task-modal-card #modal-body{max-height:calc(94vh - 58px)!important;overflow:auto!important;padding-bottom:18px!important}
.task-form-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important}.task-title-field{grid-column:span 2!important}.task-form-grid .full{grid-column:1/-1!important}
.task-existing-meta{display:flex!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;margin:10px 0!important;padding:7px 9px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;color:#64748b!important}
.task-history{margin-top:10px!important;border:1px solid #dce2e8!important;border-radius:6px!important;overflow:hidden!important}.task-history-title{padding:8px 10px!important;background:#f8fafc!important;border-bottom:1px solid #e2e8f0!important;color:#10233f!important;font-weight:900!important}
.task-history-row{display:grid!important;grid-template-columns:150px minmax(0,1fr) 120px!important;gap:8px!important;padding:8px 10px!important;border-bottom:1px solid #edf0f3!important;align-items:start!important}.task-history-row:last-child{border-bottom:0!important}.task-history-row>div{display:flex!important;flex-direction:column!important}.task-history-row span,.task-history-row time{color:#64748b!important;font-size:10px!important}.task-history-row p{margin:0!important;color:#334155!important}
.task-form-actions{position:sticky!important;bottom:-18px!important;z-index:5!important;margin:12px -16px -18px!important;padding:10px 16px!important;background:#fff!important;border-top:1px solid #d7dde5!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}.task-delete-btn{margin-right:auto!important}

@media(max-width:900px){
 .task-summary-grid{grid-template-columns:repeat(2,1fr)!important}.task-filterbar{grid-template-columns:1fr 1fr!important}.task-card{grid-template-columns:1fr!important}.task-card-actions{justify-content:flex-start!important;max-width:none!important}.task-form-grid{grid-template-columns:1fr!important}.task-title-field,.task-form-grid .full{grid-column:auto!important}.task-history-row{grid-template-columns:1fr!important}
}

.task-linked-critical-row{
  outline:2px solid #2563eb!important;
  outline-offset:-2px!important;
  background:#eff6ff!important;
}
.task-linked-critical-row>td{background:#eff6ff!important}

/* V1.9.5.0 — Compliance & Certification */
.compliance-page{display:flex!important;flex-direction:column!important;gap:10px!important}
.compliance-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important}
.compliance-head h2{margin:0!important;color:#10233f!important}.compliance-head p{margin:4px 0 0!important;color:#64748b!important;max-width:850px!important;line-height:1.4!important}

.compliance-summary-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.compliance-summary-grid>div{min-height:72px!important;padding:10px 12px!important;border:1px solid #dce2e8!important;border-radius:7px!important;background:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
.compliance-summary-grid span{color:#64748b!important;font-size:11px!important;font-weight:700!important}.compliance-summary-grid strong{margin-top:4px!important;color:#10233f!important;font-size:23px!important}
.comp-summary-expiring{border-left:4px solid #f59e0b!important}.comp-summary-expired{border-left:4px solid #dc2626!important}.comp-summary-expired strong{color:#b91c1c!important}.comp-summary-missing{border-left:4px solid #64748b!important}

.compliance-missing-panel{border:1px solid #fed7aa!important;border-radius:7px!important;background:#fffaf3!important;overflow:hidden!important}
.compliance-section-head{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:9px 11px!important;border-bottom:1px solid #fed7aa!important}.compliance-section-head>div{display:flex!important;flex-direction:column!important}.compliance-section-head strong{color:#9a3412!important}.compliance-section-head span{color:#64748b!important;font-size:11px!important}.compliance-section-head>span{min-width:26px!important;height:26px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;background:#ffedd5!important;color:#9a3412!important;font-weight:900!important}
.compliance-missing-list{display:flex!important;flex-direction:column!important}.compliance-missing-list>div{display:grid!important;grid-template-columns:minmax(220px,1fr) minmax(180px,1fr) auto!important;gap:8px!important;align-items:center!important;padding:7px 10px!important;border-bottom:1px solid #ffedd5!important}.compliance-missing-list>div:last-child{border-bottom:0!important}.compliance-missing-list>div>div{display:flex!important;flex-direction:column!important}.compliance-missing-list span{color:#64748b!important;font-size:10px!important}.compliance-more{padding:7px 10px!important}

.compliance-filterbar{display:grid!important;grid-template-columns:minmax(280px,1fr) 160px 150px auto!important;gap:7px!important;align-items:center!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important}.compliance-filterbar input,.compliance-filterbar select{height:34px!important}.compliance-filterbar>span{color:#64748b!important;font-weight:800!important;white-space:nowrap!important}
.compliance-table{min-width:1220px!important}.compliance-table td small{display:block!important;margin-top:3px!important}.compliance-scope-chip{display:inline-flex!important;padding:2px 5px!important;border-radius:999px!important;background:#f1f5f9!important;color:#475569!important;font-size:9px!important;font-weight:800!important}.compliance-link-label{margin-top:3px!important;color:#334155!important;max-width:190px!important;white-space:normal!important}
.compliance-status,.comp-mini{display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;font-weight:900!important;white-space:nowrap!important}
.compliance-status{padding:3px 7px!important;font-size:9px!important}.comp-mini{padding:3px 6px!important;font-size:9px!important}
.comp-active{background:#dcfce7!important;color:#166534!important}.comp-expiring{background:#fef3c7!important;color:#92400e!important}.comp-expired{background:#fee2e2!important;color:#b91c1c!important}.comp-no-expiry{background:#e0f2fe!important;color:#075985!important}.comp-missing{background:#ffedd5!important;color:#9a3412!important}
.comp-pdf-missing{color:#b45309!important;font-weight:800!important}
.compliance-link-btn{border:0!important;background:transparent!important;padding:0!important;cursor:pointer!important}

.modal-card.compliance-modal-card{width:min(1050px,96vw)!important;max-width:1050px!important;max-height:94vh!important;overflow:hidden!important}.modal-card.compliance-modal-card #modal-body{max-height:calc(94vh - 58px)!important;overflow:auto!important}
.compliance-form-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important}.compliance-form-grid .full{grid-column:1/-1!important}.compliance-form-grid small{display:block!important;margin-top:3px!important;color:#64748b!important}
.compliance-current-file{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;margin-top:5px!important;padding:6px 8px!important;border:1px solid #dbe1e8!important;border-radius:5px!important;background:#f8fafc!important}.compliance-current-file span{color:#334155!important}.compliance-current-file label{display:flex!important;align-items:center!important;gap:4px!important;margin-left:auto!important}
.compliance-form-note{margin-top:10px!important;padding:8px 10px!important;border-left:3px solid #64748b!important;background:#f8fafc!important;color:#475569!important;line-height:1.4!important}
.product-compliance-cell{white-space:nowrap!important}

@media(max-width:900px){
 .compliance-summary-grid{grid-template-columns:repeat(2,1fr)!important}.compliance-filterbar{grid-template-columns:1fr 1fr!important}.compliance-missing-list>div{grid-template-columns:1fr!important}.compliance-form-grid{grid-template-columns:1fr!important}.compliance-form-grid .full{grid-column:auto!important}
}

/* V1.9.6.0 — Sample Management */
.sample-mgmt-page{display:flex!important;flex-direction:column!important;gap:10px!important}
.sample-mgmt-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important}
.sample-mgmt-head h2{margin:0!important;color:#10233f!important}.sample-mgmt-head p{margin:4px 0 0!important;color:#64748b!important;line-height:1.4!important}
.sample-mgmt-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.sample-mgmt-summary>div{min-height:70px!important;padding:10px 12px!important;border:1px solid #dce2e8!important;border-radius:7px!important;background:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
.sample-mgmt-summary span{color:#64748b!important;font-size:11px!important;font-weight:700!important}.sample-mgmt-summary strong{margin-top:4px!important;font-size:22px!important;color:#10233f!important}
.sample-pipeline-panel{border:1px solid #dce2e8!important;border-radius:7px!important;overflow:hidden!important;background:#fff!important}.sample-section-head{padding:9px 11px!important;border-bottom:1px solid #e2e8f0!important;background:#f8fafc!important}.sample-section-head>div{display:flex!important;flex-direction:column!important}.sample-section-head strong{color:#10233f!important}.sample-section-head span{color:#64748b!important;font-size:11px!important}
.sample-pipeline-table{min-width:1050px!important}.sample-pipeline-table td:nth-child(2) small,.sample-history-table td small{display:block!important;margin-top:2px!important;color:#64748b!important}
.sample-pipeline-status,.sample-mgmt-stage-btn{border:0!important;border-radius:999px!important;padding:4px 7px!important;font-weight:900!important;font-size:9px!important;cursor:pointer!important;white-space:nowrap!important}
.sample-mgmt-waiting{background:#f1f5f9!important;color:#475569!important}.sample-mgmt-in-transit{background:#dbeafe!important;color:#1d4ed8!important}.sample-mgmt-received,.sample-mgmt-under-review{background:#fef3c7!important;color:#92400e!important}.sample-mgmt-approved{background:#dcfce7!important;color:#166534!important}.sample-mgmt-rejected{background:#fee2e2!important;color:#b91c1c!important}
.sample-mgmt-filterbar{display:grid!important;grid-template-columns:minmax(280px,1fr) 160px 160px auto!important;gap:7px!important;align-items:center!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important}.sample-mgmt-filterbar input,.sample-mgmt-filterbar select{height:34px!important}.sample-mgmt-filterbar span{color:#64748b!important;font-weight:800!important;white-space:nowrap!important}
.sample-history-table{min-width:1200px!important}.sample-mgmt-status{display:inline-flex!important;padding:3px 7px!important;border-radius:999px!important;font-weight:900!important;font-size:9px!important}

.modal-card.sample-history-modal-card{width:min(1000px,96vw)!important;max-width:1000px!important;max-height:94vh!important;overflow:hidden!important}.modal-card.sample-history-modal-card #modal-body{max-height:calc(94vh - 58px)!important;overflow:auto!important}
.sample-line-head{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;margin-bottom:10px!important}.sample-line-head>div{padding:7px 8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.sample-line-head span{color:#64748b!important;font-size:10px!important}.sample-line-head strong{margin-top:2px!important;color:#10233f!important}
.sample-round-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))!important;gap:8px!important}.sample-round-card{padding:10px!important;border:1px solid transparent!important;border-radius:7px!important;text-align:left!important;display:flex!important;flex-direction:column!important;cursor:pointer!important}.sample-round-card>span{font-size:10px!important;font-weight:800!important;opacity:.8!important}.sample-round-card>strong{margin:4px 0!important;font-size:14px!important}.sample-round-card small{margin-top:2px!important}.sample-empty-rounds{padding:25px!important;border:1px dashed #cbd5e1!important;border-radius:7px!important;color:#64748b!important;text-align:center!important}

.modal-card.sample-round-modal-card{width:min(1150px,97vw)!important;max-width:1150px!important;height:min(95vh,1050px)!important;max-height:95vh!important;overflow:hidden!important}.modal-card.sample-round-modal-card #modal-body{height:100%!important;overflow:auto!important;padding-bottom:18px!important}
.sample-form-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important}.sample-form-grid .full{grid-column:1/-1!important}
.sample-round-lock{margin:8px 0!important;padding:8px 10px!important;border:1px solid #bbf7d0!important;border-radius:5px!important;background:#f0fdf4!important;color:#166534!important;font-weight:800!important}
.sample-photo-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(190px,1fr))!important;gap:8px!important;margin-bottom:8px!important}.sample-photo-card{border:1px solid #dbe1e8!important;border-radius:6px!important;overflow:hidden!important;background:#f8fafc!important}.sample-photo-card img{width:100%!important;height:130px!important;object-fit:cover!important;background:#e2e8f0!important}.sample-photo-card>div{padding:7px!important;display:flex!important;flex-direction:column!important;gap:5px!important}.sample-photo-card label{display:flex!important;align-items:center!important;gap:5px!important;color:#b91c1c!important}
.sample-round-meta{margin-top:9px!important;padding:7px 9px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:5px!important;color:#64748b!important}
.modal-card.sample-starter-modal-card{width:min(720px,94vw)!important;max-width:720px!important}

@media(max-width:900px){.sample-mgmt-summary{grid-template-columns:repeat(2,1fr)!important}.sample-mgmt-filterbar{grid-template-columns:1fr 1fr!important}.sample-line-head,.sample-form-grid{grid-template-columns:1fr 1fr!important}.sample-form-grid .full{grid-column:1/-1!important}}

/* V1.9.7.0 — Supplier Performance */
.supplier-perf-page{display:flex!important;flex-direction:column!important;gap:10px!important}
.supplier-perf-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important}
.supplier-perf-head h2{margin:0!important;color:#10233f!important}.supplier-perf-head p{margin:4px 0 0!important;color:#64748b!important}
.supplier-perf-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.supplier-perf-summary>div{min-height:72px!important;padding:10px 12px!important;border:1px solid #dce2e8!important;border-radius:7px!important;background:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
.supplier-perf-summary span{color:#64748b!important;font-size:11px!important;font-weight:700!important}.supplier-perf-summary strong{margin-top:4px!important;color:#10233f!important;font-size:22px!important}.supplier-perf-summary small{margin-top:2px!important;color:#64748b!important}
.supplier-perf-filterbar{display:grid!important;grid-template-columns:minmax(280px,1fr) 180px auto!important;gap:7px!important;align-items:center!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important}.supplier-perf-filterbar input,.supplier-perf-filterbar select{height:34px!important}.supplier-perf-filterbar>span{color:#64748b!important;font-weight:800!important;white-space:nowrap!important}
.supplier-perf-table{min-width:1450px!important}.supplier-perf-table td>strong{display:block!important;color:#10233f!important}.supplier-perf-table td>small{display:block!important;margin-top:2px!important;color:#64748b!important}.supplier-perf-table td:nth-child(n+2){vertical-align:middle!important}
.supplier-perf-compliance{display:inline-flex!important;padding:3px 7px!important;border-radius:999px!important;font-size:9px!important;font-weight:900!important;white-space:nowrap!important}.supplier-perf-compliance.is-current{background:#dcfce7!important;color:#166534!important}.supplier-perf-compliance.has-expiring{background:#fef3c7!important;color:#92400e!important}.supplier-perf-compliance.has-expired{background:#fee2e2!important;color:#b91c1c!important}
.supplier-perf-footnote{padding:8px 10px!important;border-left:3px solid #64748b!important;background:#f8fafc!important;color:#475569!important;line-height:1.4!important}
.modal-card.supplier-perf-modal-card{width:min(1300px,97vw)!important;max-width:1300px!important;height:min(95vh,1050px)!important;max-height:95vh!important;overflow:hidden!important}.modal-card.supplier-perf-modal-card #modal-body{height:100%!important;overflow:auto!important}
.supplier-perf-detail-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin-bottom:12px!important}.supplier-perf-detail-grid>div{padding:9px 10px!important;border:1px solid #dce2e8!important;border-radius:6px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.supplier-perf-detail-grid span{color:#64748b!important;font-size:10px!important}.supplier-perf-detail-grid strong{margin-top:3px!important;color:#10233f!important;font-size:18px!important}.supplier-perf-detail-grid small{margin-top:2px!important;color:#64748b!important}
.supplier-perf-detail h3{margin:14px 0 7px!important;color:#10233f!important}.supplier-perf-po-table{min-width:1150px!important}
.supplier-perf-shipment-list{display:flex!important;flex-direction:column!important;border:1px solid #dce2e8!important;border-radius:6px!important;overflow:hidden!important}.supplier-perf-shipment-list>div{display:grid!important;grid-template-columns:minmax(220px,1fr) 130px 300px!important;gap:8px!important;padding:8px 10px!important;border-bottom:1px solid #edf0f3!important;align-items:center!important}.supplier-perf-shipment-list>div:last-child{border-bottom:0!important}.supplier-perf-shipment-list>div.on-time b{color:#166534!important}.supplier-perf-shipment-list>div.late b{color:#b91c1c!important}.supplier-perf-shipment-list small{color:#64748b!important}
@media(max-width:900px){.supplier-perf-summary,.supplier-perf-detail-grid{grid-template-columns:repeat(2,1fr)!important}.supplier-perf-filterbar{grid-template-columns:1fr!important}.supplier-perf-shipment-list>div{grid-template-columns:1fr!important}}

/* V1.9.7.1 — Product Master Compliance column heading/layout fix */
.product-master-table col.pc-compliance{width:8%!important}
.product-master-table th:nth-child(8){
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
}
.product-master-table td.product-compliance-cell{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

/* V1.9.8.0 — Landed Costing */
.landed-cost-page{display:flex!important;flex-direction:column!important;gap:10px!important}
.landed-cost-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important}
.landed-cost-head h2{margin:0!important;color:#10233f!important}.landed-cost-head p{margin:4px 0 0!important;color:#64748b!important;max-width:900px!important}
.landed-cost-summary{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important}
.landed-cost-summary>div{min-height:70px!important;padding:10px 12px!important;border:1px solid #dce2e8!important;border-radius:7px!important;background:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
.landed-cost-summary span{font-size:11px!important;color:#64748b!important;font-weight:700!important}.landed-cost-summary strong{margin-top:4px!important;color:#10233f!important;font-size:21px!important}.lc-summary-review{border-left:4px solid #dc2626!important}.lc-summary-review strong{color:#b91c1c!important}
.landed-cost-filterbar{display:grid!important;grid-template-columns:minmax(280px,1fr) 170px auto!important;gap:7px!important;align-items:center!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:6px!important;background:#f8fafc!important}.landed-cost-filterbar input,.landed-cost-filterbar select{height:34px!important}.landed-cost-filterbar span{color:#64748b!important;font-weight:800!important}
.landed-cost-master-table{min-width:1250px!important}.landed-cost-master-table td small{display:block!important;margin-top:2px!important;color:#64748b!important}
.landed-cost-status,.landed-cost-status-btn{display:inline-flex!important;padding:3px 7px!important;border-radius:999px!important;font-size:9px!important;font-weight:900!important;white-space:nowrap!important}
.landed-cost-status-btn{border:0!important;cursor:pointer!important}
.lc-final{background:#dcfce7!important;color:#166534!important}.lc-draft{background:#fef3c7!important;color:#92400e!important}.lc-review{background:#fee2e2!important;color:#b91c1c!important}.lc-none{background:#f1f5f9!important;color:#475569!important}
.landed-cost-note{padding:8px 10px!important;border-left:3px solid #64748b!important;background:#f8fafc!important;color:#475569!important;line-height:1.4!important}

.modal-card.landed-cost-modal-card{width:min(1500px,98vw)!important;max-width:1500px!important;height:min(96vh,1100px)!important;max-height:96vh!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.modal-card.landed-cost-modal-card #modal-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding-bottom:18px!important}
#landed-cost-form{min-width:1250px!important}
.landed-cost-identity{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important}.landed-cost-identity>div{padding:7px 8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}.landed-cost-identity span{font-size:10px!important;color:#64748b!important}.landed-cost-identity strong{margin-top:2px!important;color:#10233f!important}
.landed-cost-stale{display:flex!important;flex-direction:column!important;gap:3px!important;margin-top:9px!important;padding:8px 10px!important;border:1px solid #fecaca!important;border-radius:5px!important;background:#fef2f2!important;color:#991b1b!important}
.landed-cost-lock{margin-top:9px!important;padding:8px 10px!important;border:1px solid #bbf7d0!important;border-radius:5px!important;background:#f0fdf4!important;color:#166534!important;font-weight:800!important}
.landed-cost-section{margin-top:10px!important;border:1px solid #dce2e8!important;border-radius:7px!important;overflow:hidden!important;background:#fff!important}.landed-cost-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:8px 10px!important;border-bottom:1px solid #e2e8f0!important;background:#f8fafc!important}.landed-cost-section-head>div{display:flex!important;flex-direction:column!important}.landed-cost-section-head strong{color:#10233f!important}.landed-cost-section-head span{margin-top:2px!important;color:#64748b!important;font-size:11px!important}
.landed-allocation-select{max-width:300px!important;margin:9px!important}.landed-charge-table{min-width:1230px!important}.landed-charge-table input,.landed-charge-table select{min-width:110px!important}.landed-charge-table .lc-description{min-width:180px!important}.landed-charge-table td small{display:block!important;margin-top:2px!important;color:#64748b!important}
.landed-cost-totals{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;padding:9px!important}.landed-cost-totals>div{padding:8px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#fff!important;display:flex!important;flex-direction:column!important}.landed-cost-totals span{font-size:10px!important;color:#64748b!important}.landed-cost-totals strong{margin-top:3px!important;color:#10233f!important;font-size:16px!important}
.landed-allocation-table{min-width:1100px!important}.landed-allocation-table td small{display:block!important;color:#64748b!important;margin-top:2px!important}
.landed-cost-notes{margin-top:10px!important}.landed-cost-audit{margin-top:8px!important;padding:7px 9px!important;border:1px solid #e2e8f0!important;border-radius:5px!important;background:#f8fafc!important;color:#64748b!important}
.landed-cost-actions{position:sticky!important;bottom:-18px!important;z-index:6!important;margin:10px -16px -18px!important;padding:10px 16px!important;background:#fff!important;border-top:1px solid #d7dde5!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}

.modal-card.landed-cost-preview-card{width:min(1500px,98vw)!important;max-width:1500px!important;height:min(96vh,1100px)!important;max-height:96vh!important;overflow:hidden!important}.modal-card.landed-cost-preview-card #modal-body{height:100%!important;overflow:auto!important}
.landed-cost-preview-scroll{min-width:1150px!important;padding:10px!important;background:#eef2f7!important}.landed-cost-doc{width:1120px!important;margin:0 auto!important;padding:22px!important;background:#fff!important;box-shadow:0 2px 10px rgba(15,23,42,.12)!important}.landed-doc-head{display:flex!important;justify-content:space-between!important;border-bottom:2px solid #10233f!important;padding-bottom:7px!important;margin-bottom:8px!important}.landed-doc-head>div{display:flex!important;flex-direction:column!important}.landed-doc-head strong{font-size:18px!important;color:#10233f!important}.landed-doc-meta{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:5px!important;margin-bottom:9px!important}.landed-doc-meta>div{padding:5px!important;border:1px solid #d1d5db!important}.landed-doc-meta span{display:block!important;color:#64748b!important;font-size:9px!important}.landed-cost-doc table{width:100%!important;border-collapse:collapse!important;font-size:9px!important}.landed-cost-doc th,.landed-cost-doc td{padding:4px!important;border:1px solid #9ca3af!important;vertical-align:top!important}.landed-cost-doc th{background:#f3f4f6!important;color:#10233f!important}.landed-cost-doc h3{margin:9px 0 4px!important;color:#10233f!important}.landed-doc-notes{margin-top:8px!important;padding:6px!important;border:1px solid #d1d5db!important}.landed-doc-audit{display:flex!important;justify-content:space-between!important;gap:8px!important;margin-top:8px!important;color:#64748b!important}
.modal-card.landed-cost-starter-card{width:min(720px,94vw)!important;max-width:720px!important}

@media(max-width:900px){.landed-cost-summary{grid-template-columns:repeat(2,1fr)!important}.landed-cost-filterbar{grid-template-columns:1fr!important}.landed-cost-identity,.landed-cost-totals{grid-template-columns:repeat(2,1fr)!important}}

/* V1.9.9.0 — Fabric purchasing + confidential composition */
.fabric-commercial-table{min-width:1050px!important}
.tp-fabric-composition.restricted{font-weight:800!important;color:#64748b!important}
.po-add-item-actions{display:flex!important;gap:7px!important;flex-wrap:wrap!important}
.po-group-label{padding:5px 8px!important;background:#eef2f7!important;border:1px solid #d7dde5!important;border-bottom:0!important;border-radius:5px 5px 0 0!important;color:#10233f!important;font-weight:900!important;font-size:10px!important;text-transform:uppercase!important;letter-spacing:.03em!important}
.po-fabric-group .po-group-table{min-width:1280px!important}
.po-fabric-line .po-fabric-description{min-width:250px!important;width:100%!important;resize:none!important;background:#f8fafc!important}
.po-fabric-line .po-pantone{min-width:120px!important;background:#f8fafc!important}
.po-fabric-line .po-fabric-qty{min-width:90px!important;text-align:right!important}
.po-fabric-line .po-uom{min-width:100px!important}
.po-type-cell select{min-width:88px!important}
.po-uom-fixed{display:inline-flex!important;align-items:center!important;min-height:30px!important;padding:0 6px!important;border:1px solid #d7dde5!important;border-radius:4px!important;background:#f8fafc!important;color:#475569!important;font-weight:700!important}
.po-doc-fabric-group .po-doc-name{text-align:left!important}

/* V1.9.9.1 — PO selector descriptions + organised navigation */
.sidebar .nav-btn.nav-compliance{
  min-height:46px!important;
  align-items:center!important;
}
.sidebar .nav-btn.nav-compliance .nav-label{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.15!important;
  max-width:125px!important;
}
body.sidebar-collapsed .sidebar .nav-btn.nav-compliance{min-height:36px!important}
body.sidebar-collapsed .sidebar .nav-btn.nav-compliance .nav-label{display:none!important}
@media(max-width:720px){
  body.sidebar-collapsed .sidebar .nav-btn.nav-compliance .nav-label{display:inline!important}
}

.po-code-select-wrap{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
}
.po-code-description-select{
  width:100%!important;
  min-width:210px!important;
  font-weight:700!important;
}
.po-code-description-preview{
  min-height:28px!important;
  padding:4px 6px!important;
  border:1px solid #e2e8f0!important;
  border-radius:4px!important;
  background:#f8fafc!important;
  color:#475569!important;
  font-size:10px!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.po-code-description-preview .muted{font-size:10px!important}
.po-group-table .po-code{vertical-align:top!important}
.po-group-table .po-code option{font-weight:400!important}

/* V1.9.9.2 — Unified Product Code PO entry */
.po-code-entry-wrap{width:100%!important;min-width:0!important}
.po-code-entry{width:100%!important;min-width:150px!important;height:31px!important;box-sizing:border-box!important;padding:4px 6px!important;font-weight:800!important;color:#10233f!important}
.po-group-table .po-code{vertical-align:middle!important}
.po-group-table .po-description-field{display:block!important;width:100%!important;min-width:0!important;min-height:44px!important;max-height:70px!important;box-sizing:border-box!important;resize:vertical!important;padding:5px 6px!important;background:#f8fafc!important;line-height:1.25!important;overflow-wrap:anywhere!important}
.po-group-table .po-name{min-width:0!important}
.po-group-table .po-colour-cell select,.po-group-table .po-cost-cell input,.po-group-table .po-fabric-qty,.po-group-table .po-pantone,.po-group-table .po-uom{width:100%!important;min-width:0!important;box-sizing:border-box!important}
.po-group-table{min-width:1220px!important}
.po-fabric-group .po-group-table{min-width:1180px!important}
.po-type-cell,.po-techpack-cell,.po-col-techpack{display:none!important}
.po-code-description-preview,.po-code-description-select{display:none!important}

/* V1.9.9.2 final PO width correction */
.po-group-table .po-remove{min-width:58px!important}
.po-group-table .po-remove .small-btn{width:100%!important;min-width:0!important;box-sizing:border-box!important;padding-left:3px!important;padding-right:3px!important}

/* V1.9.9.3 — Spreadsheet-style editable table cells across the PLM */
#content table:not(.po-doc-table) td:has(> input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"])),
#content table:not(.po-doc-table) td:has(> select),
#content table:not(.po-doc-table) td:has(> textarea){padding:0!important}

#content table:not(.po-doc-table) td > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
#content table:not(.po-doc-table) td > select,
#content table:not(.po-doc-table) td > textarea{
 display:block!important;width:100%!important;min-width:0!important;max-width:none!important;
 min-height:36px!important;height:100%!important;margin:0!important;padding:8px 7px!important;
 border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
 box-sizing:border-box!important
}
#content table:not(.po-doc-table) td > textarea{min-height:50px!important;resize:vertical!important}
#content table:not(.po-doc-table) td > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
#content table:not(.po-doc-table) td > select:focus,
#content table:not(.po-doc-table) td > textarea:focus{
 outline:0!important;box-shadow:inset 0 0 0 2px #2563eb!important;background:#fff!important
}
#content table:not(.po-doc-table) td:has(> input[type="date"]){min-width:120px!important}
#content table:not(.po-doc-table) td > input[type="date"]{width:100%!important;min-width:118px!important;padding:7px!important}

#content .critical-table td select,
#content .critical-table td input[type="date"],
#content .critical-table td input[type="text"],
#content .qc-table td select,#content .qc-table td input,
#content .aql-edit-table td input,#content .aql-edit-table td select,
#content .aql-plan-table td input,#content .tp-measure-table td input,
#content .tp-construction-table td input,#content .tp-branding-table td input,
#content .tp-attached-table td input,#content .packing-list-edit-table td input,
#content .landed-charge-table td input,#content .landed-charge-table td select,
#content .container-settings-table td input{
 width:100%!important;max-width:none!important;min-width:0!important;border-radius:0!important
}
.form-group input[type="date"]{width:100%!important;box-sizing:border-box!important}

/* PO is intentionally wider so size ratios remain practical. */
.po-group-table{table-layout:fixed!important;width:auto!important}
.po-group-table th,.po-group-table td{border:1px solid #d3dbe4!important}
.po-group-table tbody td{height:52px!important;vertical-align:middle!important}
.po-group-table .po-size-heading{min-width:56px!important;width:56px!important;white-space:nowrap!important;text-align:center!important}
.po-group-table .po-size-cell{min-width:56px!important;width:56px!important;padding:0!important}
.po-group-table .po-size-cell .size-qty{
 width:100%!important;height:100%!important;min-height:52px!important;border:0!important;border-radius:0!important;
 background:transparent!important;padding:0 4px!important;text-align:center!important;font-weight:700!important;box-shadow:none!important
}
.po-group-table .po-code,.po-group-table .po-name,.po-group-table .po-colour-cell,
.po-group-table .po-pantone-cell,.po-group-table .po-fabric-qty-cell,.po-group-table .po-cost-cell{padding:0!important}
.po-code-entry-wrap{height:100%!important}
.po-code-entry,.po-group-table .po-description-field,.po-group-table .po-colour,
.po-group-table .po-pantone,.po-group-table .po-fabric-qty,.po-group-table .po-cost{
 width:100%!important;height:100%!important;min-height:52px!important;margin:0!important;padding:8px!important;
 border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box!important
}
.po-group-table .po-description-field{resize:none!important;overflow:auto!important;line-height:1.3!important}
.po-group-table .po-code-entry{font-weight:800!important;color:#10233f!important}
.po-group-table .po-pantone[readonly],.po-group-table .po-description-field[readonly]{background:#fafbfc!important}
.po-group-table .po-totalqty,.po-group-table .po-amount{padding:0!important}
.po-group-table .po-totalqty .calc-box,.po-group-table .po-amount .calc-box{
 display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;
 min-height:52px!important;margin:0!important;padding:6px!important;border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important
}
.po-group-table .po-remove{padding:0!important}
.po-group-table .po-remove .small-btn{width:100%!important;height:100%!important;min-height:52px!important;border-radius:0!important;margin:0!important}
.po-group-table-wrap{overflow-x:auto!important;width:100%!important}
.po-group-table .po-cost{text-align:center!important;font-weight:700!important}

/* V1.9.9.4 — PO column alignment + A4 portrait preview */
.po-group-table th:nth-child(1),.po-group-table td:nth-child(1){width:48px!important;min-width:48px!important;max-width:48px!important}
.po-group-table th:nth-child(2),.po-group-table td:nth-child(2){width:190px!important;min-width:190px!important;max-width:190px!important}
.po-group-table th:nth-child(3),.po-group-table td:nth-child(3){width:300px!important;min-width:300px!important;max-width:300px!important}
.po-group-table th:nth-child(4),.po-group-table td:nth-child(4){width:145px!important;min-width:145px!important;max-width:145px!important}

.modal-card.po-preview-modal .po-a4{
  width:210mm!important;
  min-width:210mm!important;
  max-width:210mm!important;
  min-height:297mm!important;
  margin:0 auto!important;
  padding:8mm!important;
  background:#ffffff!important;
  box-shadow:0 1px 5px rgba(15,23,42,.18)!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
.modal-card.po-preview-modal .po-doc-head{padding-bottom:3mm!important;margin-bottom:3mm!important}
.modal-card.po-preview-modal .po-doc-meta{grid-template-columns:1.45fr 1fr!important;gap:6mm!important;margin-bottom:3mm!important;line-height:1.3!important}
.modal-card.po-preview-modal .po-doc-groups{gap:2.5mm!important}
.modal-card.po-preview-modal .po-doc-group-table{
  width:100%!important;
  min-width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
  font-size:6.5px!important;
}
.modal-card.po-preview-modal .po-doc-group-table th,
.modal-card.po-preview-modal .po-doc-group-table td{
  padding:.8mm .45mm!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.12!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}
.modal-card.po-preview-modal .po-doc-group-table .po-doc-size-heading{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  font-size:6.2px!important;
}

/* V1.9.9.5 — Compact PO columns and blank-line item switching */
.po-group-table th:nth-child(1),.po-group-table td:nth-child(1){width:38px!important;min-width:38px!important;max-width:38px!important}
.po-group-table th:nth-child(2),.po-group-table td:nth-child(2){width:150px!important;min-width:150px!important;max-width:150px!important}
.po-group-table th:nth-child(3),.po-group-table td:nth-child(3){width:210px!important;min-width:210px!important;max-width:210px!important}
.po-group-table th:nth-child(4),.po-group-table td:nth-child(4){width:105px!important;min-width:105px!important;max-width:105px!important}

.po-group-table .po-size-heading,.po-group-table .po-size-cell{
 width:40px!important;min-width:40px!important;max-width:40px!important
}
.po-group-table tbody td{height:46px!important}
.po-group-table .po-size-cell .size-qty{min-height:46px!important;padding:0 2px!important}
.po-code-entry,.po-group-table .po-description-field,.po-group-table .po-colour,
.po-group-table .po-pantone,.po-group-table .po-fabric-qty,.po-group-table .po-cost{
 min-height:46px!important;padding:6px!important
}
.po-group-table .po-totalqty .calc-box,.po-group-table .po-amount .calc-box,
.po-group-table .po-remove .small-btn{min-height:46px!important}
.po-group-table-wrap{overflow-x:hidden!important}
.po-group-table{max-width:100%!important}

/* V1.9.10.0 — Supplier carton-ratio Packing List */
.modal-card.packing-ratio-modal-card,
.modal-card.packing-list-modal-card{
  width:min(1550px,98vw)!important;max-width:1550px!important;
  height:min(96vh,1100px)!important;max-height:96vh!important;
  overflow:hidden!important;display:flex!important;flex-direction:column!important
}
.modal-card.packing-ratio-modal-card #modal-body,
.modal-card.packing-list-modal-card #modal-body{
  flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding-bottom:18px!important
}
.packing-list-identity{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important}
.packing-list-identity>div{padding:7px 8px!important;border:1px solid #dce2e8!important;border-radius:5px!important;background:#f8fafc!important;display:flex!important;flex-direction:column!important}
.packing-list-identity span{font-size:10px!important;color:#64748b!important}.packing-list-identity strong{color:#10233f!important}
.packing-status.packing-submitted,.shipment-doc-pill.packing-submitted{background:#dbeafe!important;color:#1d4ed8!important}
.packing-order-summary{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:6px!important;margin-top:9px!important}
.packing-order-summary>div{padding:8px!important;border:1px solid #dce2e8!important;background:#fff!important;display:flex!important;flex-direction:column!important}
.packing-order-summary span{font-size:10px!important;color:#64748b!important}.packing-order-summary strong{font-size:16px!important;color:#10233f!important}
.pl-order-reconcile{margin:8px 0!important}.pl-reconcile-ok{display:inline-flex!important;padding:3px 7px!important;border-radius:999px!important;background:#dcfce7!important;color:#166534!important;font-weight:800!important;white-space:nowrap!important}.pl-reconcile-bad{display:inline-flex!important;padding:3px 7px!important;border-radius:999px!important;background:#fee2e2!important;color:#b91c1c!important;font-weight:800!important;white-space:nowrap!important}
.packing-review-banner{padding:8px 10px!important;margin:8px 0!important;border:1px solid #bfdbfe!important;background:#eff6ff!important;color:#1e40af!important;font-weight:700!important}
.packing-style-stack{display:flex!important;flex-direction:column!important;gap:12px!important}
.packing-style-section{border:1px solid #d7dde5!important;background:#fff!important;overflow:hidden!important}
.packing-style-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important;padding:8px 10px!important;background:#f8fafc!important;border-bottom:1px solid #d7dde5!important}
.packing-style-head>div:first-child{display:flex!important;flex-direction:column!important}.packing-style-head>div:first-child strong{color:#10233f!important;font-size:13px!important}.packing-style-head>div:first-child span{color:#64748b!important;margin-top:2px!important}
.packing-style-metrics{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important}.packing-style-metrics>span{white-space:nowrap!important;color:#475569!important}.packing-style-metrics b{color:#10233f!important}
.pl-style-sizes{display:flex!important;gap:5px!important;flex-wrap:wrap!important;padding:6px 10px!important;border-bottom:1px solid #e2e8f0!important;background:#fff!important}.pl-style-sizes span{padding:2px 5px!important;border-radius:4px!important;font-size:10px!important;font-weight:700!important}.pl-size-ok{background:#f0fdf4!important;color:#166534!important}.pl-size-bad{background:#fef2f2!important;color:#b91c1c!important}
.packing-ratio-scroll{overflow-x:auto!important;width:100%!important}
.packing-ratio-grid{width:100%!important;min-width:1120px!important;border-collapse:collapse!important;table-layout:auto!important}
.packing-ratio-grid th,.packing-ratio-grid td{border:1px solid #d7dde5!important;padding:0!important;text-align:center!important;vertical-align:middle!important}
.packing-ratio-grid th{padding:6px 4px!important;background:#eef2f7!important;color:#10233f!important;white-space:nowrap!important}
.packing-ratio-grid .pl-size-head{min-width:48px!important}
.packing-ratio-grid td>input,.packing-ratio-grid td>textarea{width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;padding:5px!important;text-align:center!important;box-sizing:border-box!important}
.packing-ratio-grid td>textarea{text-align:left!important;min-width:120px!important;resize:vertical!important}
.packing-ratio-grid .pl-ratio-cell{min-width:48px!important;width:48px!important}
.packing-ratio-grid .pl-range{min-width:80px!important;font-weight:800!important;color:#10233f!important}
.packing-ratio-grid .pl-pcs-carton,.packing-ratio-grid .pl-packed-qty{min-width:80px!important;font-weight:800!important}
.packing-ratio-grid .pl-remove-row{height:42px!important;border-radius:0!important}
.packing-fabric-grid{min-width:980px!important}
.pl-add-group{margin:7px 9px!important}
.packing-list-remarks{margin-top:10px!important}
.packing-list-audit{padding:7px 9px!important;border:1px solid #e2e8f0!important;background:#f8fafc!important;color:#64748b!important}
.packing-list-form-actions{position:sticky!important;bottom:-18px!important;z-index:5!important;margin:10px -16px -18px!important;padding:10px 16px!important;background:#fff!important;border-top:1px solid #d7dde5!important;box-shadow:0 -4px 10px rgba(15,23,42,.05)!important}
.packing-legacy{margin:8px 0!important;padding:8px 10px!important;border:1px solid #fde68a!important;background:#fffbeb!important}.packing-legacy summary{font-weight:800!important;color:#854d0e!important;cursor:pointer!important}.packing-legacy table{width:100%!important;margin-top:7px!important;border-collapse:collapse!important}.packing-legacy th,.packing-legacy td{border:1px solid #e5c766!important;padding:5px!important}
.packing-preview-modal .packing-doc{min-width:1180px!important}
.packing-doc-style{margin-bottom:10px!important}.packing-doc-style-head{display:flex!important;justify-content:space-between!important;padding:6px 8px!important;background:#eef2f7!important;border:1px solid #9ca3af!important;border-bottom:0!important}.packing-doc-style-head>div:first-child{display:flex!important;gap:8px!important}.packing-doc-style table{width:100%!important;border-collapse:collapse!important}.packing-doc-style th,.packing-doc-style td{border:1px solid #9ca3af!important;padding:4px!important;text-align:center!important}.packing-doc-size-check{padding:4px 6px!important;border:1px solid #d1d5db!important;border-top:0!important}.packing-doc-order-total{display:flex!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;border-top:2px solid #10233f!important;padding-top:7px!important;margin-top:7px!important}
@media(max-width:900px){.packing-list-identity{grid-template-columns:repeat(2,1fr)!important}.packing-order-summary{grid-template-columns:repeat(2,1fr)!important}.packing-style-head{flex-direction:column!important}}

/* V1.9.10.1 — Packing List quantity variance review */
.packing-variance-warning{
  margin:8px 0!important;padding:9px 11px!important;border:1px solid #f59e0b!important;
  background:#fffbeb!important;color:#854d0e!important;display:flex!important;flex-direction:column!important;gap:4px!important
}
.packing-variance-warning strong{font-size:12px!important;color:#92400e!important}
.packing-variance-warning span{font-weight:600!important}
.packing-variance-warning ul{margin:3px 0 0 18px!important;padding:0!important}
.packing-variance-warning li{margin:2px 0!important}
.packing-doc .packing-variance-warning{break-inside:avoid!important;font-size:8px!important}

/* V1.9.11.0 — Split shipment quantity allocation */
.shipment-allocation-form{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.shipment-allocation-panel{padding:0!important;border:1px solid #d7dde5!important;background:#fff!important}
.shipment-allocation-title{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;padding:9px 10px!important;background:#f1f5f9!important;border-bottom:1px solid #d7dde5!important}
.shipment-allocation-title>div:first-child{display:flex!important;flex-direction:column!important;gap:2px!important}
.shipment-allocation-title span{color:#64748b!important}
.shipment-allocation-form-total{display:flex!important;flex-direction:column!important;text-align:right!important;white-space:nowrap!important}
.shipment-allocation-form-total b{color:#10233f!important;font-size:14px!important}
.shipment-allocation-list{display:flex!important;flex-direction:column!important;gap:10px!important;padding:10px!important}
.shipment-allocation-row{border:1px solid #d7dde5!important;background:#fff!important}
.shipment-allocation-line-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important;padding:7px 8px!important;background:#f8fafc!important;border-bottom:1px solid #d7dde5!important}
.shipment-allocation-line-head>div:first-child{display:flex!important;flex-direction:column!important;gap:1px!important}
.shipment-allocation-line-head>div:first-child strong{color:#10233f!important;font-size:12px!important}
.shipment-allocation-line-head>div:first-child span{color:#64748b!important}
.shipment-allocation-line-totals{display:flex!important;gap:10px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
.shipment-allocation-line-totals span{white-space:nowrap!important;color:#475569!important}
.shipment-allocation-line-totals b{color:#10233f!important}
.shipment-allocation-grid-wrap{width:100%!important;overflow-x:auto!important}
.shipment-allocation-grid{width:100%!important;min-width:760px!important;border-collapse:collapse!important;table-layout:fixed!important}
.shipment-allocation-grid th,.shipment-allocation-grid td{border:1px solid #d7dde5!important;padding:5px!important;text-align:center!important}
.shipment-allocation-grid th:first-child{width:125px!important;text-align:left!important;background:#eef2f7!important}
.shipment-allocation-grid thead th{background:#e8eef5!important;color:#10233f!important}
.shipment-allocation-grid .shipment-allocation-info td{background:#fafbfc!important;color:#475569!important}
.shipment-allocation-grid .shipment-allocation-entry td{padding:0!important;height:38px!important}
.shipment-allocation-grid .shipment-allocation-size-input{width:100%!important;height:38px!important;min-height:38px!important;border:0!important;border-radius:0!important;text-align:center!important;background:#fff!important}
.shipment-allocation-row-total{font-weight:800!important;color:#10233f!important}
.shipment-allocation-single{display:flex!important;align-items:center!important;gap:8px!important;padding:9px!important}
.shipment-allocation-single label{font-weight:700!important;color:#374151!important}
.shipment-allocation-single input{width:160px!important;min-height:34px!important}
.shipment-allocate-all-btn{margin:7px 8px!important}
.shipment-status-badge.shipment-partial,.shipment-control-status.shipment-partial{background:#ffedd5!important;color:#9a3412!important}
@media(max-width:900px){
 .shipment-allocation-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .shipment-allocation-title,.shipment-allocation-line-head{flex-direction:column!important}
 .shipment-allocation-line-totals{justify-content:flex-start!important}
}

/* V1.9.11.1 — Shipment Control current 21-column layout */
.shipment-control-table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}

/* 21 columns total = 100%. */
.shipment-control-table th:nth-child(1), .shipment-control-table td:nth-child(1){width:4.5%!important;}
.shipment-control-table th:nth-child(2), .shipment-control-table td:nth-child(2){width:4.5%!important;}
.shipment-control-table th:nth-child(3), .shipment-control-table td:nth-child(3){width:2.5%!important;text-align:center!important;}
.shipment-control-table th:nth-child(4), .shipment-control-table td:nth-child(4){width:6.5%!important;}
.shipment-control-table th:nth-child(5), .shipment-control-table td:nth-child(5){width:8.5%!important;}
.shipment-control-table th:nth-child(6), .shipment-control-table td:nth-child(6){width:3.5%!important;}
.shipment-control-table th:nth-child(7), .shipment-control-table td:nth-child(7){width:5%!important;}
.shipment-control-table th:nth-child(8), .shipment-control-table td:nth-child(8){width:4.5%!important;}
.shipment-control-table th:nth-child(9), .shipment-control-table td:nth-child(9){width:6%!important;}
.shipment-control-table th:nth-child(10), .shipment-control-table td:nth-child(10){width:4.5%!important;}
.shipment-control-table th:nth-child(11), .shipment-control-table td:nth-child(11){width:4.5%!important;}
.shipment-control-table th:nth-child(12), .shipment-control-table td:nth-child(12){width:5.5%!important;}
.shipment-control-table th:nth-child(13), .shipment-control-table td:nth-child(13){width:5.5%!important;}
.shipment-control-table th:nth-child(14), .shipment-control-table td:nth-child(14){width:4%!important;}
.shipment-control-table th:nth-child(15), .shipment-control-table td:nth-child(15){width:5.5%!important;}
.shipment-control-table th:nth-child(16), .shipment-control-table td:nth-child(16){width:7.5%!important;}
.shipment-control-table th:nth-child(17), .shipment-control-table td:nth-child(17){width:3.5%!important;}
.shipment-control-table th:nth-child(18), .shipment-control-table td:nth-child(18){width:3.5%!important;}
.shipment-control-table th:nth-child(19), .shipment-control-table td:nth-child(19){width:2.8%!important;}
.shipment-control-table th:nth-child(20), .shipment-control-table td:nth-child(20){width:2.8%!important;}
.shipment-control-table th:nth-child(21), .shipment-control-table td:nth-child(21){width:4.9%!important;}

/* Keep the final action headings/buttons horizontal and centred. */
.shipment-control-table th:nth-child(19),
.shipment-control-table th:nth-child(20),
.shipment-control-table th:nth-child(21),
.shipment-control-table td:nth-child(19),
.shipment-control-table td:nth-child(20),
.shipment-control-table td:nth-child(21){
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  writing-mode:horizontal-tb!important;
  text-align:center!important;
  padding-left:3px!important;
  padding-right:3px!important;
}

.shipment-control-table th:nth-child(19),
.shipment-control-table th:nth-child(20){
  min-width:38px!important;
}
.shipment-control-table th:nth-child(21),
.shipment-control-table td:nth-child(21){
  min-width:62px!important;
}

.shipment-control-table .shipment-icon-col{
  width:auto!important;
  min-width:0!important;
  white-space:nowrap!important;
  writing-mode:horizontal-tb!important;
}
.shipment-control-table .shipment-icon-cell{
  white-space:nowrap!important;
  text-align:center!important;
}
.shipment-control-table .shipment-delete-col,
.shipment-control-table .shipment-delete-cell{
  width:auto!important;
  min-width:0!important;
  white-space:nowrap!important;
  text-align:center!important;
}
.shipment-control-table .shipment-delete-btn{
  max-width:100%!important;
}

/* V1.9.11.2 — Critical Path dates behave as the table cell */
#critical-path-table td.cp-cell-date{
  padding:0!important;
  cursor:pointer!important;
}
#critical-path-table .critical-date-cell-control{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:32px!important;
}
#critical-path-table .critical-date-cell-button{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:32px!important;
  margin:0!important;
  padding:0 2px!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#111827!important;
  font-size:11px!important;
  font-weight:600!important;
  line-height:32px!important;
  text-align:center!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-date-cell-button:hover,
#critical-path-table .critical-date-cell-button:focus{
  background:#eef4f9!important;
  box-shadow:none!important;
}
#critical-path-table .critical-date-cell-control .critical-date-native{
  position:absolute!important;
  inset:0!important;
  width:1px!important;
  min-width:1px!important;
  height:1px!important;
  min-height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  border:0!important;
  padding:0!important;
}
/* Explicitly suppress native calendar glyph anywhere a Critical Path date input is surfaced. */
#critical-path-table input[type="date"]::-webkit-calendar-picker-indicator{
  display:none!important;
  opacity:0!important;
}
#critical-path-table input[type="date"]{
  appearance:none!important;
  -webkit-appearance:none!important;
}

/* Old boxed Critical Path date UI is no longer used. */
#critical-path-table .critical-date-icon{display:none!important;}

/* V1.9.11.3 — Consistent date controls across the whole PLM */

/* Remove browser calendar glyph everywhere. The whole date field remains clickable. */
input[type="date"]{
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
input[type="date"]::-webkit-calendar-picker-indicator{
  display:none!important;
  opacity:0!important;
  -webkit-appearance:none!important;
}

/* Any editable date inside an application table becomes the table cell itself. */
#content table:not(.po-doc-table) td:has(input[type="date"]:not(.critical-date-native)){
  padding:0!important;
  cursor:pointer!important;
}
#content table:not(.po-doc-table) td input[type="date"]:not(.critical-date-native){
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:100%!important;
  min-height:36px!important;
  margin:0!important;
  padding:0 6px!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
  cursor:pointer!important;
  text-align:center!important;
}
#content table:not(.po-doc-table) td input[type="date"]:not(.critical-date-native):focus{
  background:#fff!important;
  box-shadow:inset 0 0 0 2px #2563eb!important;
}

/* Shipment Control ETD / ETA now use the whole cell too. */
.shipment-control-table td:has(.shipment-inline-date){
  padding:0!important;
  cursor:pointer!important;
}
.shipment-control-table .shipment-inline-date{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:48px!important;
  margin:0!important;
  padding:0 4px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-align:center!important;
}

/* Forms retain normal form layout, but use the complete field and no calendar icon. */
.form-group input[type="date"]{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  cursor:pointer!important;
}

/* V1.9.12.0 — Action Centre */
.modal.action-centre-modal-open .modal-card{
  width:min(1380px,97vw)!important;
  max-width:97vw!important;
}
.action-centre-summary{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(110px,150px)) minmax(300px,1fr)!important;
  gap:8px!important;
  align-items:stretch!important;
  margin-bottom:10px!important;
}
.action-centre-summary>div{
  display:flex!important;flex-direction:column!important;justify-content:center!important;
  padding:8px 10px!important;border:1px solid #d7dde5!important;background:#f8fafc!important;
  border-radius:4px!important
}
.action-centre-summary>div strong{font-size:18px!important;color:#10233f!important}
.action-centre-summary>div span{font-size:10px!important;color:#64748b!important}
.action-centre-summary-high{background:#fef2f2!important;border-color:#fecaca!important}
.action-centre-summary-high strong{color:#b91c1c!important}
.action-centre-summary-due{background:#fff7ed!important;border-color:#fed7aa!important}
.action-centre-summary-due strong{color:#c2410c!important}
.action-centre-summary p{
  margin:0!important;padding:8px 10px!important;border:1px solid #d7dde5!important;
  background:#fff!important;color:#64748b!important;display:flex!important;align-items:center!important
}
.action-centre-table{min-width:1120px!important}
.action-centre-table tbody tr{cursor:pointer!important}
.action-centre-table tbody tr:hover td{background:#f8fafc!important}
.action-centre-table tbody tr.action-priority-high td{background:#fff7f7!important}
.action-centre-table tbody tr.action-priority-high:hover td{background:#feecec!important}
.action-centre-table tbody tr.action-priority-due td{background:#fffaf0!important}
.action-centre-table tbody tr.action-priority-due:hover td{background:#fff3dd!important}
.action-priority-chip{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:72px!important;padding:3px 7px!important;border-radius:999px!important;
  font-size:10px!important;font-weight:800!important;white-space:nowrap!important
}
.action-priority-chip.action-priority-high{background:#fee2e2!important;color:#b91c1c!important}
.action-priority-chip.action-priority-due{background:#ffedd5!important;color:#c2410c!important}
.action-priority-chip.action-priority-normal{background:#fef9c3!important;color:#854d0e!important}
.action-centre-subject{margin-top:2px!important;color:#475569!important;line-height:1.25!important}
.action-centre-due{white-space:nowrap!important}
.action-centre-due strong{display:block!important;color:#334155!important}
.action-centre-due small{display:block!important;margin-top:2px!important;color:#64748b!important}
.action-centre-open-btn{font-weight:800!important}
.action-centre-linked-row td{box-shadow:inset 0 2px 0 #2563eb,inset 0 -2px 0 #2563eb!important}
.ops-action-row.is-due .ops-action-marker{background:#f97316!important}
@media(max-width:900px){
 .action-centre-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .action-centre-summary p{grid-column:1/-1!important}
}

/* V1.9.13.0 — Light / Dark Theme */
#theme-nav-holder{margin-bottom:4px!important}
.theme-nav-btn{width:100%!important;display:flex!important;align-items:center!important;gap:9px!important}
.theme-icon{display:inline-flex!important}
.theme-icon svg{width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.theme-icon-sun{display:none!important}
body.dark-theme .theme-icon-moon{display:none!important}
body.dark-theme .theme-icon-sun{display:inline-flex!important}

/* Theme palette */
body.dark-theme{
  --bg:#0f172a;
  --panel:#172033;
  --ink:#e5edf7;
  --muted:#94a3b8;
  --line:#334155;
  --dark:#e2e8f0;
  --soft:#1e293b;
  --success:#5eead4;
  --warn:#fbbf24;
  --danger:#fca5a5;
  background:#0f172a!important;
  color:#e5edf7!important;
}
body.dark-theme .main{background:#0f172a!important}
body.dark-theme .sidebar{background:#0b1220!important;border-right:1px solid #243044!important}
body.dark-theme .sidebar-footer{border-top-color:#263349!important}
body.dark-theme .sidebar .nav-btn{color:#cbd5e1!important}
body.dark-theme .sidebar .nav-btn:hover,
body.dark-theme .sidebar .nav-btn.active,
body.dark-theme .theme-nav-btn:hover{background:#1e293b!important;color:#fff!important}
body.dark-theme .topbar{
  background:#111827!important;
  border-bottom-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .topbar h2{color:#f8fafc!important}
body.dark-theme .topbar p{color:#94a3b8!important}
body.dark-theme .top-icon-btn{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .top-icon-btn:hover{background:#1f2a3d!important}

/* Core surfaces */
body.dark-theme #content,
body.dark-theme .modal{color:#e5edf7!important}
body.dark-theme :is(.card,.panel,.modal-card,.db-panel,.section-title,.check-list,.check-option,.style-card){
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .modal{background:rgba(2,6,23,.72)!important}
body.dark-theme .modal-head{
  background:#172033!important;
  border-bottom-color:#334155!important;
}
body.dark-theme .modal-head h3{color:#f8fafc!important}
body.dark-theme .icon-btn{color:#e5edf7!important;background:transparent!important}
body.dark-theme .muted,
body.dark-theme .empty,
body.dark-theme small,
body.dark-theme .card .label,
body.dark-theme .card .note{color:#94a3b8!important}

/* Inputs / controls */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea{
  background:#0f172a!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}
body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder{color:#64748b!important}
body.dark-theme input:disabled,
body.dark-theme select:disabled,
body.dark-theme textarea:disabled,
body.dark-theme input[readonly],
body.dark-theme textarea[readonly]{
  background:#111827!important;
  color:#cbd5e1!important;
}
body.dark-theme .secondary{
  background:#172033!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}
body.dark-theme .primary{
  background:#e2e8f0!important;
  border-color:#e2e8f0!important;
  color:#0f172a!important;
}
body.dark-theme .danger{
  background:#172033!important;
  border-color:#7f1d1d!important;
  color:#fca5a5!important;
}
body.dark-theme .link-btn{color:#93c5fd!important}

/* Tables */
body.dark-theme table{color:#e5edf7!important}
body.dark-theme th{
  background:#1e293b!important;
  color:#cbd5e1!important;
  border-color:#334155!important;
}
body.dark-theme td{
  background:#172033!important;
  color:#e5edf7!important;
  border-color:#334155!important;
}
body.dark-theme tbody tr:hover td{background:#1b2940!important}
body.dark-theme .table-wrap{border-color:#334155!important}

/* Common module surfaces */
body.dark-theme :is(
 .dashboard-report-panel,.status-report-card,.dashboard-po-row,.dashboard-record-card,
 .task-card,.task-summary-grid>div,.task-filterbar,
 .compliance-page,.compliance-summary-grid>div,.compliance-missing-panel,.compliance-filterbar,
 .supplier-performance-card,.supplier-performance-summary,.supplier-performance-filters,
 .landed-cost-page,.landed-cost-card,.landed-cost-summary-grid>div,.landed-cost-filterbar,
 .po-list-card,.po-size-group,.po-clean-section,.po-clean-summary,.po-clean-meta,.po-clean-lines,
 .sample-management-card,.sample-summary-grid>div,.sample-filterbar,.sample-line-card,
 .qc-card,.qc-summary,.qc-panel,.aql-panel,
 .shipment-item-banner,.shipment-allocation-panel,.shipment-allocation-row,.shipment-linked-doc-actions,
 .packing-list-head,.packing-order-summary>div,.packing-style-section,.packing-style-head,
 .techpack-card,.techpack-section,.techpack-summary,.tp-section,.fabric-card,.fabric-section,
 .database-grid,.db-item
 ){
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}

/* Table-cell editors and calculated cells */
body.dark-theme #content table:not(.po-doc-table) td > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.dark-theme #content table:not(.po-doc-table) td > select,
body.dark-theme #content table:not(.po-doc-table) td > textarea,
body.dark-theme .po-group-table .po-code-entry,
body.dark-theme .po-group-table .po-description-field,
body.dark-theme .po-group-table .po-colour,
body.dark-theme .po-group-table .po-pantone,
body.dark-theme .po-group-table .po-fabric-qty,
body.dark-theme .po-group-table .po-cost,
body.dark-theme .po-group-table .calc-box{
  background:#172033!important;
  color:#e5edf7!important;
}
body.dark-theme .po-group-table .po-pantone[readonly],
body.dark-theme .po-group-table .po-description-field[readonly]{
  background:#111827!important;
}

/* Critical Path */
body.dark-theme #critical-path-table th{background:#1e293b!important;color:#cbd5e1!important}
body.dark-theme #critical-path-table td{background:#172033!important;color:#e5edf7!important}
body.dark-theme #critical-path-table .critical-date-cell-button{color:#e5edf7!important;background:transparent!important}
body.dark-theme #critical-path-table .critical-date-cell-button:hover,
body.dark-theme #critical-path-table .critical-date-cell-button:focus{background:#24324a!important}

/* Shipment / Packing */
body.dark-theme .shipment-allocation-title,
body.dark-theme .shipment-allocation-line-head,
body.dark-theme .packing-style-head{
  background:#1e293b!important;border-color:#334155!important;color:#e5edf7!important
}
body.dark-theme .shipment-allocation-grid .shipment-allocation-info td{background:#111827!important;color:#cbd5e1!important}
body.dark-theme .packing-ratio-grid th{background:#1e293b!important;color:#e5edf7!important}
body.dark-theme .packing-ratio-grid td{background:#172033!important;color:#e5edf7!important}
body.dark-theme .packing-ratio-grid td>input,
body.dark-theme .packing-ratio-grid td>textarea{background:#172033!important;color:#e5edf7!important}

/* Action Centre */
body.dark-theme .action-centre-summary>div,
body.dark-theme .action-centre-summary p{
  background:#172033!important;border-color:#334155!important;color:#cbd5e1!important
}
body.dark-theme .action-centre-summary>div strong{color:#f8fafc!important}
body.dark-theme .action-centre-table tbody tr.action-priority-high td{background:#331b24!important}
body.dark-theme .action-centre-table tbody tr.action-priority-due td{background:#332615!important}
body.dark-theme .action-centre-table tbody tr:hover td{background:#24324a!important}

/* Preserve status meaning with dark-friendly chips */
body.dark-theme .badge{background:#26354f!important;color:#dbeafe!important}
body.dark-theme .badge.green,
body.dark-theme .pl-reconcile-ok,
body.dark-theme .comp-active{background:#123c35!important;color:#99f6e4!important}
body.dark-theme .badge.amber,
body.dark-theme .pl-reconcile-bad,
body.dark-theme .comp-expiring{background:#4a3412!important;color:#fde68a!important}
body.dark-theme :is(.comp-expired,.comp-missing){background:#4a2025!important;color:#fecaca!important}

/* Print / supplier-facing preview stays white for a document-like appearance. */
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document){
  background:#fff!important;
  color:#111827!important;
}
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document) table{
  color:#111827!important;
}
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document) th{
  background:#eee!important;color:#111827!important;border-color:#999!important;
}
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document) td{
  background:#fff!important;color:#111827!important;border-color:#999!important;
}

/* Collapsed sidebar retains compact theme toggle icon. */
body.sidebar-collapsed .theme-nav-btn .nav-label{display:none!important}

/* V1.9.13.0 dark-theme specificity fixes for Critical Path + Operations Dashboard */
body.dark-theme #critical-path-table tbody td,
body.dark-theme #critical-path-table tbody tr:nth-child(even) td,
body.dark-theme #critical-path-table tbody tr.po-group-0 td,
body.dark-theme #critical-path-table tbody tr.po-group-1 td{
  background:#172033!important;
  color:#e5edf7!important;
  border-color:#334155!important;
}
body.dark-theme #critical-path-table tbody tr:hover td,
body.dark-theme #critical-path-table tbody tr.po-group-0:hover td,
body.dark-theme #critical-path-table tbody tr.po-group-1:hover td{
  background:#22304a!important;
}
body.dark-theme #critical-path-table{
  background:#172033!important;
}
body.dark-theme .critical-path-scroll{
  background:#172033!important;
}

/* Operations dashboard dark surfaces */
body.dark-theme .ops-dashboard-heading h2,
body.dark-theme .ops-kpi-content strong,
body.dark-theme .ops-panel-head h3,
body.dark-theme .ops-pipeline-count,
body.dark-theme .ops-action-po,
body.dark-theme .ops-util-po strong,
body.dark-theme .ops-health-card strong{
  color:#f8fafc!important;
}
body.dark-theme .ops-dashboard-heading p,
body.dark-theme .ops-dashboard-date,
body.dark-theme .ops-kpi-label,
body.dark-theme .ops-kpi-sub,
body.dark-theme .ops-pipeline-label,
body.dark-theme .ops-action-product small,
body.dark-theme .ops-date-row small,
body.dark-theme .ops-util-po small,
body.dark-theme .ops-health-card span{
  color:#94a3b8!important;
}
body.dark-theme .ops-kpi-card,
body.dark-theme .ops-panel,
body.dark-theme .ops-pipeline-step,
body.dark-theme .ops-action-row,
body.dark-theme .ops-date-row,
body.dark-theme .ops-util-row,
body.dark-theme .ops-health-card{
  background:#172033!important;
  color:#e5edf7!important;
  border-color:#334155!important;
  box-shadow:none!important;
}
body.dark-theme .ops-panel-head{
  background:#1e293b!important;
  border-color:#334155!important;
}
body.dark-theme .ops-kpi-card:hover,
body.dark-theme .ops-pipeline-step:hover,
body.dark-theme .ops-action-row:hover,
body.dark-theme .ops-date-row:hover,
body.dark-theme .ops-util-row:hover,
body.dark-theme .ops-health-card:hover{
  background:#22304a!important;
}
body.dark-theme .ops-action-row,
body.dark-theme .ops-date-row{
  border-bottom-color:#334155!important;
}
body.dark-theme .ops-action-area,
body.dark-theme .ops-link-btn{
  background:#1e293b!important;
  color:#cbd5e1!important;
  border-color:#475569!important;
}
body.dark-theme .ops-date-row.is-overdue,
body.dark-theme .ops-util-row.is-over{
  background:#331b24!important;
}
body.dark-theme .ops-kpi-icon{
  background:color-mix(in srgb,var(--kpi-accent) 18%,#172033)!important;
}
body.dark-theme .ops-pipeline-step{
  border-bottom-color:#334155!important;
  border-left-color:#334155!important;
}
body.dark-theme .ops-pipeline-step:last-child{border-right-color:#334155!important}

/* V1.9.13.1 — UI consistency + full dark-theme readability audit */
:root{
  --riman-action-blue:#2563eb;
  --riman-action-blue-hover:#1d4ed8;
}

/* The selected sidebar page and every primary/create action use the same blue. */
.sidebar .nav-btn.active,
.sidebar .nav-btn.active:hover,
body.dark-theme .sidebar .nav-btn.active,
body.dark-theme .sidebar .nav-btn.active:hover{
  background:var(--riman-action-blue)!important;
  color:#ffffff!important;
}
button.primary,
.primary{
  background:var(--riman-action-blue)!important;
  border-color:var(--riman-action-blue)!important;
  color:#ffffff!important;
  font-weight:700!important;
}
button.primary:hover,
.primary:hover{
  background:var(--riman-action-blue-hover)!important;
  border-color:var(--riman-action-blue-hover)!important;
  color:#ffffff!important;
}
body.dark-theme button.primary,
body.dark-theme .primary{
  background:var(--riman-action-blue)!important;
  border-color:var(--riman-action-blue)!important;
  color:#ffffff!important;
}
.shipment-doc-pill.packing-none{
  background:var(--riman-action-blue)!important;
  border-color:var(--riman-action-blue)!important;
  color:#ffffff!important;
}

/* Top-left page name is a real page header now. */
.topbar h2{
  font-size:21px!important;
  line-height:1.15!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
  margin:0 0 4px!important;
}

/* Modal close is now a clearly visible control, not a floating X. */
.modal-head .icon-btn{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #cbd5e1!important;
  border-radius:6px!important;
  background:#f8fafc!important;
  color:#334155!important;
  font-size:21px!important;
  font-weight:700!important;
  line-height:1!important;
  box-shadow:0 1px 2px rgba(15,23,42,.06)!important;
}
.modal-head .icon-btn:hover{
  background:#fee2e2!important;
  border-color:#fca5a5!important;
  color:#b91c1c!important;
}
body.dark-theme .modal-head .icon-btn{
  background:#24324a!important;
  border-color:#475569!important;
  color:#f8fafc!important;
}
body.dark-theme .modal-head .icon-btn:hover{
  background:#4a2025!important;
  border-color:#ef4444!important;
  color:#fecaca!important;
}

/* ---------- Dark theme: global readable typography ---------- */
body.dark-theme #content :is(h1,h2,h3,h4,h5,h6,label,strong,b),
body.dark-theme .modal-card:not(.po-preview-modal) :is(h1,h2,h3,h4,h5,h6,label,strong,b){
  color:#f8fafc!important;
}
body.dark-theme #content :is(.product-wrap-cell,.product-sizes-cell,.compliance-link-label,.ops-action-text),
body.dark-theme .modal-card:not(.po-preview-modal) :is(.shipment-allocation-line-head span,.packing-style-head span){
  color:#e5edf7!important;
}
body.dark-theme #content :is(.muted,small,.note),
body.dark-theme .modal-card:not(.po-preview-modal) :is(.muted,small,.note){
  color:#94a3b8!important;
}

/* App-wide dark table foundations. */
body.dark-theme #content table,
body.dark-theme #content table tbody,
body.dark-theme #content table tbody tr,
body.dark-theme .modal-card:not(.po-preview-modal) table,
body.dark-theme .modal-card:not(.po-preview-modal) table tbody,
body.dark-theme .modal-card:not(.po-preview-modal) table tbody tr{
  background:#172033!important;
}
body.dark-theme .table-wrap,
body.dark-theme .critical-path-scroll,
body.dark-theme .qc-table-wrap,
body.dark-theme .shipment-control-wrap,
body.dark-theme .panel>.table-wrap,
body.dark-theme .panel .table-wrap:not(.critical-path-scroll),
body.dark-theme .csv-preview-wrap{
  background:#172033!important;
  border-color:#334155!important;
}

/* Shipment Control: every normal data label/text is light in dark mode. */
body.dark-theme .shipment-page-shell,
body.dark-theme .shipment-control-toolbar,
body.dark-theme .shipment-control-search-wrap,
body.dark-theme .shipment-control-toolbar-actions,
body.dark-theme .shipment-ready-panel,
body.dark-theme .shipment-ready-head,
body.dark-theme .shipment-control-titlebar,
body.dark-theme .shipment-control-wrap{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .shipment-ready-head,
body.dark-theme .shipment-control-toolbar,
body.dark-theme .shipment-control-titlebar{
  background:#1e293b!important;
}
body.dark-theme .shipment-control-table td :is(strong,div,span):not(.shipment-doc-pill):not(.shipment-doc-icon){
  color:#e5edf7!important;
}
body.dark-theme .shipment-control-table .shipment-name-list,
body.dark-theme .shipment-control-table .shipment-code-list{
  color:#e5edf7!important;
}
body.dark-theme .shipment-icon-btn{
  background:#1e293b!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}
body.dark-theme .shipment-delete-btn{
  background:#331b24!important;
  border-color:#7f1d1d!important;
  color:#fecaca!important;
}

/* Purchase Order editor: remove the remaining white row/line-number islands. */
body.dark-theme .po-modal-card .po-products-card,
body.dark-theme .po-modal-card .po-row-scroll,
body.dark-theme .po-modal-card .po-row,
body.dark-theme .po-modal-card .po-line-number,
body.dark-theme .po-modal-card .po-cell,
body.dark-theme .po-modal-card .po-size,
body.dark-theme .po-group-table td{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .po-modal-card .po-line-number>label,
body.dark-theme .po-modal-card .po-cell>label,
body.dark-theme .po-modal-card .po-size>label,
body.dark-theme .po-group-table th{
  background:#1e293b!important;
  color:#cbd5e1!important;
  border-color:#334155!important;
}
body.dark-theme .po-modal-card .po-line-number>span,
body.dark-theme .po-group-table .po-line-number{
  background:#172033!important;
  color:#ffffff!important;
  font-weight:800!important;
}
body.dark-theme .po-modal-card .po-cell input,
body.dark-theme .po-modal-card .po-cell select,
body.dark-theme .po-modal-card .po-size input,
body.dark-theme .po-group-table input,
body.dark-theme .po-group-table select,
body.dark-theme .po-group-table textarea,
body.dark-theme .po-group-table .calc-box{
  background:#172033!important;
  color:#e5edf7!important;
  border-color:#475569!important;
}
body.dark-theme .po-modal-card .po-remove .small-btn{
  background:#331b24!important;
  color:#fecaca!important;
}

/* Task page */
body.dark-theme .tasks-view-tabs,
body.dark-theme .task-summary-grid>div,
body.dark-theme .task-card,
body.dark-theme .task-filterbar{
  background:#172033!important;
  border-color:#334155!important;
}
body.dark-theme .task-card :is(b,strong){color:#f8fafc!important}
body.dark-theme .task-due-overdue{color:#fca5a5!important}

/* Products / Tech Packs / Sampling */
body.dark-theme .product-master-table td,
body.dark-theme .product-master-table .product-wrap-cell,
body.dark-theme .product-master-table .product-sizes-cell{
  color:#e5edf7!important;
}
body.dark-theme .tp-page h2,
body.dark-theme .sample-mgmt-page h2,
body.dark-theme .qc-aql-page h2,
body.dark-theme .supplier-performance-page h2,
body.dark-theme .landed-cost-page h2{
  color:#f8fafc!important;
}
body.dark-theme .sample-pipeline-panel,
body.dark-theme .sample-mgmt-summary>div,
body.dark-theme .sample-mgmt-filterbar{
  background:#172033!important;
  border-color:#334155!important;
}
body.dark-theme .sample-section-head{
  background:#1e293b!important;
  border-color:#334155!important;
}

/* Critical Path controls */
body.dark-theme .critical-controls,
body.dark-theme .critical-filterbar,
body.dark-theme .critical-order-filter-row{
  background:#172033!important;
  border-color:#334155!important;
}
body.dark-theme .critical-controls label,
body.dark-theme .critical-filterbar label,
body.dark-theme .critical-order-filter-row label{
  color:#e5edf7!important;
}
body.dark-theme #critical-path-table .critical-note-btn{
  background:#1e293b!important;
  color:#e5edf7!important;
  border-color:#475569!important;
}
body.dark-theme #critical-path-table .activity-log-icon-btn{
  background:#1e293b!important;
  color:#cbd5e1!important;
  border-color:#475569!important;
}

/* QC surfaces */
body.dark-theme .qc-aql-report-section,
body.dark-theme .qc-aql-overview-list,
body.dark-theme .qc-aql-overview-row,
body.dark-theme .qc-aql-round-card,
body.dark-theme .qc-aql-empty-state,
body.dark-theme .qc-aql-help-strip,
body.dark-theme .qc-start-row{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-section-head,
body.dark-theme .qc-aql-round-card.is-secondary{
  background:#1e293b!important;
  border-color:#334155!important;
}
body.dark-theme .qc-aql-round-card.is-required{
  background:#331b24!important;
  border-color:#7f1d1d!important;
}
body.dark-theme .qc-aql-overview-row small,
body.dark-theme .qc-aql-round-card small,
body.dark-theme .qc-aql-help-strip small{
  color:#94a3b8!important;
}

/* Compliance / Supplier Performance / Landed Costing */
body.dark-theme .compliance-page,
body.dark-theme .compliance-summary-grid>div,
body.dark-theme .compliance-missing-panel,
body.dark-theme .compliance-filterbar,
body.dark-theme .supplier-performance-page,
body.dark-theme .supplier-perf-filterbar,
body.dark-theme .supplier-performance-summary,
body.dark-theme .supplier-performance-card,
body.dark-theme .landed-cost-page,
body.dark-theme .landed-cost-filterbar,
body.dark-theme .landed-cost-card,
body.dark-theme .landed-cost-summary-grid>div{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .compliance-link-label,
body.dark-theme .supplier-perf-table strong{
  color:#f8fafc!important;
}
body.dark-theme .comp-expired,
body.dark-theme .task-due-overdue{
  color:#fecaca!important;
}

/* Settings / database cards were still white. */
body.dark-theme .settings-section,
body.dark-theme .settings-action-grid,
body.dark-theme .settings-action-card,
body.dark-theme .settings-transfer-grid,
body.dark-theme .settings-transfer-card,
body.dark-theme .settings-button-row,
body.dark-theme .settings-page{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .settings-section>h3,
body.dark-theme .settings-action-card strong,
body.dark-theme .settings-transfer-card strong{
  color:#f8fafc!important;
}
body.dark-theme .settings-page .link-btn{color:#93c5fd!important}

/* Keep true document/print surfaces white with dark text in Dark Theme. */
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document),
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document) *{
  color:#111827!important;
}
body.dark-theme :is(.po-a4,.packing-doc,.landed-cost-document,.qc-aql-report,.techpack-document){
  background:#ffffff!important;
}

/* V1.9.13.1 — second-pass dark-theme contrast corrections */

/* Dashboard summary tiles that retained hard-coded light backgrounds. */
body.dark-theme .ops-shipping-summary>div,
body.dark-theme .ops-empty-state{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .ops-shipping-summary>div strong{color:#f8fafc!important}
body.dark-theme .ops-shipping-summary>div small{color:#94a3b8!important}

/* Task / Tech Pack / QC / Landed Cost / Supplier summary cards. */
body.dark-theme .task-summary-grid>button,
body.dark-theme .task-summary-grid>div,
body.dark-theme .tp-summary-grid>div,
body.dark-theme .qc-aql-summary>div,
body.dark-theme .landed-cost-summary>div,
body.dark-theme .supplier-perf-summary>div{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .task-summary-grid>button strong,
body.dark-theme .task-summary-grid>div strong,
body.dark-theme .tp-summary-grid>div strong,
body.dark-theme .qc-aql-summary>div strong,
body.dark-theme .landed-cost-summary>div strong,
body.dark-theme .supplier-perf-summary>div strong{
  color:#f8fafc!important;
}
body.dark-theme .task-summary-grid>button span,
body.dark-theme .task-summary-grid>div span,
body.dark-theme .tp-summary-grid>div span,
body.dark-theme .qc-aql-summary>div span,
body.dark-theme .landed-cost-summary>div span,
body.dark-theme .supplier-perf-summary>div span{
  color:#cbd5e1!important;
}
body.dark-theme .qc-aql-summary>div small,
body.dark-theme .supplier-perf-summary>div small{
  color:#94a3b8!important;
}

/* QC primary call-to-action internals. */
body.dark-theme .qc-start-inspection-btn small{color:#ffffff!important}
body.dark-theme .qc-start-inspection-icon{
  background:rgba(255,255,255,.18)!important;
  border-color:rgba(255,255,255,.30)!important;
  color:#ffffff!important;
}

/* Shipment Control empty/help/title elements. */
body.dark-theme .shipment-ready-empty,
body.dark-theme .shipment-ready-empty-help{
  background:#172033!important;
  border-color:#334155!important;
  color:#cbd5e1!important;
}
body.dark-theme .shipment-ready-empty strong,
body.dark-theme .shipment-ready-empty b{color:#f8fafc!important}
body.dark-theme .shipment-control-title{color:#f8fafc!important}

/* Settings neutral light panels. */
body.dark-theme .settings-section-head,
body.dark-theme .settings-server-backup-note,
body.dark-theme .settings-link-grid,
body.dark-theme .settings-link-card,
body.dark-theme .container-settings-note{
  background:#1e293b!important;
  border-color:#334155!important;
  color:#cbd5e1!important;
}
body.dark-theme .settings-section-head h3,
body.dark-theme .settings-server-backup-note strong,
body.dark-theme .settings-link-card strong{color:#f8fafc!important}
body.dark-theme .container-settings-table .container-internal-cbm{
  background:#172033!important;
  color:#e5edf7!important;
}

/* Modal foundations: eliminate leftover white form-section islands. */
body.dark-theme .modal-card:not(.po-preview-modal) .modal-head{
  background:#172033!important;
  border-color:#334155!important;
}
body.dark-theme .modal-card:not(.po-preview-modal) #modal-body,
body.dark-theme .modal-card:not(.po-preview-modal) form,
body.dark-theme .modal-card:not(.po-preview-modal) .form-grid{
  background:#172033!important;
  color:#e5edf7!important;
}
body.dark-theme .product-modal-card .product-form-section,
body.dark-theme .product-modal-card .product-packing-grid,
body.dark-theme .product-modal-card .packing-profile-check,
body.dark-theme .product-modal-card .product-form-actions{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}

/* PO form neutral panels / revision banner. */
body.dark-theme .po-clean-modal #modal-body,
body.dark-theme .po-clean-form,
body.dark-theme .po-clean-section,
body.dark-theme .po-editor-revision-banner,
body.dark-theme .po-clean-meta,
body.dark-theme .po-clean-lines,
body.dark-theme .po-clean-actions{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .po-clean-section>h3,
body.dark-theme .po-editor-revision-banner strong{color:#f8fafc!important}

/* Fabric prefix and % suffix boxes. */
body.dark-theme .fabric-id-input,
body.dark-theme .fabric-id-input>span,
body.dark-theme .fabric-composition-row>div,
body.dark-theme .fabric-form .input-suffix{
  background:#172033!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}

/* Shipment allocation editor. */
body.dark-theme .shipment-item-banner span,
body.dark-theme .shipment-bol-file-name{color:#cbd5e1!important}
body.dark-theme .shipment-allocation-grid th,
body.dark-theme .shipment-allocation-grid th:first-child{
  background:#1e293b!important;
  border-color:#334155!important;
  color:#cbd5e1!important;
}
body.dark-theme .shipment-allocation-grid .shipment-allocation-info td{
  background:#111827!important;
  color:#cbd5e1!important;
}
body.dark-theme .shipment-allocation-grid .shipment-allocation-entry td,
body.dark-theme .shipment-allocation-size-input,
body.dark-theme .shipment-allocation-total-input{
  background:#172033!important;
  color:#e5edf7!important;
  border-color:#475569!important;
}

/* Packing List editor summary + warning surfaces. */
body.dark-theme .packing-list-head,
body.dark-theme .packing-order-summary>div{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .packing-order-summary>div strong{color:#f8fafc!important}
body.dark-theme .packing-order-summary>div span{color:#94a3b8!important}
body.dark-theme .packing-status.packing-draft{
  background:#4a3412!important;
  color:#fde68a!important;
}
body.dark-theme .packing-variance-warning{
  background:#3a2a0d!important;
  border-color:#a16207!important;
  color:#fde68a!important;
}
body.dark-theme .packing-variance-warning strong,
body.dark-theme .packing-variance-warning span,
body.dark-theme .packing-variance-warning li{
  color:#fde68a!important;
}

/* Dark danger links must remain danger-coloured, not generic blue. */
body.dark-theme .danger-link,
body.dark-theme .task-delete-btn{
  color:#fca5a5!important;
}

/* Stronger activity count contrast. */
body.dark-theme #critical-path-table .activity-log-count{
  background:#475569!important;
  color:#ffffff!important;
}

/* V1.9.13.1 — final dark-theme cleanup after full page/modal audit */

/* Critical Path activity badge */
body.dark-theme #critical-path-table .activity-log-icon-btn:not(.has-activity) .activity-log-count{
  background:#475569!important;
  color:#ffffff!important;
}

/* QC remaining high-specificity light surfaces/text */
body.dark-theme #content .qc-start-inspection-btn small,
body.dark-theme #content .qc-aql-primary-btn small{
  color:#ffffff!important;
}
body.dark-theme #content .qc-start-inspection-icon,
body.dark-theme #content .qc-aql-primary-icon{
  background:rgba(255,255,255,.18)!important;
  border-color:rgba(255,255,255,.30)!important;
  color:#ffffff!important;
}
body.dark-theme #content .qc-aql-round-title>span{
  color:#f8fafc!important;
}
body.dark-theme #content .qc-aql-help-strip>div{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme #content .qc-aql-help-strip>div small{
  color:#94a3b8!important;
}

/* Purchase Order modal remaining light panels */
body.dark-theme .po-clean-modal .panel-head,
body.dark-theme .po-clean-modal .po-group-label,
body.dark-theme .po-clean-modal .po-group-table-wrap,
body.dark-theme .po-clean-modal .po-supplier-notes,
body.dark-theme .po-clean-modal .form-actions.po-clean-actions,
body.dark-theme .po-clean-modal .po-capacity-panel,
body.dark-theme .po-clean-modal .po-planning-suggestion,
body.dark-theme .po-clean-modal .po-packing-summary,
body.dark-theme .po-clean-modal .po-container-summary{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .po-clean-modal .po-group-label{
  background:#1e293b!important;
  color:#f8fafc!important;
}
body.dark-theme .po-clean-modal .panel-head h3,
body.dark-theme .po-clean-modal .po-group-label,
body.dark-theme .po-clean-modal .po-capacity-panel strong,
body.dark-theme .po-clean-modal .po-planning-suggestion strong{
  color:#f8fafc!important;
}
body.dark-theme .po-clean-modal input[readonly],
body.dark-theme .po-clean-modal textarea[readonly]{
  background:#111827!important;
  color:#cbd5e1!important;
}
body.dark-theme .po-clean-modal .po-summary,
body.dark-theme .po-clean-modal .po-summary *{
  color:#e5edf7!important;
}
body.dark-theme .po-clean-modal .po-amount span{
  color:#e5edf7!important;
}

/* Product modal section headings */
body.dark-theme .product-modal-card .product-section-head{
  background:#1e293b!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .product-modal-card .product-section-head strong,
body.dark-theme .product-modal-card .product-section-head h3{
  color:#f8fafc!important;
}

/* Task modal */
body.dark-theme .task-existing-meta,
body.dark-theme .task-history-title,
body.dark-theme .task-form-actions{
  background:#172033!important;
  border-color:#334155!important;
  color:#cbd5e1!important;
}
body.dark-theme .task-history-title{color:#f8fafc!important}
body.dark-theme .task-form-actions .danger-link,
body.dark-theme .task-delete-btn{
  background:#331b24!important;
  border:1px solid #7f1d1d!important;
  color:#fecaca!important;
  text-decoration:none!important;
}

/* Packing List header/audit/size states/actions */
body.dark-theme .packing-list-head>div:first-child>div,
body.dark-theme .packing-list-head .packing-list-meta>div,
body.dark-theme .packing-list-audit,
body.dark-theme .packing-list-form-actions,
body.dark-theme .pl-style-sizes{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .packing-list-head strong,
body.dark-theme .packing-list-head .packing-status{
  color:#f8fafc!important;
}
body.dark-theme .pl-size-bad{
  background:#3f1d24!important;
  border-color:#7f1d1d!important;
  color:#fecaca!important;
}
body.dark-theme .pl-size-ok{
  background:#123c35!important;
  border-color:#115e59!important;
  color:#99f6e4!important;
}
body.dark-theme .packing-list-audit{
  color:#94a3b8!important;
}

/* Settings link and heading details */
body.dark-theme .settings-section-head span,
body.dark-theme .settings-server-backup-note span,
body.dark-theme .settings-link-card span,
body.dark-theme .container-settings-note{
  color:#cbd5e1!important;
}

/* Make neutral secondary buttons clearly visible in dark mode everywhere. */
body.dark-theme .secondary{
  background:#1e293b!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}
body.dark-theme .secondary:hover{
  background:#27364f!important;
  border-color:#64748b!important;
  color:#ffffff!important;
}

/* V1.9.13.1 — final targeted contrast fixes */

/* QC */
body.dark-theme #content .qc-aql-primary-btn .qc-aql-primary-icon,
body.dark-theme #content .qc-start-inspection-btn .qc-start-inspection-icon{
  background:rgba(255,255,255,.18)!important;
  color:#ffffff!important;
}
body.dark-theme #content .qc-aql-help-strip>div>span{
  color:#f8fafc!important;
}

/* Purchase Order container-planning panels */
body.dark-theme .modal-card.po-clean-modal .panel-head{
  background:#1e293b!important;
  border-color:#334155!important;
}
body.dark-theme .po-clean-modal .container-plan-metrics>div,
body.dark-theme .po-clean-modal .container-capacity-card,
body.dark-theme .po-clean-modal .container-capacity-grid>div,
body.dark-theme .po-clean-modal .container-adjust-suggestion{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .po-clean-modal .container-capacity-title{
  background:#1e293b!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .po-clean-modal .container-plan-metrics strong,
body.dark-theme .po-clean-modal .container-capacity-title strong,
body.dark-theme .po-clean-modal .container-capacity-grid strong,
body.dark-theme .po-clean-modal .container-adjust-suggestion strong{
  color:#f8fafc!important;
}
body.dark-theme .po-clean-modal .container-plan-metrics span,
body.dark-theme .po-clean-modal .container-capacity-title span,
body.dark-theme .po-clean-modal .container-capacity-grid span,
body.dark-theme .po-clean-modal .container-adjust-suggestion span{
  color:#cbd5e1!important;
}

/* Product modal section headings */
body.dark-theme .product-modal-card .product-section-head{
  background:#1e293b!important;
}

/* Packing List identity row */
body.dark-theme .packing-list-identity>div{
  background:#172033!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .packing-list-identity>div span{color:#94a3b8!important}
body.dark-theme .packing-list-identity>div strong{color:#f8fafc!important}

/* V1.9.13.2 — researched dark-theme surface system and modal/page consistency */
body.dark-theme{
  --ui-dark-bg:#0f172a;
  --ui-dark-surface-1:#172033;
  --ui-dark-surface-2:#1e293b;
  --ui-dark-surface-3:#24324a;
  --ui-dark-input:#111827;
  --ui-dark-border:#334155;
  --ui-dark-border-strong:#475569;
  --ui-dark-text:#e5edf7;
  --ui-dark-heading:#f8fafc;
  --ui-dark-muted:#94a3b8;
  --ui-dark-brand:#2563eb;
}

/* Modal foundation — consistent with the Purchase Order editor. */
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card){
  background:var(--ui-dark-surface-1)!important;
  border:1px solid var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
  box-shadow:0 22px 55px rgba(0,0,0,.42)!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) .modal-head{
  background:var(--ui-dark-surface-1)!important;
  border-bottom-color:var(--ui-dark-border)!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) #modal-body{
  background:var(--ui-dark-bg)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) .form-actions{
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) .form-group label{
  color:var(--ui-dark-heading)!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) :is(input,select,textarea){
  background:var(--ui-dark-input)!important;
  border-color:var(--ui-dark-border-strong)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) :is(input,textarea)::placeholder{
  color:#64748b!important;
}
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) :is(input,textarea)[readonly],
body.dark-theme .modal-card:not(.po-preview-modal):not(.preview-modal-card):not(.landed-cost-preview-card) :is(input,select,textarea):disabled{
  background:#101827!important;
  color:#cbd5e1!important;
}

/* Tech Pack editor — dark mode now follows the same layered hierarchy as Create PO. */
body.dark-theme .modal-card.tp-modal-card #modal-body{
  background:var(--ui-dark-bg)!important;
}
body.dark-theme .tp-form{color:var(--ui-dark-text)!important}
body.dark-theme .tp-revision-banner{
  background:#17263e!important;
  border-color:#315488!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .tp-revision-banner span{color:var(--ui-dark-muted)!important}
body.dark-theme .tp-revision-banner strong{color:var(--ui-dark-heading)!important}
body.dark-theme .tp-form-section{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  box-shadow:none!important;
}
body.dark-theme .tp-section-head{
  background:var(--ui-dark-surface-2)!important;
  border-bottom-color:var(--ui-dark-border)!important;
}
body.dark-theme .tp-section-head strong{color:var(--ui-dark-heading)!important}
body.dark-theme .tp-section-head span{color:var(--ui-dark-muted)!important}
body.dark-theme .tp-overview-grid,
body.dark-theme .tp-two-grid,
body.dark-theme .tp-library-picker,
body.dark-theme .tp-files-list,
body.dark-theme .tp-packaging-notes{
  background:var(--ui-dark-surface-1)!important;
}
body.dark-theme .tp-fabric-card,
body.dark-theme .tp-packing-grid>div,
body.dark-theme .tp-approval-grid>div,
body.dark-theme .tp-file-row{
  background:var(--ui-dark-input)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .tp-fabric-card>strong,
body.dark-theme .tp-packing-grid strong,
body.dark-theme .tp-approval-grid strong{color:var(--ui-dark-heading)!important}
body.dark-theme .tp-fabric-card>span,
body.dark-theme .tp-fabric-card dt,
body.dark-theme .tp-packing-grid span,
body.dark-theme .tp-approval-grid span,
body.dark-theme .tp-file-row small{color:var(--ui-dark-muted)!important}
body.dark-theme .tp-fabric-card dd{color:var(--ui-dark-text)!important}
body.dark-theme :is(.tp-measure-table,.tp-construction-table,.tp-branding-table,.tp-attached-table){
  background:var(--ui-dark-surface-1)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme :is(.tp-measure-table,.tp-construction-table,.tp-branding-table,.tp-attached-table) th{
  background:var(--ui-dark-surface-2)!important;
  border-color:var(--ui-dark-border)!important;
  color:#cbd5e1!important;
}
body.dark-theme :is(.tp-measure-table,.tp-construction-table,.tp-branding-table,.tp-attached-table) td{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme :is(.tp-measure-table,.tp-construction-table,.tp-branding-table,.tp-attached-table) :is(input,select,textarea){
  background:var(--ui-dark-input)!important;
  border-color:var(--ui-dark-border-strong)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .tp-library-picker{
  border-top:0!important;
}
body.dark-theme .tp-files-list:empty::after{color:var(--ui-dark-muted)!important}
body.dark-theme .tp-form-actions{
  background:#111827!important;
  border-top-color:var(--ui-dark-border)!important;
  box-shadow:0 -8px 18px rgba(0,0,0,.24)!important;
}
body.dark-theme .tp-fabric-missing{
  background:#3a2a0d!important;
  border-color:#a16207!important;
}
body.dark-theme .tp-fabric-missing span{color:#fde68a!important}

/* Tech Pack Library and revision dialogs. */
body.dark-theme .tp-library-modal #modal-body,
body.dark-theme .tp-library-form,
body.dark-theme .tp-library-files,
body.dark-theme .tp-library-files>div,
body.dark-theme .tp-revision-list,
body.dark-theme .tp-revision-row{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .tp-library-rev,
body.dark-theme .tp-revision-row small{color:var(--ui-dark-muted)!important}
body.dark-theme .tp-file-icons button{
  background:var(--ui-dark-surface-2)!important;
  border-color:var(--ui-dark-border-strong)!important;
  color:var(--ui-dark-text)!important;
}

/* User permissions / database dialogs. */
body.dark-theme .permission-section,
body.dark-theme .permission-summary-bar,
body.dark-theme .permission-po-scope,
body.dark-theme .permission-sticky-actions,
body.dark-theme .master-admin-note{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .permission-section h3,
body.dark-theme .permission-summary-bar strong,
body.dark-theme .master-admin-note strong{color:var(--ui-dark-heading)!important}
body.dark-theme .permission-po-scope label{color:var(--ui-dark-text)!important}

/* Sample Management dialogs. */
body.dark-theme .sample-line-head,
body.dark-theme .sample-round-meta,
body.dark-theme .sample-photo-card,
body.dark-theme .sample-empty-rounds{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .sample-line-head strong{color:var(--ui-dark-heading)!important}
body.dark-theme .sample-line-head span,
body.dark-theme .sample-round-meta{color:var(--ui-dark-muted)!important}
body.dark-theme .sample-photo-card img{background:var(--ui-dark-surface-2)!important}
body.dark-theme .sample-round-lock{
  background:#123c35!important;
  border-color:#115e59!important;
  color:#99f6e4!important;
}

/* QC/AQL dialogs and page cards. */
body.dark-theme .aql-form-section,
body.dark-theme .aql-photo-card,
body.dark-theme .qc-aql-review-notes-grid>div,
body.dark-theme .aql-defect-guide-card,
body.dark-theme .aql-riman-standard-box,
body.dark-theme .qc-review-no-photos,
body.dark-theme .qc-feedback-grid,
body.dark-theme .qc-inline-photo-card,
body.dark-theme .qc-review-grid,
body.dark-theme .qc-side-review-grid,
body.dark-theme .qc-side-review-note{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .aql-form-section>.aql-section-head,
body.dark-theme .aql-auto-section>.aql-section-head,
body.dark-theme .aql-defect-guide-head{
  background:var(--ui-dark-surface-2)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-heading)!important;
}
body.dark-theme .aql-photo-image-wrap{background:var(--ui-dark-surface-2)!important}
body.dark-theme .aql-form-actions{
  background:#111827!important;
  border-color:var(--ui-dark-border)!important;
}
body.dark-theme .aql-auto-plan-note,
body.dark-theme .aql-plan-explainer,
body.dark-theme .aql-class-help,
body.dark-theme .aql-random-sample-reminder{
  background:var(--ui-dark-input)!important;
  border-color:var(--ui-dark-border)!important;
  color:#cbd5e1!important;
}

/* Shipment and document dialogs. */
body.dark-theme .shipment-docs-summary>div,
body.dark-theme .shipment-docs-list,
body.dark-theme .shipment-doc-row,
body.dark-theme .shipment-linked-doc-actions,
body.dark-theme .shipment-allocation-panel,
body.dark-theme .shipment-allocation-row{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .shipment-docs-summary span,
body.dark-theme .shipment-doc-upload span,
body.dark-theme .shipment-doc-status{color:var(--ui-dark-muted)!important}
body.dark-theme .shipment-docs-summary strong{color:var(--ui-dark-heading)!important}

/* Landed Cost dialogs. */
body.dark-theme .landed-cost-identity>div,
body.dark-theme .landed-cost-section,
body.dark-theme .landed-cost-totals>div,
body.dark-theme .landed-cost-audit{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .landed-cost-section-head{
  background:var(--ui-dark-surface-2)!important;
  border-color:var(--ui-dark-border)!important;
}
body.dark-theme .landed-cost-section-head strong,
body.dark-theme .landed-cost-identity strong,
body.dark-theme .landed-cost-totals strong{color:var(--ui-dark-heading)!important}
body.dark-theme .landed-cost-section-head span,
body.dark-theme .landed-cost-identity span,
body.dark-theme .landed-cost-totals span,
body.dark-theme .landed-cost-audit{color:var(--ui-dark-muted)!important}
body.dark-theme .landed-cost-actions{
  background:#111827!important;
  border-color:var(--ui-dark-border)!important;
  box-shadow:0 -8px 18px rgba(0,0,0,.24)!important;
}
body.dark-theme .landed-cost-note{
  background:var(--ui-dark-input)!important;
  color:#cbd5e1!important;
}
body.dark-theme .landed-cost-lock{
  background:#123c35!important;
  border-color:#115e59!important;
  color:#99f6e4!important;
}
body.dark-theme .landed-cost-stale{
  background:#3f1d24!important;
  border-color:#7f1d1d!important;
  color:#fecaca!important;
}

/* Task / Compliance simple modal surfaces. */
body.dark-theme .task-history,
body.dark-theme .task-history-row,
body.dark-theme .compliance-form-section,
body.dark-theme .compliance-document-panel{
  background:var(--ui-dark-surface-1)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}

/* Page-level structural surfaces that previously retained light-mode cards. */
body.dark-theme #content :is(
 .tasks-view-tabs,.task-filterbar,.task-card,
 .sample-pipeline-panel,.sample-mgmt-filterbar,
 .supplier-perf-filterbar,.landed-cost-filterbar,
 .settings-section-head,.settings-action-card,.settings-transfer-card,.settings-link-card,
 .shipment-page-shell,.shipment-control-toolbar,.shipment-ready-panel,.shipment-control-titlebar,
 .qc-aql-report-section,.qc-aql-round-card,.qc-start-row,
 .compliance-filterbar,.compliance-missing-panel
){
  border-color:var(--ui-dark-border)!important;
}

/* Dark-mode scrollbars for long editors. */
body.dark-theme .modal-card #modal-body,
body.dark-theme .table-wrap,
body.dark-theme .critical-path-scroll{
  scrollbar-color:#475569 #111827;
}
body.dark-theme .modal-card #modal-body::-webkit-scrollbar,
body.dark-theme .table-wrap::-webkit-scrollbar{width:10px;height:10px}
body.dark-theme .modal-card #modal-body::-webkit-scrollbar-track,
body.dark-theme .table-wrap::-webkit-scrollbar-track{background:#111827}
body.dark-theme .modal-card #modal-body::-webkit-scrollbar-thumb,
body.dark-theme .table-wrap::-webkit-scrollbar-thumb{background:#475569;border:2px solid #111827;border-radius:999px}

/* V1.9.13.2 — audit follow-up: remaining light structural boxes */
body.dark-theme .supplier-perf-footnote,
body.dark-theme .compliance-form-note,
body.dark-theme .container-plan-warning{
  background:var(--ui-dark-input)!important;
  border-color:var(--ui-dark-border)!important;
  color:#cbd5e1!important;
}
body.dark-theme .container-plan-warning{
  border-left:3px solid #d97706!important;
  color:#fde68a!important;
}
body.dark-theme .sample-line-head>div{
  background:var(--ui-dark-input)!important;
  border-color:var(--ui-dark-border)!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .sample-line-head>div span{color:var(--ui-dark-muted)!important}
body.dark-theme .sample-line-head>div strong{color:var(--ui-dark-heading)!important}
body.dark-theme .qc-start-intro{
  background:#17263e!important;
  border-color:#315488!important;
  color:var(--ui-dark-text)!important;
}
body.dark-theme .qc-start-intro strong{color:#dbeafe!important}
body.dark-theme .qc-start-intro span{color:#cbd5e1!important}
body.dark-theme .fabric-warning{
  background:#3f1d24!important;
  border-color:#7f1d1d!important;
  color:#fecaca!important;
}

/* V1.9.13.3 — QC View Report dark-mode redesign
   Screen preview is a true dark report; Print/PDF remains white. */

/* Report modal shell */
body.dark-theme .modal.qc-aql-report-modal-open{
  background:rgba(2,6,23,.82)!important;
}
body.dark-theme .modal-card.qc-aql-report-card{
  background:#0f172a!important;
  border:1px solid #334155!important;
  box-shadow:0 22px 60px rgba(0,0,0,.48)!important;
  color:#e5edf7!important;
}
body.dark-theme .modal-card.qc-aql-report-card .modal-head{
  background:#111827!important;
  border-bottom:1px solid #334155!important;
}
body.dark-theme .modal-card.qc-aql-report-card #modal-title{
  color:#f8fafc!important;
}
body.dark-theme .modal.qc-aql-report-modal-open #modal-body{
  background:#0f172a!important;
  color:#e5edf7!important;
}

/* Sticky report toolbar */
body.dark-theme .qc-aql-report-card .aql-report-toolbar{
  background:#111827!important;
  border-bottom:1px solid #334155!important;
  box-shadow:0 8px 20px rgba(0,0,0,.18)!important;
  justify-content:space-between!important;
  align-items:center!important;
}
.qc-aql-report-card .aql-report-toolbar-actions{
  display:flex!important;
  gap:7px!important;
  align-items:center!important;
}
.qc-aql-report-card .aql-screen-status{
  display:inline-flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:34px!important;
  padding:5px 10px!important;
  border:1px solid #cbd5e1!important;
  border-radius:6px!important;
  background:#f8fafc!important;
}
.qc-aql-report-card .aql-screen-status span{
  font-size:10px!important;
  font-weight:700!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
  color:#64748b!important;
}
.qc-aql-report-card .aql-screen-status strong{
  font-size:14px!important;
  letter-spacing:.03em!important;
}
.qc-aql-report-card .aql-screen-status.is-pass{
  background:#ecfdf5!important;
  border-color:#86efac!important;
}
.qc-aql-report-card .aql-screen-status.is-pass strong{color:#166534!important}
.qc-aql-report-card .aql-screen-status.is-fail{
  background:#fef2f2!important;
  border-color:#fca5a5!important;
}
.qc-aql-report-card .aql-screen-status.is-fail strong{color:#b91c1c!important}
.qc-aql-report-card .aql-screen-status.is-pending{
  background:#fff7ed!important;
  border-color:#fdba74!important;
}
.qc-aql-report-card .aql-screen-status.is-pending strong{color:#9a3412!important}

body.dark-theme .qc-aql-report-card .aql-screen-status.is-pass{
  background:#123c35!important;
  border-color:#2f766a!important;
}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-pass span{color:#99f6e4!important}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-pass strong{color:#d1fae5!important}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-fail{
  background:#4a2025!important;
  border-color:#9f3a46!important;
}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-fail span{color:#fecaca!important}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-fail strong{color:#fee2e2!important}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-pending{
  background:#4a3412!important;
  border-color:#a16207!important;
}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-pending span{color:#fde68a!important}
body.dark-theme .qc-aql-report-card .aql-screen-status.is-pending strong{color:#fef3c7!important}

/* Report pages become dark cards on screen */
body.dark-theme .qc-aql-report-card .aql-report-preview{
  max-width:980px!important;
}
body.dark-theme .qc-aql-report-card .aql-print-report{
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-page{
  background:#172033!important;
  border:1px solid #334155!important;
  box-shadow:0 10px 28px rgba(0,0,0,.30)!important;
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-head{
  border-bottom-color:#5b7caa!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-head strong{
  color:#f8fafc!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-head span{
  color:#94a3b8!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-head b{
  color:#dbeafe!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-sub{
  background:#111827!important;
  border:1px solid #334155!important;
  color:#cbd5e1!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-sub span{
  color:#94a3b8!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-sub b{
  color:#f8fafc!important;
}

/* PASS / FAIL must remain unmistakable */
body.dark-theme .qc-aql-report-card .aql-doc-result-box{
  color:#e5edf7!important;
  border-width:1px!important;
  border-radius:6px!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-result-box span{
  color:#cbd5e1!important;
  font-weight:800!important;
  letter-spacing:.05em!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-result-box.pass{
  background:#123c35!important;
  border-color:#2f766a!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-result-box.pass strong{
  color:#d1fae5!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-result-box.fail{
  background:#4a2025!important;
  border-color:#9f3a46!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-result-box.fail strong{
  color:#fee2e2!important;
}
body.dark-theme .qc-aql-report-card .pass-text,
body.dark-theme .qc-aql-report-card .aql-doc-result.pass{
  color:#6ee7b7!important;
  font-weight:800!important;
}
body.dark-theme .qc-aql-report-card .fail-text,
body.dark-theme .qc-aql-report-card .aql-doc-result.fail{
  color:#fca5a5!important;
  font-weight:800!important;
}

/* Metadata */
body.dark-theme .qc-aql-report-card .aql-doc-meta-grid>div{
  border-bottom-color:#334155!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-meta-grid span{
  color:#94a3b8!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-meta-grid b{
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-page h3{
  color:#dbeafe!important;
  border-bottom:1px solid #334155!important;
  padding-bottom:4px!important;
}

/* Tables */
body.dark-theme .qc-aql-report-card .aql-doc-table{
  background:#172033!important;
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-table th{
  background:#24324a!important;
  color:#f8fafc!important;
  border-color:#475569!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-table td{
  background:#172033!important;
  color:#e5edf7!important;
  border-color:#3b4a60!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-table tbody tr:nth-child(even) td{
  background:#19253a!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-table td.aql-doc-result.pass{
  background:#123c35!important;
  color:#a7f3d0!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-table td.aql-doc-result.fail{
  background:#4a2025!important;
  color:#fecaca!important;
}

/* Notes, photos and sign-off */
body.dark-theme .qc-aql-report-card .aql-doc-photo-grid>div{
  background:#111827!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-photo-grid img{
  background:#0f172a!important;
  border:1px solid #334155!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-photo-grid b,
body.dark-theme .qc-aql-report-card .aql-doc-photo-grid p{
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-photo-grid span{
  color:#94a3b8!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-note{
  background:#111827!important;
  border-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-signoff>div{
  border-bottom-color:#334155!important;
  color:#e5edf7!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-signoff span{
  color:#94a3b8!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-signoff b{
  color:#f8fafc!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-footer{
  border-top-color:#334155!important;
  color:#64748b!important;
}
body.dark-theme .qc-aql-report-card .aql-doc-empty{
  color:#94a3b8!important;
  background:#111827!important;
  border:1px dashed #475569!important;
}

/* QC page itself: make round/report status easy to scan */
body.dark-theme #content .qc-aql-status,
body.dark-theme #content .qc-aql-round-status,
body.dark-theme #content .qc-review-status{
  border-color:#475569!important;
}
body.dark-theme #content .qc-aql-status.status-pass,
body.dark-theme #content .qc-aql-round-status.status-pass,
body.dark-theme #content .qc-review-status.status-pass{
  background:#123c35!important;
  color:#a7f3d0!important;
}
body.dark-theme #content .qc-aql-status.status-fail,
body.dark-theme #content .qc-aql-round-status.status-fail,
body.dark-theme #content .qc-review-status.status-fail{
  background:#4a2025!important;
  color:#fecaca!important;
}

/* Small screens */
@media(max-width:760px){
  .qc-aql-report-card .aql-report-toolbar{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .qc-aql-report-card .aql-report-toolbar-actions{
    justify-content:flex-end!important;
  }
  body.dark-theme .qc-aql-report-card .aql-doc-page{
    min-height:auto!important;
    padding:16px 14px 42px!important;
  }
  body.dark-theme .qc-aql-report-card .aql-doc-meta-grid{
    grid-template-columns:1fr!important;
  }
}

/* V1.9.14.0 — Calendar & World Time */
.world-time-top-btn svg{width:21px!important;height:21px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.world-time-panel{position:fixed!important;top:58px!important;right:12px!important;width:min(760px,calc(100vw - 24px))!important;max-height:calc(100vh - 72px)!important;z-index:980!important;display:flex!important;flex-direction:column!important;background:#fff!important;border:1px solid #d7dde5!important;border-radius:10px!important;box-shadow:0 20px 54px rgba(15,23,42,.20)!important;opacity:0!important;transform:translateY(-8px) scale(.99)!important;pointer-events:none!important;transition:opacity .16s ease,transform .16s ease!important;overflow:hidden!important}
.world-time-panel.is-open{opacity:1!important;transform:none!important;pointer-events:auto!important}
.world-time-panel-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:12px 14px!important;background:#f8fafc!important;border-bottom:1px solid #e2e8f0!important}
.world-time-panel-head>div{display:flex!important;flex-direction:column!important;gap:1px!important}.world-time-panel-head strong{font-size:14px!important;color:#10233f!important}.world-time-panel-head span{font-size:10px!important;color:#64748b!important}
.world-time-close{width:30px!important;height:30px!important;border:1px solid #cbd5e1!important;border-radius:6px!important;background:#fff!important;color:#334155!important;font-size:20px!important;line-height:1!important;cursor:pointer!important}.world-time-close:hover{background:#fee2e2!important;border-color:#fca5a5!important;color:#b91c1c!important}
.world-time-panel-body{display:grid!important;grid-template-columns:minmax(270px,310px) minmax(0,1fr)!important;min-height:390px!important;overflow:auto!important;background:#fff!important}
.world-time-calendar-section{padding:14px!important;border-right:1px solid #e2e8f0!important;background:#fbfcfe!important}.world-time-clocks-section{padding:14px!important;background:#fff!important;min-width:0!important}
.world-calendar{display:flex!important;flex-direction:column!important;gap:9px!important}.world-calendar-head{display:grid!important;grid-template-columns:30px 1fr 30px!important;align-items:center!important;gap:6px!important}.world-calendar-head>div{text-align:center!important;display:flex!important;flex-direction:column!important;gap:1px!important}.world-calendar-head strong{font-size:14px!important;color:#10233f!important}
.world-cal-nav{width:30px!important;height:30px!important;border:1px solid #d7dde5!important;border-radius:6px!important;background:#fff!important;color:#334155!important;font-size:20px!important;cursor:pointer!important}.world-cal-nav:hover{background:#eff6ff!important;border-color:#bfdbfe!important;color:#1d4ed8!important}
.world-cal-today-link{border:0!important;background:transparent!important;color:#2563eb!important;font-size:10px!important;font-weight:700!important;padding:0!important;cursor:pointer!important}
.world-cal-weekdays,.world-cal-grid{display:grid!important;grid-template-columns:repeat(7,1fr)!important}.world-cal-weekdays span{text-align:center!important;color:#64748b!important;font-size:9px!important;font-weight:800!important;padding:4px 0!important}.world-cal-grid{gap:3px!important}
.world-cal-day{aspect-ratio:1/1!important;min-height:31px!important;border-radius:7px!important;background:transparent!important;color:#334155!important;font-size:11px!important;font-weight:700!important;display:flex!important;align-items:center!important;justify-content:center!important}.world-cal-day.is-outside{color:#b6c0cd!important}.world-cal-day.is-today{background:#2563eb!important;color:#fff!important;box-shadow:0 0 0 2px rgba(37,99,235,.16)!important}
.world-calendar-today{margin-top:5px!important;padding:9px 10px!important;border:1px solid #dbeafe!important;border-radius:7px!important;background:#eff6ff!important;display:flex!important;flex-direction:column!important;gap:2px!important}.world-calendar-today span{font-size:9px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.05em!important;color:#2563eb!important}.world-calendar-today strong{font-size:11px!important;color:#1e3a8a!important}
.world-time-section-head{display:flex!important;justify-content:space-between!important;align-items:center!important;margin-bottom:9px!important}.world-time-section-head>div{display:flex!important;gap:8px!important;align-items:baseline!important}.world-time-section-head strong{font-size:13px!important;color:#10233f!important}.world-time-section-head span{font-size:10px!important;color:#64748b!important}
.world-clock-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.world-clock-card{position:relative!important;display:grid!important;grid-template-columns:74px minmax(0,1fr)!important;gap:9px!important;align-items:center!important;padding:9px!important;border:1px solid #d7dde5!important;border-radius:8px!important;background:#fff!important;min-width:0!important}
.world-clock-remove{position:absolute!important;right:5px!important;top:4px!important;width:22px!important;height:22px!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#94a3b8!important;font-size:16px!important;cursor:pointer!important;line-height:1!important}.world-clock-remove:hover{background:#fee2e2!important;color:#b91c1c!important}
.world-clock-analogue,.world-analog-svg{width:68px!important;height:68px!important}.world-analog-svg{display:block!important}.world-clock-face{fill:#f8fafc!important;stroke:#cbd5e1!important;stroke-width:1.3!important}.world-clock-tick{stroke:#64748b!important;stroke-width:1.6!important}.world-clock-hand{stroke:#10233f!important;stroke-linecap:round!important}.world-clock-hand.hour{stroke-width:4!important}.world-clock-hand.minute{stroke-width:2.7!important}.world-clock-hand.second{stroke:#ef4444!important;stroke-width:1.1!important}.world-clock-pin{fill:#ef4444!important}
.world-clock-copy{display:flex!important;flex-direction:column!important;min-width:0!important;padding-right:15px!important}.world-clock-copy strong{font-size:11px!important;color:#10233f!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.world-clock-copy>span{font-size:9px!important;color:#64748b!important;margin-top:1px!important}.world-clock-copy b{font-size:16px!important;color:#111827!important;margin-top:5px!important;font-variant-numeric:tabular-nums!important;letter-spacing:.02em!important}.world-clock-copy small{display:flex!important;gap:7px!important;align-items:center!important;margin-top:2px!important;color:#64748b!important;font-size:9px!important}.world-clock-offset{font-weight:800!important;color:#475569!important}
.world-clock-add{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;margin-top:10px!important;padding-top:10px!important;border-top:1px solid #e2e8f0!important}.world-clock-add select{min-height:34px!important}.world-clock-empty{grid-column:1/-1!important;border:1px dashed #cbd5e1!important;border-radius:8px!important;padding:20px!important;text-align:center!important;color:#64748b!important;background:#f8fafc!important}
body.dark-theme .world-time-panel{background:#111827!important;border-color:#334155!important;box-shadow:0 22px 60px rgba(0,0,0,.48)!important}body.dark-theme .world-time-panel-head{background:#111827!important;border-color:#334155!important}
body.dark-theme .world-time-panel-head strong,body.dark-theme .world-calendar-head strong,body.dark-theme .world-time-section-head strong,body.dark-theme .world-clock-copy strong{color:#f8fafc!important}body.dark-theme .world-time-panel-head span,body.dark-theme .world-time-section-head span,body.dark-theme .world-clock-copy>span,body.dark-theme .world-clock-copy small,body.dark-theme .world-cal-weekdays span{color:#94a3b8!important}
body.dark-theme .world-time-close,body.dark-theme .world-cal-nav{background:#1e293b!important;border-color:#475569!important;color:#e5edf7!important}body.dark-theme .world-time-close:hover{background:#4a2025!important;border-color:#9f3a46!important;color:#fecaca!important}body.dark-theme .world-cal-nav:hover{background:#24324a!important;border-color:#5b7caa!important;color:#dbeafe!important}
body.dark-theme .world-time-panel-body,body.dark-theme .world-time-clocks-section{background:#111827!important}body.dark-theme .world-time-calendar-section{background:#0f172a!important;border-color:#334155!important}
body.dark-theme .world-cal-day{color:#cbd5e1!important}body.dark-theme .world-cal-day.is-outside{color:#526176!important}body.dark-theme .world-cal-day.is-today{background:#2563eb!important;color:#fff!important}
body.dark-theme .world-calendar-today{background:#17263e!important;border-color:#315488!important}body.dark-theme .world-calendar-today span{color:#93c5fd!important}body.dark-theme .world-calendar-today strong{color:#dbeafe!important}
body.dark-theme .world-clock-card{background:#172033!important;border-color:#334155!important}body.dark-theme .world-clock-remove{color:#64748b!important}body.dark-theme .world-clock-remove:hover{background:#4a2025!important;color:#fecaca!important}
body.dark-theme .world-clock-face{fill:#111827!important;stroke:#475569!important}body.dark-theme .world-clock-tick{stroke:#64748b!important}body.dark-theme .world-clock-hand{stroke:#f8fafc!important}body.dark-theme .world-clock-hand.second{stroke:#f87171!important}body.dark-theme .world-clock-pin{fill:#f87171!important}
body.dark-theme .world-clock-copy b{color:#f8fafc!important}body.dark-theme .world-clock-offset{color:#cbd5e1!important}body.dark-theme .world-clock-add{border-color:#334155!important}body.dark-theme .world-clock-empty{background:#172033!important;border-color:#475569!important;color:#94a3b8!important}
@media(max-width:760px){.world-time-panel{top:54px!important;right:6px!important;width:calc(100vw - 12px)!important;max-height:calc(100vh - 62px)!important}.world-time-panel-body{grid-template-columns:1fr!important}.world-time-calendar-section{border-right:0!important;border-bottom:1px solid #e2e8f0!important}body.dark-theme .world-time-calendar-section{border-bottom-color:#334155!important}}
@media(max-width:520px){.world-clock-grid{grid-template-columns:1fr!important}}

/* V1.9.14.1 — make World Time immediately discoverable */
.world-time-top-btn{
  width:auto!important;
  min-width:112px!important;
  padding:0 10px!important;
  gap:7px!important;
}
.world-time-top-btn .world-time-button-label{
  display:inline!important;
  white-space:nowrap!important;
  font-size:10px!important;
  font-weight:700!important;
}
.world-time-top-btn.is-active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}
body.dark-theme .world-time-top-btn.is-active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}
@media(max-width:760px){
  .world-time-top-btn{min-width:40px!important;width:40px!important;padding:0!important}
  .world-time-top-btn .world-time-button-label{display:none!important}
}

/* V1.9.14.2 — Calendar & World Time lives directly on Dashboard */
.dashboard-world-time{
  display:grid!important;
  grid-template-columns:280px minmax(0,1fr)!important;
  gap:12px!important;
  margin:0 0 14px!important;
  align-items:stretch!important;
}
.dashboard-world-calendar-card,
.dashboard-world-clocks-card{
  background:#ffffff!important;
  border:1px solid #d7dde5!important;
  border-radius:8px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
  min-width:0!important;
}
.dashboard-world-calendar-card{padding:11px!important}
.dashboard-world-clocks-card{padding:11px!important}
.dashboard-world-card-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:9px!important;
}
.dashboard-world-card-head>div:first-child{
  display:flex!important;
  flex-direction:column!important;
  gap:1px!important;
}
.dashboard-world-card-head strong{
  color:#10233f!important;
  font-size:12px!important;
  font-weight:800!important;
}
.dashboard-world-card-head span{
  color:#64748b!important;
  font-size:9px!important;
}
.dashboard-world-clocks-head{align-items:flex-start!important}
.dashboard-world-add{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-width:260px!important;
}
.dashboard-world-add select{
  min-height:30px!important;
  height:30px!important;
  font-size:10px!important;
  flex:1 1 auto!important;
  min-width:140px!important;
}
.dashboard-world-add .small-btn{
  min-height:30px!important;
  height:30px!important;
  white-space:nowrap!important;
  padding:0 10px!important;
}
.dashboard-world-clock-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(145px,1fr))!important;
  gap:7px!important;
  align-items:stretch!important;
}
.dashboard-world-time .world-clock-card{
  grid-template-columns:60px minmax(0,1fr)!important;
  gap:7px!important;
  padding:7px!important;
  min-height:80px!important;
}
.dashboard-world-time .world-clock-analogue,
.dashboard-world-time .world-analog-svg{
  width:56px!important;
  height:56px!important;
}
.dashboard-world-time .world-clock-copy b{
  font-size:14px!important;
  margin-top:3px!important;
}
.dashboard-world-time .world-clock-copy strong{font-size:10px!important}
.dashboard-world-time .world-clock-copy>span,
.dashboard-world-time .world-clock-copy small{font-size:8px!important}
.dashboard-world-time .world-clock-remove{
  right:3px!important;
  top:3px!important;
  width:19px!important;
  height:19px!important;
  font-size:14px!important;
}
.dashboard-world-time .world-calendar{
  gap:5px!important;
}
.dashboard-world-time .world-calendar-head{
  grid-template-columns:26px 1fr 26px!important;
  gap:4px!important;
}
.dashboard-world-time .world-calendar-head strong{font-size:12px!important}
.dashboard-world-time .world-cal-nav{
  width:26px!important;
  height:26px!important;
  font-size:17px!important;
}
.dashboard-world-time .world-cal-weekdays span{
  font-size:8px!important;
  padding:2px 0!important;
}
.dashboard-world-time .world-cal-grid{gap:2px!important}
.dashboard-world-time .world-cal-day{
  min-height:25px!important;
  border-radius:5px!important;
  font-size:9px!important;
}
.dashboard-world-time .world-calendar-today{
  margin-top:3px!important;
  padding:6px 8px!important;
}
.dashboard-world-time .world-calendar-today span{font-size:8px!important}
.dashboard-world-time .world-calendar-today strong{font-size:9px!important}

/* No popup world-time UI is used from this version onward. */
.world-time-panel{display:none!important}

/* Dark dashboard world time */
body.dark-theme .dashboard-world-calendar-card,
body.dark-theme .dashboard-world-clocks-card{
  background:#172033!important;
  border-color:#334155!important;
  box-shadow:none!important;
}
body.dark-theme .dashboard-world-card-head strong{color:#f8fafc!important}
body.dark-theme .dashboard-world-card-head span{color:#94a3b8!important}
body.dark-theme .dashboard-world-add select{
  background:#0f172a!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}
body.dark-theme .dashboard-world-time .world-clock-card{
  background:#111827!important;
  border-color:#334155!important;
}
body.dark-theme .dashboard-world-time .world-calendar-today{
  background:#17263e!important;
  border-color:#315488!important;
}

/* Responsive dashboard world-time layout */
@media(max-width:1320px){
  .dashboard-world-clock-grid{grid-template-columns:repeat(3,minmax(150px,1fr))!important}
}
@media(max-width:980px){
  .dashboard-world-time{grid-template-columns:1fr!important}
  .dashboard-world-clock-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important}
}
@media(max-width:600px){
  .dashboard-world-card-head.dashboard-world-clocks-head{flex-direction:column!important}
  .dashboard-world-add{width:100%!important;min-width:0!important}
  .dashboard-world-clock-grid{grid-template-columns:1fr!important}
}

/* V1.9.14.3 — compact local date + world clocks */
.dashboard-world-time.compact{
  display:block!important;
  margin:0 0 14px!important;
  padding:10px!important;
  background:#ffffff!important;
  border:1px solid #d7dde5!important;
  border-radius:8px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.dashboard-world-time.compact .dashboard-world-card-head{
  margin-bottom:8px!important;
}
.dashboard-world-time.compact .dashboard-world-clock-grid{
  grid-template-columns:repeat(6,minmax(145px,1fr))!important;
  gap:7px!important;
}
.dashboard-local-date-card,
.dashboard-world-time.compact .world-clock-card{
  min-height:82px!important;
  height:82px!important;
  box-sizing:border-box!important;
}
.dashboard-local-date-card{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  padding:9px 10px!important;
  border:1px solid #bfdbfe!important;
  border-radius:8px!important;
  background:#eff6ff!important;
  overflow:hidden!important;
}
.local-date-top,
.local-date-foot{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
}
.local-date-top span{
  color:#2563eb!important;
  font-size:8px!important;
  font-weight:800!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
}
.local-date-top strong{
  color:#1e3a8a!important;
  font-size:9px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.local-date-main{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
}
.local-date-main>b{
  color:#10233f!important;
  font-size:29px!important;
  line-height:1!important;
  font-weight:800!important;
  font-variant-numeric:tabular-nums!important;
}
.local-date-main>div{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
.local-date-main strong{
  color:#10233f!important;
  font-size:10px!important;
  line-height:1.1!important;
}
.local-date-main span{
  color:#64748b!important;
  font-size:8px!important;
  margin-top:2px!important;
}
.local-date-foot span{
  color:#64748b!important;
  font-size:8px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.dashboard-world-time.compact .world-clock-card{
  grid-template-columns:58px minmax(0,1fr)!important;
  gap:7px!important;
  padding:7px!important;
}
.dashboard-world-time.compact .world-clock-analogue,
.dashboard-world-time.compact .world-analog-svg{
  width:54px!important;
  height:54px!important;
}
.dashboard-world-time.compact .world-clock-copy b{
  font-size:13px!important;
}
.dashboard-world-time.compact .world-clock-local-badge{
  position:absolute!important;
  top:4px!important;
  left:5px!important;
  z-index:2!important;
  padding:2px 5px!important;
  border-radius:999px!important;
  background:#2563eb!important;
  color:#ffffff!important;
  font-size:7px!important;
  font-weight:800!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
.dashboard-world-time.compact .world-clock-card.is-local-clock{
  border-color:#2563eb!important;
  box-shadow:0 0 0 2px rgba(37,99,235,.14)!important;
  background:#f8fbff!important;
}

/* Dark theme */
body.dark-theme .dashboard-world-time.compact{
  background:#172033!important;
  border-color:#334155!important;
  box-shadow:none!important;
}
body.dark-theme .dashboard-local-date-card{
  background:#17263e!important;
  border-color:#315488!important;
}
body.dark-theme .local-date-top span{color:#93c5fd!important}
body.dark-theme .local-date-top strong,
body.dark-theme .local-date-main>b,
body.dark-theme .local-date-main strong{color:#f8fafc!important}
body.dark-theme .local-date-main span,
body.dark-theme .local-date-foot span{color:#94a3b8!important}
body.dark-theme .dashboard-world-time.compact .world-clock-card.is-local-clock{
  background:#17263e!important;
  border-color:#3b82f6!important;
  box-shadow:0 0 0 2px rgba(59,130,246,.18)!important;
}

/* The old monthly-calendar dashboard card is retired. */
.dashboard-world-time.compact .dashboard-world-calendar-card,
.dashboard-world-time.compact .world-calendar{
  display:none!important;
}

@media(max-width:1450px){
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(3,minmax(150px,1fr))!important}
}
@media(max-width:900px){
  .dashboard-world-time.compact .dashboard-world-clocks-head{flex-direction:column!important;align-items:stretch!important}
  .dashboard-world-time.compact .dashboard-world-add{width:100%!important;min-width:0!important}
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important}
}
@media(max-width:560px){
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:1fr!important}
}

/* V1.9.14.4 — 5 clocks max per row + time-zone sorting */
.dashboard-world-time-row{
  display:grid!important;
  grid-template-columns:145px minmax(0,1fr)!important;
  gap:7px!important;
  align-items:start!important;
}
.dashboard-world-time.compact .dashboard-world-clock-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(145px,1fr))!important;
  gap:7px!important;
  align-items:stretch!important;
}
.dashboard-world-time.compact .dashboard-local-date-card{
  width:100%!important;
  min-width:0!important;
}

/* My Tasks top controls use the same primary blue family as other PLM actions. */
.tasks-topbar .tasks-view-tabs{
  border:0!important;
  background:transparent!important;
  padding:0!important;
  gap:6px!important;
}
.tasks-topbar .task-top-blue,
.tasks-topbar .tasks-view-tabs .task-top-blue{
  background:#2563eb!important;
  border:1px solid #2563eb!important;
  color:#ffffff!important;
  border-radius:5px!important;
  font-weight:700!important;
  min-height:32px!important;
  padding:6px 11px!important;
}
.tasks-topbar .task-top-blue:hover,
.tasks-topbar .tasks-view-tabs .task-top-blue:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue.active{
  background:#1e40af!important;
  border-color:#1e40af!important;
  color:#ffffff!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important;
}
body.dark-theme .tasks-topbar .task-top-blue,
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue.active{
  background:#1e40af!important;
  border-color:#1e40af!important;
  color:#ffffff!important;
}

/* Responsive clock rows: never exceed five clocks per row. */
@media(max-width:1450px){
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(4,minmax(145px,1fr))!important}
}
@media(max-width:1220px){
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(3,minmax(145px,1fr))!important}
}
@media(max-width:950px){
  .dashboard-world-time-row{grid-template-columns:145px minmax(0,1fr)!important}
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(2,minmax(145px,1fr))!important}
}
@media(max-width:650px){
  .dashboard-world-time-row{grid-template-columns:1fr!important}
  .dashboard-world-time.compact .dashboard-local-date-card{max-width:none!important}
  .dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:1fr!important}
}

/* V1.9.14.5 — My Tasks view toggle: active blue, inactive white */
.tasks-topbar .tasks-view-tabs .task-top-blue{
  background:#ffffff!important;
  border:1px solid #2563eb!important;
  color:#2563eb!important;
  box-shadow:none!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue:hover{
  background:#eff6ff!important;
  border-color:#1d4ed8!important;
  color:#1d4ed8!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
  box-shadow:none!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue.active:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important;
}

/* Keep Assign Task as a standard primary blue action. */
.tasks-topbar > .task-top-blue.primary{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}
.tasks-topbar > .task-top-blue.primary:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important;
}

/* Same clear active/inactive distinction in Dark Theme. */
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue{
  background:#ffffff!important;
  border-color:#2563eb!important;
  color:#2563eb!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue:hover{
  background:#eff6ff!important;
  border-color:#1d4ed8!important;
  color:#1d4ed8!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}
body.dark-theme .tasks-topbar > .task-top-blue.primary{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}

/* V1.9.14.6 — My Tasks toggle styled like Tech Packs / Trim & Label Library */
.tasks-topbar .tasks-view-tabs{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue{
  min-height:38px!important;
  height:38px!important;
  padding:0 13px!important;
  border-radius:9px!important;
  background:#ffffff!important;
  border:1px solid #d1d5db!important;
  color:#111827!important;
  font-weight:600!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue:hover{
  background:#f8fafc!important;
  border-color:#cbd5e1!important;
  color:#111827!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
  box-shadow:none!important;
}
.tasks-topbar .tasks-view-tabs .task-top-blue.active:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important;
}

/* Dark theme keeps the same visual language but fits the dark page. */
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue{
  background:#ffffff!important;
  border-color:#d1d5db!important;
  color:#111827!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue:hover{
  background:#f8fafc!important;
  border-color:#cbd5e1!important;
  color:#111827!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs .task-top-blue.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}

/* V1.9.14.7 — application-wide button design system
   Primary actions, secondary actions, view toggles, links and danger controls. */
:root{
  --plm-btn-blue:#2563eb;
  --plm-btn-blue-hover:#1d4ed8;
  --plm-btn-text:#111827;
  --plm-btn-border:#d1d5db;
  --plm-btn-soft:#f8fafc;
  --plm-btn-danger:#b91c1c;
  --plm-btn-danger-border:#fecaca;
}

/* Standard primary actions: Create, Add, Save, Submit, Assign, PDF etc. */
button.primary,
.primary{
  background:var(--plm-btn-blue)!important;
  border:1px solid var(--plm-btn-blue)!important;
  color:#ffffff!important;
  border-radius:7px!important;
  font-weight:700!important;
  box-shadow:none!important;
}
button.primary:hover,
.primary:hover{
  background:var(--plm-btn-blue-hover)!important;
  border-color:var(--plm-btn-blue-hover)!important;
  color:#ffffff!important;
}

/* Neutral secondary actions: Close, Cancel, View, Print, Restore, Import etc. */
button.secondary,
.secondary{
  background:#ffffff!important;
  border:1px solid var(--plm-btn-border)!important;
  color:var(--plm-btn-text)!important;
  border-radius:7px!important;
  font-weight:600!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
button.secondary:hover,
.secondary:hover{
  background:var(--plm-btn-soft)!important;
  border-color:#cbd5e1!important;
  color:var(--plm-btn-text)!important;
}

/* Any active secondary control behaves as the standard selected tab. */
button.secondary.active,
.secondary.active{
  background:var(--plm-btn-blue)!important;
  border-color:var(--plm-btn-blue)!important;
  color:#ffffff!important;
}
button.secondary.active:hover,
.secondary.active:hover{
  background:var(--plm-btn-blue-hover)!important;
  border-color:var(--plm-btn-blue-hover)!important;
  color:#ffffff!important;
}

/* Shared tab / view-switch style: same visual language everywhere. */
.plm-view-toggle{
  min-height:38px!important;
  height:38px!important;
  padding:0 13px!important;
  border-radius:9px!important;
  background:#ffffff!important;
  border:1px solid var(--plm-btn-border)!important;
  color:var(--plm-btn-text)!important;
  font-weight:600!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.plm-view-toggle:hover{
  background:var(--plm-btn-soft)!important;
  border-color:#cbd5e1!important;
  color:var(--plm-btn-text)!important;
}
.plm-view-toggle.active{
  background:var(--plm-btn-blue)!important;
  border-color:var(--plm-btn-blue)!important;
  color:#ffffff!important;
  box-shadow:none!important;
}
.plm-view-toggle.active:hover{
  background:var(--plm-btn-blue-hover)!important;
  border-color:var(--plm-btn-blue-hover)!important;
  color:#ffffff!important;
}

/* Dense table actions remain links, but are consistently blue rather than black. */
button.link-btn,
.link-btn{
  background:transparent!important;
  border-color:transparent!important;
  color:#2563eb!important;
  box-shadow:none!important;
}
button.link-btn:hover,
.link-btn:hover{
  color:#1d4ed8!important;
  text-decoration:underline!important;
}

/* Delete/remove/destructive controls are consistently red. */
button.danger,
.danger{
  background:#ffffff!important;
  border:1px solid var(--plm-btn-danger-border)!important;
  color:var(--plm-btn-danger)!important;
  border-radius:7px!important;
  font-weight:700!important;
}
button.danger:hover,
.danger:hover{
  background:#fef2f2!important;
  border-color:#fca5a5!important;
  color:#991b1b!important;
}
.danger-link,
.danger-text,
button.danger-link,
button.danger-text{
  color:var(--plm-btn-danger)!important;
}
button.link-btn.danger-link:hover,
button.link-btn.danger-text:hover,
.link-btn.danger-link:hover,
.link-btn.danger-text:hover{
  color:#991b1b!important;
}

/* Tasks and Tech Packs use the same view-toggle spacing. */
.tasks-view-tabs,
.techpack-view-tabs,
.tp-view-tabs{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
}

/* Dark theme: primary remains blue. Standard secondary actions stay dark,
   while view switches intentionally remain white like the approved reference. */
body.dark-theme button.primary,
body.dark-theme .primary{
  background:var(--plm-btn-blue)!important;
  border-color:var(--plm-btn-blue)!important;
  color:#ffffff!important;
}
body.dark-theme button.secondary,
body.dark-theme .secondary{
  background:#1e293b!important;
  border-color:#475569!important;
  color:#e5edf7!important;
}
body.dark-theme button.secondary:hover,
body.dark-theme .secondary:hover{
  background:#27364f!important;
  border-color:#64748b!important;
  color:#ffffff!important;
}
body.dark-theme button.secondary.active,
body.dark-theme .secondary.active{
  background:var(--plm-btn-blue)!important;
  border-color:var(--plm-btn-blue)!important;
  color:#ffffff!important;
}
body.dark-theme .plm-view-toggle{
  background:#ffffff!important;
  border-color:var(--plm-btn-border)!important;
  color:var(--plm-btn-text)!important;
}
body.dark-theme .plm-view-toggle:hover{
  background:var(--plm-btn-soft)!important;
  border-color:#cbd5e1!important;
  color:var(--plm-btn-text)!important;
}
body.dark-theme .plm-view-toggle.active{
  background:var(--plm-btn-blue)!important;
  border-color:var(--plm-btn-blue)!important;
  color:#ffffff!important;
}
body.dark-theme button.link-btn,
body.dark-theme .link-btn{
  color:#93c5fd!important;
}
body.dark-theme button.link-btn:hover,
body.dark-theme .link-btn:hover{
  color:#bfdbfe!important;
}
body.dark-theme button.danger,
body.dark-theme .danger{
  background:#331b24!important;
  border-color:#7f1d1d!important;
  color:#fecaca!important;
}
body.dark-theme .danger-link,
body.dark-theme .danger-text,
body.dark-theme button.danger-link,
body.dark-theme button.danger-text{
  color:#fca5a5!important;
}

/* Do not override semantic workflow/status controls. */
.qc-review-choice,
.qc-result,
.sample-pipeline-status,
.sample-mgmt-stage-btn,
.critical-status-display,
.shipment-doc-pill,
.landed-cost-status-btn,
.po-rev-chip{
  box-shadow:none!important;
}

/* V1.9.14.7 — specificity fix for Tasks shared view toggles */
.tasks-topbar .tasks-view-tabs button.plm-view-toggle{
  min-height:38px!important;
  height:38px!important;
  padding:0 13px!important;
  border-radius:9px!important;
  background:#ffffff!important;
  border:1px solid #d1d5db!important;
  color:#111827!important;
  font-weight:600!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.tasks-topbar .tasks-view-tabs button.plm-view-toggle:hover{
  background:#f8fafc!important;
  border-color:#cbd5e1!important;
  color:#111827!important;
}
.tasks-topbar .tasks-view-tabs button.plm-view-toggle.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
.tasks-topbar .tasks-view-tabs button.plm-view-toggle.active:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs button.plm-view-toggle{
  background:#ffffff!important;
  border-color:#d1d5db!important;
  color:#111827!important;
}
body.dark-theme .tasks-topbar .tasks-view-tabs button.plm-view-toggle.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#ffffff!important;
}

/* V1.9.14.8 — one application-wide 12px interface typography standard.
   Page headers and document/report surfaces intentionally retain their own sizing. */
:root{--riman-ui-font-size:12px}
body,
.sidebar,
.topbar,
#content,
.modal-card{
  font-size:var(--riman-ui-font-size)!important;
}
.sidebar :where(*),
.topbar :where(*):not(#page-title),
#content :where(*):not(
  .po-a4,.po-a4 *,
  .tp-document,.tp-document *,
  .aql-print-report,.aql-print-report *,
  .packing-doc,.packing-doc *,
  .landed-cost-doc,.landed-cost-doc *
),
.modal-card :where(*):not(
  .po-a4,.po-a4 *,
  .tp-document,.tp-document *,
  .aql-print-report,.aql-print-report *,
  .packing-doc,.packing-doc *,
  .landed-cost-doc,.landed-cost-doc *
){
  font-size:var(--riman-ui-font-size)!important;
}

/* Keep the only application page heading outside the 12px interface rule. */
.topbar #page-title{
  font-size:21px!important;
}

/* Count badges need enough room now that their text follows the 12px standard. */
.task-nav-badge,
.sidebar-collapsed .task-nav-badge,
.top-alert-count{
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  line-height:1!important;
}

/* V1.9.14.9 — report typography for both on-screen View and document preview.
   Report body content follows the 12px standard; hierarchy stays larger. */
:is(.po-a4,.tp-document,.aql-print-report,.packing-doc,.landed-cost-doc){
  font-size:12px!important;
  line-height:1.35!important;
  max-width:100%!important;
}
#modal-body :is(.po-a4,.tp-document,.aql-print-report,.packing-doc,.landed-cost-doc) :where(*){
  font-size:12px!important;
  line-height:1.35!important;
  box-sizing:border-box!important;
}
#modal-body :is(.po-a4,.tp-document,.aql-print-report,.packing-doc,.landed-cost-doc) table{
  width:100%!important;
  max-width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
#modal-body :is(.po-a4,.tp-document,.aql-print-report,.packing-doc,.landed-cost-doc) :is(th,td){
  font-size:12px!important;
  line-height:1.3!important;
  height:auto!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  vertical-align:top!important;
}
#modal-body :is(.po-a4,.tp-document,.aql-print-report,.packing-doc,.landed-cost-doc) :is(p,span,strong,b,small,li,dt,dd){
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}

/* Main report identities and document titles. */
#modal-body .po-a4 .po-doc-head h1,
#modal-body .tp-document .tp-doc-page h2,
#modal-body .aql-print-report .aql-doc-head strong,
#modal-body .packing-doc .packing-doc-head strong,
#modal-body .landed-cost-doc .landed-doc-head strong{
  font-size:18px!important;
  line-height:1.2!important;
}

/* Section headings remain visibly above body copy. */
#modal-body .tp-document .tp-doc-page h3,
#modal-body .aql-print-report .aql-doc-page h3,
#modal-body .landed-cost-doc h3{
  font-size:14px!important;
  line-height:1.25!important;
}

/* Important outcomes and totals retain strong report hierarchy. */
#modal-body .aql-print-report .aql-doc-result-box strong,
#modal-body .aql-print-report .aql-doc-result,
#modal-body .aql-print-report .pass-text,
#modal-body .aql-print-report .fail-text{
  font-size:16px!important;
  line-height:1.2!important;
}
#modal-body .po-a4 .po-doc-number strong,
#modal-body .po-a4 .po-doc-grand-totals strong,
#modal-body .packing-doc .packing-doc-order-total b,
#modal-body .landed-cost-doc .landed-doc-head b{
  font-size:14px!important;
  line-height:1.2!important;
}

/* A flowing footer cannot cover expanded 12px QC/AQL report content. */
#modal-body .aql-print-report .aql-doc-page{
  display:flex!important;
  flex-direction:column!important;
  height:auto!important;
  overflow:visible!important;
}
#modal-body .aql-print-report .aql-doc-footer{
  position:static!important;
  inset:auto!important;
  margin-top:auto!important;
}

/* V1.9.14.10 — higher-contrast light workspace inspired by established
   accounting applications: darker canvas, distinct white work surfaces,
   medium-grey table headings and clearly outlined controls. */
body:not(.dark-theme){
  --bg:#edf1f4;
  --panel:#ffffff;
  --ink:#1f2937;
  --muted:#586474;
  --line:#c4cdd6;
  --soft:#e8edf2;
  --riman-light-canvas:#edf1f4;
  --riman-light-soft:#e8edf2;
  --riman-light-soft-2:#f3f5f7;
  --riman-light-border:#c4cdd6;
  --riman-light-border-strong:#aeb9c4;
  --riman-light-table-head:#e1e6eb;
  --riman-light-table-grid:#d3dae2;
  --riman-light-hover:#edf3f7;
  background:var(--riman-light-canvas)!important;
  color:var(--ink)!important;
}
body:not(.dark-theme) .main,
body:not(.dark-theme) #content{
  background:var(--riman-light-canvas)!important;
}
body:not(.dark-theme) .topbar{
  background:#ffffff!important;
  border-bottom:1px solid var(--riman-light-border-strong)!important;
  box-shadow:0 1px 3px rgba(15,23,42,.08)!important;
}

/* Primary work surfaces and section boundaries. */
body:not(.dark-theme) :is(.card,.panel,.db-panel,.modal-card){
  background:#ffffff!important;
  border-color:var(--riman-light-border)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.06)!important;
}
body:not(.dark-theme) .modal-card{
  border:1px solid var(--riman-light-border-strong)!important;
}
body:not(.dark-theme) .modal-head{
  border-bottom:1px solid var(--riman-light-border)!important;
  padding-bottom:10px!important;
}
body:not(.dark-theme) .panel > .panel-head{
  border-bottom:1px solid #d5dce3!important;
  padding-bottom:10px!important;
}
body:not(.dark-theme) :is(
  .dashboard-report-panel,.status-report-card,.dashboard-po-row,.dashboard-record-card,
  .task-card,.task-summary-grid>div,.task-filterbar,
  .compliance-page,.compliance-summary-grid>div,.compliance-missing-panel,.compliance-filterbar,
  .supplier-performance-card,.supplier-performance-summary,.supplier-performance-filters,
  .landed-cost-page,.landed-cost-card,.landed-cost-summary-grid>div,.landed-cost-filterbar,
  .po-list-card,.po-size-group,.po-clean-section,.po-clean-summary,.po-clean-meta,.po-clean-lines,
  .sample-management-card,.sample-summary-grid>div,.sample-filterbar,.sample-line-card,
  .qc-card,.qc-summary,.qc-panel,.aql-panel,
  .shipment-item-banner,.shipment-allocation-panel,.shipment-allocation-row,.shipment-linked-doc-actions,
  .packing-list-head,.packing-order-summary>div,.packing-style-section,
  .techpack-card,.techpack-section,.techpack-summary,.tp-section,.fabric-card,.fabric-section,
  .settings-action-card,.settings-link-card,.settings-transfer-card,.settings-section,
  .permission-section,.product-form-section,.product-details-section,.product-attributes-section,
  .product-packing-section,.product-datasheet-section,.size-profile-panel,.world-time-panel
){
  border-color:var(--riman-light-border)!important;
}

/* Grey title bands make adjacent sections easier to scan. */
body:not(.dark-theme) :is(
  .section-title,.product-section-head,.settings-section-head,.sample-section-head,
  .compliance-section-head,.landed-cost-section-head,.tp-section-head,.aql-section-head,
  .qc-aql-section-head,.packing-style-head,.shipment-allocation-line-head,
  .world-time-panel-head,.world-time-section-head,.permission-column-head,
  .csv-mapping-head,.critical-notes-table-head
){
  background:var(--riman-light-soft)!important;
  border-color:var(--riman-light-border-strong)!important;
  color:#334155!important;
}
body:not(.dark-theme) :is(
  .po-clean-summary,.po-clean-meta,.task-filterbar,.compliance-filterbar,
  .supplier-performance-filters,.landed-cost-filterbar,.sample-filterbar,
  .permission-summary-bar,.csv-import-help,.csv-import-summary,.csv-import-result>div,
  .action-centre-summary>div,.action-centre-summary p
){
  background:var(--riman-light-soft-2)!important;
  border-color:var(--riman-light-border)!important;
}

/* Application tables: darker headers, complete grid lines and a clear hover. */
body:not(.dark-theme) #content :is(.table-wrap,.product-master-table-wrap,.compliance-table-wrap,
  .supplier-perf-table-wrap,.action-centre-table-wrap,.order-updates-table-wrap,
  .shipment-control-wrap,.csv-preview-wrap,.po-group-table-wrap){
  background:#ffffff!important;
  border-color:var(--riman-light-border)!important;
}
body:not(.dark-theme) #content table th,
body:not(.dark-theme) #modal-body th:not(.po-a4 *):not(.tp-document *):not(.aql-print-report *):not(.packing-doc *):not(.landed-cost-doc *){
  background:var(--riman-light-table-head)!important;
  color:#334155!important;
  border-color:var(--riman-light-border-strong)!important;
}
body:not(.dark-theme) #content table td,
body:not(.dark-theme) #modal-body td:not(.po-a4 *):not(.tp-document *):not(.aql-print-report *):not(.packing-doc *):not(.landed-cost-doc *){
  border-color:var(--riman-light-table-grid)!important;
}
body:not(.dark-theme) #content table :is(th,td):not(:last-child),
body:not(.dark-theme) #modal-body :is(th,td):not(.po-a4 *):not(.tp-document *):not(.aql-print-report *):not(.packing-doc *):not(.landed-cost-doc *):not(:last-child){
  border-right:1px solid var(--riman-light-table-grid)!important;
}
body:not(.dark-theme) #content tbody tr:hover td,
body:not(.dark-theme) #modal-body tbody tr:hover td:not(.po-a4 *):not(.tp-document *):not(.aql-print-report *):not(.packing-doc *):not(.landed-cost-doc *){
  background:var(--riman-light-hover);
}

/* Inputs and neutral actions must remain visible on white panels. */
body:not(.dark-theme) input,
body:not(.dark-theme) select,
body:not(.dark-theme) textarea{
  background:#ffffff;
  border-color:#b5c0cb;
  color:#1f2937;
}
body:not(.dark-theme) input:focus,
body:not(.dark-theme) select:focus,
body:not(.dark-theme) textarea:focus{
  border-color:#64748b!important;
  outline:2px solid rgba(37,99,235,.16)!important;
  outline-offset:0!important;
}
body:not(.dark-theme) :is(input,textarea)[readonly],
body:not(.dark-theme) :is(input,select,textarea):disabled{
  background:#e9edf1!important;
  border-color:#c1cad3!important;
  color:#596575!important;
}
body:not(.dark-theme) :is(button.secondary,.secondary,.icon-btn,.top-icon-btn,.photo-icon-btn,.shipment-icon-btn){
  border-color:#b8c2cc!important;
}
body:not(.dark-theme) :is(button.secondary,.secondary):hover{
  background:#e9eef3!important;
  border-color:#9ba8b5!important;
}
body:not(.dark-theme) :is(.check-list,.check-option,.calc-box,.fabric-id-input,.percent-field>div){
  border-color:var(--riman-light-border)!important;
}
body:not(.dark-theme) .check-list{
  background:var(--riman-light-soft-2)!important;
}

/* Document previews remain clean white report pages, independent of app chrome. */
body:not(.dark-theme) :is(.po-a4,.tp-document,.aql-print-report,.packing-doc,.landed-cost-doc){
  background:#ffffff!important;
  color:#111827!important;
}

/* V1.9.14.11 — Shipment Control owns the Received workflow. */
.shipment-status-control-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:4px!important;
  min-width:0!important;
}
.shipment-status-control-stack.received{
  align-items:center!important;
}
.shipment-mark-received-btn,
.shipment-received-state{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:24px!important;
  padding:3px 5px!important;
  border:1px solid #15803d!important;
  border-radius:4px!important;
  background:#15803d!important;
  color:#ffffff!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
.shipment-mark-received-btn{cursor:pointer!important;}
.shipment-mark-received-btn:hover{background:#166534!important;border-color:#166534!important;}
.shipment-status-control-stack>small{
  display:block!important;
  color:#475569!important;
  line-height:1.1!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.shipment-received-undo{
  min-height:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#2563eb!important;
  text-decoration:underline!important;
  font-size:12px!important;
}
.shipment-control-status.shipment-received,
#critical-path-table .shipment-status-badge.shipment-received{
  background:#15803d!important;
  color:#ffffff!important;
}
#critical-path-table .critical-received-status{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  min-width:0!important;
}
#critical-path-table .critical-received-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  padding:3px 7px!important;
  border-radius:4px!important;
  color:#ffffff!important;
  font-weight:700!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-received-badge.received{background:#15803d!important;}
#critical-path-table .critical-received-badge.partial{background:#d97706!important;}
#critical-path-table .critical-received-status>small{
  color:#475569!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
#critical-path-table .critical-received-awaiting{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  padding:3px 7px!important;
  border:1px solid #d97706!important;
  border-radius:4px!important;
  background:#fff7ed!important;
  color:#9a3412!important;
  font-weight:700!important;
}
body.dark-theme .shipment-status-control-stack>small,
body.dark-theme #critical-path-table .critical-received-status>small{color:#cbd5e1!important;}
body.dark-theme #critical-path-table .critical-received-awaiting{
  background:#4a3412!important;
  border-color:#d97706!important;
  color:#fde68a!important;
}
body.dark-theme .shipment-received-undo{color:#93c5fd!important;}

/* V2.0.30 — receive shipments independently and reconcile the remaining PO balance. */
.shipment-balance-btn{
  min-height:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#166534!important;
  text-decoration:underline!important;
  font-size:12px!important;
  font-weight:700!important;
}
.shipment-reconciliation-modal-card{width:min(1040px,96vw)!important;max-width:1040px!important;}
.shipment-reconciliation-form{display:flex;flex-direction:column;gap:12px;}
.shipment-reconciliation-intro{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #93c5fd;border-radius:7px;background:#eff6ff;color:#1e3a8a;}
.shipment-reconciliation-intro span{color:#334155;line-height:1.45;}
.shipment-reconciliation-list{display:flex;flex-direction:column;border:1px solid #cbd5e1;border-radius:7px;overflow:hidden;background:#fff;}
.shipment-reconciliation-row{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(115px,.65fr) minmax(150px,.85fr) minmax(230px,1.2fr);gap:12px;align-items:center;padding:11px 12px;border-bottom:1px solid #d7dde5;}
.shipment-reconciliation-row:last-child{border-bottom:0;}
.shipment-reconciliation-product,.shipment-reconciliation-qty,.shipment-reconciliation-row label{display:flex;flex-direction:column;gap:3px;min-width:0;}
.shipment-reconciliation-product strong,.shipment-reconciliation-qty strong{color:#10233f;font-size:13px;}
.shipment-reconciliation-product span,.shipment-reconciliation-qty span,.shipment-reconciliation-row small,.shipment-reconciliation-row label>span{color:#64748b;font-size:12px;overflow-wrap:anywhere;}
.shipment-reconciliation-row select{width:100%;min-width:0;}
.shipment-reconciliation-note{padding:9px 11px;border:1px solid #fde68a;border-radius:7px;background:#fffbeb;color:#78350f;line-height:1.4;}
body.dark-theme .shipment-balance-btn{color:#86efac!important;}
body.dark-theme .shipment-reconciliation-intro{background:#172554;border-color:#3b82f6;color:#dbeafe;}
body.dark-theme .shipment-reconciliation-intro span{color:#cbd5e1;}
body.dark-theme .shipment-reconciliation-list{background:#172033;border-color:#526176;}
body.dark-theme .shipment-reconciliation-row{border-color:#526176;}
body.dark-theme .shipment-reconciliation-product strong,body.dark-theme .shipment-reconciliation-qty strong{color:#f8fafc;}
body.dark-theme .shipment-reconciliation-product span,body.dark-theme .shipment-reconciliation-qty span,body.dark-theme .shipment-reconciliation-row small,body.dark-theme .shipment-reconciliation-row label>span{color:#cbd5e1;}
body.dark-theme .shipment-reconciliation-note{background:#422006;border-color:#a16207;color:#fef3c7;}
@media(max-width:760px){.shipment-reconciliation-row{grid-template-columns:1fr 1fr}.shipment-reconciliation-product,.shipment-reconciliation-row label{grid-column:1/-1;}}

/* V2.0.31 — compact master-data filters and discontinued Product control. */
.master-filterbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border-top:1px solid #d7dde5;border-bottom:1px solid #c5ced8;background:#eef2f5;}
.master-filterbar input[type="search"]{flex:1 1 300px;min-width:220px;max-width:520px;height:36px;}
.master-filterbar select{flex:0 1 190px;min-width:145px;height:36px;}
.master-filterbar>span{margin-left:auto;color:#475569;font-weight:700;white-space:nowrap;}
.master-filter-check{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 9px;border:1px solid #b8c2cc;border-radius:5px;background:#fff;color:#334155;font-weight:600;white-space:nowrap;}
.master-filter-check input{width:16px;height:16px;margin:0;}
.product-discontinue-control{display:flex;align-items:center;gap:8px;max-width:300px;padding:8px 10px;border:1px solid #fca5a5;border-radius:6px;background:#fff1f2;color:#991b1b;cursor:pointer;}
.product-discontinue-control>input{width:17px;height:17px;margin:0;flex:0 0 auto;}
.product-discontinue-control>span{display:flex!important;flex-direction:column;gap:1px;color:#991b1b!important;}
.product-discontinue-control strong{color:#991b1b!important;}
.product-discontinue-control small{color:#7f1d1d;font-weight:400;line-height:1.25;}
.product-discontinued-row{background:#f8fafc;color:#64748b;}
.product-discontinued-badge,.po-completed-badge{display:block;width:max-content;margin-top:3px;padding:2px 5px;border:1px solid #cbd5e1;border-radius:3px;background:#e2e8f0;color:#475569;font-size:10px;font-weight:700;line-height:1.1;}
.po-completed-row{background:#f8fafc;color:#64748b;}
.critical-completed-divider td{padding:10px 12px!important;border-top:8px solid #e7edf2!important;border-bottom:2px solid #94a3b8!important;background:#dbe3ea!important;color:#10233f!important;text-align:left!important;}
.critical-completed-divider td strong{display:block;font-size:13px;line-height:1.2;}
.critical-completed-divider td span{display:block;margin-top:2px;color:#526173;font-weight:400;}
.critical-completed-divider[hidden]{display:none!important;}
#product-master-table tr[hidden],#fabric-master-table tr[hidden],#po-master-list-table tr[hidden],#product-filter-empty[hidden],#fabric-filter-empty[hidden],#po-filter-empty[hidden]{display:none!important;}
body.dark-theme .master-filterbar{background:#1d2939;border-color:#526176;}
body.dark-theme .master-filterbar>span{color:#cbd5e1;}
body.dark-theme .master-filter-check{background:#172033;border-color:#64748b;color:#f8fafc;}
body.dark-theme .product-discontinue-control{background:#3f1d24;border-color:#ef4444;color:#fecaca;}
body.dark-theme .product-discontinue-control strong,body.dark-theme .product-discontinue-control small,body.dark-theme .product-discontinue-control>span{color:#fecaca!important;}
body.dark-theme .product-discontinued-row,body.dark-theme .po-completed-row{background:#172033;color:#cbd5e1;}
body.dark-theme .critical-completed-divider td{border-top-color:#101827!important;border-bottom-color:#64748b!important;background:#24344b!important;color:#f8fafc!important;}body.dark-theme .critical-completed-divider td span{color:#cbd5e1;}
@media(max-width:760px){.master-filterbar{align-items:stretch}.master-filterbar input[type="search"],.master-filterbar select{flex:1 1 100%;max-width:none}.master-filterbar>span{margin-left:0}.product-form-intro{flex-direction:column}.product-discontinue-control{max-width:none;width:100%;}}

/* V1.9.14.12 — one Critical Path shipment Status column. */
#critical-path-table .cp-col-shipment,
#critical-path-table .cp-cell-shipment{
  width:88px!important;
  min-width:88px!important;
  max-width:88px!important;
  text-align:center!important;
  vertical-align:middle!important;
}

/* V2.0.32 — grouped Products menu, inline QC completion guidance and PO-balance actions. */
.nav-menu-group{
  margin:2px 0 4px!important;
  padding:3px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.035)!important;
}
.nav-menu-group-title{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:30px!important;
  padding:4px 6px!important;
  color:#dbe7f3!important;
  font-size:12px!important;
  font-weight:800!important;
}
.nav-menu-group-title .nav-icon{display:flex!important;align-items:center!important;justify-content:center!important}
.nav-menu-group-title .nav-icon svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important}
.nav-menu-group-children{display:flex!important;flex-direction:column!important;gap:2px!important}
.sidebar .nav-btn.nav-product-child{padding-left:30px!important;min-height:31px!important}
.sidebar .nav-btn.nav-product-child .nav-icon{width:15px!important;min-width:15px!important}
.sidebar .nav-btn.nav-product-child .nav-icon svg{width:15px!important;height:15px!important}
body.sidebar-collapsed .nav-menu-group{padding:2px!important}
body.sidebar-collapsed .nav-menu-group-title{justify-content:center!important;padding:4px 0!important}
body.sidebar-collapsed .nav-menu-group-title .nav-label{display:none!important}
body.sidebar-collapsed .nav-menu-group-children .nav-btn{padding-left:0!important;padding-right:0!important;justify-content:center!important}

.qc-validation-summary{
  position:sticky!important;
  top:0!important;
  z-index:7!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  margin-top:8px!important;
  padding:9px 11px!important;
  border:1px solid #ef4444!important;
  border-left-width:4px!important;
  border-radius:6px!important;
  background:#fef2f2!important;
  color:#991b1b!important;
}
.qc-validation-summary strong{color:#991b1b!important}
.qc-validation-summary span{color:#7f1d1d!important}
#qc-aql-form .form-group.qc-required-missing>label,
#qc-aql-form .aql-check-row.qc-required-missing>strong,
#qc-aql-form .qc-required-row-missing>td:first-child strong,
#qc-aql-form td.qc-required-missing,
#qc-aql-form .qc-required-missing label{color:#b91c1c!important;font-weight:800!important}
#qc-aql-form input.qc-required-missing,
#qc-aql-form select.qc-required-missing,
#qc-aql-form textarea.qc-required-missing{
  border-color:#dc2626!important;
  background:#fff7f7!important;
  box-shadow:0 0 0 2px rgba(220,38,38,.12)!important;
}
#qc-aql-form .aql-check-row.qc-required-missing{
  border-color:#ef4444!important;
  background:#fff7f7!important;
}
.shipment-ready-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;flex-wrap:wrap!important}
.shipment-close-shortfall-btn{border-color:#d97706!important;color:#92400e!important;background:#fffbeb!important;font-weight:800!important}
body.dark-theme .qc-validation-summary{background:#451a1a!important;border-color:#f87171!important;color:#fecaca!important}
body.dark-theme .qc-validation-summary strong,body.dark-theme .qc-validation-summary span{color:#fecaca!important}
body.dark-theme #qc-aql-form input.qc-required-missing,
body.dark-theme #qc-aql-form select.qc-required-missing,
body.dark-theme #qc-aql-form textarea.qc-required-missing,
body.dark-theme #qc-aql-form .aql-check-row.qc-required-missing{background:#3b1818!important;border-color:#f87171!important}
#critical-path-table .cp-cell-shipment .critical-received-status{
  width:100%!important;
}

/* V1.9.14.13 — separate shipment progress from reportable order status. */
#critical-path-table .cp-col-order-status,
#critical-path-table .cp-cell-order-status{
  width:68px!important;
  min-width:68px!important;
  max-width:68px!important;
  text-align:center!important;
  vertical-align:middle!important;
}
#critical-path-table .critical-final-date,
#critical-path-table .critical-final-date.no-date{
  display:inline!important;
  min-width:0!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#111827!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:normal!important;
}
body.dark-theme #critical-path-table .critical-final-date,
body.dark-theme #critical-path-table .critical-final-date.no-date{
  border:0!important;
  background:transparent!important;
  color:#e5edf7!important;
}

/* V2.0.0 — Falcon PLM multi-organisation identity and responsive foundation. */
#platform-brand{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 4px 14px!important;
  border-bottom:1px solid rgba(255,255,255,.16)!important;
}
.sidebar-organisation-logo,
.sidebar-organisation-initials{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  border-radius:8px!important;
  background:#ffffff!important;
  color:#172033!important;
  display:grid!important;
  place-items:center!important;
  object-fit:contain!important;
  padding:4px!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.03em!important;
}
.platform-brand-copy{display:flex!important;flex-direction:column!important;min-width:0!important;gap:2px!important;}
.platform-brand-copy strong{color:#ffffff!important;font-size:14px!important;line-height:1.2!important;letter-spacing:.035em!important;white-space:nowrap!important;}
.platform-brand-copy small{color:#b8c4d4!important;font-size:11px!important;line-height:1.25!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
.organisation-switch,.current-organisation-label{display:flex!important;flex-direction:column!important;gap:4px!important;margin-bottom:10px!important;}
.organisation-switch small,.current-organisation-label small{color:#94a3b8!important;font-size:10px!important;text-transform:uppercase!important;letter-spacing:.06em!important;}
.organisation-switch select{width:100%!important;min-width:0!important;min-height:34px!important;background:#202b3c!important;border-color:#475569!important;color:#ffffff!important;font-size:11px!important;}
.current-organisation-label strong{color:#ffffff!important;font-size:11px!important;line-height:1.3!important;overflow-wrap:anywhere!important;}
.organisation-settings-summary{display:grid!important;grid-template-columns:minmax(220px,1fr) auto auto!important;gap:16px!important;align-items:center!important;padding:16px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel)!important;}
.organisation-summary-brand{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;}
.organisation-summary-brand>img,.organisation-summary-brand>span,.organisation-logo-preview{width:62px!important;height:62px!important;min-width:62px!important;border:1px solid #c4cdd6!important;border-radius:8px!important;background:#f8fafc!important;object-fit:contain!important;display:grid!important;place-items:center!important;padding:5px!important;color:#1e3a5f!important;font-weight:800!important;}
.organisation-summary-brand>div{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important;}
.organisation-summary-brand strong{font-size:14px!important;color:var(--ink)!important;overflow-wrap:anywhere!important;}
.organisation-summary-brand small{font-size:11px!important;color:var(--muted)!important;overflow-wrap:anywhere!important;}
.organisation-summary-meta{display:flex!important;gap:16px!important;flex-wrap:wrap!important;}
.organisation-summary-meta span{display:flex!important;flex-direction:column!important;gap:3px!important;font-size:11px!important;color:var(--muted)!important;}
.organisation-summary-meta b{font-size:10px!important;color:var(--ink)!important;text-transform:uppercase!important;letter-spacing:.04em!important;}
.organisation-registry{margin-top:14px!important;border:1px solid var(--line)!important;border-radius:8px!important;overflow:hidden!important;background:var(--panel)!important;}
.organisation-registry-head{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;padding:12px 14px!important;background:var(--soft)!important;border-bottom:1px solid var(--line)!important;}
.organisation-registry-head>div{display:flex!important;flex-direction:column!important;gap:3px!important;}
.organisation-registry-head strong{font-size:12px!important;}.organisation-registry-head span{font-size:11px!important;color:var(--muted)!important;}
.organisation-registry-list{display:flex!important;flex-direction:column!important;}
.organisation-registry-row{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;padding:11px 14px!important;border-bottom:1px solid var(--line)!important;}
.organisation-registry-row:last-child{border-bottom:0!important;}.organisation-registry-row.active{background:#eff6ff!important;}
.organisation-registry-row>div{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;}
.organisation-registry-row strong{font-size:12px!important;overflow-wrap:anywhere!important;}.organisation-registry-row small{font-size:10px!important;color:var(--muted)!important;overflow-wrap:anywhere!important;}
.organisation-logo-editor{display:grid!important;grid-template-columns:74px minmax(0,1fr)!important;column-gap:12px!important;align-items:center!important;}
.organisation-logo-editor>label,.organisation-logo-editor>small{grid-column:1/-1!important;}.organisation-logo-editor .settings-button-row{justify-content:flex-start!important;}
.organisation-logo-preview img{width:100%!important;height:100%!important;object-fit:contain!important;}
.organisation-report-brand{display:flex!important;align-items:flex-start!important;gap:10px!important;min-width:0!important;}
.organisation-report-brand>div{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important;}
.organisation-report-logo{width:52px!important;height:52px!important;min-width:52px!important;object-fit:contain!important;display:block!important;}
.organisation-report-brand span{display:block!important;font-size:12px!important;font-weight:700!important;line-height:1.25!important;}
.organisation-report-details{display:block!important;margin-top:3px!important;font-size:9px!important;font-weight:400!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important;color:#475569!important;}
body.dark-theme .organisation-registry-row.active{background:#172554!important;}

@media(max-width:760px){
  body.sidebar-collapsed .app,.app{display:block!important;min-height:100vh!important;}
  .sidebar,body.sidebar-collapsed .sidebar{position:relative!important;width:100%!important;min-width:0!important;padding:12px!important;gap:10px!important;}
  .sidebar-brand-row,body.sidebar-collapsed .sidebar-brand-row{justify-content:space-between!important;}
  body.sidebar-collapsed .sidebar .brand{display:flex!important;}
  .sidebar-collapse-btn{display:none!important;}
  .sidebar #nav,.sidebar nav,body.sidebar-collapsed .sidebar #nav,body.sidebar-collapsed .sidebar nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;align-items:stretch!important;}
  .sidebar .nav-btn,body.sidebar-collapsed .sidebar .nav-btn{width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:38px!important;padding:8px 9px!important;justify-content:flex-start!important;gap:7px!important;}
  body.sidebar-collapsed .sidebar .nav-btn .nav-label{display:inline!important;}
  .sidebar-footer,body.sidebar-collapsed .sidebar-footer{margin-top:2px!important;padding-top:10px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;align-items:start!important;}
  #current-user{grid-column:1/-1!important;}.organisation-switch,.current-organisation-label{margin:0!important;}
  body.sidebar-collapsed #settings-nav-holder{width:auto!important;}
  body.sidebar-collapsed #current-user .user-switch{display:block!important;min-width:0!important;}
  #current-user .user-card{min-width:0!important;}.user-switch{flex:1 1 auto!important;min-width:0!important;}.user-switch select{width:100%!important;min-width:0!important;}
  .topbar{padding:14px 15px!important;position:relative!important;}.top-actions{width:auto!important;align-self:flex-end!important;}
  #content{padding:12px!important;}.panel,.card{padding:12px!important;}.panel-head{align-items:flex-start!important;flex-direction:column!important;}
  .toolbar{width:100%!important;}.toolbar input,.toolbar select,.toolbar button{min-width:0!important;max-width:100%!important;}
  .modal{padding:0!important;align-items:stretch!important;}.modal-card{width:100vw!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important;}
  .form-grid{grid-template-columns:1fr!important;}.form-group.full{grid-column:auto!important;}
  .organisation-settings-summary{grid-template-columns:1fr!important;align-items:start!important;}
  .organisation-registry-head{align-items:flex-start!important;flex-direction:column!important;}.organisation-registry-head button{width:100%!important;}
  .table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
}

/* V2.0.1 — clear Falcon platform console vs organisation workspace. */
.sidebar-brand-row{position:relative!important;align-items:flex-start!important;}
.sidebar-collapse-btn{position:absolute!important;right:0!important;top:0!important;z-index:2!important;}
#platform-brand{width:100%!important;min-width:0!important;border-bottom:0!important;}
#platform-brand.platform-only-brand{display:block!important;padding:3px 38px 16px 4px!important;border-bottom:1px solid rgba(255,255,255,.18)!important;}
#platform-brand.platform-only-brand .platform-brand-copy{display:flex!important;}
#platform-brand.organisation-workspace-brand{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding:3px 0 14px!important;}
#platform-brand.organisation-workspace-brand .platform-brand-copy{padding-right:38px!important;}
.platform-organisation-divider{display:block!important;width:100%!important;height:1px!important;background:rgba(255,255,255,.26)!important;margin:3px 0 1px!important;}
.sidebar-organisation-logo-frame{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:62px!important;min-height:62px!important;padding:6px!important;border:1px solid rgba(255,255,255,.22)!important;border-radius:7px!important;background:#ffffff!important;overflow:hidden!important;}
.sidebar-organisation-logo-frame .sidebar-organisation-logo{display:block!important;width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;max-height:100%!important;padding:0!important;border-radius:0!important;background:transparent!important;object-fit:contain!important;object-position:center!important;}
.sidebar-organisation-logo-frame .sidebar-organisation-initials{width:50px!important;height:50px!important;min-width:50px!important;padding:0!important;border-radius:6px!important;background:#e9eef5!important;color:#172033!important;}
.sidebar-organisation-name{display:block!important;width:100%!important;color:#ffffff!important;font-size:12px!important;line-height:1.25!important;letter-spacing:.045em!important;text-align:center!important;overflow-wrap:anywhere!important;}
.workspace-context{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;margin-top:7px!important;}
.workspace-context strong{font-size:11px!important;color:#334155!important;}
.workspace-context-badge{display:inline-flex!important;align-items:center!important;min-height:22px!important;padding:3px 7px!important;border-radius:4px!important;font-size:10px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.04em!important;}
.workspace-context-badge.platform{background:#172033!important;color:#ffffff!important;}
.workspace-context-badge.organisation{background:#dbeafe!important;color:#1d4ed8!important;border:1px solid #93c5fd!important;}
body.dark-theme .workspace-context strong{color:#e5edf7!important;}body.dark-theme .workspace-context-badge.organisation{background:#1e3a5f!important;color:#bfdbfe!important;border-color:#3b82f6!important;}
.platform-admin-identity{display:flex!important;flex-direction:column!important;gap:3px!important;margin-bottom:10px!important;padding:9px!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:6px!important;background:rgba(255,255,255,.06)!important;}
.platform-admin-identity small{font-size:10px!important;color:#94a3b8!important;text-transform:uppercase!important;letter-spacing:.05em!important;}.platform-admin-identity strong{font-size:11px!important;color:#ffffff!important;line-height:1.3!important;}
.falcon-console-return{width:100%!important;margin:0 0 10px!important;padding:7px 8px!important;border:1px solid rgba(255,255,255,.25)!important;background:rgba(255,255,255,.08)!important;color:#ffffff!important;text-align:left!important;font-size:11px!important;}
.falcon-console-return:hover{background:rgba(255,255,255,.16)!important;}
.falcon-console-page{display:flex!important;flex-direction:column!important;gap:16px!important;}
.falcon-console-intro{padding:20px!important;border:1px solid #aeb9c4!important;border-radius:10px!important;background:linear-gradient(135deg,#172033,#263a56)!important;color:#ffffff!important;box-shadow:0 2px 5px rgba(15,23,42,.13)!important;}
.falcon-console-intro.compact{padding:17px 20px!important;}.falcon-console-intro span{font-size:10px!important;font-weight:800!important;letter-spacing:.1em!important;color:#93c5fd!important;}.falcon-console-intro h3{margin:5px 0!important;font-size:18px!important;line-height:1.25!important;}.falcon-console-intro p{max-width:820px!important;margin:0!important;font-size:12px!important;line-height:1.5!important;color:#dbe5f2!important;}
.falcon-platform-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
.falcon-platform-kpis>div{display:flex!important;flex-direction:column!important;gap:5px!important;min-width:0!important;padding:15px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel)!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;}
.falcon-platform-kpis span{font-size:10px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.05em!important;color:var(--muted)!important;}.falcon-platform-kpis strong{font-size:20px!important;line-height:1.2!important;color:var(--ink)!important;overflow-wrap:anywhere!important;}.falcon-platform-kpis small{font-size:10px!important;color:var(--muted)!important;}
.falcon-admin-section{padding:0!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--panel)!important;overflow:hidden!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;}
.falcon-admin-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:13px 15px!important;border-bottom:1px solid var(--line)!important;background:var(--soft)!important;}
.falcon-admin-section-head>div{display:flex!important;flex-direction:column!important;gap:3px!important;}.falcon-admin-section-head h3{margin:0!important;font-size:13px!important;color:var(--ink)!important;}.falcon-admin-section-head span{font-size:11px!important;color:var(--muted)!important;}
.falcon-admin-tile-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
.falcon-console-page>.falcon-admin-tile-grid{padding:0!important;}.falcon-admin-section .falcon-admin-tile-grid{padding:14px!important;}
.falcon-admin-tile{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;min-height:126px!important;padding:14px!important;border:1px solid #b8c3cf!important;border-radius:8px!important;background:#ffffff!important;color:#1f2937!important;text-align:left!important;box-shadow:0 1px 2px rgba(15,23,42,.05)!important;}
.falcon-admin-tile:hover{border-color:#2563eb!important;background:#f5f9ff!important;box-shadow:0 3px 8px rgba(37,99,235,.12)!important;}.falcon-admin-tile strong{font-size:13px!important;}.falcon-admin-tile small{font-size:11px!important;line-height:1.4!important;color:#64748b!important;}.falcon-admin-tile-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:32px!important;height:32px!important;border-radius:6px!important;background:#e5edf7!important;color:#1d4ed8!important;font-size:17px!important;font-weight:800!important;}.falcon-admin-tile-icon svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
.falcon-organisations-table-wrap{border:0!important;border-radius:0!important;}.falcon-organisations-table{min-width:1100px!important;}.falcon-organisations-table th,.falcon-organisations-table td{vertical-align:middle!important;white-space:normal!important;}.falcon-organisations-table td>small,.falcon-organisations-table td>span+small{display:block!important;margin-top:3px!important;color:var(--muted)!important;font-size:10px!important;}.falcon-org-cell{display:flex!important;align-items:center!important;gap:9px!important;min-width:190px!important;}.falcon-org-cell>img,.falcon-org-cell>span{display:grid!important;place-items:center!important;width:46px!important;height:34px!important;min-width:46px!important;padding:3px!important;border:1px solid #c4cdd6!important;border-radius:5px!important;background:#ffffff!important;object-fit:contain!important;color:#1e3a5f!important;font-size:10px!important;font-weight:800!important;}.falcon-org-cell>div{display:flex!important;flex-direction:column!important;gap:3px!important;}.falcon-org-cell strong{font-size:12px!important;}.falcon-org-cell small{font-size:9px!important;color:var(--muted)!important;}.falcon-org-actions{display:flex!important;gap:5px!important;align-items:center!important;}.licence-warning{color:#b91c1c!important;font-weight:700!important;}
.organisation-settings-platform-note{display:flex!important;align-items:center!important;gap:10px!important;margin-top:12px!important;padding:11px 12px!important;border:1px solid #93c5fd!important;border-radius:7px!important;background:#eff6ff!important;}.organisation-settings-platform-note strong{font-size:11px!important;color:#1e3a8a!important;}.organisation-settings-platform-note span{flex:1 1 auto!important;font-size:11px!important;color:#475569!important;}
.organisation-form-section-title{padding:10px 11px!important;border:1px solid var(--line)!important;border-radius:6px!important;background:var(--soft)!important;}.organisation-form-section-title strong,.organisation-form-section-title span{display:block!important;}.organisation-form-section-title strong{font-size:12px!important;color:var(--ink)!important;}.organisation-form-section-title span{margin-top:3px!important;font-size:10px!important;color:var(--muted)!important;}
.organisation-contract-editor{padding:11px!important;border:1px solid var(--line)!important;border-radius:7px!important;background:var(--soft)!important;}.organisation-contract-editor #organisation-contract-preview{display:flex!important;flex-direction:column!important;gap:3px!important;padding:9px!important;border:1px solid var(--line)!important;border-radius:5px!important;background:var(--panel)!important;}.organisation-contract-editor #organisation-contract-preview strong{font-size:11px!important;overflow-wrap:anywhere!important;}.organisation-contract-editor #organisation-contract-preview small{font-size:9px!important;color:var(--muted)!important;}
body.dark-theme .falcon-admin-tile{background:#172033!important;color:#e5edf7!important;border-color:#435168!important;}body.dark-theme .falcon-admin-tile:hover{background:#1d2d46!important;border-color:#60a5fa!important;}body.dark-theme .falcon-admin-tile small{color:#afbed0!important;}body.dark-theme .organisation-settings-platform-note{background:#172554!important;border-color:#3b82f6!important;}body.dark-theme .organisation-settings-platform-note strong{color:#bfdbfe!important;}body.dark-theme .organisation-settings-platform-note span{color:#cbd5e1!important;}

@media(max-width:1050px){.falcon-platform-kpis,.falcon-admin-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:760px){
  #platform-brand.organisation-workspace-brand{padding-right:0!important;}.sidebar-organisation-logo-frame{height:58px!important;}.workspace-context{margin-top:5px!important;}
  .falcon-platform-kpis,.falcon-admin-tile-grid{grid-template-columns:1fr!important;}.falcon-admin-tile{min-height:105px!important;}.falcon-admin-section-head{align-items:flex-start!important;flex-direction:column!important;}.falcon-admin-section-head button{width:100%!important;}.organisation-settings-platform-note{align-items:flex-start!important;flex-direction:column!important;}.organisation-settings-platform-note button{width:100%!important;}
}

/* V2.0.2 — simplified organisation identity and console-style settings. */
#platform-brand .platform-brand-copy{display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;text-align:left!important;}
#platform-brand .platform-brand-copy strong{display:block!important;width:100%!important;text-align:left!important;white-space:nowrap!important;}
#platform-brand.organisation-workspace-brand{align-items:flex-start!important;gap:9px!important;}
#platform-brand.organisation-workspace-brand .platform-brand-copy{padding-right:38px!important;}
#platform-brand.organisation-workspace-brand .platform-organisation-divider{align-self:stretch!important;width:auto!important;}
#platform-brand.organisation-workspace-brand .sidebar-organisation-logo-frame{justify-content:flex-start!important;width:100%!important;height:58px!important;min-height:58px!important;}
#platform-brand.organisation-workspace-brand .sidebar-organisation-logo{object-position:left center!important;}
#platform-brand.organisation-workspace-brand .sidebar-organisation-name{text-align:left!important;letter-spacing:.035em!important;}
#theme-nav-holder[hidden]{display:none!important;}
.console-return-bar,.settings-detail-return{display:flex!important;align-items:center!important;justify-content:flex-start!important;}
.console-return-bar .secondary,.settings-detail-return .secondary{min-height:34px!important;padding:7px 11px!important;font-size:11px!important;}
.settings-console{display:flex!important;flex-direction:column!important;gap:16px!important;}
.settings-console-intro{padding:18px 20px!important;border:1px solid #aeb9c4!important;border-radius:9px!important;background:linear-gradient(135deg,#172033,#263a56)!important;color:#fff!important;box-shadow:0 2px 5px rgba(15,23,42,.12)!important;}
.settings-console-intro span{font-size:10px!important;font-weight:800!important;letter-spacing:.1em!important;color:#93c5fd!important;}
.settings-console-intro h3{margin:5px 0!important;font-size:18px!important;line-height:1.25!important;}
.settings-console-intro p{max-width:820px!important;margin:0!important;font-size:12px!important;line-height:1.5!important;color:#dbe5f2!important;}
.settings-console-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
.settings-console-tile{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;min-height:126px!important;padding:14px!important;border:1px solid #aeb9c4!important;border-radius:8px!important;background:var(--panel)!important;color:var(--ink)!important;text-align:left!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;}
.settings-console-tile:hover{border-color:#2563eb!important;background:#f2f7fd!important;box-shadow:0 3px 8px rgba(37,99,235,.12)!important;}
.settings-console-tile strong{font-size:13px!important;line-height:1.3!important;}
.settings-console-tile small{font-size:11px!important;line-height:1.42!important;color:var(--muted)!important;}
.settings-console-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:34px!important;height:34px!important;border-radius:7px!important;background:#dfe8f2!important;color:#1d4ed8!important;}
.settings-console-icon svg{width:19px!important;height:19px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
.settings-page{display:flex!important;flex-direction:column!important;gap:12px!important;}
.settings-page .settings-section{margin:0!important;}
.appearance-choice-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;padding:16px!important;}
.appearance-choice{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:7px!important;padding:13px!important;border:2px solid var(--line)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--ink)!important;text-align:left!important;}
.appearance-choice.selected{border-color:#2563eb!important;box-shadow:0 0 0 2px rgba(37,99,235,.12)!important;}
.appearance-choice strong{font-size:13px!important;}.appearance-choice small{font-size:11px!important;color:var(--muted)!important;line-height:1.4!important;}
.appearance-preview{display:grid!important;grid-template-columns:30% 1fr!important;grid-template-rows:repeat(2,1fr)!important;gap:4px!important;width:100%!important;height:74px!important;padding:7px!important;border:1px solid #94a3b8!important;border-radius:6px!important;overflow:hidden!important;}
.appearance-preview i{grid-row:1/3!important;border-radius:3px!important;}.appearance-preview b{border-radius:3px!important;}
.appearance-preview.light{background:#f3f5f8!important;}.appearance-preview.light i{background:#172d49!important;}.appearance-preview.light b{background:#d1d8e0!important;}
.appearance-preview.dark{background:#101827!important;}.appearance-preview.dark i{background:#24344b!important;}.appearance-preview.dark b{background:#3b4a60!important;}
.organisation-logo-preview .no-logo-message{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;padding:6px!important;color:var(--muted)!important;font-size:9px!important;font-weight:600!important;text-align:center!important;}
body.dark-theme .settings-console-tile{background:#172033!important;border-color:#435168!important;}body.dark-theme .settings-console-tile:hover{background:#1d2d46!important;border-color:#60a5fa!important;}
body.dark-theme .settings-console-icon{background:#263a56!important;color:#93c5fd!important;}
@media(max-width:1050px){.settings-console-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:760px){.settings-console-grid,.appearance-choice-grid{grid-template-columns:1fr!important;}.settings-console-tile{min-height:105px!important;}.settings-detail-return .secondary,.console-return-bar .secondary{width:100%!important;}}

/* V2.0.3 — licensed user enforcement, compact user editor and unified billing. */
.falcon-admin-tile-grid.two-up{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.falcon-admin-tile-grid.three-up{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.falcon-billing-note{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px 14px!important;align-items:start!important;padding:15px!important;}
.falcon-billing-note>div{display:flex!important;flex-direction:column!important;gap:4px!important;}.falcon-billing-note strong{font-size:13px!important;color:var(--ink)!important;}.falcon-billing-note span{font-size:11px!important;color:var(--muted)!important;}.falcon-billing-note>p{grid-column:1/-1!important;margin:0!important;padding-top:8px!important;border-top:1px solid var(--line)!important;color:var(--muted)!important;font-size:11px!important;line-height:1.45!important;}
.organisation-licence-preview{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:11px 12px!important;border:1px solid #93c5fd!important;border-radius:7px!important;background:#eff6ff!important;}.organisation-licence-preview strong{font-size:11px!important;color:#1e3a8a!important;}.organisation-licence-preview span{font-size:12px!important;font-weight:700!important;color:#1e3a8a!important;text-align:right!important;}
.user-database-actions{display:flex!important;align-items:center!important;gap:9px!important;}.licence-seat-count{display:inline-flex!important;align-items:center!important;min-height:28px!important;padding:4px 8px!important;border:1px solid #86efac!important;border-radius:5px!important;background:#f0fdf4!important;color:#166534!important;font-size:10px!important;font-weight:800!important;}.licence-seat-count.full{border-color:#fdba74!important;background:#fff7ed!important;color:#9a3412!important;}
.user-row-actions{display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important;}
.modal.user-modal-open{padding:18px!important;}.modal-card.user-modal-card{display:flex!important;flex-direction:column!important;width:min(560px,94vw)!important;max-width:560px!important;max-height:88vh!important;overflow:hidden!important;padding:0!important;border-radius:10px!important;}.modal-card.user-modal-card .modal-head{flex:0 0 auto!important;margin:0!important;padding:13px 15px!important;border-bottom:1px solid var(--line)!important;background:var(--soft)!important;}.modal-card.user-modal-card #modal-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding:14px 15px 15px!important;}.user-compact-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}.user-compact-form .form-group{margin:0!important;}.user-compact-form .form-actions{margin-top:2px!important;padding-top:11px!important;border-top:1px solid var(--line)!important;}.user-compact-form small{display:block!important;margin-top:4px!important;font-size:9px!important;line-height:1.35!important;color:var(--muted)!important;}.user-compact-form input[readonly]{background:var(--soft)!important;color:var(--ink)!important;font-weight:700!important;}
body.dark-theme .organisation-licence-preview{background:#172554!important;border-color:#3b82f6!important;}body.dark-theme .organisation-licence-preview strong,body.dark-theme .organisation-licence-preview span{color:#bfdbfe!important;}body.dark-theme .licence-seat-count{background:#15372a!important;border-color:#278455!important;color:#bbf7d0!important;}body.dark-theme .licence-seat-count.full{background:#422006!important;border-color:#c2410c!important;color:#fed7aa!important;}
@media(max-width:1050px){.falcon-admin-tile-grid.three-up{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:760px){.falcon-admin-tile-grid.two-up,.falcon-admin-tile-grid.three-up,.user-compact-form{grid-template-columns:1fr!important;}.falcon-billing-note{grid-template-columns:1fr!important;}.falcon-billing-note>p{grid-column:1!important;}.organisation-licence-preview{align-items:flex-start!important;flex-direction:column!important;}.organisation-licence-preview span{text-align:left!important;}.user-database-actions{width:100%!important;justify-content:space-between!important;}.modal.user-modal-open{padding:0!important;}.modal-card.user-modal-card{width:100vw!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important;}}

/* V2.0.4 — automatic Fabric Codes and a larger dashboard time panel. */
.fabric-generated-code{background:var(--soft)!important;color:var(--ink)!important;font-weight:800!important;letter-spacing:.045em!important;cursor:not-allowed!important;}
.fabric-id-col>small{display:block!important;margin-top:4px!important;color:var(--muted)!important;font-size:9px!important;}
.dashboard-world-time.compact{position:relative!important;padding:14px!important;overflow:visible!important;}
.dashboard-world-time.compact .dashboard-world-card-head{margin-bottom:11px!important;}
.dashboard-world-time-row{grid-template-columns:190px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;}
.dashboard-local-date-card,.dashboard-world-time.compact .world-clock-card{height:118px!important;min-height:118px!important;}
.dashboard-local-date-card{padding:11px 12px!important;overflow:visible!important;gap:7px!important;}
.local-date-top strong,.local-date-foot span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;}
.local-date-top span{font-size:9px!important;}.local-date-top strong{font-size:10px!important;text-align:right!important;}
.local-date-main{gap:11px!important;}.local-date-main>b{font-size:38px!important;}.local-date-main strong{font-size:12px!important;}.local-date-main span{font-size:9px!important;}
.local-date-bottom{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:end!important;}
.local-date-foot{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-end!important;gap:1px!important;min-width:0!important;}
.local-date-foot span{font-size:9px!important;line-height:1.2!important;}
.dashboard-calendar-btn{min-height:27px!important;padding:5px 9px!important;border:1px solid #2563eb!important;border-radius:5px!important;background:#2563eb!important;color:#fff!important;font-size:9px!important;font-weight:800!important;cursor:pointer!important;}
.dashboard-calendar-btn:hover{background:#1d4ed8!important;border-color:#1d4ed8!important;}
.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(5,minmax(180px,1fr))!important;gap:10px!important;}
.dashboard-world-time.compact .world-clock-card{grid-template-columns:82px minmax(0,1fr)!important;gap:11px!important;padding:11px!important;overflow:visible!important;}
.dashboard-world-time.compact .world-clock-analogue,.dashboard-world-time.compact .world-analog-svg{width:76px!important;height:76px!important;}
.dashboard-world-time.compact .world-clock-copy{min-width:0!important;justify-content:center!important;}
.dashboard-world-time.compact .world-clock-copy strong{font-size:12px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;}
.dashboard-world-time.compact .world-clock-copy>span{font-size:10px!important;white-space:normal!important;overflow-wrap:anywhere!important;}
.dashboard-world-time.compact .world-clock-copy b{font-size:18px!important;line-height:1.15!important;}
.dashboard-world-time.compact .world-clock-copy small{font-size:9px!important;gap:6px!important;flex-wrap:wrap!important;}
.dashboard-world-time.compact .world-clock-local-badge{top:6px!important;left:7px!important;font-size:7px!important;}
.dashboard-calendar-popover[hidden]{display:none!important;}
.dashboard-calendar-popover{position:absolute!important;z-index:90!important;top:calc(100% - 5px)!important;left:14px!important;width:min(350px,calc(100% - 28px))!important;padding:12px!important;border:1px solid #aeb9c4!important;border-radius:9px!important;background:#fff!important;box-shadow:0 14px 30px rgba(15,23,42,.2)!important;}
.dashboard-calendar-popover-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin-bottom:9px!important;padding-bottom:8px!important;border-bottom:1px solid var(--line)!important;}
.dashboard-calendar-popover-head strong{font-size:13px!important;color:var(--ink)!important;}.dashboard-calendar-popover-head button{display:grid!important;place-items:center!important;width:28px!important;height:28px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:5px!important;background:var(--soft)!important;color:var(--ink)!important;font-size:18px!important;cursor:pointer!important;}
.dashboard-world-time.compact .dashboard-calendar-popover .world-calendar{display:flex!important;}
body.dark-theme .dashboard-calendar-popover{background:#172033!important;border-color:#435168!important;box-shadow:0 14px 30px rgba(0,0,0,.42)!important;}
@media(max-width:1550px){.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(4,minmax(180px,1fr))!important;}}
@media(max-width:1260px){.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(3,minmax(180px,1fr))!important;}}
@media(max-width:980px){.dashboard-world-time-row{grid-template-columns:190px minmax(0,1fr)!important;}.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(2,minmax(180px,1fr))!important;}}
@media(max-width:680px){.dashboard-world-time-row{grid-template-columns:1fr!important;}.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:1fr!important;}.dashboard-calendar-popover{position:fixed!important;top:50%!important;left:50%!important;width:min(350px,calc(100vw - 28px))!important;transform:translate(-50%,-50%)!important;}}

/* V2.0.5 — aligned Fabric Code field and fuller dashboard clock cards. */
.fabric-row-one .fabric-id-col{align-self:flex-end!important;}
.fabric-row-one .fabric-generated-code{display:block!important;width:100%!important;height:28px!important;min-height:28px!important;margin:0!important;padding:5px!important;box-sizing:border-box!important;}
.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(5,minmax(210px,1fr))!important;}
.dashboard-world-time.compact .world-clock-card{grid-template-columns:96px minmax(0,1fr)!important;gap:8px!important;padding:8px!important;overflow:hidden!important;}
.dashboard-world-time.compact .world-clock-analogue,.dashboard-world-time.compact .world-analog-svg{width:92px!important;height:92px!important;max-width:100%!important;}
.dashboard-world-time.compact .world-clock-copy{min-width:0!important;max-width:100%!important;padding-right:13px!important;overflow:hidden!important;}
.dashboard-world-time.compact .world-clock-copy strong{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;max-height:2.35em!important;line-height:1.15!important;overflow:hidden!important;overflow-wrap:anywhere!important;}
.dashboard-world-time.compact .world-clock-copy>span{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.dashboard-world-time.compact .world-clock-copy b{font-size:19px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;}
.dashboard-world-time.compact .world-clock-copy small{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:0!important;max-width:100%!important;overflow:hidden!important;}
.dashboard-world-time.compact .world-clock-copy small span{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.dashboard-world-time.compact .world-clock-remove{top:3px!important;right:3px!important;}
@media(max-width:1650px){.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(4,minmax(210px,1fr))!important;}}
@media(max-width:1320px){.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(3,minmax(210px,1fr))!important;}}
@media(max-width:1000px){.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:repeat(2,minmax(210px,1fr))!important;}}
@media(max-width:680px){.dashboard-world-time.compact .dashboard-world-clock-grid{grid-template-columns:1fr!important;}}

/* V2.0.6 — modern calendar, local weather and horizontal digital clocks. */
.dashboard-smart-widgets{display:grid!important;grid-template-columns:minmax(285px,330px) minmax(290px,340px) minmax(0,1fr)!important;gap:14px!important;align-items:stretch!important;margin:0 0 16px!important;}
.smart-widget{min-width:0!important;min-height:330px!important;padding:16px!important;border:1px solid #b8c3cf!important;border-radius:14px!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,23,42,.08)!important;overflow:hidden!important;}
.smart-widget-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:12px!important;}
.smart-widget-head>div:first-child{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;}.smart-widget-head>div:first-child>span{font-size:11px!important;font-weight:800!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#64748b!important;}.smart-widget-head>div:first-child>strong{font-size:18px!important;line-height:1.2!important;color:#172033!important;}
.smart-calendar-nav{display:flex!important;align-items:center!important;gap:4px!important;}.smart-calendar-nav button{display:grid!important;place-items:center!important;min-width:30px!important;height:30px!important;padding:0 7px!important;border:1px solid #cbd5e1!important;border-radius:8px!important;background:#f8fafc!important;color:#334155!important;font-size:15px!important;font-weight:800!important;}.smart-calendar-nav button:nth-child(2){font-size:10px!important;padding:0 8px!important;}
.smart-cal-weekdays,.smart-cal-grid{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;}.smart-cal-weekdays{margin-bottom:4px!important;}.smart-cal-weekdays span{padding:3px 0!important;text-align:center!important;color:#64748b!important;font-size:10px!important;font-weight:800!important;}
.smart-cal-day{display:grid!important;place-items:center!important;width:100%!important;aspect-ratio:1/1!important;min-width:0!important;min-height:30px!important;padding:0!important;border:2px solid transparent!important;border-radius:50%!important;background:transparent!important;color:#27364a!important;font-size:13px!important;font-weight:700!important;line-height:1!important;}.smart-cal-day:hover{background:#eff6ff!important;color:#1d4ed8!important;}.smart-cal-day.is-outside{color:#a8b2c1!important;}.smart-cal-day.is-selected:not(.is-today){border-color:#2563eb!important;background:transparent!important;color:#1d4ed8!important;}.smart-cal-day.is-today{border-color:#2563eb!important;background:#2563eb!important;color:#fff!important;box-shadow:0 0 0 3px rgba(37,99,235,.14)!important;}
.smart-calendar-selection{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-top:9px!important;padding:9px 10px!important;border-radius:9px!important;background:#eef4fb!important;}.smart-calendar-selection span{font-size:10px!important;font-weight:800!important;text-transform:uppercase!important;color:#64748b!important;}.smart-calendar-selection strong{font-size:12px!important;color:#1e3a5f!important;text-align:right!important;}
.smart-weather-widget{position:relative!important;display:flex!important;flex-direction:column!important;color:#fff!important;border-color:#3b82f6!important;background:linear-gradient(145deg,#1d4ed8 0%,#2563eb 48%,#0ea5e9 100%)!important;}
.weather-widget-top{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;}.weather-widget-top>div{display:flex!important;flex-direction:column!important;min-width:0!important;}.weather-widget-top span{font-size:11px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.08em!important;color:#dbeafe!important;}.weather-widget-top strong{margin-top:5px!important;font-size:20px!important;line-height:1.15!important;color:#fff!important;overflow-wrap:anywhere!important;}.weather-widget-top small{margin-top:2px!important;font-size:12px!important;color:#dbeafe!important;}.weather-widget-top>button{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;padding:0!important;border:1px solid rgba(255,255,255,.38)!important;border-radius:10px!important;background:rgba(255,255,255,.13)!important;color:#fff!important;font-size:21px!important;}
.weather-widget-main{display:flex!important;align-items:center!important;justify-content:center!important;gap:14px!important;flex:1 1 auto!important;padding:15px 0 12px!important;}.weather-widget-icon{font-size:62px!important;line-height:1!important;filter:drop-shadow(0 4px 5px rgba(0,0,0,.15))!important;}.weather-widget-main>div{display:flex!important;flex-direction:column!important;}.weather-widget-main strong{font-size:48px!important;line-height:.95!important;font-weight:500!important;letter-spacing:-.04em!important;}.weather-widget-main span{margin-top:7px!important;font-size:15px!important;font-weight:800!important;}.weather-widget-main small{margin-top:4px!important;font-size:11px!important;color:#dbeafe!important;}
.weather-widget-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;border:1px solid rgba(255,255,255,.28)!important;border-radius:11px!important;background:rgba(15,23,42,.14)!important;overflow:hidden!important;}.weather-widget-stats>div{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important;padding:10px 7px!important;text-align:center!important;}.weather-widget-stats>div+div{border-left:1px solid rgba(255,255,255,.24)!important;}.weather-widget-stats span{font-size:9px!important;color:#dbeafe!important;}.weather-widget-stats strong{font-size:12px!important;color:#fff!important;white-space:nowrap!important;}
.weather-widget-foot{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:7px!important;margin-top:9px!important;color:#dbeafe!important;font-size:9px!important;}.weather-widget-foot span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}.weather-error{justify-content:space-between!important;}.weather-retry-btn{align-self:flex-start!important;border:1px solid rgba(255,255,255,.45)!important;background:rgba(255,255,255,.14)!important;color:#fff!important;font-weight:800!important;}.weather-loading-visual{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:12px!important;flex:1!important;}.weather-loading-visual span{font-size:58px!important;}.weather-loading-visual i{display:block!important;width:70%!important;height:8px!important;border-radius:99px!important;background:rgba(255,255,255,.22)!important;}.weather-loading-visual i:last-child{width:48%!important;}
.smart-world-clock-widget{display:flex!important;flex-direction:column!important;}.digital-world-clock-head{flex:0 0 auto!important;}.digital-clock-add{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important;}.digital-clock-add select{width:135px!important;min-width:0!important;height:32px!important;min-height:32px!important;padding:4px 7px!important;border-color:#cbd5e1!important;font-size:10px!important;}.digital-clock-add>button{height:32px!important;padding:4px 9px!important;border:1px solid #2563eb!important;border-radius:7px!important;background:#2563eb!important;color:#fff!important;font-size:10px!important;font-weight:800!important;}
.dashboard-digital-clock-strip{display:flex!important;align-items:stretch!important;gap:9px!important;flex:1 1 auto!important;min-width:0!important;padding:2px 0 7px!important;overflow-x:auto!important;scrollbar-color:#94a3b8 #e2e8f0!important;scrollbar-width:thin!important;}.dashboard-digital-clock{position:relative!important;display:flex!important;flex:0 0 155px!important;flex-direction:column!important;justify-content:space-between!important;min-width:155px!important;height:241px!important;padding:13px!important;border:1px solid #34445b!important;border-radius:11px!important;background:linear-gradient(155deg,#263449,#172033)!important;color:#fff!important;box-shadow:0 5px 13px rgba(15,23,42,.16)!important;overflow:hidden!important;}.dashboard-digital-clock.is-local{border-color:#60a5fa!important;box-shadow:0 0 0 2px rgba(96,165,250,.18),0 5px 13px rgba(15,23,42,.16)!important;}
.digital-clock-top{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:5px!important;min-height:23px!important;}.digital-clock-zone{max-width:95px!important;color:#bfdbfe!important;font-size:10px!important;font-weight:800!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}.digital-clock-top button{display:grid!important;place-items:center!important;width:23px!important;height:23px!important;padding:0!important;border:0!important;border-radius:6px!important;background:rgba(255,255,255,.09)!important;color:#cbd5e1!important;font-size:17px!important;}.digital-clock-local{padding:3px 6px!important;border-radius:999px!important;background:#2563eb!important;color:#fff!important;font-size:8px!important;font-weight:800!important;text-transform:uppercase!important;}
.digital-clock-time{display:flex!important;align-items:flex-start!important;gap:4px!important;margin:7px 0!important;white-space:nowrap!important;}.digital-clock-time strong{font-size:35px!important;line-height:1!important;font-weight:300!important;letter-spacing:-.045em!important;font-variant-numeric:tabular-nums!important;}.digital-clock-time>span{margin-top:4px!important;color:#cbd5e1!important;font-size:10px!important;font-weight:800!important;}
.digital-clock-place{display:flex!important;flex-direction:column!important;min-width:0!important;}.digital-clock-place>strong{color:#fff!important;font-size:14px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}.digital-clock-place>span{margin-top:2px!important;color:#cbd5e1!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}.digital-clock-place small{margin-top:8px!important;padding-top:8px!important;border-top:1px solid rgba(255,255,255,.14)!important;color:#94a3b8!important;font-size:10px!important;white-space:nowrap!important;}
body.dark-theme .smart-widget{background:#172033!important;border-color:#435168!important;box-shadow:none!important;}body.dark-theme .smart-widget-head>div:first-child>span{color:#94a3b8!important;}body.dark-theme .smart-widget-head>div:first-child>strong{color:#f8fafc!important;}body.dark-theme .smart-calendar-nav button{background:#24344b!important;border-color:#526176!important;color:#e5edf7!important;}body.dark-theme .smart-cal-weekdays span{color:#94a3b8!important;}body.dark-theme .smart-cal-day{color:#d9e2ee!important;}body.dark-theme .smart-cal-day.is-outside{color:#617086!important;}body.dark-theme .smart-cal-day:hover{background:#1e3a5f!important;color:#bfdbfe!important;}body.dark-theme .smart-calendar-selection{background:#24344b!important;}body.dark-theme .smart-calendar-selection span{color:#94a3b8!important;}body.dark-theme .smart-calendar-selection strong{color:#dbeafe!important;}body.dark-theme .smart-weather-widget{background:linear-gradient(145deg,#1e3a8a,#1d4ed8 52%,#0369a1)!important;border-color:#3b82f6!important;}body.dark-theme .digital-clock-add select{background:#101827!important;border-color:#526176!important;color:#e5edf7!important;}
@media(max-width:1400px){.dashboard-smart-widgets{grid-template-columns:minmax(285px,1fr) minmax(290px,1fr)!important;}.smart-world-clock-widget{grid-column:1/-1!important;min-height:310px!important;}.dashboard-digital-clock{height:220px!important;}}
@media(max-width:760px){.dashboard-smart-widgets{grid-template-columns:1fr!important;}.smart-world-clock-widget{grid-column:auto!important;}.smart-widget{min-height:320px!important;padding:14px!important;}.smart-widget-head{align-items:flex-start!important;}.digital-world-clock-head{flex-direction:column!important;}.digital-clock-add{width:100%!important;}.digital-clock-add select{flex:1 1 auto!important;width:auto!important;}.dashboard-digital-clock{flex-basis:150px!important;min-width:150px!important;}.smart-cal-day{min-height:32px!important;}}

/* V2.0.7 — compact equal-height widgets and active operational cards. */
.dashboard-smart-widgets{position:relative!important;grid-template-columns:230px 220px minmax(0,1fr)!important;gap:12px!important;align-items:start!important;margin-bottom:14px!important;overflow:visible!important;}
.dashboard-smart-widgets .smart-widget{height:138px!important;min-height:138px!important;padding:11px 12px!important;border-radius:12px!important;box-shadow:0 3px 10px rgba(15,23,42,.08)!important;}
.smart-calendar-widget{position:relative!important;width:230px!important;overflow:visible!important;z-index:12!important;}
.smart-calendar-summary{display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;height:100%!important;padding:0!important;border:0!important;background:transparent!important;color:#172033!important;text-align:left!important;}
.smart-calendar-icon{display:grid!important;place-items:center!important;width:52px!important;height:52px!important;min-width:52px!important;border:2px solid #2563eb!important;border-radius:13px!important;background:#eff6ff!important;color:#1d4ed8!important;font-size:24px!important;font-weight:800!important;line-height:1!important;}
.smart-calendar-summary>span:last-child{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important;}.smart-calendar-summary small{color:#64748b!important;font-size:12px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.06em!important;}.smart-calendar-summary strong{color:#172033!important;font-size:18px!important;line-height:1.18!important;font-weight:750!important;overflow-wrap:anywhere!important;}
.smart-calendar-popover[hidden]{display:none!important;}.smart-calendar-popover{position:absolute!important;z-index:120!important;top:calc(100% + 8px)!important;left:0!important;width:325px!important;padding:15px!important;border:1px solid #aeb9c4!important;border-radius:13px!important;background:#fff!important;box-shadow:0 18px 40px rgba(15,23,42,.24)!important;}
.smart-calendar-popover-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin-bottom:12px!important;}.smart-calendar-popover-head>div{display:flex!important;flex-direction:column!important;gap:2px!important;}.smart-calendar-popover-head span{font-size:12px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.06em!important;color:#64748b!important;}.smart-calendar-popover-head strong{font-size:20px!important;color:#172033!important;}.smart-calendar-popover-head>button{display:grid!important;place-items:center!important;width:32px!important;height:32px!important;padding:0!important;border:1px solid #cbd5e1!important;border-radius:8px!important;background:#f8fafc!important;color:#334155!important;font-size:20px!important;}
.smart-calendar-popover .smart-cal-weekdays span{font-size:12px!important;}.smart-calendar-popover .smart-cal-day{min-height:35px!important;font-size:15px!important;}.smart-calendar-popover .smart-calendar-selection{margin-top:11px!important;padding:10px!important;}.smart-calendar-popover .smart-calendar-selection span,.smart-calendar-popover .smart-calendar-selection strong{font-size:13px!important;}
.smart-weather-widget{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto 1fr auto!important;gap:4px 8px!important;padding:11px 12px!important;overflow:hidden!important;}
.weather-compact-location{grid-column:1!important;grid-row:1!important;display:flex!important;align-items:baseline!important;gap:5px!important;min-width:0!important;padding-right:28px!important;white-space:nowrap!important;overflow:hidden!important;}.weather-compact-location>span{font-size:11px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.05em!important;color:#dbeafe!important;}.weather-compact-location strong{font-size:15px!important;color:#fff!important;overflow:hidden!important;text-overflow:ellipsis!important;}.weather-compact-location small{font-size:12px!important;color:#dbeafe!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.weather-compact-condition{grid-column:1/3!important;grid-row:2!important;display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important;}.weather-compact-condition .weather-widget-icon{font-size:42px!important;line-height:1!important;}.weather-compact-condition>div{display:grid!important;grid-template-columns:auto 1fr!important;grid-template-rows:auto!important;align-items:center!important;gap:0 8px!important;min-width:0!important;}.weather-compact-condition strong{font-size:36px!important;line-height:1!important;font-weight:500!important;}.weather-compact-condition>div>span{font-size:14px!important;font-weight:700!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.weather-compact-stats{grid-column:1/3!important;grid-row:3!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;font-size:12px!important;color:#e0f2fe!important;white-space:nowrap!important;}.weather-location-refresh{position:absolute!important;right:8px!important;top:7px!important;display:grid!important;place-items:center!important;width:28px!important;height:28px!important;padding:0!important;border:1px solid rgba(255,255,255,.38)!important;border-radius:8px!important;background:rgba(255,255,255,.13)!important;color:#fff!important;font-size:18px!important;}.smart-weather-widget.weather-loading,.smart-weather-widget.weather-error{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:10px!important;}.smart-weather-widget.weather-loading .weather-widget-icon,.smart-weather-widget.weather-error .weather-widget-icon{font-size:40px!important;}.smart-weather-widget.weather-loading>div,.smart-weather-widget.weather-error>div{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;}.smart-weather-widget.weather-loading strong,.smart-weather-widget.weather-error strong{font-size:15px!important;}.smart-weather-widget.weather-loading div>span,.smart-weather-widget.weather-error div>span{font-size:12px!important;color:#dbeafe!important;}.smart-weather-widget .weather-retry-btn{padding:6px 8px!important;font-size:12px!important;}
.smart-world-clock-widget{height:138px!important;min-height:138px!important;padding:8px 10px!important;overflow:hidden!important;}.smart-world-clock-widget .smart-widget-head{align-items:center!important;min-height:25px!important;margin-bottom:4px!important;}.smart-world-clock-widget .smart-widget-head>div:first-child{gap:0!important;}.smart-world-clock-widget .smart-widget-head>div:first-child>span{font-size:11px!important;}.smart-world-clock-widget .smart-widget-head>div:first-child>strong{font-size:13px!important;}.digital-clock-add select{width:145px!important;height:27px!important;min-height:27px!important;padding:3px 6px!important;font-size:11px!important;}.digital-clock-add>button{height:27px!important;padding:3px 8px!important;font-size:11px!important;}.digital-clock-add select:disabled,.digital-clock-add button:disabled{opacity:.58!important;cursor:not-allowed!important;}
.dashboard-digital-clock-strip{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;min-height:0!important;padding:0!important;overflow:hidden!important;}.dashboard-digital-clock{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:16px 38px 22px!important;align-content:center!important;column-gap:4px!important;flex:none!important;width:auto!important;min-width:0!important;height:93px!important;padding:7px 9px!important;border-radius:9px!important;}.digital-clock-top{display:contents!important;}.digital-clock-zone{grid-column:1!important;grid-row:1!important;max-width:100%!important;font-size:10px!important;}.digital-clock-top button,.digital-clock-local{grid-column:2!important;grid-row:1!important;align-self:start!important;justify-self:end!important;}.digital-clock-top button{width:18px!important;height:18px!important;font-size:14px!important;}.digital-clock-local{padding:2px 5px!important;font-size:7px!important;}.digital-clock-time{grid-column:1/3!important;grid-row:2!important;align-items:flex-start!important;gap:5px!important;margin:0!important;min-width:0!important;}.digital-clock-time strong{font-size:34px!important;line-height:1!important;}.digital-clock-time>span{margin-top:3px!important;font-size:11px!important;}.digital-clock-place{grid-column:1/3!important;grid-row:3!important;display:flex!important;flex-direction:row!important;align-items:baseline!important;gap:6px!important;min-width:0!important;}.digital-clock-place>strong{font-size:13px!important;}.digital-clock-place small{min-width:0!important;margin:0!important;padding:0!important;border:0!important;font-size:11px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}.digital-clock-place>span{display:none!important;}
body.dark-theme .smart-calendar-summary{color:#f8fafc!important;}body.dark-theme .smart-calendar-summary strong{color:#f8fafc!important;}body.dark-theme .smart-calendar-icon{background:#1e3a5f!important;color:#bfdbfe!important;border-color:#60a5fa!important;}body.dark-theme .smart-calendar-popover{background:#172033!important;border-color:#526176!important;box-shadow:0 18px 40px rgba(0,0,0,.48)!important;}body.dark-theme .smart-calendar-popover-head strong{color:#f8fafc!important;}body.dark-theme .smart-calendar-popover-head>button{background:#24344b!important;border-color:#526176!important;color:#e5edf7!important;}
.ops-dashboard-heading h2{font-size:20px!important;}.ops-dashboard-heading p{font-size:13px!important;}.ops-kpi-card{min-height:120px!important;padding:13px!important;}.ops-kpi-label,.ops-kpi-content strong{font-size:18px!important;line-height:1.1!important;font-weight:800!important;}.ops-kpi-content strong{margin-top:7px!important;}.ops-kpi-sub{font-size:12px!important;font-weight:400!important;line-height:1.3!important;}.ops-kpi-card.has-value{background:var(--kpi-accent)!important;border-color:var(--kpi-accent)!important;color:#fff!important;box-shadow:0 5px 14px color-mix(in srgb,var(--kpi-accent) 25%,transparent)!important;}.ops-kpi-card.has-value .ops-kpi-label,.ops-kpi-card.has-value .ops-kpi-content strong{color:#fff!important;}.ops-kpi-card.has-value .ops-kpi-sub{color:rgba(255,255,255,.86)!important;font-weight:400!important;}.ops-kpi-card.has-value .ops-kpi-icon{background:rgba(255,255,255,.18)!important;color:#fff!important;}.ops-kpi-card.has-value:hover{background:color-mix(in srgb,var(--kpi-accent) 88%,#000)!important;border-color:var(--kpi-accent)!important;}
.ops-panel-head h3{font-size:16px!important;}.ops-pipeline-step{min-height:92px!important;}.ops-pipeline-label,.ops-pipeline-count{font-size:18px!important;line-height:1.1!important;font-weight:800!important;}.ops-pipeline-label{order:1!important;margin:0!important;}.ops-pipeline-count{order:2!important;margin-top:8px!important;}.ops-pipeline-step.has-value{background:var(--pipe)!important;border-color:var(--pipe)!important;color:#fff!important;}.ops-pipeline-step.has-value .ops-pipeline-label,.ops-pipeline-step.has-value .ops-pipeline-count{color:#fff!important;font-weight:800!important;}.ops-pipeline-step.has-value:hover{background:color-mix(in srgb,var(--pipe) 88%,#000)!important;}
body.dark-theme .ops-kpi-card.has-value{background:var(--kpi-accent)!important;border-color:var(--kpi-accent)!important;}body.dark-theme .ops-kpi-card.has-value .ops-kpi-label,body.dark-theme .ops-kpi-card.has-value .ops-kpi-content strong,body.dark-theme .ops-kpi-card.has-value .ops-kpi-sub,body.dark-theme .ops-pipeline-step.has-value .ops-pipeline-label,body.dark-theme .ops-pipeline-step.has-value .ops-pipeline-count{color:#fff!important;}body.dark-theme .ops-pipeline-step.has-value{background:var(--pipe)!important;border-color:var(--pipe)!important;}
@media(max-width:1250px){.dashboard-smart-widgets{grid-template-columns:210px 210px minmax(0,1fr)!important;}.smart-calendar-widget{width:210px!important;}.digital-clock-time strong{font-size:29px!important;}.digital-clock-place small{font-size:10px!important;}}
@media(max-width:900px){.dashboard-smart-widgets{grid-template-columns:1fr 1fr!important;}.smart-calendar-widget{width:100%!important;}.smart-world-clock-widget{grid-column:1/-1!important;}.smart-calendar-popover{width:min(325px,calc(100vw - 36px))!important;}}
@media(max-width:620px){.dashboard-smart-widgets{grid-template-columns:1fr!important;}.smart-world-clock-widget{grid-column:auto!important;height:auto!important;min-height:138px!important;}.dashboard-digital-clock-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;}.smart-world-clock-widget:has(.dashboard-digital-clock:nth-child(3)){height:233px!important;}.digital-world-clock-head{flex-direction:row!important;}.digital-clock-add select{width:118px!important;}.smart-calendar-popover{position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;}}

/* V2.0.8 — refined fixed-size dashboard widgets and larger operational figures. */
.smart-calendar-summary{flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:7px!important;}
.smart-calendar-title{display:block!important;flex:0 0 auto!important;color:#64748b!important;font-size:12px!important;font-weight:800!important;line-height:1!important;letter-spacing:.06em!important;text-transform:uppercase!important;}
.smart-calendar-summary>.smart-calendar-compact-date{display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important;min-width:0!important;}
.smart-calendar-icon{width:59px!important;height:59px!important;min-width:59px!important;border-radius:14px!important;font-size:42px!important;font-weight:700!important;}
.smart-calendar-date-copy{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;}
.smart-calendar-date-copy strong{font-size:17px!important;line-height:1.05!important;white-space:normal!important;overflow-wrap:anywhere!important;}
.smart-calendar-date-copy>span{color:#64748b!important;font-size:14px!important;font-weight:700!important;line-height:1.1!important;white-space:normal!important;overflow-wrap:anywhere!important;}
.smart-calendar-popover-head{align-items:flex-start!important;}
.smart-calendar-popover-head>div:first-child{max-width:175px!important;}
.smart-calendar-popover-head strong{font-size:18px!important;line-height:1.16!important;}
.smart-calendar-popover-actions{display:flex!important;align-items:center!important;gap:4px!important;}
.smart-calendar-popover-actions button{display:grid!important;place-items:center!important;width:31px!important;height:31px!important;padding:0!important;border:1px solid #cbd5e1!important;border-radius:8px!important;background:#f8fafc!important;color:#334155!important;font-size:22px!important;font-weight:800!important;line-height:1!important;}
.smart-calendar-popover-actions .smart-calendar-close{margin-left:2px!important;font-size:20px!important;}
.smart-calendar-popover .smart-cal-weekdays span{font-size:13px!important;}
.smart-calendar-popover .smart-cal-day{min-height:36px!important;font-size:16px!important;}
.smart-calendar-popover .smart-calendar-selection span{font-size:13px!important;}
.smart-calendar-popover .smart-calendar-selection strong{font-size:14px!important;}

.weather-compact-location{align-items:flex-start!important;align-content:flex-start!important;flex-wrap:wrap!important;row-gap:1px!important;white-space:normal!important;overflow:visible!important;line-height:1.05!important;}
.weather-compact-location strong{font-size:16px!important;line-height:1.05!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;}
.weather-compact-location small{font-size:13px!important;line-height:1.05!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;}
.weather-compact-condition{gap:8px!important;}
.weather-compact-condition .weather-widget-icon{font-size:48px!important;}
.weather-compact-condition strong{font-size:42px!important;}
.weather-compact-condition>div>span{font-size:16px!important;line-height:1.05!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}

.smart-world-clock-widget{position:relative!important;padding:8px 10px!important;background:#10233f!important;border-color:#10233f!important;}
.smart-world-clock-widget .digital-clock-add{position:absolute!important;z-index:5!important;top:6px!important;right:7px!important;padding:3px!important;border-radius:8px!important;background:rgba(255,255,255,.12)!important;box-shadow:0 2px 7px rgba(0,0,0,.18)!important;}
.smart-world-clock-widget .digital-clock-add select{width:116px!important;background:#fff!important;}
.dashboard-digital-clock-strip{height:100%!important;min-height:100%!important;gap:7px!important;}
.dashboard-digital-clock{position:relative!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;width:auto!important;min-width:0!important;height:100%!important;min-height:100%!important;padding:9px 10px!important;border-color:#314967!important;border-radius:9px!important;background:#10233f!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;}
.dashboard-digital-clock.is-local{border-color:#60a5fa!important;box-shadow:inset 0 0 0 1px rgba(96,165,250,.2)!important;}
.digital-clock-top{position:absolute!important;z-index:2!important;top:6px!important;right:6px!important;display:flex!important;min-height:0!important;}
.digital-clock-top button{width:20px!important;height:20px!important;font-size:15px!important;}
.digital-clock-local{padding:3px 6px!important;font-size:8px!important;}
.digital-clock-time{display:flex!important;align-items:center!important;justify-content:center!important;flex:1 1 auto!important;width:100%!important;min-height:0!important;margin:0!important;padding:3px 0 1px!important;white-space:nowrap!important;}
.digital-clock-time strong{font-size:42px!important;line-height:.95!important;font-weight:300!important;letter-spacing:-.045em!important;font-variant-numeric:tabular-nums!important;}
.digital-clock-place{display:flex!important;flex:0 0 auto!important;flex-direction:column!important;align-items:flex-start!important;gap:1px!important;min-width:0!important;padding-right:44px!important;}
.digital-clock-place>strong{max-width:100%!important;font-size:16px!important;line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.digital-clock-place small{max-width:100%!important;margin:0!important;padding:0!important;border:0!important;color:#cbd5e1!important;font-size:11px!important;line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.digital-clock-zone{position:absolute!important;right:8px!important;bottom:8px!important;max-width:40px!important;color:#bfdbfe!important;font-size:10px!important;font-weight:800!important;line-height:1!important;text-align:right!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.dark-theme .smart-calendar-title,body.dark-theme .smart-calendar-date-copy>span{color:#cbd5e1!important;}
body.dark-theme .smart-calendar-popover-actions button{background:#24344b!important;border-color:#526176!important;color:#e5edf7!important;}
body.dark-theme .smart-world-clock-widget{background:#10233f!important;border-color:#435168!important;}

.ops-kpi-card{height:138px!important;min-height:138px!important;padding:14px!important;align-items:center!important;}
.ops-kpi-label{font-size:17px!important;line-height:1.1!important;}
.ops-kpi-content strong{margin-top:8px!important;font-size:42px!important;line-height:1!important;letter-spacing:-.035em!important;}
.ops-kpi-card.kpi-navy .ops-kpi-content strong{font-size:29px!important;line-height:1.05!important;}
.ops-kpi-sub{margin-top:8px!important;font-size:13px!important;line-height:1.2!important;}
.ops-pipeline-step{height:138px!important;min-height:138px!important;}
.ops-pipeline-label{font-size:18px!important;line-height:1.1!important;}
.ops-pipeline-count{margin-top:10px!important;font-size:42px!important;line-height:1!important;letter-spacing:-.035em!important;}
@media(max-width:1250px){.digital-clock-place>strong{font-size:14px!important;}.digital-clock-place small{font-size:10px!important;}.digital-clock-zone{font-size:9px!important;}.ops-kpi-card.kpi-navy .ops-kpi-content strong{font-size:27px!important;}}
@media(max-width:620px){.dashboard-digital-clock{height:100%!important;min-height:100%!important;}.smart-world-clock-widget:has(.dashboard-digital-clock:nth-child(3)){height:233px!important;}.smart-world-clock-widget:has(.dashboard-digital-clock:nth-child(3)) .dashboard-digital-clock{height:102px!important;min-height:102px!important;}}

/* V2.0.9 — six independent equal dashboard widgets and isolated dashboard type scale. */
:root{--dashboard-display-font-size:21px;}
#content .dashboard-smart-widgets{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:12px!important;align-items:stretch!important;}
#content .dashboard-smart-widgets>.smart-widget{width:100%!important;height:138px!important;min-height:138px!important;margin:0!important;}
#content .dashboard-smart-widgets>.smart-calendar-widget{width:100%!important;}

#content .smart-calendar-summary{justify-content:flex-start!important;}
#content .smart-calendar-summary>.smart-calendar-compact-date{flex-direction:row!important;flex-wrap:nowrap!important;gap:10px!important;}
#content .smart-calendar-icon{display:block!important;width:auto!important;height:auto!important;min-width:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#1d4ed8!important;}
#content .smart-calendar-date-copy{display:flex!important;flex-direction:row!important;align-items:baseline!important;gap:5px!important;min-width:0!important;white-space:nowrap!important;}
#content .smart-calendar-date-copy strong{font-size:14px!important;font-weight:800!important;line-height:1!important;white-space:nowrap!important;}
#content .smart-calendar-date-copy>span{font-size:14px!important;font-weight:500!important;line-height:1!important;white-space:nowrap!important;}

#content .smart-weather-widget{width:100%!important;}
#content .weather-compact-location strong{font-size:15px!important;}
#content .weather-compact-location small{font-size:13px!important;}
#content .weather-compact-condition>div>span{font-size:14px!important;}

#content .dashboard-smart-widgets>.dashboard-digital-clock{position:relative!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;padding:10px 11px!important;border:1px solid #314967!important;border-radius:12px!important;background:#10233f!important;color:#fff!important;box-shadow:0 3px 10px rgba(15,23,42,.13)!important;overflow:hidden!important;}
#content .dashboard-smart-widgets>.dashboard-digital-clock.is-local{border:0!important;background:#2563eb!important;box-shadow:0 3px 10px rgba(37,99,235,.22)!important;}
#content .dashboard-digital-clock.is-local .digital-clock-zone{color:#dbeafe!important;}
#content .dashboard-digital-clock.is-local .digital-clock-local{background:rgba(255,255,255,.2)!important;color:#fff!important;}
#content .digital-clock-place>strong{font-size:16px!important;color:#fff!important;}
#content .digital-clock-place small{font-size:11px!important;color:#dbeafe!important;}
#content .digital-clock-zone{font-size:10px!important;color:#bfdbfe!important;}

#content .dashboard-clock-add-card,#content .dashboard-clock-empty-card{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;gap:8px!important;border:1px dashed #94a3b8!important;background:#f8fafc!important;text-align:center!important;}
#content .dashboard-clock-add-card strong{font-size:14px!important;}
#content .dashboard-clock-add-card select,#content .dashboard-clock-add-card button{height:30px!important;font-size:11px!important;}
#content .dashboard-clock-add-card button{border:0!important;border-radius:6px!important;background:#2563eb!important;color:#fff!important;font-weight:800!important;}
#content .dashboard-clock-empty-card span{font-size:12px!important;color:#64748b!important;}

/* The dashboard has its own explicit display type scale, outside the global 12px UI rule. */
#content .ops-dashboard .smart-calendar-icon,
#content .ops-dashboard .weather-compact-condition strong,
#content .ops-dashboard .weather-compact-condition .weather-widget-icon,
#content .ops-dashboard .digital-clock-time strong,
#content .ops-dashboard .ops-dashboard-heading h2,
#content .ops-dashboard .ops-kpi-label,
#content .ops-dashboard .ops-kpi-content strong,
#content .ops-dashboard .ops-panel-head h3,
#content .ops-dashboard .ops-pipeline-label,
#content .ops-dashboard .ops-pipeline-count{
  font-size:var(--dashboard-display-font-size)!important;
}
#content .ops-dashboard .smart-calendar-icon,
#content .ops-dashboard .weather-compact-condition strong,
#content .ops-dashboard .digital-clock-time strong,
#content .ops-dashboard .ops-kpi-content strong,
#content .ops-dashboard .ops-pipeline-count{font-weight:800!important;line-height:1!important;}
#content .ops-dashboard .weather-compact-condition .weather-widget-icon{line-height:1!important;}
#content .ops-dashboard .ops-kpi-label,#content .ops-dashboard .ops-pipeline-label{line-height:1.1!important;}
#content .ops-dashboard .ops-kpi-card.kpi-navy .ops-kpi-content strong{font-size:var(--dashboard-display-font-size)!important;}

body.dark-theme #content .smart-calendar-icon{background:transparent!important;color:#93c5fd!important;}
body.dark-theme #content .dashboard-clock-add-card,body.dark-theme #content .dashboard-clock-empty-card{background:#172033!important;border-color:#526176!important;}
@media(max-width:1400px){#content .dashboard-smart-widgets{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:760px){#content .dashboard-smart-widgets{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:480px){#content .dashboard-smart-widgets{grid-template-columns:1fr!important;}}

/* V2.0.10 — three-widget row with a grouped four-clock panel. */
#content .dashboard-smart-widgets{grid-template-columns:230px 220px minmax(0,1fr)!important;gap:12px!important;align-items:stretch!important;}
#content .dashboard-smart-widgets>.smart-widget{height:138px!important;min-height:138px!important;}

#content .smart-calendar-icon,
#content .smart-calendar-date-copy strong,
#content .smart-calendar-date-copy>span{color:#1d4ed8!important;}
#content .smart-calendar-popover-actions{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;flex-wrap:nowrap!important;}
#content .smart-calendar-popover-actions button{flex:0 0 31px!important;}

#content .weather-compact-location{padding-top:2px!important;}
#content .weather-compact-location>span{display:none!important;}

#content .dashboard-smart-widgets>.smart-world-clock-widget{display:block!important;width:100%!important;height:138px!important;min-height:138px!important;padding:10px!important;border:1px solid #b8c3cf!important;border-radius:12px!important;background:var(--panel)!important;box-shadow:0 3px 10px rgba(15,23,42,.08)!important;overflow:hidden!important;}
#content .smart-world-clock-widget .dashboard-digital-clock-strip{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;width:100%!important;height:116px!important;min-height:116px!important;padding:0!important;overflow:hidden!important;}
#content .smart-world-clock-widget .dashboard-digital-clock{position:relative!important;display:flex!important;flex:0 0 116px!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;width:116px!important;min-width:116px!important;height:116px!important;min-height:116px!important;aspect-ratio:1/1!important;padding:8px!important;border:1px solid #60a5fa!important;border-radius:10px!important;background:#eff6ff!important;color:#1d4ed8!important;box-shadow:0 2px 6px rgba(37,99,235,.09)!important;overflow:hidden!important;}
#content .smart-world-clock-widget .dashboard-digital-clock.is-local{border:3px solid #1d4ed8!important;background:#eff6ff!important;box-shadow:0 2px 7px rgba(29,78,216,.16)!important;}
#content .smart-world-clock-widget .digital-clock-top{top:5px!important;right:5px!important;}
#content .smart-world-clock-widget .digital-clock-top button{background:rgba(37,99,235,.09)!important;color:#1d4ed8!important;}
#content .smart-world-clock-widget .digital-clock-local{background:#1d4ed8!important;color:#fff!important;}
#content .smart-world-clock-widget .digital-clock-time{display:flex!important;align-items:center!important;justify-content:center!important;flex:1 1 auto!important;min-height:0!important;padding:1px 0!important;color:#1d4ed8!important;}
#content .smart-world-clock-widget .digital-clock-time strong{color:#1d4ed8!important;}
#content .smart-world-clock-widget .digital-clock-place{display:flex!important;flex:0 0 auto!important;flex-direction:column!important;align-items:flex-start!important;gap:1px!important;width:100%!important;min-width:0!important;padding:0!important;color:#1d4ed8!important;}
#content .smart-world-clock-widget .digital-clock-place>strong{max-width:100%!important;color:#1d4ed8!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#content .smart-world-clock-widget .digital-clock-place small{max-width:100%!important;color:#2563eb!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#content .smart-world-clock-widget .digital-clock-zone{position:static!important;display:block!important;max-width:100%!important;margin-top:1px!important;color:#1d4ed8!important;font-weight:800!important;text-align:left!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}

#content .smart-world-clock-widget .dashboard-clock-add-card,
#content .smart-world-clock-widget .dashboard-clock-empty-card{display:flex!important;flex:0 0 116px!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;gap:6px!important;width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;padding:8px!important;border:1px dashed #60a5fa!important;border-radius:10px!important;background:#eff6ff!important;color:#1d4ed8!important;text-align:center!important;}
#content .smart-world-clock-widget .dashboard-clock-add-card strong{font-size:12px!important;}
#content .smart-world-clock-widget .dashboard-clock-add-card select,#content .smart-world-clock-widget .dashboard-clock-add-card button{width:100%!important;height:27px!important;font-size:10px!important;}

#content .ops-kpi-content{width:100%!important;}
body.dark-theme #content .smart-calendar-icon,
body.dark-theme #content .smart-calendar-date-copy strong,
body.dark-theme #content .smart-calendar-date-copy>span{color:#93c5fd!important;}
body.dark-theme #content .dashboard-smart-widgets>.smart-world-clock-widget{background:#172033!important;border-color:#435168!important;}
body.dark-theme #content .smart-world-clock-widget .dashboard-digital-clock,
body.dark-theme #content .smart-world-clock-widget .dashboard-clock-add-card,
body.dark-theme #content .smart-world-clock-widget .dashboard-clock-empty-card{background:#dbeafe!important;color:#1d4ed8!important;}
@media(max-width:1100px){#content .dashboard-smart-widgets{grid-template-columns:1fr 1fr!important;}#content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:1/-1!important;}}
@media(max-width:620px){#content .dashboard-smart-widgets{grid-template-columns:1fr!important;}#content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:auto!important;overflow-x:auto!important;}#content .smart-world-clock-widget .dashboard-digital-clock-strip{justify-content:flex-start!important;overflow-x:auto!important;}}

/* V2.0.11 — hourly SAR/USD converter and five compact world clocks. */
#content .dashboard-smart-widgets{grid-template-columns:230px 220px 220px minmax(0,1fr)!important;gap:12px!important;align-items:stretch!important;}
#content .dashboard-smart-widgets>.smart-weather-widget,
#content .dashboard-smart-widgets>.smart-currency-widget{width:220px!important;height:138px!important;min-height:138px!important;}

#content .smart-currency-widget{display:grid!important;grid-template-rows:auto 1fr 1fr auto!important;gap:4px!important;padding:9px 10px!important;border-color:#93c5fd!important;background:linear-gradient(145deg,#f8fbff,#eaf3ff)!important;color:#1e3a8a!important;overflow:hidden!important;}
#content .currency-widget-title{display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:8px!important;min-width:0!important;}
#content .currency-widget-title strong{font-size:12px!important;color:#1e3a8a!important;white-space:nowrap!important;}
#content .currency-widget-title small{font-size:9px!important;color:#64748b!important;white-space:nowrap!important;}
#content .currency-converter-row{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;align-items:center!important;gap:7px!important;min-width:0!important;padding:2px 7px!important;border:1px solid #bfdbfe!important;border-radius:7px!important;background:#fff!important;}
#content .currency-converter-row>span{font-size:12px!important;font-weight:800!important;color:#1d4ed8!important;letter-spacing:.04em!important;}
#content .currency-converter-row input{width:100%!important;height:25px!important;min-height:25px!important;padding:0!important;border:0!important;background:transparent!important;color:#10233f!important;text-align:right!important;font-weight:800!important;font-variant-numeric:tabular-nums!important;outline:0!important;}
#content .currency-converter-row output{display:block!important;min-width:0!important;color:#1d4ed8!important;text-align:right!important;font-weight:800!important;font-variant-numeric:tabular-nums!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#content .currency-widget-foot{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:5px!important;min-width:0!important;color:#475569!important;}
#content .currency-widget-foot span,#content .currency-widget-foot small{font-size:9px!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#content .currency-widget-foot span{flex:1 1 auto!important;}
#content .currency-widget-foot small{flex:0 0 auto!important;}
#content .ops-dashboard .currency-converter-row input,
#content .ops-dashboard .currency-converter-row output{font-size:var(--dashboard-display-font-size)!important;line-height:1!important;}

#content .smart-world-clock-widget .dashboard-digital-clock-strip{justify-content:flex-start!important;gap:6px!important;}

body.dark-theme #content .smart-currency-widget{background:linear-gradient(145deg,#172554,#1e3a5f)!important;border-color:#3b82f6!important;color:#dbeafe!important;}
body.dark-theme #content .currency-widget-title strong,body.dark-theme #content .currency-converter-row>span{color:#bfdbfe!important;}
body.dark-theme #content .currency-widget-title small,body.dark-theme #content .currency-widget-foot{color:#cbd5e1!important;}
body.dark-theme #content .currency-converter-row{background:#172033!important;border-color:#3b82f6!important;}
body.dark-theme #content .currency-converter-row input,body.dark-theme #content .currency-converter-row output{color:#f8fafc!important;}
@media(max-width:1450px){#content .dashboard-smart-widgets{grid-template-columns:230px 220px 220px!important;}#content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:1/-1!important;}}
@media(max-width:850px){#content .dashboard-smart-widgets{grid-template-columns:1fr 1fr!important;}#content .dashboard-smart-widgets>.smart-weather-widget,#content .dashboard-smart-widgets>.smart-currency-widget{width:100%!important;}#content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:1/-1!important;}}
@media(max-width:620px){#content .dashboard-smart-widgets{grid-template-columns:1fr!important;}#content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:auto!important;}}

/* V2.0.12 — selectable currencies with one-touch base/exchange swapping. */
#content .smart-currency-widget{position:relative!important;}
#content .currency-converter-row{grid-template-columns:70px minmax(0,1fr)!important;padding:2px 7px!important;}
#content .currency-converter-row select{width:100%!important;height:25px!important;min-width:0!important;min-height:25px!important;padding:0 16px 0 0!important;border:0!important;background-color:transparent!important;color:#1d4ed8!important;font-size:12px!important;font-weight:800!important;outline:0!important;}
#content .currency-swap-button{position:absolute!important;z-index:4!important;top:58px!important;left:50%!important;display:grid!important;place-items:center!important;width:28px!important;height:28px!important;padding:0!important;transform:translateX(-50%)!important;border:1px solid #93c5fd!important;border-radius:50%!important;background:#1d4ed8!important;color:#fff!important;font-size:17px!important;font-weight:800!important;line-height:1!important;box-shadow:0 2px 6px rgba(29,78,216,.18)!important;}
#content .currency-base-row{padding-bottom:4px!important;}
#content .currency-result-row{padding-top:4px!important;}
body.dark-theme #content .currency-converter-row select{color:#bfdbfe!important;}
body.dark-theme #content .currency-swap-button{border-color:#60a5fa!important;background:#2563eb!important;color:#fff!important;}

/* V2.0.13 — clickable Critical Path shipment cells and softer status rectangles. */
#critical-path-table .cp-cell-shipment.shipment-status-clickable{
  cursor:pointer!important;
}
#critical-path-table .cp-cell-shipment.shipment-status-clickable:hover{
  background:#eef6ff!important;
}
#critical-path-table .cp-cell-shipment.shipment-status-clickable:focus-visible{
  outline:2px solid #2563eb!important;
  outline-offset:-3px!important;
}

/* Positive statuses: light green rectangle with dark green text. */
#critical-path-table select.sample-approved,
#critical-path-table select.prod-complete,
#critical-path-table .sample-mgmt-stage-btn.sample-mgmt-approved,
#critical-path-table .stage-view-badge.stage-view-approved,
#critical-path-table .qc-result.qc-pass,
#critical-path-table .shipment-status-badge.shipment-received,
#critical-path-table .shipment-status-badge.shipment-landed,
#critical-path-table .critical-received-badge.received{
  background:#dcfce7!important;
  background-color:#dcfce7!important;
  color:#166534!important;
  -webkit-text-fill-color:#166534!important;
  border:1px solid #bbf7d0!important;
  border-radius:4px!important;
  box-shadow:none!important;
}

/* V2.0.18 — category measurement templates with full per-size grading. */
.tp-template-panel .panel-head>div{display:flex!important;flex-direction:column!important;gap:3px!important;}
.tp-template-list{width:100%!important;min-width:980px!important;border-collapse:collapse!important;background:#fff!important;}
.tp-template-list th,.tp-template-list td{padding:9px 10px!important;border:1px solid #d7dee7!important;vertical-align:middle!important;text-align:left!important;}
.tp-template-list th{background:#e3e8ed!important;color:#26364d!important;font-weight:800!important;white-space:nowrap!important;}
.tp-template-list td small{display:block!important;margin-top:2px!important;color:#64748b!important;}
.tp-template-warning{display:inline-flex!important;padding:3px 6px!important;border:1px solid #fbbf24!important;border-radius:4px!important;background:#fef3c7!important;color:#92400e!important;font-weight:700!important;}
.modal-card.tp-template-modal{width:min(1500px,98vw)!important;max-width:1500px!important;}
.tp-template-category-row{display:grid!important;grid-template-columns:minmax(240px,360px) minmax(0,1fr)!important;align-items:end!important;gap:10px!important;padding:10px!important;}
.tp-template-category-row .form-group{margin:0!important;}
.tp-template-guidance{display:flex!important;flex-direction:column!important;gap:2px!important;min-height:58px!important;padding:8px 10px!important;border:1px solid #bfdbfe!important;border-radius:5px!important;background:#eff6ff!important;color:#334155!important;}
.tp-template-guidance strong{color:#1d4ed8!important;}
.tp-template-table-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:8px 10px!important;border-top:1px solid #dce2e8!important;border-bottom:1px solid #dce2e8!important;background:#f8fafc!important;}
.tp-template-table-head>div{display:flex!important;flex-direction:column!important;gap:2px!important;}
.tp-template-table-head span{color:#64748b!important;}
.tp-template-measure-table{width:max-content!important;min-width:100%!important;}
.tp-template-measure-table th:nth-child(2),.tp-template-measure-table td:nth-child(2){position:sticky!important;left:35px!important;z-index:2!important;background:#fff!important;min-width:230px!important;}
.tp-template-measure-table thead th:nth-child(2){z-index:4!important;background:#f2f4f6!important;}
.tp-template-measure-table th:first-child,.tp-template-measure-table td:first-child{position:sticky!important;left:0!important;z-index:3!important;background:#fff!important;}
.tp-template-measure-table thead th:first-child{z-index:5!important;background:#f2f4f6!important;}
.tp-template-measure-table .tp-size-heading{min-width:86px!important;text-align:center!important;}
.tp-template-measure-table .tp-template-value{min-width:76px!important;text-align:center!important;}
.tp-template-measure-table .tp-template-tolerance{min-width:100px!important;}
.tp-measure-empty-note{padding:10px!important;color:#64748b!important;background:#f8fafc!important;border-top:1px solid #e2e8f0!important;}
body.dark-theme .tp-template-list{background:var(--ui-dark-panel,#172033)!important;}
body.dark-theme .tp-template-list th{background:var(--ui-dark-soft,#243044)!important;color:var(--ui-dark-heading,#f8fafc)!important;border-color:var(--ui-dark-border,#475569)!important;}
body.dark-theme .tp-template-list td{color:var(--ui-dark-text,#e2e8f0)!important;border-color:var(--ui-dark-border,#475569)!important;}
body.dark-theme .tp-template-guidance{background:#172d4d!important;border-color:#315a8d!important;color:#dbeafe!important;}
body.dark-theme .tp-template-table-head{background:var(--ui-dark-soft,#243044)!important;border-color:var(--ui-dark-border,#475569)!important;}
body.dark-theme .tp-template-measure-table th:nth-child(2),body.dark-theme .tp-template-measure-table td:nth-child(2),body.dark-theme .tp-template-measure-table th:first-child,body.dark-theme .tp-template-measure-table td:first-child{background:var(--ui-dark-panel,#172033)!important;}
body.dark-theme .tp-template-measure-table thead th:nth-child(2),body.dark-theme .tp-template-measure-table thead th:first-child{background:var(--ui-dark-soft,#243044)!important;}
body.dark-theme .tp-measure-empty-note{background:var(--ui-dark-soft,#243044)!important;color:var(--ui-dark-muted,#cbd5e1)!important;border-color:var(--ui-dark-border,#475569)!important;}
@media(max-width:760px){.tp-template-category-row{grid-template-columns:1fr!important}.tp-page-actions{align-items:stretch!important}}

/* V2.0.19 — compact Tech Pack forms and unobstructed measurement grading. */
.tp-page-head h2{font-size:22px!important;line-height:1.15!important;}
.modal-card.tp-modal-card{width:98vw!important;max-width:none!important;}
.modal-card.tp-modal-card .modal-head{min-height:56px!important;padding:10px 14px!important;}
.modal-card.tp-modal-card .modal-head h3{font-size:20px!important;line-height:1.2!important;color:#10233f!important;}
.tp-section-head strong{font-size:15px!important;line-height:1.2!important;}
.tp-template-table-head strong{font-size:15px!important;line-height:1.2!important;color:#10233f!important;}
.tp-template-table-head span,.tp-section-head span{font-size:12px!important;line-height:1.3!important;}

.tp-measure-wrap{overflow-x:hidden!important;}
.tp-measure-table,.tp-template-measure-table{width:100%!important;min-width:0!important;table-layout:fixed!important;}
.tp-measure-table col.tp-col-number{width:34px!important;}
.tp-measure-table col.tp-col-pom{width:230px!important;}
.tp-measure-table col.tp-col-tolerance{width:82px!important;}
.tp-measure-table col.tp-col-size{width:52px!important;}
.tp-measure-table col.tp-col-action{width:32px!important;}
.tp-measure-table th,.tp-measure-table td{padding:3px!important;}
.tp-measure-table th{font-size:12px!important;text-align:center!important;}
.tp-measure-table th:nth-child(2){text-align:left!important;}
.tp-measure-table input{height:28px!important;min-width:0!important;padding:3px 4px!important;font-size:12px!important;}
.tp-measure-table .tp-pom,.tp-template-measure-table .tp-template-pom{min-width:0!important;}
.tp-measure-table .tp-tolerance,.tp-template-measure-table .tp-template-tolerance{min-width:0!important;text-align:center!important;}
.tp-template-measure-table .tp-size-heading,.tp-measure-table .tp-size-heading{min-width:0!important;text-align:center!important;}
.tp-template-measure-table .tp-template-value,.tp-measure-table .tp-measure-value{min-width:0!important;text-align:center!important;}
.tp-template-measure-table th:nth-child(2),.tp-template-measure-table td:nth-child(2),
.tp-template-measure-table th:first-child,.tp-template-measure-table td:first-child{position:static!important;left:auto!important;z-index:auto!important;}
.tp-template-measure-table td:nth-child(2),.tp-template-measure-table td:first-child{background:#fff!important;}
.tp-template-measure-table thead th:nth-child(2),.tp-template-measure-table thead th:first-child{background:#e1e6eb!important;}

/* The remaining Tech Pack edit tables use predictable widths and no desktop scrollbar. */
.tp-construction-table,.tp-branding-table,.tp-attached-table{table-layout:fixed!important;min-width:0!important;}
.tp-construction-table th:first-child,.tp-branding-table th:first-child{width:36px!important;}
.tp-construction-table th:nth-child(2),.tp-construction-table th:nth-child(3){width:22%!important;}
.tp-construction-table th:nth-child(4){width:80px!important;}
.tp-construction-table th:last-child,.tp-branding-table th:last-child,.tp-attached-table th:last-child{width:36px!important;}
.tp-branding-table th:nth-child(2){width:21%!important;}.tp-branding-table th:nth-child(3){width:18%!important;}.tp-branding-table th:nth-child(4){width:20%!important;}.tp-branding-table th:nth-child(5){width:16%!important;}.tp-branding-table th:nth-child(6){width:14%!important;}
.tp-attached-table th:nth-child(1){width:105px!important;}.tp-attached-table th:nth-child(2){width:150px!important;}.tp-attached-table th:nth-child(3){width:190px!important;}.tp-attached-table th:nth-child(4){width:60px!important;}.tp-attached-table th:nth-child(5){width:135px!important;}.tp-attached-table th:nth-child(6){width:70px!important;}
body.dark-theme .modal-card.tp-modal-card .modal-head h3,body.dark-theme .tp-template-table-head strong{color:var(--ui-dark-heading)!important;}
body.dark-theme .tp-template-measure-table td:nth-child(2),body.dark-theme .tp-template-measure-table td:first-child{background:var(--ui-dark-surface-1)!important;}
body.dark-theme .tp-template-measure-table thead th:nth-child(2),body.dark-theme .tp-template-measure-table thead th:first-child{background:var(--ui-dark-surface-2)!important;}

@media(max-width:1100px){
 .tp-measure-wrap,.tp-form-section>.table-wrap{overflow-x:auto!important;}
 .tp-measure-table{min-width:980px!important;}
 .tp-construction-table{min-width:760px!important;}.tp-branding-table{min-width:850px!important;}.tp-attached-table{min-width:980px!important;}
}

/* V2.0.20 — spreadsheet-style Tech Pack measurement cells. */
.tp-editable-grid tbody td{height:34px!important;padding:0!important;background:#fff!important;}
.tp-editable-grid tbody td:first-child,.tp-editable-grid tbody td:last-child{padding:3px!important;}
.tp-editable-grid tbody input{
 display:block!important;width:100%!important;height:33px!important;margin:0!important;padding:4px 6px!important;
 border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
 color:#1f2937!important;outline:0!important;
}
.tp-editable-grid tbody :is(.tp-measure-value,.tp-template-value,.tp-tolerance,.tp-template-tolerance){text-align:center!important;}
.tp-editable-grid tbody input:hover{background:#f8fafc!important;}
.tp-editable-grid tbody input:focus{background:#eff6ff!important;box-shadow:inset 0 0 0 2px #2563eb!important;}
.tp-editable-grid tbody td:focus-within{background:#eff6ff!important;}
.tp-editable-grid tbody input::placeholder{color:#94a3b8!important;opacity:1!important;}
body.dark-theme .tp-editable-grid tbody td{background:var(--ui-dark-surface-1)!important;}
body.dark-theme .tp-editable-grid tbody input{background:transparent!important;color:var(--ui-dark-text)!important;border:0!important;}
body.dark-theme .tp-editable-grid tbody input:hover{background:var(--ui-dark-input)!important;}
body.dark-theme .tp-editable-grid tbody input:focus,body.dark-theme .tp-editable-grid tbody td:focus-within{background:#17345f!important;}

/* Negative statuses: light red rectangle with dark red text. */
#critical-path-table select.sample-rejected,
#critical-path-table .sample-mgmt-stage-btn.sample-mgmt-rejected,
#critical-path-table .stage-view-badge.stage-view-rejected,
#critical-path-table .qc-result.qc-fail{
  background:#fee2e2!important;
  background-color:#fee2e2!important;
  color:#991b1b!important;
  -webkit-text-fill-color:#991b1b!important;
  border:1px solid #fecaca!important;
  border-radius:4px!important;
  box-shadow:none!important;
}

/* Keep all affected status controls rectangular with only slightly curved corners. */
#critical-path-table select.sample-status,
#critical-path-table select.production-status,
#critical-path-table .sample-mgmt-stage-btn,
#critical-path-table .stage-view-badge,
#critical-path-table .qc-result,
#critical-path-table .shipment-status-badge,
#critical-path-table .critical-received-badge{
  border-radius:4px!important;
}

/* Higher-specificity current-stage rules keep the same light semantic labels. */
#critical-path-table tbody tr td.critical-current-stage select.sample-approved,
#critical-path-table tbody tr td.critical-current-stage select.prod-complete,
#critical-path-table tbody tr td.critical-current-stage .sample-mgmt-stage-btn.sample-mgmt-approved,
#critical-path-table tbody tr td.critical-current-stage .stage-view-badge.stage-view-approved,
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-pass,
#critical-path-table tbody tr td.critical-current-stage .shipment-status-badge.shipment-received,
#critical-path-table tbody tr td.critical-current-stage .shipment-status-badge.shipment-landed,
#critical-path-table tbody tr td.critical-current-stage .critical-received-badge.received{
  background:#dcfce7!important;
  background-color:#dcfce7!important;
  color:#166534!important;
  -webkit-text-fill-color:#166534!important;
  border:1px solid #bbf7d0!important;
  border-radius:4px!important;
}
#critical-path-table tbody tr td.critical-current-stage select.sample-rejected,
#critical-path-table tbody tr td.critical-current-stage .sample-mgmt-stage-btn.sample-mgmt-rejected,
#critical-path-table tbody tr td.critical-current-stage .stage-view-badge.stage-view-rejected,
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-fail{
  background:#fee2e2!important;
  background-color:#fee2e2!important;
  color:#991b1b!important;
  -webkit-text-fill-color:#991b1b!important;
  border:1px solid #fecaca!important;
  border-radius:4px!important;
}

.critical-shipment-choice>p{margin:0 0 12px;color:#475569;}
.critical-shipment-choice-list{display:flex;flex-direction:column;gap:8px;}
.critical-shipment-choice-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#172033;text-align:left;cursor:pointer;}
.critical-shipment-choice-row:hover{border-color:#60a5fa;background:#eff6ff;}
.critical-shipment-choice-row>span:first-child{display:flex;flex-direction:column;gap:3px;min-width:0;}
.critical-shipment-choice-row small{color:#64748b;}
body.dark-theme #critical-path-table .cp-cell-shipment.shipment-status-clickable:hover{background:#24344b!important;}
body.dark-theme .critical-shipment-choice>p,body.dark-theme .critical-shipment-choice-row small{color:#cbd5e1;}
body.dark-theme .critical-shipment-choice-row{border-color:#526176;background:#172033;color:#f8fafc;}
body.dark-theme .critical-shipment-choice-row:hover{border-color:#60a5fa;background:#24344b;}

/* V2.0.14 — definitive Critical Path QC PASS / FAIL rectangles. */
#critical-path-table tbody td .qc-result.qc-pass,
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-pass{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:54px!important;
  height:22px!important;
  min-height:22px!important;
  padding:3px 7px!important;
  background:#dcfce7!important;
  background-color:#dcfce7!important;
  color:#166534!important;
  -webkit-text-fill-color:#166534!important;
  border:1px solid #bbf7d0!important;
  border-radius:4px!important;
  box-shadow:none!important;
}
#critical-path-table tbody td .qc-result.qc-fail,
#critical-path-table tbody tr td.critical-current-stage .qc-result.qc-fail{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:54px!important;
  height:22px!important;
  min-height:22px!important;
  padding:3px 7px!important;
  background:#fee2e2!important;
  background-color:#fee2e2!important;
  color:#991b1b!important;
  -webkit-text-fill-color:#991b1b!important;
  border:1px solid #fecaca!important;
  border-radius:4px!important;
  box-shadow:none!important;
}

/* V2.0.22 — organisation asset libraries and generated Product Datasheets. */
.database-asset-identity{display:flex;align-items:center;gap:10px;min-width:0}.database-asset-identity>span{display:flex;flex-direction:column;gap:3px;min-width:0}.database-asset-identity small{color:var(--muted);font-size:12px}.asset-thumb,.asset-editor-preview{width:48px;height:38px;object-fit:contain;border:1px solid #cbd5e1;border-radius:5px;background:#fff;padding:3px;flex:0 0 auto}.asset-thumb-empty{display:flex;align-items:center;justify-content:center;color:#64748b;font-size:9px;text-align:center}.asset-editor-preview{width:120px;height:72px}.database-colour-swatch{width:48px;height:30px;border:1px solid #94a3b8;border-radius:4px;flex:0 0 auto}.database-colour-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:5px;border:1px solid #94a3b8}.database-image-current{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #d5dce5;background:#f8fafc;border-radius:6px;margin-bottom:8px}.database-remove-image{display:inline-flex!important;margin-top:8px;width:auto}.database-asset-form{max-width:760px;margin:auto}.product-asset-option .option-asset-icon{width:30px;height:25px;object-fit:contain;border:0;background:transparent;padding:0}.product-image-editor{display:grid;grid-template-columns:190px 1fr;gap:16px;align-items:center}.product-image-editor>img,.product-image-empty{width:190px;height:160px;object-fit:contain;border:1px solid #cbd5e1;border-radius:6px;background:#fff}.product-image-empty{display:flex;align-items:center;justify-content:center;color:#64748b;text-align:center;padding:20px}.product-feature-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.product-feature-grid textarea{min-height:150px}.product-care-list{grid-template-columns:repeat(3,minmax(0,1fr));max-height:300px}.product-datasheet-options{display:grid;grid-template-columns:minmax(320px,1fr) auto;gap:16px;align-items:end;margin-bottom:14px}.datasheet-generated-actions{display:flex;align-items:flex-end;padding-bottom:2px}.product-pdf-actions{display:flex;gap:5px;justify-content:center}.datasheet-pdf-btn.generated{font-size:11px;font-weight:800;color:#1d4ed8;background:#eff6ff;border:1px solid #93c5fd;border-radius:4px;padding:4px 6px}.datasheet-settings-grid{display:grid;grid-template-columns:minmax(300px,420px) minmax(400px,1fr);gap:28px;align-items:start}.datasheet-settings-controls{display:flex;flex-direction:column;gap:12px}.datasheet-colour-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.datasheet-settings-preview{--ds-primary:#d7192d;--ds-secondary:#3b3839;aspect-ratio:210/297;max-height:620px;margin:auto;border:1px solid #cbd5e1;box-shadow:0 8px 24px rgba(15,23,42,.12);background:#fff;padding:24px;display:flex;flex-direction:column;gap:15px;color:#253047}.ds-preview-head{display:flex;justify-content:space-between;align-items:center;border-bottom:9px solid var(--ds-primary);padding-bottom:10px}.ds-preview-head>div{display:flex;flex-direction:column}.ds-preview-head strong{font-size:21px;color:var(--ds-secondary)}.ds-preview-head span{font-size:14px;color:var(--ds-primary);font-weight:700}.ds-preview-head img{width:110px;height:45px;object-fit:contain}.ds-preview-spec{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.ds-preview-spec i{height:42px;border:1px solid #d4dae2;background:linear-gradient(#eef2f7 30%,#fff 30%)}.ds-preview-body{display:grid;grid-template-columns:1.05fr .95fr;gap:14px;flex:1}.ds-preview-product{border:1px solid #d4dae2;display:flex;align-items:center;justify-content:center;color:#94a3b8}.ds-preview-features{padding:12px;border-top:24px solid var(--ds-primary);line-height:1.8}.ds-preview-strip{height:50px;border-top:6px solid var(--ds-primary);background:repeating-linear-gradient(90deg,#fff,#fff 35px,#edf1f5 36px,#edf1f5 70px)}.ds-preview-footer{height:46px;background:var(--ds-secondary);color:#fff;display:flex;align-items:center;padding:10px;font-size:11px}.datasheet-preview-note{text-align:center;margin-top:10px}.generated-datasheet-modal{width:min(1040px,97vw)!important;max-width:1040px!important}.generated-datasheet-preview{background:#d9e0e7;padding:22px;overflow:auto;max-height:76vh}.generated-datasheet-preview .generated-product-datasheet{transform-origin:top center;box-shadow:0 8px 28px rgba(15,23,42,.18);margin:auto}.generated-datasheet-actions{padding:12px 18px;background:#fff;border-top:1px solid #d1d9e2}.generated-product-datasheet{width:794px;height:1123px;overflow:hidden;padding:45px 49px 38px;background:#fff;color:#263247;font-family:Arial,Helvetica,sans-serif;display:flex;flex-direction:column;gap:15px;box-sizing:border-box}.generated-product-datasheet *{box-sizing:border-box}.gds-header{min-height:94px;display:flex;justify-content:space-between;align-items:center;border-bottom:8px solid var(--ds-primary);padding-bottom:15px}.gds-title h1{margin:0;color:var(--ds-secondary);font-size:31px;line-height:1.05;text-transform:uppercase}.gds-title span{display:block;color:var(--ds-primary);font-size:19px;font-weight:700;margin-top:7px}.gds-brand{width:170px;height:72px;display:flex;justify-content:flex-end;align-items:center;color:var(--ds-primary);font-size:24px}.gds-brand img,.gds-footer-brand img{max-width:100%;max-height:100%;object-fit:contain}.generated-product-datasheet h2{margin:0 0 7px;color:var(--ds-primary);font-size:16px;text-transform:uppercase}.gds-spec-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #d5d9df}.gds-spec-grid>div{padding:8px 9px;min-height:48px;border-right:1px solid #d5d9df;border-bottom:1px solid #d5d9df}.gds-spec-grid>div:nth-child(4n){border-right:0}.gds-spec-grid span{display:block;color:#667085;font-size:10px;text-transform:uppercase}.gds-spec-grid strong{display:block;margin-top:4px;font-size:13px;line-height:1.2}.gds-care>div{display:flex;gap:15px;align-items:flex-start;flex-wrap:wrap}.gds-care-item{width:120px;text-align:center;color:#333;font-size:10px;line-height:1.15}.gds-care-item img,.gds-icon-placeholder{width:53px;height:53px;object-fit:contain;margin:0 auto 4px;display:flex;align-items:center;justify-content:center;border:1px solid #cbd5e1;color:#64748b;font-size:8px}.gds-main{display:grid;grid-template-columns:1.05fr .95fr;gap:26px;min-height:397px;flex:1}.gds-product-image{border:1px solid #d5d9df;display:flex;align-items:center;justify-content:center;min-height:390px;color:#94a3b8}.gds-product-image img{width:100%;height:100%;max-height:420px;object-fit:contain}.gds-product-info{padding-top:4px}.gds-product-info ul{margin:0 0 18px;padding-left:19px;font-size:12px;line-height:1.45}.gds-colours{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:18px}.gds-colours>div{display:flex;align-items:center;gap:7px;font-size:11px}.gds-colours img,.gds-colours i{width:45px;height:30px;object-fit:cover;border:1px solid #aab2bd;display:block}.gds-colours small{display:block;color:#667085}.gds-sizes{display:flex;gap:6px;flex-wrap:wrap}.gds-sizes span{min-width:38px;padding:6px;border:1px solid var(--ds-primary);color:var(--ds-primary);font-size:11px;font-weight:700;text-align:center}.gds-standards{border-top:1px solid #d5d9df;padding-top:11px}.gds-standards>div{display:flex;gap:15px;align-items:flex-start;flex-wrap:wrap}.gds-standards>div>div{width:102px;text-align:center;font-size:9px;line-height:1.1}.gds-standards img,.gds-standards .gds-icon-placeholder{width:68px;height:53px;object-fit:contain;margin:0 auto 4px}.gds-standards strong{display:block}.gds-footer{height:76px;margin:0 -49px -38px;padding:11px 49px;background:var(--ds-secondary);color:#fff;display:grid;grid-template-columns:136px 1fr auto;align-items:center;gap:18px}.gds-footer-brand{height:49px;display:flex;align-items:center}.gds-footer p{margin:0;font-size:11px;line-height:1.3}.gds-footer>span{font-size:20px;font-weight:700;opacity:.13;text-transform:uppercase}.gds-empty{color:#667085;font-size:11px}
@media(max-width:900px){.datasheet-settings-grid{grid-template-columns:1fr}.product-feature-grid{grid-template-columns:1fr}.product-care-list{grid-template-columns:1fr 1fr}.product-datasheet-options{grid-template-columns:1fr}.generated-datasheet-preview .generated-product-datasheet{transform:scale(.72);margin-bottom:-314px}.product-image-editor{grid-template-columns:1fr}.product-image-editor>img,.product-image-empty{width:100%;max-width:260px}.database-grid{grid-template-columns:1fr}}
body.dark-theme .database-image-current{background:#172033;border-color:#526176}body.dark-theme .asset-thumb,body.dark-theme .asset-editor-preview,body.dark-theme .product-image-editor>img,body.dark-theme .product-image-empty{background:#fff}body.dark-theme .datasheet-settings-preview{color:#253047}

/* V2.0.23 — fabric-linked Product identity. */
.product-basic-grid .product-generated-name-field{grid-column:1/-1!important}.product-generated-name-field input[readonly]{font-weight:700;color:#183153;background:#eef4fb;border-color:#9eb6d2}.product-name-duplicate-message{display:block;margin-top:5px;color:#51657d}.product-name-duplicate-message.duplicate{color:#b42318;font-weight:700}.product-linked-fabric-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:10px 11px 0;padding:11px;border:1px solid #b7c3d1;border-radius:6px;background:#e9eef4}.product-linked-fabric-grid .form-group{margin:0;min-width:0}.product-linked-fabric-grid input[readonly]{font-weight:700;color:#334155;background:#f8fafc;border-color:#b9c5d2}.product-linked-fabric-grid label{color:#41536a}.product-linked-fabric-grid input{width:100%;box-sizing:border-box}.product-basic-grid select[name="fabricId"] option{font-size:12px}
body.dark-theme .product-linked-fabric-grid{background:#172033;border-color:#526176}body.dark-theme .product-linked-fabric-grid input[readonly],body.dark-theme .product-generated-name-field input[readonly]{background:#24344b;border-color:#64748b;color:#f8fafc}body.dark-theme .product-linked-fabric-grid label{color:#cbd5e1}
@media(max-width:1050px){.product-linked-fabric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.product-linked-fabric-grid{grid-template-columns:1fr 1fr}.product-basic-grid .product-generated-name-field{grid-column:auto!important}}

/* V2.0.24 — editable Product and Fabric setup lists. */
.database-edit-link-note{margin-top:10px;padding:10px 12px;border:1px solid #a9bdd3;border-radius:6px;background:#eaf2fb;color:#294766;font-size:12px}.db-item>.row-actions{flex:0 0 auto}.fabric-setup-grid .db-item>.row-actions{display:flex;gap:7px;align-items:center}body.dark-theme .database-edit-link-note{background:#20334a;border-color:#58708b;color:#dbeafe}

/* V2.0.25 — configurable Product Datasheet typography and compact asset layout. */
.datasheet-font-settings{margin:0;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--panel-soft)}
.datasheet-font-settings legend{padding:0 6px;font-weight:700;color:var(--text)}
.datasheet-font-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.datasheet-font-controls .form-group{margin:0}
.datasheet-settings-preview{--preview-product-name:23px;--preview-heading:12px;--preview-body:9px;--preview-footer:8px}
.ds-preview-head strong{font-size:var(--preview-product-name)}
.ds-preview-head span,.ds-preview-features>strong,.ds-preview-standards>strong{font-size:var(--preview-heading)}
.ds-preview-features{padding:8px 10px;border-top:0;line-height:1.45;display:flex;flex-direction:column;gap:5px;font-size:var(--preview-body)}
.ds-preview-features>strong{color:var(--ds-primary);margin-top:3px}
.ds-preview-care{line-height:1.55}
.ds-preview-standards{border-top:1px solid #d5d9df;padding-top:7px;text-align:left}
.ds-preview-standards>strong{display:block;color:var(--ds-primary);margin-bottom:6px}
.ds-preview-standards>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}
.ds-preview-standards span{flex:0 0 calc((100% - 35px)/8);max-width:calc((100% - 35px)/8);min-width:0;text-align:center;font-size:var(--preview-body);line-height:1.1}
.ds-preview-standards i{display:block;width:22px;height:16px;margin:0 auto 3px;background:#e7ebf0;border:0}
.ds-preview-footer{justify-content:center;text-align:center;font-size:var(--preview-footer)}
.generated-product-datasheet{--ds-product-name-font:23pt;--ds-heading-font:12pt;--ds-body-font:9pt;--ds-footer-font:8pt}
.gds-title h1{font-size:var(--ds-product-name-font)}
.gds-title span,.generated-product-datasheet h2{font-size:var(--ds-heading-font)}
.gds-main{align-items:start}
.gds-product-image{align-self:start}
.gds-product-info{padding-top:0}
.gds-product-info ul{margin-bottom:15px;font-size:var(--ds-body-font);line-height:1.4}
.gds-care-list{display:flex;flex-direction:column;gap:7px;margin:0 0 15px}
.gds-care-row{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:9px;min-height:34px;font-size:var(--ds-body-font);line-height:1.25}
.gds-care-row img,.gds-care-placeholder{width:34px;height:34px;object-fit:contain;border:0;background:transparent;display:flex;align-items:center;justify-content:center;color:#64748b;font-size:7px}
.gds-standards-grid{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:flex-start;gap:8px;row-gap:11px}
.gds-standards-grid>div{flex:0 0 calc((100% - 56px)/8);max-width:calc((100% - 56px)/8);min-width:0;text-align:center;font-size:var(--ds-body-font);line-height:1.15}
.gds-standards-grid img,.gds-standards-grid .gds-icon-placeholder{width:52px;height:40px;object-fit:contain;margin:0 auto 4px;border:0}
.gds-standards-grid strong{display:block;font-size:inherit;font-weight:400;overflow-wrap:anywhere}
.gds-footer{grid-template-columns:136px 1fr 136px}
.gds-footer p{width:100%;font-size:var(--ds-footer-font);text-align:center;justify-self:center}
.gds-footer>span{text-align:right}
@media(max-width:900px){.datasheet-font-controls{grid-template-columns:1fr}.ds-preview-standards span{flex-basis:calc((100% - 15px)/4);max-width:calc((100% - 15px)/4)}}

/* V2.0.26 — live Product Datasheet spacing controls. */
.datasheet-spacing-settings{margin:0;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--panel-soft)}
.datasheet-spacing-settings legend{padding:0 6px;font-weight:700;color:var(--text)}
.datasheet-spacing-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.datasheet-spacing-controls .form-group{margin:0;display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px 10px}
.datasheet-spacing-controls label{grid-column:1/-1}
.datasheet-spacing-controls input[type="range"]{width:100%;min-width:0;margin:0;accent-color:var(--primary)}
.datasheet-spacing-controls output{min-width:40px;text-align:right;color:var(--muted);font-size:12px;font-weight:700}
.datasheet-spacing-wide{grid-column:1/-1}
.datasheet-settings-grid>div:nth-child(2){position:sticky;top:14px;align-self:start}
.datasheet-settings-preview{--preview-specifications-spacer:4mm;--preview-features-spacer:4mm;--preview-care-spacer:4mm;--preview-colours-spacer:4mm;--preview-sizes-spacer:0mm;gap:0}
.ds-preview-head{margin-bottom:15px}
.ds-preview-body{margin-top:var(--preview-specifications-spacer);min-height:0;overflow:hidden}
.ds-preview-product{height:100%;align-self:stretch}
.ds-preview-features{gap:0;min-height:0;overflow:hidden}
.ds-preview-info-block{display:flex;flex-direction:column;gap:3px;min-width:0}
.ds-preview-feature-block{margin-bottom:var(--preview-features-spacer)}
.ds-preview-care-block{margin-bottom:var(--preview-care-spacer)}
.ds-preview-colours-block{margin-bottom:var(--preview-colours-spacer)}
.ds-preview-sizes-block{padding-bottom:var(--preview-sizes-spacer)}
.ds-preview-info-block>strong{color:var(--ds-primary);font-size:var(--preview-heading)}
.ds-preview-standards{flex:0 0 auto}
.ds-preview-footer{margin-top:15px;flex:0 0 auto}
.generated-product-datasheet{--ds-specifications-spacer:4mm;--ds-features-spacer:4mm;--ds-care-spacer:4mm;--ds-colours-spacer:4mm;--ds-sizes-spacer:0mm;gap:0}
.generated-product-datasheet .gds-header{margin-bottom:15px}
.generated-product-datasheet .gds-main{min-height:0;flex:1 1 auto;align-items:stretch;margin-top:var(--ds-specifications-spacer);overflow:hidden}
.generated-product-datasheet .gds-product-image{min-height:0;height:100%;align-self:stretch}
.generated-product-datasheet .gds-product-info{min-height:0}
.generated-product-datasheet .gds-info-section{margin:0}
.generated-product-datasheet .gds-info-features{margin-bottom:var(--ds-features-spacer)}
.generated-product-datasheet .gds-info-care{margin-bottom:var(--ds-care-spacer)}
.generated-product-datasheet .gds-info-colours{margin-bottom:var(--ds-colours-spacer)}
.generated-product-datasheet .gds-info-sizes{padding-bottom:var(--ds-sizes-spacer)}
.generated-product-datasheet .gds-product-info ul,.generated-product-datasheet .gds-care-list,.generated-product-datasheet .gds-colours{margin-bottom:0}
.generated-product-datasheet .gds-standards{flex:0 0 auto}
.generated-product-datasheet .gds-footer{margin:15px -49px -38px;flex:0 0 auto}
@media(max-width:900px){.datasheet-spacing-controls{grid-template-columns:1fr}.datasheet-spacing-wide{grid-column:auto}.datasheet-settings-grid>div:nth-child(2){position:static}}

/* V2.0.27 — verified Datasheet saving, numeric spacing inputs and complete body typography. */
.datasheet-spacing-number{display:grid;grid-template-columns:54px auto;align-items:center;gap:5px}
.datasheet-spacing-number input{width:54px;min-width:54px;text-align:center;padding-left:5px;padding-right:5px}
.datasheet-spacing-number b{color:var(--muted);font-size:11px;font-weight:700}
.datasheet-save-bar{position:sticky;bottom:0;z-index:4;margin:16px -1px -1px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:7px;background:var(--panel);box-shadow:0 -5px 18px rgba(15,23,42,.08)}
.datasheet-save-status{font-size:12px;font-weight:700;line-height:1.35}
.datasheet-save-status.ready{color:var(--muted)}
.datasheet-save-status.unsaved{color:#92400e}
.datasheet-save-status.saving{color:#1d4ed8}
.datasheet-save-status.saved{color:#166534}
.datasheet-save-status.error{color:#b91c1c}
.generated-product-datasheet .gds-spec-grid strong,.generated-product-datasheet .gds-colours>div,.generated-product-datasheet .gds-sizes span,.generated-product-datasheet .gds-standards-grid>div{font-size:var(--ds-body-font)}
.generated-product-datasheet .gds-colours small{font-size:.85em}
body.dark-theme .datasheet-save-bar{background:#172033;border-color:#526176}body.dark-theme .datasheet-save-status.unsaved{color:#fbbf24}body.dark-theme .datasheet-save-status.saved{color:#86efac}
@media(max-width:700px){.datasheet-save-bar{align-items:stretch;flex-direction:column}.datasheet-save-bar button{width:100%}}

/* V2.0.28 — configurable Datasheet section boxes and enforced title sizing. */
.datasheet-section-colour-settings{margin:0;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--panel-soft)}
.datasheet-section-colour-settings legend{padding:0 6px;font-weight:700;color:var(--text)}
.datasheet-section-colour-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.datasheet-section-colour-controls .form-group{margin:0}.datasheet-section-colour-controls input[type="color"]{width:100%;height:40px}
.datasheet-settings-preview{--ds-section-header:#c62828;--ds-section-bg:#eef1f4;--ds-section-border:#9aa6b2}
.ds-preview-head strong{font-size:var(--preview-product-name)!important}
.ds-preview-section-box,.ds-preview-info-block{border:1px solid var(--ds-section-border);border-radius:4px;background:var(--ds-section-bg);overflow:hidden}
.ds-preview-section-box>strong,.ds-preview-info-block>strong{display:block;margin:0;padding:4px 6px;background:var(--ds-section-header);color:#fff!important;font-size:var(--preview-heading)}
.ds-preview-spec{gap:0}.ds-preview-spec i{border:0;border-right:1px solid var(--ds-section-border);background:linear-gradient(var(--ds-section-bg) 30%,rgba(255,255,255,.6) 30%)}.ds-preview-spec i:last-child{border-right:0}
.ds-preview-info-block>span{display:block;padding:5px 7px}
.generated-product-datasheet{--ds-section-header:#c62828;--ds-section-bg:#eef1f4;--ds-section-border:#9aa6b2}
.generated-product-datasheet .gds-title h1{font-size:var(--ds-product-name-font)!important}
.generated-product-datasheet .gds-footer p{font-size:var(--ds-footer-font)!important}
.generated-product-datasheet .gds-section-box,.generated-product-datasheet .gds-info-section{border:1px solid var(--ds-section-border);border-radius:6px;background:var(--ds-section-bg);overflow:hidden}
.generated-product-datasheet .gds-section-box>h2,.generated-product-datasheet .gds-info-section>h2{margin:0!important;padding:6px 9px;background:var(--ds-section-header);color:#fff!important}
.generated-product-datasheet .gds-spec-grid{border:0;background:var(--ds-section-bg)}
.generated-product-datasheet .gds-spec-grid>div{border-color:var(--ds-section-border)}
.generated-product-datasheet .gds-product-info ul{padding:9px 11px 9px 27px}
.generated-product-datasheet .gds-care-list,.generated-product-datasheet .gds-colours,.generated-product-datasheet .gds-sizes{padding:9px 11px}
.generated-product-datasheet .gds-info-sizes{padding-bottom:0;margin-bottom:var(--ds-sizes-spacer)}
@media(max-width:900px){.datasheet-section-colour-controls{grid-template-columns:1fr}}

/* V2.0.29 — compact Fabric Specifications and left-aligned boxed Standards. */
.ds-preview-spec{grid-template-columns:repeat(2,minmax(0,1fr))}
.ds-preview-spec span{min-height:25px;padding:5px 6px;display:flex;align-items:center;gap:3px;border-right:1px solid var(--ds-section-border);border-bottom:1px solid var(--ds-section-border);background:var(--ds-section-bg);color:#111;font-size:var(--preview-body);line-height:1.15}
.ds-preview-spec span:nth-child(2n){border-right:0}.ds-preview-spec span:nth-last-child(-n+2){border-bottom:0}.ds-preview-spec span b{color:#111;font-size:inherit}
.ds-preview-standards{padding-top:0;text-align:left}
.ds-preview-standards>div{justify-content:flex-start;padding:7px;background:var(--ds-section-bg)}
.generated-product-datasheet .gds-spec-grid>div{min-height:30px;padding:5px 8px;display:flex;align-items:center;gap:4px;color:#111}
.generated-product-datasheet .gds-spec-grid span,.generated-product-datasheet .gds-spec-grid strong{display:inline;margin:0;color:#111;font-size:var(--ds-body-font);text-transform:none;line-height:1.2}
.generated-product-datasheet .gds-spec-grid span{font-weight:700}.generated-product-datasheet .gds-spec-grid strong{font-weight:400}
.generated-product-datasheet .gds-standards{border:1px solid var(--ds-section-border);padding-top:0}
.generated-product-datasheet .gds-standards-grid{justify-content:flex-start;padding:9px 11px;background:var(--ds-section-bg)}

/* V2.0.33 — collapsible Products menu, dashboard list widgets and split Shipment Control. */
.nav-menu-group-title{
  width:100%!important;border:0!important;background:transparent!important;text-align:left!important;cursor:pointer!important;
}
.nav-menu-chevron{margin-left:auto!important;font-size:15px!important;line-height:1!important;transition:transform .16s ease!important}
.nav-menu-group.is-collapsed .nav-menu-chevron{transform:rotate(-90deg)!important}
.nav-menu-group.is-collapsed .nav-menu-group-children{display:none!important}
body.sidebar-collapsed .nav-menu-chevron{display:none!important}

#content .dashboard-smart-widgets{
  display:grid!important;
  grid-template-columns:minmax(230px,260px) minmax(390px,1fr) minmax(220px,250px) minmax(230px,260px)!important;
  gap:12px!important;align-items:stretch!important;margin-bottom:16px!important;overflow:visible!important;
}
#content .dashboard-smart-widgets>.smart-widget{
  width:100%!important;height:210px!important;min-height:210px!important;margin:0!important;border-radius:12px!important;
}
#content .smart-calendar-widget{width:100%!important;position:relative!important;overflow:visible!important}
#content .smart-calendar-summary{display:grid!important;grid-template-rows:auto 1fr 1fr!important;align-items:stretch!important;gap:5px!important;height:100%!important}
#content .smart-calendar-summary>.smart-calendar-title{align-self:start!important}
#content .smart-calendar-summary>.smart-calendar-compact-date{align-self:center!important}
#content .smart-calendar-local-time{
  display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:10px!important;
  min-width:0!important;padding-top:9px!important;border-top:1px solid #cbd5e1!important;
}
#content .smart-calendar-local-time>.smart-calendar-local-clock{font-size:26px!important;line-height:1!important;font-weight:800!important;color:#1d4ed8!important;font-variant-numeric:tabular-nums!important}
#content .smart-calendar-local-time>span{display:flex!important;min-width:0!important;flex-direction:column!important;gap:1px!important}
#content .smart-calendar-local-time b{font-size:13px!important;color:#172033!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .smart-calendar-local-time small{font-size:11px!important;color:#64748b!important;text-transform:none!important;letter-spacing:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

#content .dashboard-smart-widgets>.smart-world-clock-widget{
  display:flex!important;flex-direction:column!important;width:100%!important;height:210px!important;min-height:210px!important;
  padding:8px 10px!important;border:1px solid #b8c3cf!important;background:var(--panel)!important;color:var(--text)!important;overflow:hidden!important;
}
#content .dashboard-world-time-list{display:grid!important;grid-auto-rows:minmax(28px,1fr)!important;flex:1 1 auto!important;min-height:0!important}
#content .dashboard-world-time-row{
  position:relative!important;display:grid!important;grid-template-columns:minmax(100px,1.15fr) 74px minmax(112px,1fr) 58px 20px!important;
  align-items:center!important;gap:8px!important;min-width:0!important;padding:4px 2px!important;border-bottom:1px solid #dbe2ea!important;color:#172033!important;
}
#content .dashboard-world-time-row:last-child{border-bottom:0!important}
#content .world-time-place{display:flex!important;min-width:0!important;flex-direction:column!important;line-height:1.1!important}
#content .world-time-place strong{font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .world-time-place small{font-size:10px!important;color:#64748b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .dashboard-world-time-row>.digital-clock-time{font-size:20px!important;line-height:1!important;font-weight:800!important;color:#1d4ed8!important;font-variant-numeric:tabular-nums!important}
#content .world-time-date{font-size:11px!important;color:#475569!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .dashboard-world-time-row>.digital-clock-zone{font-size:11px!important;font-weight:800!important;color:#1d4ed8!important;text-align:right!important;white-space:nowrap!important}
#content .world-time-remove{display:grid!important;place-items:center!important;width:20px!important;height:20px!important;padding:0!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#94a3b8!important;font-size:16px!important}
#content .world-time-remove:hover{background:#fee2e2!important;color:#b91c1c!important}
#content .dashboard-world-time-row>.digital-clock-local{padding:2px 3px!important;border-radius:4px!important;background:#dbeafe!important;color:#1d4ed8!important;font-size:8px!important;text-align:center!important}
#content .dashboard-world-time-add{display:flex!important;flex:0 0 auto!important;align-items:center!important;gap:5px!important;margin-top:4px!important}
#content .dashboard-world-time-add select{flex:1 1 auto!important;min-width:0!important;height:27px!important;min-height:27px!important;padding:2px 6px!important;font-size:10px!important}
#content .dashboard-world-time-add button{height:27px!important;padding:2px 8px!important;border:0!important;border-radius:6px!important;background:#2563eb!important;color:#fff!important;font-size:10px!important;font-weight:800!important}

#content .dashboard-smart-widgets>.smart-weather-widget{width:100%!important;height:210px!important;min-height:210px!important;padding:15px!important}
#content .smart-weather-widget .weather-widget-icon{font-size:54px!important}
#content .smart-weather-widget .weather-compact-condition strong{font-size:34px!important}
#content .smart-weather-widget .weather-compact-location strong{font-size:16px!important}
#content .smart-weather-widget .weather-compact-location small{font-size:12px!important}

#content .dashboard-po-summary-widget{display:grid!important;grid-template-rows:auto repeat(4,1fr)!important;padding:10px 12px!important;border:1px solid #b8c3cf!important;background:var(--panel)!important;overflow:hidden!important}
#content .dashboard-po-summary-title{padding:0 2px 7px!important;border-bottom:1px solid #dbe2ea!important;color:#172033!important;font-size:13px!important;font-weight:800!important}
#content .dashboard-po-summary-widget button{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important;padding:5px 2px!important;border:0!important;border-bottom:1px solid #edf0f4!important;background:transparent!important;color:#475569!important;text-align:left!important;cursor:pointer!important}
#content .dashboard-po-summary-widget button:last-child{border-bottom:0!important}
#content .dashboard-po-summary-widget button:hover{background:#f8fafc!important}
#content .dashboard-po-summary-widget button span{font-size:11px!important}
#content .dashboard-po-summary-widget button strong{font-size:15px!important;color:#172033!important;white-space:nowrap!important;font-variant-numeric:tabular-nums!important}

#content .ops-pipeline-step,#content .ops-pipeline-step.has-value{
  background:#fff1f2!important;border-color:#fca5a5!important;color:#b91c1c!important;
}
#content .ops-pipeline-step .ops-pipeline-label,#content .ops-pipeline-step .ops-pipeline-count,
#content .ops-pipeline-step.has-value .ops-pipeline-label,#content .ops-pipeline-step.has-value .ops-pipeline-count{color:#b91c1c!important}
#content .ops-pipeline-step:hover,#content .ops-pipeline-step.has-value:hover{background:#ffe4e6!important}
#content .ops-pipeline-step.pipe-complete,#content .ops-pipeline-step.pipe-complete.has-value{background:#dcfce7!important;border-color:#86efac!important;color:#166534!important}
#content .ops-pipeline-step.pipe-complete .ops-pipeline-label,#content .ops-pipeline-step.pipe-complete .ops-pipeline-count{color:#166534!important}
#content .ops-pipeline-step.pipe-complete:hover{background:#bbf7d0!important}

.shipment-completed-section{margin:16px 10px 10px!important;border:1px solid #a7c7ae!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 1px 3px rgba(15,23,42,.06)!important}
.shipment-completed-titlebar{background:#eef8f0!important;border-bottom-color:#a7c7ae!important}
.shipment-completed-titlebar .shipment-control-title{color:#166534!important}
.shipment-completed-section .shipment-control-wrap{border:0!important}

body.dark-theme #content .smart-calendar-local-time{border-top-color:#526176!important}
body.dark-theme #content .smart-calendar-local-time b,body.dark-theme #content .dashboard-world-time-row,body.dark-theme #content .dashboard-po-summary-title,body.dark-theme #content .dashboard-po-summary-widget button strong{color:#f8fafc!important}
body.dark-theme #content .smart-calendar-local-time small,body.dark-theme #content .world-time-place small,body.dark-theme #content .world-time-date,body.dark-theme #content .dashboard-po-summary-widget button{color:#cbd5e1!important}
body.dark-theme #content .dashboard-world-time-row,body.dark-theme #content .dashboard-po-summary-title,body.dark-theme #content .dashboard-po-summary-widget button{border-color:#435168!important}
body.dark-theme #content .dashboard-po-summary-widget button:hover{background:#24344b!important}
body.dark-theme .shipment-completed-section{background:#172033!important;border-color:#477052!important}
body.dark-theme .shipment-completed-titlebar{background:#173b2a!important;border-color:#477052!important}

@media(max-width:1450px){#content .dashboard-smart-widgets{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:760px){#content .dashboard-smart-widgets{grid-template-columns:1fr!important}#content .dashboard-world-time-row{grid-template-columns:minmax(90px,1fr) 70px minmax(100px,1fr) 52px 20px!important}}
@media(max-width:480px){#content .world-time-date{display:none!important}#content .dashboard-world-time-row{grid-template-columns:minmax(85px,1fr) 68px 48px 20px!important}}

/* V2.0.34 — compact professional Dashboard widgets and zero-state pipeline. */
#content .dashboard-smart-widgets{
  grid-template-columns:minmax(230px,250px) minmax(410px,1fr) 220px minmax(245px,270px)!important;
  gap:10px!important;align-items:stretch!important;margin-bottom:12px!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
#content .dashboard-smart-widgets>.smart-widget{
  width:100%!important;height:140px!important;min-height:140px!important;padding:9px 10px!important;border-radius:9px!important;
}
#content .smart-calendar-widget{display:flex!important;flex-direction:column!important;gap:5px!important}
#content .smart-calendar-summary{
  display:grid!important;grid-template-rows:15px minmax(0,1fr)!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;
  gap:2px!important;align-items:center!important;
}
#content .smart-calendar-summary>.smart-calendar-title{font-size:10px!important;line-height:1!important;letter-spacing:.04em!important}
#content .smart-calendar-summary>.smart-calendar-compact-date{align-self:center!important;gap:9px!important}
#content .smart-calendar-icon{font-size:24px!important;line-height:1!important}
#content .smart-calendar-date-copy strong{font-size:16px!important;line-height:1.1!important}
#content .smart-calendar-date-copy span{font-size:11px!important;line-height:1.1!important}
#content .calendar-weather-inline{
  display:grid!important;grid-template-columns:32px auto minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;
  flex:0 0 54px!important;min-width:0!important;padding:7px 0 0!important;border-top:1px solid #cbd5e1!important;color:#172033!important;
}
#content .calendar-weather-inline .weather-widget-icon{font-size:27px!important;line-height:1!important}
#content .calendar-weather-reading{display:flex!important;flex-direction:column!important;gap:1px!important}
#content .calendar-weather-reading strong{font-size:21px!important;line-height:1!important;color:#1d4ed8!important}
#content .calendar-weather-reading span{font-size:9px!important;color:#475569!important;white-space:nowrap!important}
#content .calendar-weather-inline .weather-compact-location{display:flex!important;min-width:0!important;flex-direction:column!important;gap:1px!important}
#content .calendar-weather-inline .weather-compact-location strong{font-size:11px!important;color:#172033!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .calendar-weather-inline .weather-compact-location small{font-size:9px!important;color:#64748b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .calendar-weather-inline .weather-location-refresh,#content .calendar-weather-inline .weather-retry-btn{
  position:static!important;width:auto!important;height:24px!important;padding:3px 6px!important;border:1px solid #cbd5e1!important;border-radius:5px!important;
  background:#fff!important;color:#334155!important;font-size:9px!important;font-weight:700!important;box-shadow:none!important;
}
#content .calendar-weather-inline.weather-loading,#content .calendar-weather-inline.weather-error{display:flex!important;justify-content:space-between!important;font-size:10px!important}
#content .calendar-weather-inline.weather-loading div,#content .calendar-weather-inline.weather-error div{display:flex!important;flex-direction:column!important;gap:1px!important}

#content .dashboard-smart-widgets>.smart-world-clock-widget{
  display:flex!important;flex-direction:column!important;height:140px!important;min-height:140px!important;padding:7px 9px!important;
  border:1px solid #b8c3cf!important;background:var(--panel)!important;color:#172033!important;
}
#content .dashboard-world-time-head,#content .dashboard-world-time-row{
  display:grid!important;grid-template-columns:minmax(115px,1.2fr) 72px minmax(92px,1fr) 55px!important;align-items:center!important;column-gap:8px!important;
}
#content .dashboard-world-time-head{
  flex:0 0 18px!important;padding:0 6px 3px!important;border-bottom:1px solid #cbd5e1!important;color:#64748b!important;
  font-size:9px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:.03em!important;
}
#content .dashboard-world-time-head span:nth-child(n+2){text-align:right!important}
#content .dashboard-world-time-list{display:grid!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;flex:1 1 auto!important;min-height:0!important}
#content .dashboard-world-time-row{
  min-height:0!important;padding:2px 6px!important;border-bottom:1px solid #e2e8f0!important;border-radius:0!important;background:transparent!important;
}
#content .dashboard-world-time-row:last-child{border-bottom:0!important}
#content .dashboard-world-time-row.is-local{
  margin:1px 0!important;padding-left:5px!important;border-left:3px solid #2563eb!important;border-radius:4px!important;background:#eaf3ff!important;
}
#content .world-time-place{display:block!important;min-width:0!important;line-height:1!important}
#content .world-time-place>strong{display:block!important;font-size:11px!important;color:#172033!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#content .world-time-place>small{display:none!important}
#content .world-time-local-label{display:inline!important;margin-left:4px!important;padding:1px 4px!important;border-radius:3px!important;background:#2563eb!important;color:#fff!important;font-size:7px!important;font-weight:700!important;vertical-align:1px!important}
#content .dashboard-world-time-row>.digital-clock-time{font-size:15px!important;line-height:1!important;color:#1d4ed8!important;text-align:right!important}
#content .world-time-date{font-size:10px!important;color:#475569!important;text-align:right!important;white-space:nowrap!important}
#content .dashboard-world-time-row>.digital-clock-zone{font-size:10px!important;color:#334155!important;text-align:right!important}

#content .dashboard-smart-widgets>.smart-currency-widget{width:100%!important;height:140px!important;min-height:140px!important;padding:8px 9px!important}
#content .smart-currency-widget .currency-widget-title strong{font-size:11px!important}
#content .smart-currency-widget .currency-widget-title small{font-size:8px!important}
#content .smart-currency-widget .currency-converter-row{height:31px!important;min-height:31px!important}
#content .smart-currency-widget .currency-converter-row input,#content .smart-currency-widget .currency-converter-row output{font-size:18px!important}
#content .smart-currency-widget .currency-swap-button{top:56px!important;width:25px!important;height:25px!important;font-size:14px!important}

#content .dashboard-po-summary-widget{display:grid!important;grid-template-rows:29px repeat(2,1fr)!important;height:140px!important;min-height:140px!important;padding:8px 10px!important}
#content .dashboard-po-summary-title,#content .dashboard-po-summary-widget button{
  display:grid!important;grid-template-columns:minmax(90px,1fr) 42px minmax(86px,auto)!important;align-items:center!important;column-gap:7px!important;
}
#content .dashboard-po-summary-title{padding:0 3px 5px!important}
#content .dashboard-po-summary-title strong{font-size:11px!important;color:#172033!important}
#content .dashboard-po-summary-title span{font-size:9px!important;color:#64748b!important;font-weight:700!important;text-align:right!important;text-transform:uppercase!important}
#content .dashboard-po-summary-widget button{padding:5px 3px!important}
#content .dashboard-po-summary-widget button span{font-size:11px!important;font-weight:700!important}
#content .dashboard-po-summary-widget button strong{font-size:14px!important;text-align:right!important}
#content .dashboard-po-summary-widget button b{font-size:12px!important;color:#172033!important;text-align:right!important;white-space:nowrap!important;font-variant-numeric:tabular-nums!important}

#content .ops-pipeline-step{height:70px!important;min-height:70px!important;padding:6px 4px!important}
#content .ops-pipeline-label,#content .ops-pipeline-count{font-size:14px!important;line-height:1.05!important}
#content .ops-pipeline-count{margin-top:5px!important}
#content .ops-pipeline-step.is-zero:not(.pipe-complete){background:#fffbeb!important;border-color:#f6c453!important;color:#92400e!important}
#content .ops-pipeline-step.is-zero:not(.pipe-complete) .ops-pipeline-label,#content .ops-pipeline-step.is-zero:not(.pipe-complete) .ops-pipeline-count{color:#92400e!important}
#content .ops-pipeline-step.is-zero:not(.pipe-complete):hover{background:#fef3c7!important}

body.dark-theme #content .calendar-weather-inline{border-top-color:#526176!important;color:#f8fafc!important}
body.dark-theme #content .calendar-weather-inline .weather-compact-location strong{color:#f8fafc!important}
body.dark-theme #content .calendar-weather-inline .weather-compact-location small,body.dark-theme #content .calendar-weather-reading span{color:#cbd5e1!important}
body.dark-theme #content .dashboard-world-time-row.is-local{background:#1e3a5f!important;border-left-color:#60a5fa!important}
body.dark-theme #content .world-time-place>strong,body.dark-theme #content .dashboard-world-time-row>.digital-clock-zone,body.dark-theme #content .dashboard-po-summary-title strong,body.dark-theme #content .dashboard-po-summary-widget button b{color:#f8fafc!important}

@media(max-width:1450px){#content .dashboard-smart-widgets{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:760px){#content .dashboard-smart-widgets{grid-template-columns:1fr!important}#content .dashboard-world-time-head,#content .dashboard-world-time-row{grid-template-columns:minmax(105px,1fr) 65px 88px 50px!important}}

/* V2.0.35 — equal dashboard utility widths, blue calendar/weather and strict clock alignment. */
#content .dashboard-smart-widgets{
  grid-template-columns:minmax(235px,1fr) minmax(360px,1.65fr) minmax(235px,1fr) minmax(235px,1fr)!important;
  gap:10px!important;align-items:stretch!important;
}
#content .dashboard-smart-widgets>.smart-calendar-widget,
#content .dashboard-smart-widgets>.smart-currency-widget,
#content .dashboard-smart-widgets>.dashboard-po-summary-widget{
  width:100%!important;min-width:0!important;height:140px!important;min-height:140px!important;
}

#content .dashboard-smart-widgets>.smart-calendar-widget{
  display:grid!important;grid-template-rows:45px minmax(0,1fr)!important;gap:5px!important;
  padding:8px 11px!important;border-color:#1d4ed8!important;background:#2563eb!important;color:#fff!important;
}
#content .smart-calendar-widget .smart-calendar-summary{
  display:grid!important;grid-template-rows:13px minmax(0,1fr)!important;height:45px!important;min-height:45px!important;
  gap:0!important;padding:0!important;align-items:start!important;background:transparent!important;color:#fff!important;
}
#content .smart-calendar-widget .smart-calendar-title{
  color:#fff!important;font-size:10px!important;line-height:1!important;
}
#content .smart-calendar-widget .smart-calendar-compact-date{
  align-self:start!important;margin-top:-1px!important;gap:8px!important;color:#fff!important;
}
#content .smart-calendar-widget .smart-calendar-icon{
  color:#fff!important;font-size:22px!important;line-height:1!important;
}
#content .smart-calendar-widget .smart-calendar-date-copy strong{
  color:#fff!important;font-size:15px!important;line-height:1!important;
}
#content .smart-calendar-widget .smart-calendar-date-copy span{
  color:#fff!important;font-size:10px!important;line-height:1!important;
}
#content .smart-calendar-widget .calendar-weather-inline{
  display:grid!important;grid-template-columns:30px 43px minmax(0,1fr) auto!important;align-items:center!important;
  min-width:0!important;height:auto!important;min-height:0!important;padding:7px 0 0!important;gap:5px!important;
  border-top:1px solid rgba(255,255,255,.65)!important;background:transparent!important;color:#fff!important;
}
#content .smart-calendar-widget .calendar-weather-inline .weather-widget-icon{font-size:26px!important;color:#fff!important}
#content .smart-calendar-widget .calendar-weather-reading strong{font-size:21px!important;color:#fff!important}
#content .smart-calendar-widget .calendar-weather-reading span,
#content .smart-calendar-widget .weather-compact-location strong,
#content .smart-calendar-widget .weather-compact-location small{color:#fff!important}
#content .smart-calendar-widget .calendar-weather-reading span{font-size:9px!important}
#content .smart-calendar-widget .weather-compact-location strong{font-size:11px!important}
#content .smart-calendar-widget .weather-compact-location small{font-size:9px!important}
#content .smart-calendar-widget .weather-location-refresh,
#content .smart-calendar-widget .weather-retry-btn{
  height:23px!important;padding:2px 5px!important;border:1px solid rgba(255,255,255,.75)!important;
  background:rgba(255,255,255,.13)!important;color:#fff!important;font-size:8px!important;
}
#content .smart-calendar-widget .weather-location-refresh:hover,
#content .smart-calendar-widget .weather-retry-btn:hover{background:rgba(255,255,255,.24)!important}

#content .dashboard-smart-widgets>.smart-world-clock-widget{
  padding:7px 9px!important;overflow:hidden!important;
}
#content .smart-world-clock-widget .dashboard-world-time-head,
#content .smart-world-clock-widget .dashboard-world-time-row{
  display:grid!important;grid-template-columns:minmax(92px,1fr) 58px 83px 48px!important;
  column-gap:6px!important;align-items:center!important;
}
#content .smart-world-clock-widget .dashboard-world-time-head{
  height:19px!important;min-height:19px!important;padding:0 6px 3px!important;color:#111827!important;
  font-size:11px!important;line-height:1!important;font-weight:700!important;letter-spacing:0!important;
}
#content .smart-world-clock-widget .dashboard-world-time-head span:nth-child(1){grid-column:1!important;text-align:left!important}
#content .smart-world-clock-widget .dashboard-world-time-head span:nth-child(2){grid-column:2!important;text-align:center!important}
#content .smart-world-clock-widget .dashboard-world-time-head span:nth-child(3){grid-column:3!important;text-align:center!important}
#content .smart-world-clock-widget .dashboard-world-time-head span:nth-child(4){grid-column:4!important;text-align:center!important}
#content .smart-world-clock-widget .dashboard-world-time-list{
  display:grid!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;min-height:0!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row{
  position:relative!important;min-height:0!important;margin:0!important;padding:1px 6px!important;
  border-bottom:1px solid #dbe2ea!important;border-radius:0!important;background:transparent!important;
  color:#111827!important;font-size:11px!important;line-height:1!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row.is-local{
  margin:1px 0!important;padding:1px 6px!important;border-left:3px solid #2563eb!important;
  border-bottom-color:#cbdff8!important;border-radius:4px!important;background:#eaf3ff!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place{
  position:static!important;display:block!important;grid-column:1!important;min-width:0!important;margin:0!important;padding:0!important;
  color:#111827!important;font-size:11px!important;line-height:1!important;text-align:left!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place>strong{
  display:block!important;color:#111827!important;font-size:11px!important;line-height:1!important;font-weight:700!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
#content .smart-world-clock-widget .world-time-local-label{display:none!important}
#content .smart-world-clock-widget .dashboard-world-time-row>.digital-clock-time{
  position:static!important;display:block!important;grid-column:2!important;width:auto!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;color:#111827!important;font-size:11px!important;line-height:1!important;
  font-weight:700!important;letter-spacing:0!important;text-align:center!important;white-space:nowrap!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date{
  position:static!important;display:block!important;grid-column:3!important;min-width:0!important;margin:0!important;padding:0!important;
  color:#111827!important;font-size:11px!important;line-height:1!important;font-weight:400!important;text-align:center!important;white-space:nowrap!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.digital-clock-zone{
  position:static!important;display:block!important;grid-column:4!important;max-width:none!important;min-width:0!important;
  margin:0!important;padding:0!important;color:#111827!important;font-size:11px!important;line-height:1!important;
  font-weight:400!important;text-align:center!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;
}

body.dark-theme #content .dashboard-smart-widgets>.smart-calendar-widget{background:#2563eb!important;border-color:#60a5fa!important;color:#fff!important}
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-head,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place>strong,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.digital-clock-time,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.digital-clock-zone{color:#f8fafc!important}
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row.is-local{background:#1e3a5f!important}

@media(max-width:1100px){
  #content .dashboard-smart-widgets{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:1/-1!important}
}
@media(max-width:620px){
  #content .dashboard-smart-widgets{grid-template-columns:1fr!important}
  #content .dashboard-smart-widgets>.smart-world-clock-widget{grid-column:auto!important}
  #content .smart-world-clock-widget .dashboard-world-time-head,
  #content .smart-world-clock-widget .dashboard-world-time-row{grid-template-columns:minmax(85px,1fr) 52px 76px 45px!important;column-gap:4px!important}
}

/* V2.0.36 — separated weather bands and vertically centred world-time values. */
#content .smart-calendar-widget .calendar-weather-inline{
  display:grid!important;grid-template-columns:30px 43px minmax(0,1fr) auto!important;grid-template-rows:18px minmax(0,1fr)!important;
  align-items:center!important;column-gap:5px!important;row-gap:1px!important;padding-top:5px!important;
}
#content .smart-calendar-widget .calendar-weather-inline .weather-widget-icon{
  grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;margin:2px 0 0!important;
}
#content .smart-calendar-widget .calendar-weather-reading{
  grid-column:2!important;grid-row:2!important;align-self:center!important;margin:2px 0 0!important;
}
#content .smart-calendar-widget .weather-compact-location{display:contents!important}
#content .smart-calendar-widget .weather-compact-location>strong{
  grid-column:1/4!important;grid-row:1!important;align-self:start!important;min-width:0!important;margin:0!important;
  line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
#content .smart-calendar-widget .weather-compact-location>small{
  grid-column:3!important;grid-row:2!important;align-self:center!important;min-width:0!important;margin:2px 0 0!important;
  line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
#content .smart-calendar-widget .weather-location-refresh,
#content .smart-calendar-widget .weather-retry-btn{
  grid-column:4!important;grid-row:2!important;align-self:center!important;margin:2px 0 0!important;
}

#content .smart-world-clock-widget .dashboard-world-time-row{
  align-items:stretch!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place,
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-value,
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date-value,
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-zone-value{
  position:static!important;display:flex!important;align-items:center!important;justify-content:center!important;height:100%!important;
  min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;color:#111827!important;
  font-family:Arial,Helvetica,sans-serif!important;font-size:11px!important;line-height:1!important;white-space:nowrap!important;
  transform:none!important;vertical-align:middle!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place{
  grid-column:1!important;justify-content:flex-start!important;text-align:left!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place>strong{
  display:block!important;margin:0!important;padding:0!important;color:#111827!important;font-size:11px!important;line-height:1!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-value{
  grid-column:2!important;width:auto!important;font-weight:700!important;letter-spacing:0!important;text-align:center!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date-value{
  grid-column:3!important;font-weight:400!important;text-align:center!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-zone-value{
  grid-column:4!important;max-width:none!important;font-weight:400!important;text-align:center!important;overflow:visible!important;text-overflow:clip!important;
}
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place>strong,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-value,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date-value,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-zone-value{color:#f8fafc!important}

/* V2.0.38 — shared widget headers, compact settings and consistent modal actions. */
#content .dashboard-widget-drag-header{
  position:relative!important;z-index:5!important;display:flex!important;align-items:center!important;
  width:100%!important;height:20px!important;min-height:20px!important;padding:0 58px 0 0!important;
  color:#111827!important;font-size:11px!important;line-height:1!important;cursor:grab!important;user-select:none!important;
}
#content .dashboard-widget-drag-header:active{cursor:grabbing!important}
#content .dashboard-widget-drag-header strong{color:inherit!important;font-size:11px!important;line-height:1!important;font-weight:800!important;white-space:nowrap!important}
#content .dashboard-widget-actions{top:4px!important;right:6px!important}
#content .dashboard-widget-actions button{height:22px!important;min-height:22px!important;padding:2px 7px!important;font-size:9px!important}
#content .dashboard-widget-row-actions{top:-36px!important;gap:7px!important}
#content .dashboard-widget-row-actions button{
  height:30px!important;min-height:30px!important;padding:6px 11px!important;border-radius:6px!important;font-size:11px!important;
}
#content .dashboard-smart-widgets>.smart-calendar-widget{
  display:grid!important;grid-template-rows:20px 34px minmax(0,1fr)!important;gap:2px!important;
}
#content .smart-calendar-widget .smart-calendar-summary{height:34px!important;min-height:34px!important;padding:0!important}
#content .smart-calendar-widget .smart-calendar-compact-date{height:34px!important}
#content .smart-world-clock-widget .dashboard-widget-heading,
#content .smart-currency-widget .currency-widget-title{display:none!important}
#content .smart-world-clock-widget .dashboard-world-time-list{height:calc(100% - 54px)!important}
#content .smart-currency-widget{padding-top:6px!important}
#content .smart-currency-widget .currency-converter-row:first-of-type{margin-top:1px!important}
#content .dashboard-po-summary-widget{padding-top:6px!important}
body.dark-theme #content .dashboard-widget-drag-header,
body.dark-theme #content .dashboard-widget-drag-header strong{color:#f8fafc!important}

/* V2.0.40 — unobstructed header calendar and a dedicated full Weather widget. */
.topbar{z-index:1000!important;overflow:visible!important}
.header-calendar-popover{z-index:10050!important}
.header-date-time-button{height:40px!important;min-height:40px!important;column-gap:9px!important;padding:4px 5px!important}
.header-date-time-button>svg{width:20px!important;height:20px!important}
.header-date-time-button>span{font-size:13px!important}
.header-date-time-button>strong{font-size:15px!important;line-height:1!important}
.header-calendar-head strong{font-size:14px!important}
.header-calendar-weekdays span{font-size:11px!important}
.header-calendar-day{font-size:12px!important}

#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card{
  display:grid!important;grid-template-rows:20px minmax(0,1fr)!important;gap:3px!important;
  width:100%!important;min-width:0!important;height:140px!important;min-height:140px!important;
  padding:7px 9px!important;border:1px solid #1d4ed8!important;background:#2563eb!important;color:#fff!important;
}
#content .dashboard-weather-card .dashboard-widget-drag-header,
#content .dashboard-weather-card .dashboard-widget-drag-header strong{color:#fff!important}
#content .dashboard-weather-card .calendar-weather-inline{
  display:grid!important;grid-template-columns:48px 1fr auto!important;grid-template-rows:auto minmax(0,1fr)!important;
  align-items:center!important;column-gap:10px!important;row-gap:4px!important;width:100%!important;height:100%!important;
  min-width:0!important;min-height:0!important;margin:0!important;padding:4px 0 0!important;border:0!important;background:transparent!important;color:#fff!important;
}
#content .dashboard-weather-card .weather-compact-location{
  display:flex!important;grid-column:1/4!important;grid-row:1!important;align-items:baseline!important;align-self:start!important;
  min-width:0!important;gap:5px!important;flex-wrap:wrap!important;
}
#content .dashboard-weather-card .weather-compact-location>strong,
#content .dashboard-weather-card .weather-compact-location>small{
  display:inline!important;margin:0!important;padding:0!important;color:#fff!important;font-size:12px!important;line-height:1.12!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
}
#content .dashboard-weather-card .weather-compact-location>strong{font-weight:800!important}
#content .dashboard-weather-card .weather-widget-icon{
  display:block!important;grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;
  margin:0!important;color:#fff!important;font-size:40px!important;line-height:1!important;
}
#content .dashboard-weather-card .calendar-weather-reading{
  display:grid!important;grid-column:2!important;grid-row:2!important;grid-template-columns:auto 1fr!important;grid-template-rows:auto auto!important;
  align-items:center!important;align-self:center!important;column-gap:8px!important;row-gap:2px!important;min-width:0!important;margin:0!important;
}
#content .dashboard-weather-card .calendar-weather-reading>strong{grid-column:1!important;grid-row:1/3!important;color:#fff!important;font-size:31px!important;line-height:1!important;font-weight:800!important}
#content .dashboard-weather-card .calendar-weather-reading>span,
#content .dashboard-weather-card .calendar-weather-reading>small{grid-column:2!important;color:#fff!important;font-size:11px!important;line-height:1.1!important;white-space:normal!important}
#content .dashboard-weather-card .calendar-weather-reading>span{grid-row:1!important;font-weight:700!important}
#content .dashboard-weather-card .calendar-weather-reading>small{grid-row:2!important;font-weight:500!important}
#content .dashboard-weather-card .weather-location-refresh,
#content .dashboard-weather-card .weather-retry-btn{
  grid-column:3!important;grid-row:2!important;align-self:center!important;height:25px!important;min-height:25px!important;margin:0!important;
  padding:3px 7px!important;border:1px solid rgba(255,255,255,.75)!important;border-radius:5px!important;
  background:rgba(255,255,255,.14)!important;color:#fff!important;font-size:9px!important;font-weight:700!important;
}
#content .dashboard-weather-card .weather-location-refresh:hover,
#content .dashboard-weather-card .weather-retry-btn:hover{background:rgba(255,255,255,.25)!important}
#content .dashboard-weather-card .calendar-weather-inline.weather-loading,
#content .dashboard-weather-card .calendar-weather-inline.weather-error{display:flex!important;align-items:center!important;justify-content:space-between!important;color:#fff!important}

#content .dashboard-smart-widgets>.smart-currency-widget{background:#fff!important;border-color:#b8c3cf!important;color:#111827!important}
body.dark-theme #content .dashboard-smart-widgets>.smart-currency-widget{background:#172033!important;border-color:#435168!important;color:#f8fafc!important}

/* V2.0.41 — reserve a visible strip for the complete widget-row control. */
#content .dashboard-smart-widgets:not(.is-row-hidden){padding-top:38px!important}
#content .dashboard-smart-widgets:not(.is-row-hidden)>.dashboard-widget-row-actions{
 top:0!important;right:0!important;left:0!important;z-index:20!important;display:flex!important;align-items:flex-start!important;
 justify-content:flex-end!important;width:100%!important;height:32px!important;min-height:32px!important;pointer-events:none!important;
}
#content .dashboard-smart-widgets:not(.is-row-hidden)>.dashboard-widget-row-actions button{pointer-events:auto!important}
#content .dashboard-smart-widgets.is-row-hidden{height:34px!important;min-height:34px!important;margin-bottom:0!important;padding:0!important;overflow:visible!important}
#content .dashboard-smart-widgets.is-row-hidden>.dashboard-widget-row-actions{
 top:0!important;right:0!important;left:0!important;z-index:20!important;display:flex!important;justify-content:flex-end!important;
 width:100%!important;height:32px!important;min-height:32px!important;
}

/* V2.0.39 — compact clickable date/time in the application header. */
.header-date-time-wrap{position:relative!important;display:flex!important;align-items:center!important}
.header-date-time-button{
  display:inline-grid!important;grid-template-columns:18px auto 1px auto!important;align-items:center!important;column-gap:8px!important;
  width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:4px 3px!important;
  border:0!important;border-radius:5px!important;background:transparent!important;color:#10233f!important;box-shadow:none!important;white-space:nowrap!important;
}
.header-date-time-button:hover,.header-date-time-button[aria-expanded="true"]{border:0!important;background:#f1f5f9!important;color:#10233f!important}
.header-date-time-button:focus-visible{outline:2px solid #93c5fd!important;outline-offset:2px!important}
.header-date-time-button>svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.header-date-time-button>span{font-size:12px!important;line-height:1!important;font-weight:500!important;color:inherit!important}
.header-date-time-button>i{display:block!important;width:1px!important;height:20px!important;background:#cbd5e1!important}
.header-date-time-button>strong{font-size:14px!important;line-height:1!important;font-weight:800!important;color:inherit!important;letter-spacing:.01em!important}
.header-calendar-popover{
  position:absolute!important;z-index:40!important;top:calc(100% + 8px)!important;right:0!important;width:294px!important;padding:12px!important;
  border:1px solid #b8c3cf!important;border-radius:8px!important;background:#fff!important;color:#10233f!important;box-shadow:0 10px 28px rgba(15,35,63,.18)!important;
}
.header-calendar-popover[hidden]{display:none!important}
.header-calendar-head{display:grid!important;grid-template-columns:30px 1fr 30px!important;align-items:center!important;gap:7px!important;margin-bottom:9px!important}
.header-calendar-head strong{font-size:13px!important;font-weight:800!important;text-align:center!important;color:#10233f!important}
.header-calendar-head button{display:grid!important;place-items:center!important;width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;border:0!important;border-radius:5px!important;background:#f1f5f9!important;color:#10233f!important;font-size:20px!important;line-height:1!important}
.header-calendar-head button:hover{background:#dbeafe!important;color:#1d4ed8!important}
.header-calendar-weekdays,.header-calendar-grid{display:grid!important;grid-template-columns:repeat(7,1fr)!important;gap:3px!important}
.header-calendar-weekdays{margin-bottom:4px!important}
.header-calendar-weekdays span{display:grid!important;place-items:center!important;height:24px!important;color:#64748b!important;font-size:10px!important;font-weight:700!important}
.header-calendar-day{display:grid!important;place-items:center!important;width:100%!important;height:31px!important;min-height:31px!important;padding:0!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#334155!important;font-size:11px!important;font-weight:500!important}
.header-calendar-day:hover{background:#eff6ff!important;color:#1d4ed8!important}
.header-calendar-day.is-outside{color:#a8b2c0!important}
.header-calendar-day.is-today{background:#2563eb!important;color:#fff!important;font-weight:800!important}
.header-calendar-day.is-selected:not(.is-today){box-shadow:inset 0 0 0 2px #2563eb!important;color:#1d4ed8!important;font-weight:800!important}
body.dark-theme .header-date-time-button{color:#f8fafc!important}
body.dark-theme .header-date-time-button:hover,body.dark-theme .header-date-time-button[aria-expanded="true"]{background:#24344b!important;color:#f8fafc!important}
body.dark-theme .header-date-time-button>i{background:#526176!important}
body.dark-theme .header-calendar-popover{background:#172033!important;border-color:#526176!important;color:#f8fafc!important}
body.dark-theme .header-calendar-head strong,body.dark-theme .header-calendar-day{color:#f8fafc!important}
body.dark-theme .header-calendar-head button{background:#24344b!important;color:#f8fafc!important}
body.dark-theme .header-calendar-weekdays span{color:#cbd5e1!important}
body.dark-theme .header-calendar-day.is-outside{color:#728096!important}
@media(max-width:720px){
 .top-actions.top-icon-actions{display:flex!important;width:100%!important;justify-content:flex-end!important;align-self:stretch!important}
 .header-calendar-popover{position:fixed!important;top:50%!important;right:auto!important;left:50%!important;transform:translate(-50%,-50%)!important;width:min(294px,calc(100vw - 28px))!important}
}

/* A single predictable footer treatment for data-entry dialogs. */
.modal-card #modal-body .form-actions:not(.rd-form-actions):not(.aql-form-actions){
  display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;
  gap:8px!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;text-align:right!important;
}
.modal-card #modal-body .form-actions:not(.rd-form-actions):not(.aql-form-actions)>button{
  flex:0 0 auto!important;width:auto!important;min-width:84px!important;max-width:100%!important;white-space:nowrap!important;
}
.organisation-profile-form>.form-actions{padding-top:11px!important;border-top:1px solid var(--line)!important}

/* Shipment allocation headings must retain a single compact line. */
.shipment-allocation-line-head{display:grid!important;grid-template-columns:minmax(220px,1fr) minmax(560px,auto)!important;align-items:start!important}
.shipment-allocation-line-totals{display:grid!important;grid-template-columns:repeat(4,max-content)!important;justify-content:end!important;gap:12px!important;min-width:560px!important;white-space:nowrap!important;overflow:visible!important}
.shipment-allocation-line-totals span{white-space:nowrap!important}

/* R&D proposed fabric deliberately reuses the Fabric database row system. */
.rd-proposed-fabric-editor{min-width:0!important}
.rd-proposed-fabric-editor .fabric-row{width:100%!important}
.rd-proposed-fabric-editor .fabric-row-one .fabric-id-col{width:150px!important;min-width:150px!important}
.rd-proposed-fabric-editor .fabric-row-one .fabric-id-col input{font-size:10px!important}
.rd-proposed-fabric-editor .fabric-row-two .fabric-mini-field{flex:1 1 66px!important;width:auto!important;min-width:58px!important}
.rd-proposed-fabric-editor .fabric-row-two .fabric-total-col{flex:0 0 96px!important;width:96px!important;min-width:96px!important}
.rd-proposed-fabric-editor .fabric-row-three{margin-bottom:0!important}

/* Compact, ordered administration tiles while retaining their icons. */
.settings-console{gap:12px!important}
.settings-console-grid,.falcon-admin-tile-grid{gap:9px!important}
.settings-console-tile,.falcon-admin-tile{
  min-height:94px!important;height:auto!important;padding:10px 11px!important;gap:4px!important;border-radius:6px!important;
}
.settings-console-icon,.falcon-admin-tile-icon{width:28px!important;height:28px!important;border-radius:5px!important}
.settings-console-icon svg,.falcon-admin-tile-icon svg{width:16px!important;height:16px!important}
.settings-console-tile strong,.falcon-admin-tile strong{font-size:12px!important}
.settings-console-tile small,.falcon-admin-tile small{font-size:10px!important;line-height:1.32!important}
.settings-action-card,.settings-transfer-card{padding:10px!important;gap:6px!important}
.settings-action-card>button,.settings-transfer-card button{align-self:flex-start!important;width:auto!important;min-width:0!important;padding:7px 10px!important}

/* Purchase Orders uses the same unboxed completed toggle as operational lists. */
.po-list-filterbar .master-filter-check{min-height:auto!important;padding:4px 2px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}

@media(max-width:900px){
  .shipment-allocation-line-head{display:flex!important;flex-direction:column!important}
  .shipment-allocation-line-totals{min-width:0!important;max-width:100%!important;overflow-x:auto!important;justify-content:start!important}
  .rd-proposed-fabric-editor{overflow-x:auto!important}
  .rd-proposed-fabric-editor .fabric-row{min-width:1040px!important}
}

/* V2.0.37 — configurable equal-width dashboard widgets and conditional R&D fabric fields. */
#content .dashboard-smart-widgets{
  position:relative!important;display:grid!important;
  grid-template-columns:repeat(var(--dashboard-widget-count,4),minmax(0,1fr))!important;
  gap:10px!important;align-items:stretch!important;margin:0 0 12px!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
#content .dashboard-smart-widgets>.smart-widget{
  position:relative!important;width:100%!important;min-width:0!important;height:140px!important;min-height:140px!important;
  font-family:Arial,Helvetica,sans-serif!important;font-size:11px!important;
}
#content .dashboard-smart-widgets>.smart-widget *{font-family:Arial,Helvetica,sans-serif!important}
#content .dashboard-widget-row-actions{
  position:absolute!important;z-index:8!important;right:0!important;top:-25px!important;display:flex!important;gap:5px!important;
}
#content .dashboard-widget-row-actions button,
#content .dashboard-widget-actions button{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;height:20px!important;min-height:20px!important;
  padding:1px 6px!important;border:1px solid #b8c3cf!important;border-radius:5px!important;background:#fff!important;
  color:#334155!important;font-size:9px!important;line-height:1!important;font-weight:700!important;box-shadow:none!important;
}
#content .dashboard-widget-row-actions button:hover,
#content .dashboard-widget-actions button:hover{border-color:#2563eb!important;background:#eff6ff!important;color:#1d4ed8!important}
#content .dashboard-widget-actions{
  position:absolute!important;z-index:7!important;right:6px!important;top:5px!important;display:flex!important;align-items:center!important;gap:4px!important;
}
#content .dashboard-smart-widgets>.smart-widget.is-dragging{opacity:.55!important}
#content .dashboard-smart-widgets>.smart-widget.is-drag-target{outline:2px solid #2563eb!important;outline-offset:2px!important}
#content .dashboard-smart-widgets.is-row-hidden{
  display:block!important;width:100%!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;
}
#content .dashboard-smart-widgets.is-row-hidden>.smart-widget{display:none!important}

#content .dashboard-widget-heading,
#content .smart-currency-widget .currency-widget-title{
  display:flex!important;align-items:center!important;height:17px!important;min-height:17px!important;padding:0 62px 0 0!important;
  color:#111827!important;font-size:11px!important;line-height:1!important;
}
#content .dashboard-widget-heading strong,
#content .smart-currency-widget .currency-widget-title strong{
  color:#111827!important;font-size:11px!important;line-height:1!important;font-weight:800!important;white-space:nowrap!important;
}
#content .smart-currency-widget .currency-widget-title small{display:none!important}

#content .dashboard-smart-widgets>.smart-calendar-widget{
  grid-template-rows:45px minmax(0,1fr)!important;height:140px!important;min-height:140px!important;padding:8px 11px!important;
}
#content .smart-calendar-widget .smart-calendar-summary{height:45px!important;min-height:45px!important;padding-right:58px!important}
#content .smart-calendar-widget .smart-calendar-title,
#content .smart-calendar-widget .smart-calendar-date-copy strong,
#content .smart-calendar-widget .smart-calendar-date-copy span{
  color:#fff!important;font-size:11px!important;line-height:1!important;font-weight:400!important;
}
#content .smart-calendar-widget .smart-calendar-title{font-weight:800!important;text-transform:uppercase!important}
#content .smart-calendar-widget .smart-calendar-date-copy strong{font-weight:700!important}
#content .smart-calendar-widget .smart-calendar-icon{font-size:22px!important;line-height:1!important}
#content .smart-calendar-widget .calendar-weather-inline{
  grid-template-columns:30px 43px minmax(0,1fr) auto!important;grid-template-rows:minmax(18px,auto) minmax(0,1fr)!important;
  column-gap:5px!important;row-gap:1px!important;padding-top:4px!important;
}
#content .smart-calendar-widget .weather-compact-location{
  display:flex!important;grid-column:1/5!important;grid-row:1!important;align-self:start!important;align-items:baseline!important;
  min-width:0!important;max-width:100%!important;gap:4px!important;flex-wrap:wrap!important;color:#fff!important;
}
#content .smart-calendar-widget .weather-compact-location>strong,
#content .smart-calendar-widget .weather-compact-location>small{
  display:inline!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:0!important;
  color:#fff!important;font-size:11px!important;line-height:1.05!important;font-weight:400!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
}
#content .smart-calendar-widget .weather-compact-location>strong{font-weight:700!important}
#content .smart-calendar-widget .calendar-weather-inline .weather-widget-icon{grid-column:1!important;grid-row:2!important;font-size:26px!important}
#content .smart-calendar-widget .calendar-weather-reading{grid-column:2!important;grid-row:2!important}
#content .smart-calendar-widget .calendar-weather-reading strong{font-size:21px!important;line-height:1!important}
#content .smart-calendar-widget .calendar-weather-reading span{font-size:11px!important;line-height:1!important}
#content .smart-calendar-widget .weather-location-refresh,
#content .smart-calendar-widget .weather-retry-btn{grid-column:4!important;grid-row:2!important}

#content .dashboard-smart-widgets>.smart-world-clock-widget{padding:6px 9px!important}
#content .smart-world-clock-widget .dashboard-widget-heading{height:16px!important;min-height:16px!important}
#content .smart-world-clock-widget .dashboard-world-time-head,
#content .smart-world-clock-widget .dashboard-world-time-row{
  grid-template-columns:minmax(66px,1fr) 48px 72px 42px!important;column-gap:4px!important;
}
#content .smart-world-clock-widget .dashboard-world-time-head{
  height:17px!important;min-height:17px!important;padding:0 4px 3px!important;color:#111827!important;
  font-size:11px!important;line-height:1!important;font-weight:800!important;text-transform:none!important;
}
#content .smart-world-clock-widget .dashboard-world-time-head span:nth-child(1){text-align:left!important}
#content .smart-world-clock-widget .dashboard-world-time-head span:nth-child(n+2){text-align:center!important}
#content .smart-world-clock-widget .dashboard-world-time-list{height:calc(100% - 33px)!important;min-height:0!important}
#content .smart-world-clock-widget .dashboard-world-time-row{padding:1px 4px!important;align-items:stretch!important}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place,
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-value,
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date-value,
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-zone-value{
  width:100%!important;height:100%!important;color:#111827!important;font-size:11px!important;line-height:1!important;font-weight:400!important;
}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place{justify-self:stretch!important;justify-content:flex-start!important;text-align:left!important}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place>strong{width:100%!important;color:#111827!important;font-size:11px!important;line-height:1!important;text-align:left!important}
#content .smart-world-clock-widget .dashboard-world-time-row>.world-time-value{font-weight:700!important;text-align:center!important}

#content .dashboard-smart-widgets>.smart-currency-widget{height:140px!important;min-height:140px!important;padding:7px 9px!important}
#content .smart-currency-widget .currency-converter-row{height:31px!important;min-height:31px!important}
#content .smart-currency-widget .currency-converter-row select,
#content .smart-currency-widget .currency-converter-row input,
#content .smart-currency-widget .currency-converter-row output,
#content .smart-currency-widget .currency-widget-foot,
#content .smart-currency-widget .currency-widget-foot span,
#content .smart-currency-widget .currency-widget-foot small{font-size:11px!important;line-height:1!important}

#content .dashboard-po-summary-widget{
  display:grid!important;grid-template-rows:17px 16px repeat(2,1fr)!important;height:140px!important;min-height:140px!important;padding:7px 9px!important;
}
#content .dashboard-po-summary-title,#content .dashboard-po-summary-widget button{
  grid-template-columns:minmax(58px,1fr) 36px minmax(68px,auto)!important;column-gap:5px!important;
}
#content .dashboard-po-summary-title{padding:0 3px 2px!important}
#content .dashboard-po-summary-title span,
#content .dashboard-po-summary-widget button span,
#content .dashboard-po-summary-widget button strong,
#content .dashboard-po-summary-widget button b{
  color:#111827!important;font-size:11px!important;line-height:1!important;
}
#content .dashboard-po-summary-title span{font-weight:800!important}
#content .dashboard-po-summary-widget button span{font-weight:400!important}
#content .dashboard-po-summary-widget button strong,#content .dashboard-po-summary-widget button b{font-weight:700!important}

.rd-existing-fabric.hidden,.rd-new-fabric.hidden{display:none!important}

body.dark-theme #content .dashboard-widget-heading,
body.dark-theme #content .dashboard-widget-heading strong,
body.dark-theme #content .smart-currency-widget .currency-widget-title,
body.dark-theme #content .smart-currency-widget .currency-widget-title strong,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-head,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-place>strong,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-value,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-date-value,
body.dark-theme #content .smart-world-clock-widget .dashboard-world-time-row>.world-time-zone-value,
body.dark-theme #content .dashboard-po-summary-title span,
body.dark-theme #content .dashboard-po-summary-widget button span,
body.dark-theme #content .dashboard-po-summary-widget button strong,
body.dark-theme #content .dashboard-po-summary-widget button b{color:#f8fafc!important}

@media(max-width:900px){#content .dashboard-smart-widgets{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:620px){#content .dashboard-smart-widgets{grid-template-columns:1fr!important}}

/* V2.0.38 final dashboard specificity — headers are the drag surface. */
#content .dashboard-widget-row-actions{top:-36px!important;gap:7px!important}
#content .dashboard-widget-row-actions button{height:30px!important;min-height:30px!important;padding:6px 11px!important;border-radius:6px!important;font-size:11px!important}
#content .dashboard-widget-actions{top:4px!important;right:6px!important}
#content .dashboard-widget-actions button{height:22px!important;min-height:22px!important;padding:2px 7px!important;font-size:9px!important}
#content .dashboard-widget-drag-header{
  position:relative!important;z-index:5!important;display:flex!important;align-items:center!important;width:100%!important;
  height:20px!important;min-height:20px!important;padding:0 58px 0 0!important;color:#111827!important;font-size:11px!important;
  line-height:1!important;cursor:grab!important;user-select:none!important;
}
#content .dashboard-widget-drag-header:active{cursor:grabbing!important}
#content .dashboard-widget-drag-header strong{color:inherit!important;font-size:11px!important;line-height:1!important;font-weight:800!important;white-space:nowrap!important}
#content .dashboard-smart-widgets>.smart-calendar-widget{display:grid!important;grid-template-rows:20px 34px minmax(0,1fr)!important;gap:2px!important}
#content .smart-calendar-widget .smart-calendar-summary{height:34px!important;min-height:34px!important;padding:0!important}
#content .smart-calendar-widget .smart-calendar-compact-date{height:34px!important}
#content .smart-world-clock-widget .dashboard-world-time-list{height:calc(100% - 54px)!important}
#content .dashboard-smart-widgets>.smart-currency-widget{display:grid!important;grid-template-rows:20px 31px 31px minmax(0,1fr)!important;gap:1px!important;padding-top:6px!important}
#content .smart-currency-widget .currency-converter-row{margin:0!important}
#content .dashboard-po-summary-widget{grid-template-rows:20px 16px repeat(2,1fr)!important;padding-top:6px!important}
body.dark-theme #content .dashboard-widget-drag-header,
body.dark-theme #content .dashboard-widget-drag-header strong{color:#f8fafc!important}

/* V2.0.40 final overrides — keep the header calendar clear and Weather dominant. */
.topbar{z-index:1000!important;overflow:visible!important}
.header-calendar-popover{z-index:10050!important}
.header-date-time-button{height:40px!important;min-height:40px!important;column-gap:9px!important;padding:4px 5px!important}
.header-date-time-button>svg{width:20px!important;height:20px!important}
.header-date-time-button>span{font-size:13px!important}
.header-date-time-button>strong{font-size:15px!important;line-height:1!important}
.header-calendar-head strong{font-size:14px!important}
.header-calendar-weekdays span{font-size:11px!important}
.header-calendar-day{font-size:12px!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card{grid-template-rows:20px minmax(0,1fr)!important;gap:3px!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .calendar-weather-inline{
 display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;grid-template-rows:auto minmax(0,1fr)!important;
 align-items:center!important;column-gap:10px!important;row-gap:4px!important;height:100%!important;padding:4px 0 0!important;border:0!important;
}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .weather-compact-location{display:flex!important;grid-column:1/4!important;grid-row:1!important;align-items:baseline!important;gap:5px!important;flex-wrap:wrap!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .weather-compact-location>strong,
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .weather-compact-location>small{display:inline!important;color:#fff!important;font-size:12px!important;line-height:1.12!important;white-space:normal!important;overflow:visible!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .weather-widget-icon{grid-column:1!important;grid-row:2!important;align-self:center!important;justify-self:center!important;font-size:40px!important;line-height:1!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .calendar-weather-reading{display:grid!important;grid-column:2!important;grid-row:2!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-self:center!important;align-items:center!important;column-gap:8px!important;row-gap:2px!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .calendar-weather-reading>strong{grid-column:1!important;grid-row:1/3!important;color:#fff!important;font-size:31px!important;line-height:1!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .calendar-weather-reading>span,
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .calendar-weather-reading>small{grid-column:2!important;color:#fff!important;font-size:11px!important;line-height:1.1!important}
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .weather-location-refresh,
#content .dashboard-smart-widgets>.smart-calendar-widget.dashboard-weather-card .weather-retry-btn{grid-column:3!important;grid-row:2!important;align-self:center!important}
#content .dashboard-smart-widgets>.smart-currency-widget{background:#fff!important;border-color:#b8c3cf!important;color:#111827!important}
body.dark-theme #content .dashboard-smart-widgets>.smart-currency-widget{background:#172033!important;border-color:#435168!important;color:#f8fafc!important}

/* V2.0.41 final placement — the row control occupies its own visible line. */
#content .dashboard-smart-widgets:not(.is-row-hidden){padding-top:38px!important}
#content .dashboard-smart-widgets:not(.is-row-hidden)>.dashboard-widget-row-actions{
 top:0!important;right:0!important;left:0!important;z-index:20!important;display:flex!important;align-items:flex-start!important;
 justify-content:flex-end!important;width:100%!important;height:32px!important;min-height:32px!important;pointer-events:none!important;
}
#content .dashboard-smart-widgets:not(.is-row-hidden)>.dashboard-widget-row-actions button{pointer-events:auto!important}
#content .dashboard-smart-widgets.is-row-hidden{height:34px!important;min-height:34px!important;margin-bottom:0!important;padding:0!important;overflow:visible!important}
#content .dashboard-smart-widgets.is-row-hidden>.dashboard-widget-row-actions{
 top:0!important;right:0!important;left:0!important;z-index:20!important;display:flex!important;justify-content:flex-end!important;
 width:100%!important;height:32px!important;min-height:32px!important;
}
