[data-theme-toggle]{white-space:nowrap;min-height:36px;padding:0 12px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#19314e;font:inherit;font-weight:600;cursor:pointer}
html[data-theme="dark"]{color-scheme:dark;--bg:#141923;--panel:#1d2532;--card:#1d2532;--text:#e4eaf3;--muted:#aab9ca;--line:#3a475a;--border:#3a475a;--accent:#ff757a;--primary:#ff757a;background:#141923;color:#e4eaf3}
html[data-theme="dark"] body{background:#141923!important;color:#e4eaf3!important}
html[data-theme="dark"] :is(h1,h2,h3,h4,p,label,strong,legend,td,th,span,summary,small,em,div){color:inherit}
html[data-theme="dark"] :is(.app,.shell,.module-content,.view,.signin-layout,.signin-intro,.raw-inventory-app){background:transparent!important;color:#e4eaf3!important}
html[data-theme="dark"] :is(.topbar,.signin-header,.signin-footer,.login-card,.panel,.sheet,.sheet-head,.filterbar,.controls,.editor-panel,.record-form,.entry-search-panel,.record-list,.modal,.product-panel,.product-detail,.product-panel-head,.detail-item,.metric,.summary,.card,.tabs,.production-mode-tabs,.material-tabs,.table-toolbar,.table-wrap,.shipping-hold-panel,.outbound-allocation-row,.product-row,.product-group-heading,.admin-panel,.autosave-box,.login-account-list-box,.login-history-list,.production-photo-batch,dialog){background:#1d2532!important;color:#e4eaf3!important;border-color:#3a475a!important;box-shadow:none!important}
html[data-theme="dark"] #loginScreen{background:radial-gradient(ellipse at bottom left,#193436,transparent 65%),#141923!important;color:#e4eaf3!important}
html[data-theme="dark"] #loginScreen :is(label,h1,h2,.signin-brand,.onedx-brand-copy){color:#e4eaf3!important}
html[data-theme="dark"] :is(.muted,.notice,.subtitle,.onedx-tagline,.signin-description,.signin-notice,.file-meta,.product-lot-weight,.allocation-lot-summary),html[data-theme="dark"] #loginHelp{color:#b4c2d3!important}
html[data-theme="dark"] :is(input,select,textarea),html[data-theme="dark"] #loginScreen .login-card input{background:#141c28!important;color:#edf2fa!important;border-color:#526176!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#9baac0!important;opacity:1}
html[data-theme="dark"] :is(input,select,textarea,button):focus-visible{outline:2px solid #89baff!important;outline-offset:2px}
html[data-theme="dark"] :is(button,.btn,.signin-tags span,.login-user-badge),html[data-theme="dark"] #loginScreen .signin-mobile{background:#263347!important;color:#e4eaf3!important;border-color:#50617a!important}
html[data-theme="dark"] :is(button.primary,.btn.primary,#loginSubmit,#recordSubmitBtn,.btn.blue){background:#b92e43!important;color:#fff!important;border-color:#ee6679!important}
html[data-theme="dark"] :is(button.active,.module-chip.active,.product-row.active){background:#412a38!important;color:#ffb0b5!important;border-color:#ff757a!important}
html[data-theme="dark"] :is(button.danger,button.delete,.delete-record,.login-error){color:#ffb4b4!important}
html[data-theme="dark"] table{background:#1d2532!important;color:#e4eaf3!important}
html[data-theme="dark"] :is(td,th){border-color:#3a475a!important;color:#e4eaf3!important}
html[data-theme="dark"] thead th{background:#29374b!important}
html[data-theme="dark"] tbody :is(tr,td){background:#1d2532!important}
html[data-theme="dark"] tbody tr:nth-child(even) td{background:#212c3b!important}
html[data-theme="dark"] tbody tr:hover td{background:#2b3b50!important}
html[data-theme="dark"] :is(.shipping-badge.held,.shipping-badge.stopped,.lot-stop){background:#532f39!important;color:#ffd1d6!important}
html[data-theme="dark"] :is(.status-expired,.danger-text){color:#ffb4b4!important}
html[data-theme="dark"] :is(.status-soon,.warning){color:#ffe099!important}
html[data-theme="dark"] :is(.status-ok,.success){color:#a6e4c7!important}
html[data-theme="dark"] a{color:#9ac8ff}
html[data-theme="dark"] :is(.brand-logo,.signin-brand img,.signin-card-heading img){background:transparent;border-radius:0}
html[data-theme="dark"] dialog::backdrop{background:#0009}
html[data-theme="dark"] :is(button,input,select):disabled{opacity:.5}
@media print{html[data-theme="dark"],html[data-theme="dark"] body{color-scheme:light;background:white!important;color:black!important}html[data-theme="dark"] :is(table,thead th,tbody td,tbody tr,div,p,span,h1,h2,h3){background:white!important;color:black!important;border-color:#aaa!important}[data-theme-toggle]{display:none!important}}

html[data-theme="dark"] :is(#materialPhotoPanel,.mp-card,.mp-source-option,.mp-preview,.detail-strip,.lot-warning){background:#1d2532!important;color:#e4eaf3!important;border-color:#3a475a!important}
html[data-theme="dark"] .lot-tile.stock{background:#766021!important;color:#fff3c6!important}
html[data-theme="dark"] .lot-tile.stock.lot-partial{background:linear-gradient(to top,#766021 0%,#766021 var(--lot-fill),#222c3b var(--lot-fill),#222c3b 100%)!important}
html[data-theme="dark"] .lot-tile.shipped{background:transparent!important;color:#94a3b8!important}
html[data-theme="dark"] :is(.lot-tile.held,.lot-tile.waiting){background:#653440!important;color:#ffe2e6!important}
html[data-theme="dark"] .lot-tile[aria-pressed="true"]{outline-color:#9ac8ff!important}

/* Keep the company logo visible in both themes. */
html[data-theme="dark"] :is(.brand-logo,.signin-brand img,.signin-card-heading img){display:block!important}

/* Explicit light scheme prevents native controls inheriting an OS dark palette. */
html[data-theme="light"]{color-scheme:light;background:#f4f7fb;color:#172130}
html[data-theme="light"] body{color:#172130}
html[data-theme="light"] :is(input,select,textarea){color:#172130!important;background-color:#fff!important;border-color:#c5cfdd!important}
html[data-theme="light"] :is(input,textarea)::placeholder{color:#617087;opacity:1}
html[data-theme="light"] :is(.muted,.notice,.subtitle,.onedx-tagline,.file-meta,.allocation-lot-summary){color:#526176}
html[data-theme="light"] :is(.heading,.metrics,.dashboard-card,.out-filters,.out-metrics,.out-charts){background:#fff;color:#172130}
@media screen{
html[data-theme="dark"]{--ink:#e4eaf3;--paper:#141923;--head:#29374b;--soft:#263347;--accent2:#f1a086}
html[data-theme="dark"] :is(.heading,.metrics,.module-page-title,.dashboard-card,.sheet-title,.modal-head,.product-detail-note,.outbound-allocation-empty,.print-record-summary div,.print-certificate-row,.chart-half,.bulk-entry,.inline-extra-items,.extra-item,.admin-box-locked,.admin-box-unlocked,.login-history-row,.login-account-row,.module-card,.coming-soon-card,.embedded-app-bar,.mobile-access-dialog,.photo-batch-tools,.photo-batch-row,.record-photo-viewer-card,.out-filters,.out-metrics,.out-charts,.plan-head,.product-plan-tabs,#materialPhotoPanel .mp-row,#materialPhotoPanel .mp-empty,.mp-source-icon,.mp-viewer){background:#1d2532!important;color:#e4eaf3!important;border-color:#3a475a!important;box-shadow:none!important}
html[data-theme="dark"] :is(.heading h1,.heading h2,.module-page-title>span,.dashboard-card strong,.panel-head h2,.panel-head h3,.sheet-title h2,.product-detail-title,.install-guide strong,.install-guide p,.install-description,.install-note,.mobile-access-dialog label){color:#e4eaf3!important}
html[data-theme="dark"] :is(.status.expired,.status-badge.short,.status.request,.status.hold,.holiday-badge,.shipping-badge.stopped){background:#54313b!important;color:#ffd1d6!important}
html[data-theme="dark"] :is(.status.soon,.status.warn,.shipping-badge.held){background:#514320!important;color:#ffe5a3!important}
html[data-theme="dark"] :is(.status.ok,.status.done,.status.normal,.shipping-badge.normal){background:#204739!important;color:#b8efd4!important}
html[data-theme="dark"] :is(.status.progress,.status-badge,.shipping-badge,.cip-badge,.install-status){background:#263e5b!important;color:#c6e2ff!important}
html[data-theme="dark"] :is(.status.expired,.status.request,.status.hold,.shipping-badge.stopped){background:#54313b!important;color:#ffd1d6!important}
html[data-theme="dark"] .shipping-badge.held{background:#514320!important;color:#ffe5a3!important}
html[data-theme="dark"] :is(.message,.toast,#toast){background:#29374b!important;color:#f3f6fc!important}
html[data-theme="dark"] :is(.login-error,.lot-error){background:#402630!important;color:#ffd1d6!important}
html[data-theme="dark"] :is(.tabs button,.module-chip,.line-tabs button,.production-mode-tabs button,.table-sort-button){background:transparent!important;color:#b9c8dc!important}
html[data-theme="dark"] :is(.tabs button.active,.module-chip.active,.line-tabs button.active,.production-mode-tabs button.active){background:transparent!important;color:#ffabb3!important}
html[data-theme="dark"] :is(.calendar-date,.plan-input,.partner-input,.note-input){color:#e4eaf3!important}
}
/* Department-specific rules must override legacy ID selectors and semantic colours. */
@media screen {
html[data-theme="dark"]{--blue:#9bcaff;--green:#9de1c3;--soft-blue:#22364f;--soft-green:#203d34;--soft-red:#422b37;--sat:#22364f}
html[data-theme="dark"] #productionTabs button,html[data-theme="dark"] #productionDailyTabs button{color:#bdcce0!important}
html[data-theme="dark"] #productionTabs button.active,html[data-theme="dark"] #productionDailyTabs button.active{color:#ffabb3!important}
html[data-theme="dark"] :is(.table-toolbar h2,.panel-head h2,.panel-head h3,.product-row strong,#selectedProductName,#productModal .product-panel-head h3){color:#e4eaf3!important}
html[data-theme="dark"] :is(.actual-entry,.actual-value,.linked-value,.calendar-legend b,.calendar-date small,.summary-item.actual strong,.all-plan-item span,.all-plan-item em){color:#9bcaff!important}
html[data-theme="dark"] :is(.stock-value,.calendar-line.stock strong,.summary-item.stock strong){color:#9de1c3!important}
html[data-theme="dark"] :is(.stock-value.negative,.calendar-line.stock strong.negative){color:#ffb4bc!important}
html[data-theme="dark"] :is(.actual-entry em,.adjustment-badge){background:#263e5b!important;color:#c6e2ff!important;border-color:#587da7!important}
html[data-theme="dark"] .calendar-table .calendar-date{background:#29374b!important;color:#e4eaf3!important;border-color:#43516a!important}
html[data-theme="dark"] .calendar-table .calendar-day.sat .calendar-date{background:#263e5b!important;color:#c6e2ff!important}
html[data-theme="dark"] .calendar-table .calendar-day.sun .calendar-date,html[data-theme="dark"] .calendar-table .calendar-day.holiday .calendar-date{background:#54313b!important;color:#ffd1d6!important}
html[data-theme="dark"] :is(.calendar-line span:first-child,.calendar-legend,.source-label,.all-plan-empty,.field,.footnote){color:#b4c2d3!important}
html[data-theme="dark"] .calendar-table td.calendar-blank{background:#141923!important}
html[data-theme="dark"] .total-row td{background:#29374b!important}
html[data-theme="dark"] :is(.cip-badge,.cip-toggle-button.active){background:#514320!important;color:#ffe5a3!important;border-color:#96804c!important}
html[data-theme="dark"] :is(.shipping-badge.normal,.status-badge){background:#204739!important;color:#b8efd4!important}
html[data-theme="dark"] .status-badge.short{background:#54313b!important;color:#ffd1d6!important}
html[data-theme="dark"] .bar-track{background:#354359!important}
}
@media screen {
html[data-theme="dark"] .panel-head{background:#1d2532!important;color:#e4eaf3!important}
html[data-theme="dark"] :is(#products #productCount,#productModal #productCount){color:#b4c2d3!important}
}
@media screen {
html[data-theme="dark"] :is(.detail-item strong,#productModal .sales-summary strong){color:#e4eaf3!important}
html[data-theme="dark"] .material-sales-chart svg text{fill:#bdcce0!important}
html[data-theme="dark"] .material-sales-chart svg line{stroke:#43516a!important}
}
/* Material navigation follows the production screen's two-level menu. */
.material-app .topbar{min-height:46px;padding:5px 16px;gap:14px;margin-bottom:8px}
.material-app .inventory-kind-tabs{margin:0 auto 0 0;gap:22px;align-items:center}
.material-app .topbar>.actions{gap:18px;align-items:center}
.material-app .topbar :is(.inventory-kind-tabs,.actions) .btn{height:42px;min-height:42px;padding:0 2px;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;line-height:1.25;white-space:nowrap}
.material-app .inventory-kind-tabs .btn{font-size:16px!important;font-weight:900}
.material-app .topbar>.actions .btn{font-size:15px!important;font-weight:800}
html[data-theme="light"] .material-app .inventory-kind-tabs .btn{color:#687180!important}
html[data-theme="light"] .material-app .topbar>.actions .btn{color:#202838!important}
html[data-theme="light"] .material-app .topbar :is(.inventory-kind-tabs,.actions) .btn.active{color:#ff4b4b!important;border-bottom-color:#ff4b4b!important}
@media screen{
html[data-theme="dark"] .material-app{--brand:#ff757a;--brand-2:#9bcaff;--warn:#ffe5a3;--danger:#ffb4bc;--ok:#9de1c3}
html[data-theme="dark"] .material-app .topbar :is(.inventory-kind-tabs,.actions) .btn{background:transparent!important;color:#bdcce0!important;border-bottom-color:transparent!important}
html[data-theme="dark"] .material-app .topbar :is(.inventory-kind-tabs,.actions) .btn.active{background:transparent!important;color:#ffabb3!important;border-bottom-color:#ff757a!important}
html[data-theme="dark"] .material-app :is(.product-form,.raw-record-form,.raw-controls,.record-search-input,.product-manager,.sales-summary,.print-record-summary){background:#1d2532!important;color:#e4eaf3!important;border-color:#3a475a!important;box-shadow:none!important}
html[data-theme="dark"] .material-app :is(.note-input,.partner-input):focus{background:#29374b!important;color:#edf2fa!important}
html[data-theme="dark"] .material-app :is(.dashboard-track,.status.na,.lot-count-check){background:#29374b!important;color:#bdcce0!important}
html[data-theme="dark"] .material-app :is(.type-badge.inbound,.lot-count-match){background:#204739!important;color:#b8efd4!important}
html[data-theme="dark"] .material-app .type-badge.outbound{background:#263e5b!important;color:#c6e2ff!important}
html[data-theme="dark"] .material-app .lot-count-review{background:#514320!important;color:#ffe5a3!important}
html[data-theme="dark"] .material-app :is(.lot-legend,.lot-company-code,.lot-register-form small,.shipping-control-dialog p,.shipping-hold-panel p){color:#b4c2d3!important}
html[data-theme="dark"] .material-app :is(.shipping-hold-panel summary,#shippingControlError,.raw-row-actions .danger){color:#ffb4bc!important}
html[data-theme="dark"] .material-app .raw-row-actions .danger{background:#402630!important;border-color:#92515f!important}
}
@media(max-width:1100px){.material-app .topbar{flex-wrap:wrap;align-items:flex-start}.material-app .topbar>.actions{width:100%;justify-content:flex-start}}
@media(max-width:720px){.material-app .topbar{padding:5px 10px;gap:8px}.material-app .inventory-kind-tabs{order:0;width:100%;gap:15px;overflow-x:auto;flex-wrap:nowrap}.material-app .topbar>.actions{gap:15px;overflow-x:auto;flex-wrap:nowrap}.material-app .topbar :is(.inventory-kind-tabs,.actions) .btn{font-size:14px!important;flex:0 0 auto}}
/* Department titles share the production/material primary-menu typography. */
.department-page{padding-top:0;padding-left:0;padding-right:0}
:is(.heading,.topbar).department-heading{min-height:46px;padding:5px 16px;gap:14px;align-items:center}
:is(.heading,.topbar).department-heading h1{display:flex;align-items:center;box-sizing:border-box;height:42px;min-height:42px;margin:0;padding:0 2px;border-bottom:3px solid transparent;font-size:16px;font-weight:900;line-height:1.25;white-space:nowrap}
.department-heading .line-tabs button{height:42px;min-height:42px;line-height:1.25;font-size:15px;font-weight:800}
@media(max-width:720px){:is(.heading,.topbar).department-heading{padding:5px 10px;gap:8px}:is(.heading,.topbar).department-heading h1,.department-heading .line-tabs button{font-size:14px}}

html[data-theme="dark"] .pnfs-save-notice{background:#1e2938!important;color:#e4eaf3!important;border-color:#64748b!important}
/* Readable save errors in the parent window in either theme. */
.pnfs-save-notice{background:#fff!important;color:#172033!important;border-color:#a6b2c3!important;line-height:1.65!important;font-weight:500;overflow-wrap:anywhere}
.pnfs-save-notice button{margin:8px 6px 0 0!important;min-height:36px!important;padding:7px 12px!important;background:#edf2f8!important;color:#172033!important;border:1px solid #98a9bf!important;border-radius:6px!important;font-weight:700!important}
html[data-theme="dark"] .pnfs-save-notice{background:#1e2938!important;color:#f1f5f9!important;border-color:#94a3b8!important}
html[data-theme="dark"] .pnfs-save-notice button{background:#33465e!important;color:#fff!important;border-color:#94a3b8!important}
.pnfs-save-notice button:focus-visible{outline:2px solid #ff757a!important;outline-offset:2px}

/* Outline covers the complete date cell, above its date-header background. */
.calendar-table td.calendar-day.today{position:relative;box-shadow:none!important}.calendar-table td.calendar-day.today::after{content:"";position:absolute;inset:0;border:3px solid var(--accent,#ff4b4b);pointer-events:none;z-index:4}.calendar-table td.calendar-day.sat .calendar-date>span:first-child{color:#2767a7}.calendar-table td.calendar-day.sun .calendar-date>span:first-child,.calendar-table td.calendar-day.holiday .calendar-date>span:first-child{color:#d9363e}html[data-theme="dark"] .calendar-table td.calendar-day.sat .calendar-date>span:first-child{color:#9bcaff!important}html[data-theme="dark"] .calendar-table td.calendar-day.sun .calendar-date>span:first-child,html[data-theme="dark"] .calendar-table td.calendar-day.holiday .calendar-date>span:first-child{color:#ff8e98!important}

/* Shared workspace palette for the authenticated department screens. */
@media screen{
:is(body:is(.module-production,.module-material,.module-maintenance):has(#appShell:not([hidden])),:is(body.material-app,body.maintenance-list-page,body.plan-workspace)){--trial-bg:#eff1f4;--trial-panel:#fafbfd;--trial-head:#edf1f6;background:var(--trial-bg)!important}
html[data-theme=dark] :is(body:is(.module-production,.module-material,.module-maintenance):has(#appShell:not([hidden])),:is(body.material-app,body.maintenance-list-page,body.plan-workspace)){--trial-bg:#191d22;--trial-panel:#20252c;--trial-head:#303741}
body:is(.module-production,.module-material,.module-maintenance):has(#appShell:not([hidden])) :is(#appShell,#moduleContent,#records,#products,#aggregates,#notes,#productionPlan,#productionDaily,#materialAppScreen,#materialFrame,#maintenanceFrame),html[data-theme] :is(body.material-app,body.maintenance-list-page,body.plan-workspace) :is(.app,.shell,.daily-shell,#weeklyApp,#productInventoryMain,#rawInventoryApp){background:var(--trial-bg)!important}
body:is(.module-production,.module-material,.module-maintenance):has(#appShell:not([hidden])) :is(.topbar,.filterbar,.panel,.editor-panel,.table-toolbar,.table-wrap,.detail-item),html[data-theme] :is(body.material-app,body.maintenance-list-page,body.plan-workspace) :is(.app,.shell,#weeklyApp,#materialDashboard,#productModal,.daily-shell,#rawInventoryApp,#recordModal) :is(.sheet,.sheet-title,.controls,.tabs,.table-wrap,.lot-scroll-pane,.panel,.metric,.entry-search-panel,.record-form,.product-panel,.product-detail,.product-panel-head,.out-filters,.out-charts,.out-metrics>div,.product-plan-tabs,.week-sheet,.week-toolbar,.recipe-card,.inventory-metric){background:var(--trial-panel)!important}
body:is(.module-production,.module-material,.module-maintenance):has(#appShell:not([hidden]))  :is(#records,#products,#aggregates,#notes) thead th,:is(body.material-app,body.maintenance-list-page,body.plan-workspace) table:not(.calendar-table) thead th{background:var(--trial-head)!important}
}

@media screen{
:root{--ledger-edge:#d6dbe1}
html[data-theme=dark]{--ledger-edge:#3b434d}
#records table :is(td,th),body.material-app .movement-scroll :is(td,th),body.maintenance-list-page table :is(td,th){border-color:var(--ledger-edge)!important}
#records tbody td,body.material-app .movement-scroll tbody td{background:var(--trial-panel)!important}
body.material-app .movement-scroll :is(td,th){padding:10px 8px;vertical-align:middle}
body.material-app .movement-scroll th{text-align:center}
body.material-app #recordModal.inline-record-panel .record-list:has(.movement-scroll){padding:0;border:0;background:transparent!important}
body.material-app .movement-scroll{box-sizing:border-box;border:1px solid var(--ledger-edge);border-radius:8px;background:var(--trial-panel)}
#recordCsvBtn{margin-inline-start:auto;align-self:end}
:is(#rawRecordCount,#rowCount,#count){font-weight:400;padding-inline-start:5px}
}

@media screen{
html[data-theme=light] :is(#records,body.material-app,body.maintenance-list-page) thead th{box-shadow:none;border-bottom:1px solid var(--ledger-edge)!important}
html[data-theme=light] #records>.editor-panel{border:1px solid var(--ledger-edge)}
}

@media screen{body.plan-workspace{--wk-bg:var(--trial-panel);--wk-soft:var(--trial-head);--wk-line:var(--ledger-edge)} body.plan-workspace :is(.week-cell,.dialog,.recipe-body){background:var(--trial-panel)!important} body.module-production :is(#products,#aggregates,#notes) table :is(th,td){border-color:var(--ledger-edge)!important} body.material-app .product-row:not(.active),body.module-production #products .product-row:not(.active){background:var(--trial-panel)!important;color:inherit} }

/* Shared single-line workspace controls */
@layer pnfs-control-sizing {
 @media screen {
  :where(#appShell,body.material-app,body.maintenance-list-page,body.plan-workspace)
  :is(input:not([type]),input:is([type=text],[type=search],[type=number],[type=date],[type=time],[type=datetime-local],[type=email],[type=tel],[type=url],[type=password]),select:not([multiple]):not([size])):not(#nasSide *):not(.pnfs-date-picker input),
  :is(#rawReportSearch,#recordSubmitBtn,#recordCancelEditBtn,#rawRecordSaveBtn,#rawRecordClearBtn,#addExtraItem,#saveBtn,#clearBtn,#clearRecordForm,.edit-form .form-actions button){
    box-sizing:border-box!important;height:30px!important;min-height:30px!important;max-height:30px!important;padding-block:0!important;line-height:normal!important
  }
 }
}


/* Center single-symbol controls independently of font baseline. */
:is(button.icon-add-button,button.icon-remove-button,button.photo-batch-remove,button.mobile-close-button,button.photo-viewer-close,button#closeProductionRecordPhotoViewer,button[data-remove-material],.mp-source-head button[data-dismiss]){position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;font-size:0!important}
:is(button.icon-add-button,button.icon-remove-button,button.photo-batch-remove,button.mobile-close-button,button.photo-viewer-close,button#closeProductionRecordPhotoViewer,button[data-remove-material],.mp-source-head button[data-dismiss])::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;background:linear-gradient(currentColor,currentColor) center/100% 2px no-repeat,linear-gradient(currentColor,currentColor) center/2px 100% no-repeat;transform:translate(-50%,-50%) rotate(45deg);pointer-events:none}
button.icon-add-button::after{transform:translate(-50%,-50%);background-size:100% 3px,3px 100%}
#nasSide .cal-tools button[aria-label="이전 달"],#nasSide .cal-tools button[aria-label="다음 달"]{position:relative;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;font-size:0!important}
#nasSide .cal-tools button[aria-label="이전 달"]::after,#nasSide .cal-tools button[aria-label="다음 달"]::after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translate(-35%,-50%) rotate(135deg);pointer-events:none}
#nasSide .cal-tools button[aria-label="다음 달"]::after{transform:translate(-65%,-50%) rotate(-45deg)}
button#addExtraItem.icon-add-button::after{transform:translate(-50%,-50%);background-size:100% 3px,3px 100%}

/* Numeric calendar hit area follows its compact visible field. */
@layer pnfs-control-sizing {
 @media screen {
  body:not(.quality-list-page) .pnfs-numeric-date .pnfs-date-picker>input[type=date]{box-sizing:border-box!important;top:0!important;bottom:0!important;height:100%!important;min-height:0!important;max-height:100%!important;margin:0!important;padding:0!important}
 }
}

/* Compact editor actions share the input center, including maintenance attachments. */
@layer pnfs-control-sizing {
 @media screen {
  :is(#recordSubmitBtn,#recordCancelEditBtn,#rawRecordSaveBtn,#rawRecordClearBtn,#rawReportSearch,#saveBtn,#clearBtn,#clearRecordForm,.edit-form .form-actions button){display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}
  body.maintenance-list-page #maintenanceFileInput{box-sizing:border-box!important;height:30px!important;min-height:30px!important;max-height:30px!important;padding:3px 6px!important;line-height:22px!important;vertical-align:middle}
  body.maintenance-list-page #maintenanceFileInput::file-selector-button{box-sizing:border-box;height:22px;margin:0 8px 0 0;padding:0 8px;line-height:20px;vertical-align:top;font:inherit}
 }
}

/* Same paging controls as production records. */
.movement-record-pager{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:8px 0;font-size:13px;color:var(--ink)}
html[data-theme] body.material-app .movement-record-pager button{display:inline-flex;align-items:center;justify-content:center;height:30px;min-height:30px;padding:4px 12px;line-height:1;font-size:14px;border-radius:8px}
.movement-record-pager button:disabled{opacity:.45;cursor:default}
@media print{.movement-record-pager{display:none}}

/* Center raw date text against the entire box, not an asymmetric icon inset. */
@media screen {
html[data-theme] body.material-app .raw-record-form :is(#rawRecordDate,#rawRecordExpiry){padding-left:24px!important;padding-right:24px!important;text-align:center!important}
html[data-theme] body.material-app .raw-record-form :is(.pnfs-date-picker,.raw-expiry-calendar){right:2px;width:20px}
html[data-theme] body.material-app .raw-record-form select{text-align:center!important;text-align-last:center}
html[data-theme] body.material-app .raw-record-form :is(#rawRecordQty,#rawRecordUnitPrice){text-align:right!important}
html[data-theme] body.material-app .raw-history-sheet .raw-ledger-table tbody td:is(.raw-quantity,.raw-price){text-align:right!important}
html[data-theme] body.material-app .raw-history-sheet .raw-ledger-table :is(th,td){vertical-align:middle!important}
}

/* Product movements follow the raw ledger's horizontal and vertical alignment. */
@media screen {
html[data-theme] body.material-app #recordModal .record-table :is(th,td){text-align:center!important;vertical-align:middle!important}
html[data-theme] body.material-app #recordModal #recordBody>tr>td:nth-child(7){text-align:right!important;font-variant-numeric:tabular-nums}
html[data-theme] body.material-app #recordModal #recordForm :is(input:not([type=checkbox]):not([type=hidden]),select){text-align:center!important}
html[data-theme] body.material-app #recordModal #recordForm select{text-align-last:center}
html[data-theme] body.material-app #recordModal #recordForm #recordQty{text-align:right!important}
html[data-theme] body.material-app #recordModal #recordForm :is(#recordDate,#recordManufacturedDate,#recordExpiry){padding-left:24px!important;padding-right:24px!important}
html[data-theme] body.material-app #recordModal #recordForm .pnfs-date-picker{right:2px;width:20px}
html[data-theme] body.material-app #recordModal .record-row-actions{align-items:center!important;justify-content:center!important}
}

/* Production records share product movement alignment. */
@media screen {
html[data-theme] #records table :is(th,td){text-align:center!important;vertical-align:middle!important}
html[data-theme] #records #recordsBody>tr>td:nth-child(3){text-align:right!important;font-variant-numeric:tabular-nums}
html[data-theme] #records #recordForm :is(input:not([type=checkbox]):not([type=hidden]),select){text-align:center!important}
html[data-theme] #records #recordForm select{text-align-last:center}
html[data-theme] #records #recordForm :is(#recordQuantity,input[type=number]){text-align:right!important}
html[data-theme] #records #recordForm input[data-numeric-date]{padding-left:24px!important;padding-right:24px!important}
html[data-theme] #records #recordForm .pnfs-date-picker{right:2px;width:20px}
html[data-theme] #records .row-actions{align-items:center!important;justify-content:center!important}
}

/* Quality and maintenance use the same ledger alignment as production. */
@media screen {
html[data-theme] body.maintenance-list-page table :is(th,td){text-align:center!important;vertical-align:middle!important}
html[data-theme] body.maintenance-list-page :is(.field input:not([type=file]):not([type=hidden]),.field select){text-align:center!important}
html[data-theme] body.maintenance-list-page .field select{text-align-last:center}
html[data-theme] body.maintenance-list-page .field input[type=number]{text-align:right!important}
html[data-theme] body.maintenance-list-page input[data-numeric-date]{padding-left:24px!important;padding-right:24px!important}
html[data-theme] body.maintenance-list-page .pnfs-date-picker{right:2px;width:20px}
html[data-theme] body.maintenance-list-page table :is(.actions,.row-actions){align-items:center!important;justify-content:center!important}
html[data-theme] body.maintenance-list-page :is(button,.upload){align-items:center;justify-content:center}
}
/* Align ledger filters consistently in both themes. */
@media screen {
html[data-theme] .filterbar :is(input,select),
html[data-theme] body.material-app :is(#recordSearchInput,#rawRecordSearchInput,#shippingHoldFilter){text-align:center!important;text-align-last:center}
html[data-theme] body.maintenance-list-page .field input[type=number]:not([type=hidden]){text-align:right!important}
}