:root{--primary:#2563eb;--ink:#172033;--muted:#718096;--line:#e5e9f0;--surface:#fff;--canvas:#f5f7fa;--nav:#152238;--success:#16805b;--warning:#b7791f;--danger:#c53030;--shadow:0 8px 24px rgba(28,43,68,.08)}
*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font:14px/1.5 "Segoe UI","Microsoft YaHei",Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{font-size:11px;letter-spacing:1.2px;color:#91a0b5;margin:0 0 5px;text-transform:uppercase}.login-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(145deg,#edf3fb,#f8fafc)}.login-panel{width:min(390px,calc(100% - 40px));background:var(--surface);padding:42px 40px;border:1px solid var(--line);box-shadow:var(--shadow)}.brand-mark{display:grid;place-items:center;width:52px;height:52px;background:var(--primary);color:#fff;font-weight:800;font-size:17px;letter-spacing:1px;margin-bottom:22px}.brand-mark.small{width:32px;height:32px;margin:0;font-size:11px}.login-panel h1{font-size:25px;margin:0 0 5px}.stack-form{display:grid;gap:16px;margin-top:28px}.stack-form label,.form-grid label{display:grid;gap:6px;color:#4c5870;font-size:13px}.stack-form input,.form-grid input,.form-grid select,.form-grid textarea,.settings-form input,.settings-form select{width:100%;border:1px solid #d8dee8;background:#fff;padding:10px 11px;outline:0;color:var(--ink)}input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}.wide{width:100%}.primary,.secondary,.danger,.text-button{padding:9px 14px;font-weight:600}.primary{background:var(--primary);color:#fff}.secondary{background:#eef3fb;color:#2f5aa0}.danger{background:#fff0f0;color:var(--danger)}.text-button{padding:4px 7px;background:transparent;color:var(--primary)}.form-message{min-height:23px;color:var(--danger);font-size:13px}.app-shell{min-height:100vh;display:flex}.sidebar{width:230px;min-width:230px;background:var(--nav);color:#b9c4d6;display:flex;flex-direction:column;padding:21px 14px}.sidebar-brand{color:#fff;display:flex;align-items:center;gap:10px;font-size:15px;font-weight:700;padding:0 8px 28px}.main-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;color:#aab7ca;background:transparent;text-align:left;padding:11px 12px;font-size:14px}.nav-item:hover,.nav-item.active{background:#243654;color:#fff}.nav-icon{width:19px;text-align:center;color:#7fa9ea;font-size:15px}.sidebar-bottom{margin-top:auto;border-top:1px solid #293952;padding:18px 8px 3px;font-size:12px;color:#8190a6}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#41ba86;margin-right:7px}.main-content{min-width:0;flex:1}.topbar{height:88px;background:var(--surface);border-bottom:1px solid var(--line);padding:19px 30px;display:flex;justify-content:space-between;align-items:center}.topbar h2{font-size:22px;margin:0}.user-menu{display:flex;gap:10px;align-items:center;color:#526075}.user-avatar{width:31px;height:31px;display:grid;place-items:center;background:#dfeaff;color:#2455a0;font-weight:700;border-radius:50%}.icon-button{background:transparent;color:#66758d;font-size:20px;padding:5px 7px}.icon-button:hover{color:var(--primary)}.view{padding:27px 30px 40px;max-width:1800px}.view-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:20px}.view-head h3{font-size:17px;margin:0}.view-actions{display:flex;gap:8px;flex-wrap:wrap}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.metric{background:var(--surface);border:1px solid var(--line);padding:18px 20px;min-height:111px}.metric-label{font-size:13px;color:var(--muted);display:flex;justify-content:space-between}.metric-value{font-size:28px;font-weight:700;margin-top:12px;color:var(--ink)}.metric-accent{color:var(--primary)}.dashboard-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.panel{background:var(--surface);border:1px solid var(--line);padding:18px}.panel h3{font-size:15px;margin:0 0 16px}.warehouse-list{display:grid;gap:13px}.warehouse-row{display:grid;grid-template-columns:105px 1fr 65px;align-items:center;gap:10px;font-size:13px}.bar{height:7px;background:#eef1f5}.bar i{display:block;height:100%;background:var(--primary)}.table-panel{background:var(--surface);border:1px solid var(--line);overflow:hidden}.table-toolbar{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.selection-count{color:var(--muted);font-size:12px}.table-wrap{overflow:auto;max-height:calc(100vh - 255px)}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}th{position:sticky;top:0;z-index:2;background:#f8fafc;border-bottom:1px solid #dce2ec;color:#526075;font-weight:600;text-align:left;padding:0 10px;height:42px}td{border-bottom:1px solid #edf0f5;padding:11px 10px;height:45px;color:#364257}tbody tr:hover{background:#f7faff}.th-inner{display:flex;align-items:center;gap:7px}.filter-btn{background:transparent;color:#a3adbb;padding:3px;font-size:12px}.filter-btn:hover,.filter-btn.active{color:var(--primary)}.checkbox{width:15px;height:15px;accent-color:var(--primary)}.tag{display:inline-flex;padding:3px 8px;border-radius:2px;font-size:12px;background:#eff4ff;color:#3b65a4}.tag.success{background:#e9f8f1;color:var(--success)}.tag.warning{background:#fff7e5;color:var(--warning)}.tag.danger{background:#fff0f0;color:var(--danger)}.table-footer{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;color:var(--muted);font-size:12px}.pagination{display:flex;gap:4px}.page-btn{min-width:29px;height:28px;background:#f1f4f8;color:#56657a}.page-btn.active{background:var(--primary);color:#fff}.page-btn:disabled{opacity:.45;cursor:not-allowed}.filter-popover{position:fixed;z-index:20;width:250px;background:#fff;border:1px solid var(--line);box-shadow:0 12px 30px rgba(29,43,67,.18);padding:13px}.filter-title{display:flex;justify-content:space-between;color:#526075;font-weight:600;margin-bottom:10px}.filter-search{width:100%;padding:8px;border:1px solid #dbe1ea;margin-bottom:8px}.filter-sort{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:9px}.filter-sort button{padding:7px;background:#f1f4f8;color:#4f5e73}.filter-values{border-top:1px solid var(--line);padding-top:7px;max-height:190px;overflow:auto;display:grid;gap:2px}.filter-value{display:flex;gap:8px;padding:6px 2px;color:#536075}.filter-clear{color:var(--primary);background:transparent}.modal{position:fixed;inset:0;z-index:30;display:grid;place-items:center}.modal-backdrop{position:absolute;inset:0;background:rgba(14,24,41,.42)}.modal-card{position:relative;background:#fff;width:min(720px,calc(100% - 30px));max-height:90vh;overflow:auto;box-shadow:0 18px 45px rgba(0,0,0,.2)}.modal-header{padding:17px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.modal-header h3{margin:0;font-size:16px}.modal-body{padding:20px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.form-grid .full{grid-column:1/-1}.form-grid textarea{min-height:76px;resize:vertical}.modal-footer{display:flex;justify-content:flex-end;gap:8px;padding-top:20px}.settings-layout{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.settings-form{display:grid;gap:16px}.settings-section{border-top:1px solid var(--line);padding-top:17px}.switch-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;color:#4c5870}.switch-row input{width:17px;height:17px;accent-color:var(--primary)}.warehouse-editor{display:flex;gap:7px;flex-wrap:wrap}.warehouse-chip{background:#eef3fb;color:#3c5b8d;padding:6px 9px}.warehouse-chip button{background:transparent;color:#8a98ab;margin-left:5px}.toast{position:fixed;right:26px;top:75px;z-index:50;background:#152238;color:#fff;padding:11px 16px;box-shadow:var(--shadow);opacity:0;transform:translateY(-8px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translateY(0)}.recent-table{width:100%}.empty{padding:42px;text-align:center;color:var(--muted)}.danger-text{color:var(--danger)}@media(max-width:980px){.sidebar{width:70px;min-width:70px;padding:17px 9px}.sidebar-brand span:last-child,.sidebar-bottom span:last-child,.nav-item span:last-child{display:none}.sidebar-brand{padding:0 9px 28px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid,.settings-layout{grid-template-columns:1fr}.view{padding:22px 18px}.topbar{padding:16px 18px}}@media(max-width:600px){.login-panel{padding:32px 25px}.metric-grid{gap:9px}.metric{padding:13px}.metric-value{font-size:22px}.topbar{height:78px}.topbar h2{font-size:18px}.user-menu #current-user{display:none}.view-head{display:block}.view-actions{margin-top:13px}.form-grid{grid-template-columns:1fr}.table-wrap{max-height:calc(100vh - 290px)}.table-toolbar{align-items:flex-start;flex-direction:column}}
/* Refined enterprise surface and form spacing. */
:root{--canvas:#f3f6fa;--surface:#fff;--line:#e2e8f0;--ink:#172033;--muted:#718096;--shadow:0 5px 18px rgba(22,38,64,.06)}
body{background:var(--canvas);color:var(--ink)}
.login-screen{background:#edf2f7}
.login-panel{border-radius:8px;padding:40px;box-shadow:0 16px 38px rgba(24,43,71,.11)}
.app-shell{background:var(--canvas)}
.sidebar{background:#152238}
.topbar{box-shadow:0 1px 0 rgba(20,35,58,.02)}
.view{padding-top:25px}
.view-head{margin-bottom:18px}
.view-head h3{font-weight:700;letter-spacing:.1px}
.metric,.panel,.table-panel{border-radius:6px;box-shadow:var(--shadow)}
.metric{padding:17px 19px}
.table-panel{overflow:hidden}
.table-toolbar{min-height:60px;padding:12px 16px}
.table-wrap{max-height:calc(100vh - 278px);scrollbar-gutter:stable;overscroll-behavior:contain}
th{height:44px;background:#f8fafc}
td{height:46px;padding:10px 10px}
.primary,.secondary,.danger{border-radius:4px;min-height:36px}
.text-button{border-radius:3px}
.filter-popover{border-radius:6px;padding:14px;max-height:min(420px,calc(100vh - 24px));overflow:hidden}
.filter-search{height:38px;border-radius:4px}
.filter-sort button{border-radius:4px}
.filter-values{max-height:235px}
.modal{padding:16px}
.modal-card{width:min(920px,calc(100vw - 32px));max-height:calc(100vh - 32px);border-radius:8px;overflow:hidden}
.modal-header{min-height:66px;padding:18px 24px;background:#fff}
.modal-header h3{font-size:17px;font-weight:700}
.modal-body{padding:24px 28px;overflow:auto}
.form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 16px}
.form-grid label{font-weight:500;color:#46546b}
.form-grid input,.form-grid select,.form-grid textarea{border-radius:4px;min-height:40px;padding:9px 11px}
.form-grid textarea{min-height:84px}
.modal-footer{border-top:1px solid var(--line);margin-top:2px;padding-top:16px}
.table-footer{border-top:1px solid #edf1f5}
@media(max-width:840px){.modal-card{width:min(680px,calc(100vw - 24px))}.modal-body{padding:20px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.modal{padding:8px}.modal-card{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.modal-header{padding:16px 18px}.modal-body{padding:18px}.form-grid{grid-template-columns:1fr;gap:14px}.table-wrap{max-height:calc(100vh - 300px)}}

/* Inventory editor redesign. */
.inventory-form{display:grid;gap:24px}
.inventory-form-summary{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:2px 0 20px;border-bottom:1px solid var(--line)}
.inventory-form-summary h4{margin:0;font-size:21px;line-height:1.25;color:var(--ink)}
.inventory-form-summary .muted{margin:6px 0 0;font-size:13px}
.record-meta-group{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end;padding-top:5px}
.record-chip{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;background:#edf3ff;color:#315b9a;font-size:12px;font-weight:700}
.record-chip-new{background:#eaf8f1;color:var(--success)}
.record-meta{font-size:12px;color:var(--muted);white-space:nowrap}
.inventory-section{display:grid;gap:16px}
.inventory-section+.inventory-section{border-top:1px solid var(--line);padding-top:23px}
.inventory-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.section-kicker{margin:0 0 3px;color:var(--primary);font-size:10px;font-weight:800;letter-spacing:1.3px}
.inventory-section-head h5{margin:0;font-size:15px;color:var(--ink)}
.section-note{color:var(--muted);font-size:12px;padding-top:4px}
.inventory-section-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.inventory-section-grid-base{grid-template-columns:repeat(2,minmax(0,1fr))}
.inventory-field{display:grid;align-content:start;gap:7px;min-width:0}
.inventory-field-wide{grid-column:1/-1}
.field-label{display:flex;align-items:center;gap:3px;color:#46546b;font-size:13px;font-weight:600}
.required-mark{color:var(--danger);font-weight:800}
.input-shell{display:flex;min-width:0;min-height:42px;border:1px solid #d8dee8;background:#fff;border-radius:4px;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.input-shell:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.input-shell input,.input-shell select{flex:1;min-width:0;width:100%;height:40px;padding:9px 11px;border:0;background:transparent;color:var(--ink);outline:0;box-shadow:none}
.input-shell select{cursor:pointer}
.field-unit{display:flex;align-items:center;padding:0 11px;border-left:1px solid #e5e9f0;background:#f8fafc;color:var(--muted);font-size:12px;white-space:nowrap}
.inventory-field textarea{width:100%;min-height:88px;padding:10px 11px;border:1px solid #d8dee8;border-radius:4px;background:#fff;color:var(--ink);resize:vertical;outline:0}
.inventory-field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.inventory-form-footer{position:sticky;bottom:-24px;display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:1px;padding:16px 0 0;background:#fff;border-top:1px solid var(--line)}
.required-hint{color:var(--muted);font-size:12px}
.modal-footer-actions{display:flex;justify-content:flex-end;gap:8px}
.modal-footer-actions button{min-width:92px}
.modal-footer-actions button:disabled{opacity:.65;cursor:wait}
@media(max-width:840px){
  .inventory-section-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .inventory-form{gap:20px}
  .inventory-form-summary{display:block;padding-bottom:16px}
  .record-meta-group{justify-content:flex-start;padding-top:12px}
  .inventory-section-grid,.inventory-section-grid-base{grid-template-columns:1fr;gap:13px}
  .inventory-section-grid .inventory-field-wide{grid-column:auto}
  .inventory-form-footer{bottom:-18px;display:block;padding-bottom:2px}
  .required-hint{display:block;margin-bottom:11px}
  .modal-footer-actions{justify-content:stretch}
  .modal-footer-actions button{flex:1}
}

/* Match the reference mold editor dialog and filter select-all row. */
.filter-select-all{display:flex;align-items:center;gap:8px;padding:7px 2px;border-bottom:1px solid var(--line);color:#536075;font-weight:600}
.filter-select-actions{display:flex;align-items:center;border-bottom:1px solid var(--line)}
.filter-select-actions .filter-select-all{flex:1;border-bottom:0}
.filter-invert{padding:7px 2px;background:transparent;color:var(--primary);font-weight:600}
.filter-invert:hover{text-decoration:underline}
.filter-title-actions{display:flex;align-items:center;gap:12px}
.filter-export{padding:0;background:transparent;color:var(--primary)}
.filter-export:hover{text-decoration:underline}
.filter-select-all input{width:15px;height:15px;accent-color:var(--primary)}
  .table-context{display:flex;align-items:baseline;gap:10px;white-space:nowrap}
  .table-context h3{margin:0;color:var(--ink);font-size:15px;font-weight:700}
  .transfer-toolbar-context{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap}
  .transfer-toolbar-context .transfer-management-stats{flex:0 1 auto;min-width:0}
  .settings-page-head .muted{margin:0}
  .table-context .muted{font-size:12px}
  .flow-management-stats{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:12px}
  .flow-management-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
  .flow-management-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
  .flow-management-stats strong{margin-left:3px;color:var(--ink);font-size:13px}
  .flow-stat{display:inline-flex;align-items:center;padding:4px 8px;border-radius:3px}
  .flow-stat-filter{border:1px solid transparent;font:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s}
  .flow-stat-filter:hover,.flow-stat-filter:focus-visible{border-color:currentColor;box-shadow:0 0 0 2px rgba(37,99,235,.12);outline:0}
  .flow-stat-filter.active{border-color:currentColor;box-shadow:inset 0 0 0 1px currentColor;font-weight:600}
  .flow-stat-net{background:#eef3f8;color:#45617d}
  .flow-stat-reconciliation{font-weight:600}
  .flow-stat-reconciliation.ok{background:#e9f8f1;color:#16805b}
  .flow-stat-reconciliation.ok::before{content:'✓';margin-right:4px;font-weight:700}
  .flow-stat-reconciliation.ok strong{color:#16805b}
  .flow-stat-reconciliation.error{background:#fff0f0;color:#c53030}
  .flow-stat-reconciliation.error::before{content:'!';display:inline-grid;place-items:center;width:14px;height:14px;margin-right:4px;border-radius:50%;background:#c53030;color:#fff;font-size:10px;font-weight:700}
  .flow-stat-reconciliation.pending{background:#f3f5f8;color:#718096}
  .flow-reconciliation-audit{min-height:25px;padding:4px 9px;border:1px solid #e3a3a3;border-radius:3px;background:#fff7f7;color:#b42323;font-size:12px;font-weight:600;cursor:pointer}
  .flow-reconciliation-audit:hover,.flow-reconciliation-audit:focus-visible{border-color:#c94b4b;background:#fff0f0;outline:0}
  .flow-stat-inbound{background:#e9f8f1;color:#16805b}
  .flow-stat-outbound{background:#fff7e5;color:#b7791f}
  .flow-stat-deleted{background:#fff0f0;color:#c53030}
  .flow-stat-today-inbound{background:#eef5ff;color:#2f67b1}
  .flow-stat-today-outbound{background:#f2efff;color:#6852a6}
  .flow-stat-today-deleted{background:#f7f1ed;color:#9a5b31}
  .flow-stat-inbound strong{color:#16805b}
  .flow-stat-outbound strong{color:#b7791f}
  .flow-stat-deleted strong{color:#c53030}
  .flow-stat-today-inbound strong{color:#2f67b1}
  .flow-stat-today-outbound strong{color:#6852a6}
  .flow-stat-today-deleted strong{color:#9a5b31}
  .flow-stat-net strong{color:#234b72}
  .flow-stat-view-toggle{min-height:25px;padding:4px 10px;border:1px solid #bcd0ee;border-radius:4px;background:#f4f8ff;color:#2d61a7;font:inherit;font-weight:600;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
  .flow-stat-view-toggle:hover,.flow-stat-view-toggle:focus-visible{border-color:#7ea8e5;background:#eaf2ff;box-shadow:0 0 0 2px rgba(37,99,235,.12);outline:0}
  .flow-view-flip{min-width:0}
  .flow-view-flip.is-flipped{perspective:1600px}
  .flow-view-flip.is-flipped{width:min(1180px,100%);margin-inline:auto}
  .flow-view-flip-inner{display:grid;min-width:0}
  .flow-view-flip.is-flipped .flow-view-flip-inner{transform-style:preserve-3d;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
  .flow-view-flip.is-flipped .flow-view-flip-inner{transform:rotateY(180deg)}
  .flow-view-face{grid-area:1/1;min-width:0}
  .flow-view-flip.is-flipped .flow-view-face{backface-visibility:hidden;-webkit-backface-visibility:hidden}
  .flow-view-back{visibility:hidden}
  .flow-view-flip.is-flipped .flow-view-back{visibility:visible;transform:rotateY(180deg)}
  .flow-statistics-panel{min-width:0}
  .flow-statistics-heading{display:flex;align-items:baseline;gap:10px;min-width:0}
  .flow-statistics-heading strong{color:var(--ink);font-size:14px}
  .flow-statistics-heading span{color:var(--muted);font-size:12px}
  .flow-statistics-filters{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap}
  .flow-statistics-filter{display:grid;gap:3px;min-width:112px;color:var(--muted);font-size:11px;text-align:left}
  .flow-statistics-filter select{width:100%;min-height:30px;padding:5px 26px 5px 8px;border:1px solid #d6e0ee;border-radius:4px;background-color:#fff;color:#40536d;font-size:12px}
  .flow-statistics-filter select:hover,.flow-statistics-filter select:focus{border-color:#8fb2e7;color:var(--primary);outline:0}
  .flow-statistics-period{display:inline-flex;border:1px solid #d6e0ee;border-radius:4px;overflow:hidden;background:#fff}
  .flow-statistics-period button{min-height:28px;padding:4px 10px;border:0;border-right:1px solid #d6e0ee;background:#fff;color:#5a6d86;font-size:12px;cursor:pointer}
  .flow-statistics-period button:last-child{border-right:0}
  .flow-statistics-period button:hover,.flow-statistics-period button:focus-visible{background:#f1f6ff;color:var(--primary);outline:0}
  .flow-statistics-period button.active{background:#eaf2ff;color:var(--primary);font-weight:600}
  .flow-statistics-summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px}
  .flow-statistics-summary strong{margin-left:3px;color:var(--ink);font-size:13px}
  .flow-statistics-summary .flow-statistics-inbound strong{color:#16805b}
  .flow-statistics-summary .flow-statistics-outbound strong{color:#b7791f}
  .flow-statistics-summary .flow-statistics-deleted strong{color:#c53030}
  .flow-statistics-table-wrap{max-height:calc(100vh - 270px);overflow:auto}
  .flow-statistics-table{width:100%;min-width:700px;border-collapse:collapse;table-layout:fixed;text-align:center}
  .flow-statistics-table th,.flow-statistics-table td{height:42px;padding:8px 12px;border-bottom:1px solid #e7edf4;color:#526075;font-size:12px;text-align:center;vertical-align:middle;font-variant-numeric:tabular-nums}
  .flow-statistics-table th{background:#f8fafc;color:#40536d;font-weight:600}
  .flow-statistics-table tbody tr:hover{background:#f7faff}
  .flow-statistics-table tfoot th{background:#f3f6fa;color:var(--ink);font-weight:700}
  .flow-statistics-table .flow-record-inbound,.flow-statistics-table .flow-record-outbound,.flow-statistics-table .quantity-zero{font-weight:600}
  .flow-statistics-timeline-trigger{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:27px;padding:3px 8px;border:1px solid transparent;border-radius:4px;background:transparent;color:inherit;font:inherit;line-height:1.2;font-variant-numeric:tabular-nums;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
  .flow-statistics-timeline-trigger:hover,.flow-statistics-timeline-trigger:focus-visible,.flow-statistics-timeline-trigger.is-expanded{border-color:#a9c4ec;background:#eef5ff;color:var(--primary);outline:0}
  .flow-statistics-count-value{color:#355b8f;font-weight:600}
  .flow-trend-icon{display:inline-flex;align-items:center;width:12px;height:14px;margin-left:4px;font-size:12px;font-weight:700;line-height:1;vertical-align:-1px}
  .flow-trend-up{color:#16805b}
  .flow-trend-down{color:#c53030}
  .flow-trend-up::before{content:"↑"}
  .flow-trend-down::before{content:"↓"}
  @media(max-width:900px){.flow-statistics-filters{width:100%}.flow-statistics-filter{flex:1 1 120px}}
  .flow-audit-modal .modal-card{width:min(760px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:hidden}
  .flow-audit-modal .modal-body{padding:18px 20px;overflow:auto}
  .flow-audit-report{display:grid;gap:14px;color:#526075;font-size:12px}
  .flow-audit-overview{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}
  .flow-audit-overview strong{color:var(--ink);font-size:15px}
  .flow-audit-overview span{color:var(--muted)}
  .flow-audit-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .flow-audit-metric{padding:10px;border:1px solid #e4e9f1;background:#fafbfd}
  .flow-audit-metric span{display:block;color:var(--muted)}
  .flow-audit-metric strong{display:block;margin-top:4px;color:var(--ink);font-size:16px}
  .flow-audit-result{padding:10px;border-radius:4px;font-weight:600}
  .flow-audit-result.ok{background:#e9f8f1;color:#16805b}
  .flow-audit-result.warn{background:#fff7e5;color:#9b6a1d}
  .flow-audit-section{border:1px solid #e4e9f1;background:#fff}
  .flow-audit-section-head{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;background:#f8fafc;border-bottom:1px solid #e4e9f1}
  .flow-audit-section-head strong{color:var(--ink)}
  .flow-audit-section-head span{color:var(--muted)}
  .flow-audit-list{display:grid}
  .flow-audit-item{display:grid;gap:2px;padding:8px 12px;border-bottom:1px solid #edf0f5;line-height:1.45}
  .flow-audit-item:last-child{border-bottom:0}
  .flow-audit-item strong{color:var(--ink)}
  .flow-audit-mismatch{gap:10px;padding:12px}
  .flow-audit-mismatch-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
  .flow-audit-mismatch-head span{color:var(--muted);white-space:nowrap}
  .flow-audit-conclusion{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #f0d49b;border-radius:4px;background:#fff8e8;color:#8a5a12}
  .flow-audit-conclusion span{font-weight:600}
  .flow-audit-conclusion strong{color:#6f4810;font-size:13px}
  .flow-audit-conclusion em{font-style:normal;color:#a6481d;font-size:16px}
  .flow-audit-conclusion b{font-weight:400;color:#b58a4d}
  .flow-audit-mismatch-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .flow-audit-mismatch-summary span{padding:9px 10px;border:1px solid #e4e9f1;background:#fafbfd;color:var(--muted)}
  .flow-audit-mismatch-summary strong{display:block;margin-top:3px;color:var(--ink);font-size:15px}
  .flow-audit-records{overflow:auto;border:1px solid #e4e9f1}
  .flow-audit-record{display:grid;grid-template-columns:minmax(130px,1.1fr) 58px 78px 78px minmax(80px,.8fr) minmax(150px,1.3fr);align-items:center;gap:10px;min-width:650px;padding:8px 10px;border-bottom:1px solid #edf0f5;line-height:1.4}
  .flow-audit-record:last-child{border-bottom:0}
  .flow-audit-record-header{background:#f8fafc;color:var(--muted);font-size:11px}
  .flow-audit-record:not(.flow-audit-record-header)>strong{color:var(--ink)}
  .flow-audit-record .tag{justify-self:start}
  .flow-audit-record .quantity-zero{color:#9aa7b8}
  .flow-audit-empty,.flow-audit-note{margin:0;padding:9px 12px;color:var(--muted);line-height:1.5}

/* Keep long reconciliation reports inside the viewport and scroll the report body. */
.flow-audit-modal .modal-card{display:flex;flex-direction:column}
.flow-audit-modal .modal-body{flex:1 1 auto;min-height:0}
  .flow-date-filter{position:relative;display:inline-flex;align-items:center;margin-left:0}
  .flow-date-filter-toggle{display:inline-grid;place-items:center;width:25px;height:25px;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;color:#66758d;font-size:15px;line-height:1;cursor:pointer}
  .flow-date-filter-toggle:hover,.flow-date-filter-toggle:focus-visible{border-color:#bfd2f5;background:#eef4ff;color:var(--primary);outline:0}
  .flow-date-filter-popover{position:absolute;top:calc(100% + 8px);right:0;z-index:30;width:232px;padding:13px;border:1px solid var(--line);border-radius:5px;background:#fff;box-shadow:0 10px 24px rgba(29,43,67,.16)}
  .flow-date-filter-popover form{display:grid;gap:10px}
  .flow-date-filter-popover strong{color:#526075;font-size:12px}
  .flow-date-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .flow-date-presets>span{grid-column:1/-1;color:#8a96a8;font-size:11px}
  .flow-date-preset{height:29px;padding:4px 6px;border:1px solid #d8e3f6;border-radius:4px;background:#f5f8fd;color:#2f5aa0;font-size:12px;cursor:pointer}
  .flow-date-preset:hover,.flow-date-preset:focus-visible{border-color:#9fc0f2;background:#eef4ff;color:var(--primary);outline:0}
  .flow-date-filter-popover label{display:grid;gap:5px;color:#526075;font-size:12px}
  .flow-date-filter-popover input{box-sizing:border-box;width:100%;height:32px;padding:5px 8px;border:1px solid #d8dee8;border-radius:4px;color:var(--ink);background:#fff;outline:0}
  .flow-date-filter-popover input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
  .flow-date-filter-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding-top:3px}
  .flow-date-filter-actions .primary{min-height:30px;padding:6px 12px}
  .flow-date-filter-actions .clear-filter-link{padding:4px 0}
  @media(max-width:760px){.flow-date-filter-popover{right:auto;left:0}}
  .curvature-infinity{font-size:16px;line-height:1;color:#526075}
  .search-highlight{padding:0 2px;border-radius:2px;background:#fff0a8;color:inherit;font-weight:inherit;box-shadow:0 0 0 1px rgba(214,158,46,.18)}
  .table-toolbar .toolbar-right{margin-left:auto}
.table-global-search{display:flex;align-items:center}
.table-global-search input{width:220px;height:36px;padding:8px 11px;border:1px solid #d8dee8;border-radius:4px;background:#fff;color:var(--ink);outline:0}
  .table-global-search input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
   .advanced-date-presets{grid-column:1/-1;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:2px 0 1px;color:var(--muted);font-size:11px}.advanced-date-presets button{min-height:27px;padding:4px 9px;border:1px solid #d6e0ee;border-radius:4px;background:#f8fbff;color:#355b8f;font-size:11px;cursor:pointer}.advanced-date-presets button:hover,.advanced-date-presets button:focus-visible{border-color:#8fb2e7;background:#eef5ff;color:var(--primary);outline:0}
  .transfer-management-table{min-width:max-content}
  .transfer-management-table th,.transfer-management-table td{white-space:nowrap}
  .transfer-management-table .transfer-warehouse-column{text-align:right}
  .transfer-warehouse-column span{display:block;margin-top:2px;color:var(--muted);font-size:11px;font-weight:400}
  .transfer-quantity-cell{text-align:right;font-variant-numeric:tabular-nums}
  .transfer-unavailable-cell{position:relative;padding:0 10px;overflow:visible}
  .transfer-unavailable-trigger{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:4px 20px 4px 7px;background:transparent;color:var(--ink);font-variant-numeric:tabular-nums}
  .transfer-unavailable-trigger:hover,.transfer-unavailable-trigger:focus-visible{border-radius:4px;background:#eef4ff;color:var(--primary);outline:0}
  .transfer-unavailable-arrow{position:absolute;right:7px;top:50%;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-65%) rotate(45deg);transition:transform .15s}
  .transfer-unavailable-trigger.is-expanded .transfer-unavailable-arrow{transform:translateY(-25%) rotate(225deg)}
  .transfer-unavailable-popover{position:absolute;top:calc(100% + 6px);left:50%;right:auto;z-index:25;display:grid;gap:8px;width:220px;padding:11px 12px;border:1px solid #dbe3ee;border-radius:5px;background:#fff;box-shadow:0 9px 24px rgba(29,43,67,.18);text-align:left;white-space:normal;transform:translateX(-50%)}
  .transfer-unavailable-popover::before{content:"";position:absolute;top:-5px;left:50%;right:auto;width:8px;height:8px;border-top:1px solid #dbe3ee;border-left:1px solid #dbe3ee;background:#fff;transform:translateX(-50%) rotate(45deg)}
  .transfer-unavailable-popover>strong{color:#526075;font-size:12px;font-weight:600}
  .transfer-unavailable-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:7px 10px;max-width:760px}
  .transfer-unavailable-grid>span{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:7px 10px;border:1px solid #e3e9f2;border-radius:4px;background:#fff;color:#526075;font-size:12px}
  .transfer-unavailable-grid strong{color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums}
  .transfer-detail-cell{position:relative;padding:0 10px;overflow:visible}
  .transfer-detail-trigger{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:4px 20px 4px 7px;background:transparent;color:var(--ink);font-variant-numeric:tabular-nums}
  .inventory-flow-trigger{padding:4px 7px}
  .transfer-detail-trigger:hover,.transfer-detail-trigger:focus-visible{border-radius:4px;background:#eef4ff;color:var(--primary);outline:0}
  .transfer-detail-arrow{position:absolute;right:7px;top:50%;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-65%) rotate(45deg);transition:transform .15s}
  .transfer-detail-trigger.is-expanded .transfer-detail-arrow{transform:translateY(-25%) rotate(225deg)}
 .transfer-detail-popover{position:fixed;top:0;left:0;right:auto;z-index:25;display:grid;gap:9px;width:min(340px,calc(100vw - 24px));padding:11px 12px;border:1px solid #dbe3ee;border-radius:5px;background:#fff;box-shadow:0 9px 24px rgba(29,43,67,.18);text-align:left;white-space:normal;transform:translateX(-50%)}
 .transfer-detail-popover::before{content:"";position:absolute;top:-5px;left:50%;right:auto;width:8px;height:8px;border-top:1px solid #dbe3ee;border-left:1px solid #dbe3ee;background:#fff;transform:translateX(-50%) rotate(45deg)}
 .transfer-detail-popover.is-above::before{top:auto;bottom:-5px;border-top:0;border-left:0;border-right:1px solid #dbe3ee;border-bottom:1px solid #dbe3ee;transform:translateX(-50%) rotate(45deg)}
  .transfer-detail-popover>strong{color:#526075;font-size:12px;font-weight:600}
  .transfer-record-distribution{display:flex;flex-wrap:wrap;gap:6px}
  .transfer-record-distribution span{display:inline-flex;align-items:center;gap:8px;padding:4px 7px;border-radius:3px;background:#f7f9fc;color:#526075;font-size:11px}
  .transfer-record-distribution strong{color:var(--ink);font-weight:700}
  .transfer-record-popover{width:min(520px,calc(100vw - 24px));max-height:min(520px,calc(100vh - 24px));overflow:auto}
  .transfer-record-title{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#526075}
  .transfer-record-title>strong{font-size:12px;font-weight:600}
  .transfer-record-title>span{color:#8a96a8;font-size:11px;white-space:nowrap}
  .transfer-record-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;padding:9px 0;border-top:1px solid #e9edf3}
  .transfer-record-card:first-of-type{margin-top:1px}
  .transfer-record-field{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:start;gap:6px;min-width:0;color:#8a96a8;font-size:11px;line-height:1.35}
  .transfer-record-field>strong{min-width:0;color:#526075;font-weight:500;overflow-wrap:anywhere}
  .transfer-record-field-wide{grid-column:1/-1}
  .inventory-flow-popover{width:min(600px,calc(100vw - 24px));max-height:min(560px,calc(100vh - 24px));padding:13px 15px}
  .inventory-flow-timeline{display:grid;gap:0;margin-top:3px}
  .inventory-flow-event{position:relative;display:grid;grid-template-columns:16px minmax(0,1fr);gap:10px;min-width:0;padding:0 0 13px}
  .inventory-flow-event:last-child{padding-bottom:0}
  .inventory-flow-event:not(:last-child)::before{content:"";position:absolute;left:7px;top:14px;bottom:0;width:1px;background:#dfe7f1}
  .inventory-flow-event-marker{position:relative;z-index:1;display:block;width:9px;height:9px;margin:5px 0 0 3px;border:2px solid #9aa8ba;border-radius:50%;background:#fff}
  .inventory-flow-event-marker.success{border-color:#30a375;background:#e9f8f1}
  .inventory-flow-event-marker.warning{border-color:#c18a2f;background:#fff7e5}
  .inventory-flow-event-marker.danger{border-color:#c94b4b;background:#fff0f0}
  .inventory-flow-event-body{min-width:0;padding:0 0 11px;border-bottom:1px solid #e9edf3}
  .inventory-flow-event:last-child .inventory-flow-event-body{padding-bottom:0;border-bottom:0}
  .inventory-flow-event-head{display:flex;align-items:center;gap:8px;min-width:0;line-height:1.3}
  .inventory-flow-event-head time{color:#526075;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
  .inventory-flow-event-head .tag{flex:0 0 auto;padding:2px 6px}
  .inventory-flow-event-id{margin-left:auto;color:#8a96a8;font-size:11px;white-space:nowrap}
   .inventory-flow-event-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px;margin-top:7px}
  .inventory-flow-event-field{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:5px;min-width:0;color:#8a96a8;font-size:11px;line-height:1.35}
  .inventory-flow-event-field strong{min-width:0;overflow:hidden;color:#526075;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
  .inventory-flow-event-extra{display:flex;gap:7px;margin:6px 0 0;color:#667286;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
  .inventory-flow-event-extra span{flex:0 0 auto;color:#8a96a8}
  @media(max-width:600px){.inventory-flow-event-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-flow-event-head{flex-wrap:wrap}.inventory-flow-event-id{margin-left:0}}
  .transfer-record-grid{display:grid;grid-template-columns:42px minmax(78px,1fr) 48px 52px;gap:8px;align-items:center;color:#526075;font-size:11px;line-height:1.35}
  .transfer-record-grid span:nth-child(n+3){text-align:right;font-variant-numeric:tabular-nums}
  .transfer-record-head{padding-bottom:5px;border-bottom:1px solid #e9edf3;color:#8a96a8;font-weight:600}
  .transfer-total{font-weight:700;color:var(--ink)}
  .transfer-management-table th,.transfer-management-table td{text-align:center}
  .transfer-management-table .th-inner{justify-content:center}
  .transfer-management-content{min-width:0}
  .transfer-management-panel.has-flow-record-panel .transfer-management-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,380px);align-items:stretch}
  .transfer-table-area{min-width:0}
  .transfer-flow-record-panel{min-width:0;max-height:calc(100vh - 260px);overflow:auto;border-left:1px solid var(--line);background:#fff;padding:15px 16px}
  .transfer-flow-record-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:11px;border-bottom:1px solid var(--line)}
  .transfer-flow-record-header strong{display:block;color:var(--ink);font-size:14px}
  .transfer-flow-record-header span{display:block;margin-top:3px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
  .transfer-flow-record-header .icon-button{padding:0;color:#8995a7;font-size:17px;line-height:1}
  .transfer-flow-record-summary{padding:10px 0;color:var(--muted);font-size:12px}
  .flow-record-list{display:grid;gap:10px}
  .flow-record-item{padding:10px 0;border-top:1px solid #edf0f5}
  .flow-record-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .flow-record-item-head time{color:#8a96a8;font-size:11px;white-space:nowrap}
  .flow-record-item-grid{display:grid;grid-template-columns:52px minmax(0,1fr) 60px minmax(0,1fr);gap:5px 8px;margin-top:9px;color:#8a96a8;font-size:11px}
  .flow-record-item-grid strong{min-width:0;color:#526075;font-weight:500;overflow-wrap:anywhere}
  .flow-record-inbound{color:var(--success)!important}.flow-record-outbound{color:var(--danger)!important}
  .flow-record-dynamic,.flow-record-note{margin:8px 0 0;padding:7px 8px;background:#f8fafc;color:#667286;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
  .flow-record-note{background:#fffaf0;color:#856b35}
  @media(max-width:1080px){.transfer-management-panel.has-flow-record-panel .transfer-management-content{grid-template-columns:minmax(0,1fr) 320px}}
  @media(max-width:760px){.transfer-management-panel.has-flow-record-panel .transfer-management-content{display:block}.transfer-flow-record-panel{max-height:420px;border-top:1px solid var(--line);border-left:0}}
  .transfer-management-stats{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:12px}
  .transfer-management-stats strong{margin-left:3px;color:var(--ink);font-size:13px}
  .transfer-warehouse-menu{position:relative;display:inline-flex;align-items:center}
  .transfer-warehouse-toggle{position:relative;display:inline-flex;align-items:center;min-height:32px;padding:6px 29px 6px 11px;border:1px solid #cddcf4;border-radius:5px;background:#f5f8fe;color:#2f5aa0;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;transition:border-color .15s,background .15s,color .15s,box-shadow .15s}
  .transfer-warehouse-toggle::after{content:"";position:absolute;right:11px;top:50%;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-70%) rotate(45deg);transition:transform .15s ease}
  .transfer-warehouse-toggle[aria-expanded="true"]{border-color:#9dbcf1;background:#eaf2ff;color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.08)}
  .transfer-warehouse-toggle[aria-expanded="true"]::after{transform:translateY(-25%) rotate(225deg)}
  .transfer-warehouse-toggle:hover,.transfer-warehouse-toggle:focus-visible{border-color:#9dbcf1;background:#eaf2ff;color:var(--primary);outline:0}
  .transfer-warehouse-dropdown{position:absolute;top:calc(100% + 7px);left:0;z-index:12;display:block;width:min(650px,calc(100vw - 24px));max-width:calc(100vw - 24px);padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:5px;box-shadow:0 10px 24px rgba(29,43,67,.16);overflow-x:auto;white-space:normal}
  .transfer-warehouse-dropdown.is-floating{position:fixed;z-index:60;top:0;left:0;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:auto}
  .transfer-warehouse-summary-table{min-width:560px;width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}
.transfer-warehouse-summary-table th,.transfer-warehouse-summary-table td{position:static;height:34px;padding:6px 10px;border-bottom:1px solid #edf0f5;text-align:center;color:#526075;font-weight:400}
  .transfer-warehouse-summary-table thead th{background:#f8fafc;color:#526075;font-weight:600}
  .transfer-warehouse-summary-table tbody th{background:#fbfcfe;font-weight:600;text-align:left}
  .transfer-warehouse-summary-table tr:last-child th,.transfer-warehouse-summary-table tr:last-child td{border-bottom:0}
  .transfer-warehouse-summary-table .transfer-summary-total-row th,.transfer-warehouse-summary-table .transfer-summary-total-row td{border-top:1px solid #dfe5ee;background:#f8fafc;color:var(--ink);font-weight:700}
  .transfer-header-label{display:inline-flex;flex-direction:column;align-items:center;line-height:1.25}
  .transfer-header-label>span{margin-top:2px;color:var(--muted);font-size:11px;font-weight:400}
  .transfer-zero{color:#aeb8c7!important;font-weight:400!important}
  .quantity-zero{color:#aeb8c7!important;font-weight:400!important}
.table-footer-left{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap}
.table-footer-summary{color:var(--ink);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.table-footer{gap:16px;flex-wrap:wrap}
.table-footer-left{flex:0 1 auto}
.table-footer-summary{margin-left:0;flex:0 0 auto;padding-left:0}
.recent-flow-carousel{order:1;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:1;color:#9aa6b7;font-size:11px;white-space:nowrap;overflow:hidden}
.recent-flow-carousel{cursor:pointer;border-radius:3px}
.recent-flow-carousel:hover,.recent-flow-carousel:focus-visible{color:#718096;background:#fafcff;outline:1px solid #dbe6f5;outline-offset:-2px}
.recent-flow-label{flex:0 0 auto;color:#8997aa}
.recent-flow-item{display:inline-flex;align-items:center;gap:7px;min-width:0;overflow:hidden;opacity:.78}
.recent-flow-item.is-changing{animation:recent-flow-fade .35s ease}
.recent-flow-item strong,.recent-flow-item span,.recent-flow-item time{overflow:hidden;text-overflow:ellipsis}
.recent-flow-item strong{max-width:170px;color:#7c8ba0;font-weight:600}
.recent-flow-status{padding:1px 5px;border-radius:2px;font-size:10px}
.recent-flow-status.inbound{background:#eef8f3;color:#5a9a7b}.recent-flow-status.outbound{background:#fff8ea;color:#b08a4e}.recent-flow-status.other{background:#f4f5f7;color:#8c97a6}
.recent-flow-quantity{font-variant-numeric:tabular-nums}.recent-flow-quantity.positive{color:#6e9b83}.recent-flow-quantity.negative{color:#b18472}
.recent-flow-item time{color:#a5afbd}.recent-flow-position{flex:0 0 auto;color:#b1bac7;font-variant-numeric:tabular-nums}
@keyframes recent-flow-fade{from{opacity:.2;transform:translateY(3px)}to{opacity:.78;transform:translateY(0)}}
@media(max-width:760px){.recent-flow-carousel{order:3;flex:0 0 100%;justify-content:flex-end}}
.brand-mark.has-image{background:#fff;padding:0;overflow:hidden}
.brand-mark.has-image img{display:block;width:100%;height:100%;object-fit:contain}
.logo-upload-preview{display:flex;align-items:center;gap:12px;min-height:76px;margin-top:8px;padding:10px 12px;border:1px dashed #cbd7e8;background:#fafcff;color:var(--muted);font-size:12px}
.logo-upload-preview img{width:56px;height:56px;object-fit:contain;border:1px solid var(--line);background:#fff}
.clear-logo-button{padding:5px 9px;background:#eef3fb;color:#2f5aa0;font-size:12px}
.clear-logo-button:hover{background:#e5edfb;color:var(--primary)}
.filter-status{display:flex;align-items:center;flex-wrap:wrap;color:var(--primary)}
.filter-status-item{padding:0;background:transparent;color:var(--primary);font-size:12px}
.filter-status-item:hover,.filter-status-item:focus-visible{text-decoration:underline;outline:none}
.filter-status-separator{color:var(--primary)}
.clear-filter-link{padding:0;background:transparent;color:var(--primary);font-size:12px}
.clear-filter-link:hover{text-decoration:underline}
.warehouse-quick-filter{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:thin}
.warehouse-quick-label{flex:0 0 auto;color:var(--muted);font-size:12px;font-weight:600}
.warehouse-filter{flex:0 0 auto;padding:6px 10px;border:1px solid transparent;border-radius:4px;background:transparent;color:#526075;font-size:13px;white-space:nowrap}
.warehouse-filter:hover{border-color:#bfd2f5;background:#f4f7fd;color:var(--primary)}
.warehouse-filter.active{border-color:#bfd2f5;background:#eaf1ff;color:var(--primary);font-weight:700}
.inventory-quick-filter-divider{width:1px;height:22px;flex:0 0 auto;background:var(--line);margin:0 4px}
.inventory-reference-modal{padding:0}
.inventory-reference-modal .modal-card{display:flex;flex-direction:column;width:min(800px,calc(100vw - 30px));height:auto;max-height:calc(100vh - 32px);border-radius:4px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.12)}
.inventory-reference-modal .modal-header{flex:0 0 auto;min-height:56px;padding:18px 20px}
.inventory-reference-modal .modal-header h3{font-size:18px;font-weight:500;color:#303133}
.inventory-reference-modal .modal-body{flex:0 1 auto;min-height:0;max-height:calc(100vh - 88px);padding:20px;overflow-y:auto}
.reference-inventory-form{display:flex;flex-direction:column;gap:0;min-height:100%;padding-bottom:1px}
.reference-form-item{display:flex;align-items:flex-start;width:100%;min-height:32px;margin-bottom:18px}
.reference-form-label{width:100px;flex:0 0 100px;padding-right:12px;color:#606266;font-size:14px;line-height:32px;text-align:right}
.reference-required{margin-right:4px;color:#f56c6c}
.reference-form-control{flex:1;min-width:0;line-height:32px}
.reference-input,.reference-select,.reference-textarea{display:block;width:100%;min-height:32px;padding:5px 11px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;color:#606266;font-size:14px;line-height:20px;outline:0;transition:border-color .2s}
.reference-input:focus,.reference-select:focus,.reference-textarea:focus{border-color:#409eff;box-shadow:none}
.reference-select{cursor:pointer}
.reference-textarea{min-height:80px;resize:vertical}
.reference-curvature{display:flex;align-items:center;width:100%;gap:8px}
.reference-input-wrap{position:relative;flex:1;min-width:0}
.reference-input-wrap .reference-input{padding-right:34px}
.reference-infinity{display:none;position:absolute;top:0;right:11px;color:#606266;font-size:18px;line-height:32px}
.reference-input-wrap.is-infinity .reference-input{color:transparent;caret-color:#606266}
.reference-input-wrap.is-infinity .reference-infinity{display:block}
.reference-infinity-button{width:40px;height:32px;padding:0;border:1px solid #dcdfe6;border-radius:4px;background:#fff;color:#606266;font-size:17px;line-height:30px}
.reference-infinity-button:hover{border-color:#409eff;color:#409eff}
.reference-form-footer{position:sticky;bottom:0;z-index:2;display:flex;justify-content:flex-end;gap:10px;margin:20px -20px -1px;padding:12px 20px;background:#fff;border-top:1px solid #ebeef5}
.reference-form-footer button{min-width:68px;height:32px;padding:0 15px;border-radius:4px}
@media(max-width:768px){
  .table-context{white-space:normal;flex-wrap:wrap;gap:2px 8px}
  .inventory-reference-modal .modal-card{width:90%;height:auto;max-height:calc(100vh - 24px)}
  .inventory-reference-modal .modal-body{max-height:calc(100vh - 80px);padding:15px}
  .reference-form-item{margin-bottom:16px}
  .reference-form-label{width:80px;flex-basis:80px;font-size:13px}
  .reference-form-footer{bottom:0;margin:20px -15px -1px;padding:12px 15px}
}
@media(max-width:480px){
  .inventory-reference-modal .modal-card{width:95%}
  .inventory-reference-modal .modal-header{padding:15px}
  .inventory-reference-modal .modal-header h3{font-size:16px}
  .inventory-reference-modal .modal-body{padding:12px}
  .reference-form-label{width:70px;flex-basis:70px;font-size:12px;line-height:30px}
  .reference-input,.reference-select{min-height:30px;font-size:13px}
  .reference-textarea{min-height:72px}
  .reference-form-footer{bottom:0;margin:20px -12px -1px;padding:12px 12px}
}

/* Top navigation is the default; the sidebar remains available as a layout preference. */
.topbar-brand,.top-nav{display:none}
.topbar-page{min-width:0}
.layout-toggle{font-size:18px}
.user-menu{position:relative}
.user-profile-trigger{display:inline-flex;align-items:center;gap:7px;padding:0;background:transparent;color:#526075}
.user-profile-trigger:hover,.user-profile-trigger:focus-visible{color:var(--primary);outline:0}
.user-profile-trigger:focus-visible .user-avatar{box-shadow:0 0 0 3px rgba(37,99,235,.16)}
.user-menu-chevron{position:relative;display:inline-block;width:14px;height:14px;color:#7890ad;transform:translateY(-1px)}
.user-menu-chevron::before{content:"";position:absolute;left:3px;top:3px;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .15s ease,top .15s ease}
.user-profile-trigger[aria-expanded="true"] .user-menu-chevron::before{top:6px;transform:rotate(225deg)}
.user-profile-menu{position:absolute;top:calc(100% + 9px);right:42px;z-index:25;display:grid;min-width:142px;padding:5px;border:1px solid #dbe3ee;border-radius:5px;background:#fff;box-shadow:0 10px 24px rgba(29,43,67,.18)}
.user-profile-item{display:block;width:100%;padding:8px 10px;background:transparent;color:#526075;text-align:left;font-size:13px;border-radius:3px}
.user-profile-item:hover,.user-profile-item:focus-visible,.user-profile-item.active{background:#eef4ff;color:var(--primary);outline:0}
.user-profile-empty{padding:8px 10px;color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:600px){.user-profile-menu{right:0}}
.nav-top{display:block;min-height:100vh}
.nav-top .sidebar{display:none}
.nav-top .main-content{width:100%}
.nav-top .topbar{height:72px;padding:12px 24px;justify-content:flex-start;gap:22px}
.nav-top .topbar-brand{display:flex;align-items:center;gap:10px;flex:0 0 auto;color:var(--ink);font-size:15px;font-weight:700;white-space:nowrap}
.nav-top .top-nav{display:flex;align-items:center;gap:3px;flex:1;min-width:0;order:2}
.nav-top .topbar-brand{order:1}
.nav-top .topbar-page{order:3;margin-left:auto}
.nav-top .topbar-page .eyebrow{display:none}
.nav-top .topbar-page h2{margin:0;font-size:16px;white-space:nowrap}
.nav-top .nav-item{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:4px;white-space:nowrap}
.nav-top .nav-icon{width:auto}
.nav-top .user-menu{order:4;flex:0 0 auto}
.nav-top .view{width:100%;max-width:none}
.nav-top .table-panel,.nav-top .metric-grid,.nav-top .dashboard-grid,.nav-top .settings-layout{width:100%}
.nav-top .table-wrap{max-height:calc(100vh - 252px)}
.nav-side .view{width:auto}
.nav-side .table-wrap{max-height:calc(100vh - 278px)}
.nav-side .topbar-brand,.nav-side .top-nav{display:none}
.nav-top .nav-item{background:transparent;color:#74839a;border-radius:0;padding:9px 11px;gap:0;border-bottom:2px solid transparent;font-weight:500}
.nav-top .nav-item:hover{background:transparent;color:var(--ink)}
.nav-top .nav-item.active{background:transparent;color:var(--primary);border-bottom-color:var(--primary)}
.nav-top .nav-icon{display:none}
@media(max-width:1100px){
  .nav-top .topbar{padding-left:18px;padding-right:18px;gap:12px}
  .nav-top .topbar-page{display:none}
  .nav-top .nav-item{padding:8px 9px}
}
@media(max-width:760px){
  .table-toolbar .toolbar-right{width:100%}
  .table-global-search{flex:1;min-width:0}
  .table-global-search input{width:100%}
  .nav-top .topbar{height:64px;padding:10px 12px;gap:8px}
  .nav-top .topbar-brand span:last-child{display:none}
  .nav-top .top-nav{overflow-x:auto;scrollbar-width:none}
  .nav-top .top-nav::-webkit-scrollbar{display:none}
  .nav-top .nav-item{padding:8px 10px}
  .nav-top .nav-item span:last-child{display:none}
  .nav-top .nav-icon{font-size:16px}
}

/* Edge modification dialog. */
.edge-modify-modal{padding:0}
.edge-modify-modal .modal-card{width:min(500px,calc(100vw - 24px));max-height:calc(100vh - 32px);border-radius:3px;overflow:hidden}
.edge-modify-modal .modal-header{min-height:56px;padding:17px 20px}
.edge-modify-modal .modal-body{padding:0 16px 16px;max-height:calc(100vh - 88px);overflow-y:auto}
.edge-modify-form{display:flex;flex-direction:column;color:#606266;font-size:13px}
.edge-modify-help{margin-bottom:20px;padding:9px 16px;background:#f4f4f5;border-radius:3px;color:#909399;line-height:1.55}
.edge-modify-help strong{display:block;margin-bottom:4px;color:#909399}
.edge-modify-help ol{margin:0;padding-left:17px}
.edge-modify-field{display:flex;align-items:center;min-height:32px;margin:0 0 18px}
.edge-modify-field>span{width:88px;flex:0 0 88px;margin-right:12px;color:#606266;text-align:right;line-height:32px}
.edge-modify-field>span em{margin-right:4px;color:#f56c6c;font-style:normal}
.edge-modify-field>input,.edge-quantity-control input{width:100%;height:32px;min-width:0;padding:5px 11px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;color:#606266;outline:0}
.edge-modify-field>input:focus,.edge-quantity-control input:focus{border-color:#409eff;box-shadow:none}
.edge-modify-field>input:disabled{background:#f5f7fa;color:#a0a6b2;cursor:not-allowed}
.edge-quantity-control{display:flex;flex:1;min-width:0}
.edge-quantity-control input{border-radius:0;text-align:left}
.edge-quantity-control button{width:32px;height:32px;flex:0 0 32px;padding:0;border:1px solid #dcdfe6;background:#f5f7fa;color:#606266;font-size:17px;line-height:30px}
.edge-quantity-control button:first-child{border-right:0;border-radius:4px 0 0 4px}
.edge-quantity-control button:last-child{border-left:0;border-radius:0 4px 4px 0}
.edge-quantity-control button:hover{color:#409eff;background:#ecf5ff}
.edge-modify-footer{display:flex;justify-content:flex-end;gap:12px;margin-top:16px;padding-top:14px}
.edge-modify-footer button{min-width:60px;height:32px;padding:0 15px;border-radius:4px}
@media(max-width:480px){
  .edge-modify-modal .modal-card{width:95%;max-height:calc(100vh - 16px)}
  .edge-modify-modal .modal-header{padding:15px}
  .edge-modify-modal .modal-body{padding:0 12px 12px;max-height:calc(100vh - 72px)}
  .edge-modify-field>span{width:76px;flex-basis:76px;margin-right:10px}
}

/* Batch inventory operation dialog. */
.batch-inventory-modal .modal-card{width:min(820px,calc(100vw - 30px));max-height:calc(100vh - 32px);border-radius:6px}
.batch-inventory-modal .modal-body{padding:20px 24px;overflow-y:auto}
.batch-inventory-form{display:grid;gap:18px;color:#46546b}
.batch-operation-summary{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #dce7f8;border-radius:5px;background:#f6f9ff;font-size:13px}
.batch-operation-summary strong{color:var(--ink)}
.batch-operation-summary span{color:var(--muted);font-size:12px}
.batch-operation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.batch-operation-field{display:grid;grid-template-columns:118px minmax(0,1fr);align-items:start;gap:8px;min-width:0}
.batch-operation-heading{min-width:0}
.batch-operation-title{display:flex;align-items:center;gap:5px;min-height:38px;min-width:0}
.batch-operation-field-wide{grid-column:1/-1}
.batch-operation-toggle{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:12px;white-space:nowrap;cursor:pointer}
.batch-operation-toggle input{width:15px;height:15px;accent-color:var(--primary)}
.batch-operation-label{color:#46546b;font-size:13px;white-space:nowrap}
.batch-operation-control{min-width:0}
.batch-operation-mode{display:flex;align-items:center;gap:6px;min-height:22px;color:var(--muted);font-size:11px;white-space:nowrap}
.batch-operation-mode>span{color:#8792a3}
.batch-operation-mode label{display:inline-flex;align-items:center;gap:3px;cursor:pointer}
.batch-operation-mode input{width:13px;height:13px;margin:0;accent-color:var(--primary)}
.batch-operation-control input,.batch-operation-control select,.batch-operation-control textarea{display:block;width:100%;min-height:38px;padding:8px 10px;border:1px solid #d8dee8;border-radius:4px;background:#fff;color:var(--ink);outline:0}
.batch-operation-control textarea{height:70px;resize:vertical}
.batch-operation-control input:disabled,.batch-operation-control select:disabled,.batch-operation-control textarea:disabled{background:#f5f7fa;color:#a0a6b2;cursor:not-allowed}
.batch-operation-control input:focus,.batch-operation-control select:focus,.batch-operation-control textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.batch-operation-footer{display:flex;justify-content:flex-end;gap:8px;padding-top:16px;border-top:1px solid var(--line)}
.batch-operation-footer button{min-width:88px}
.batch-operation-preview{display:grid;gap:12px}
.batch-preview-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #dce7f8;border-radius:5px;background:#f6f9ff;color:var(--ink);font-size:13px}
.batch-preview-header>div{display:grid;gap:3px}.batch-preview-header span{color:var(--muted);font-size:12px}
.batch-preview-list{display:grid;gap:8px;max-height:440px;overflow:auto;padding-right:2px}
.batch-preview-item{display:grid;gap:5px;padding:10px 12px;border:1px solid #e0e7f1;border-radius:4px;background:#fff}
.batch-preview-item header{display:flex;align-items:center;gap:12px;min-width:0;color:var(--muted);font-size:12px}
.batch-preview-item header strong{color:var(--ink)}.batch-preview-item header span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.batch-preview-item header span:nth-child(2){flex:1;color:var(--ink);font-weight:600}
.batch-preview-change{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-top:5px;border-top:1px solid #f0f3f7;color:var(--muted);font-size:12px}
.batch-preview-change small{color:#8b97aa;font-size:11px}.batch-preview-change strong{color:var(--ink);font-weight:500;text-align:right;overflow-wrap:anywhere}.batch-preview-change em{padding:0 5px;color:var(--primary);font-style:normal}.batch-preview-unchanged{padding-top:5px;border-top:1px solid #f0f3f7;color:var(--muted);font-size:12px}
.batch-operation-preview>.batch-operation-footer{padding-top:12px}
.table-toolbar button:disabled{opacity:.55;cursor:not-allowed}
/* Make the active selection count immediately visible in the toolbar. */
#selected-count.selection-count:not([hidden]){display:inline-flex;align-items:center;gap:6px;min-height:29px;padding:4px 10px;border:1px solid #a9c8fa;border-radius:4px;background:#eaf3ff;color:var(--primary);font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 0 0 2px rgba(37,99,235,.06)}
#selected-count.selection-count:not([hidden])::before{content:"✓";display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--primary);color:#fff;font-size:11px;line-height:1}
.selection-select-all{min-height:21px;padding:2px 7px;border:1px solid #a9c8fa;border-radius:3px;background:#fff;color:var(--primary);font-size:12px;font-weight:700;line-height:1.2}
.selection-select-all:hover,.selection-select-all:focus-visible{border-color:var(--primary);background:#dceaff;outline:0}
.selection-cancel{min-height:21px;padding:2px 7px;border:1px solid #d8dee8;border-radius:3px;background:#fff;color:#536075;font-size:12px;font-weight:600;line-height:1.2}
.selection-cancel:hover,.selection-cancel:focus-visible{border-color:#aeb9c9;background:#f4f6f9;outline:0}
/* Inventory export dialog. */
.export-inventory-modal .modal-card{width:min(680px,calc(100vw - 30px));max-height:calc(100vh - 32px);border-radius:6px;overflow:hidden}
.export-inventory-modal .modal-body{padding:22px 24px;overflow-y:auto}
.inventory-export-form{display:grid;gap:16px;color:#46546b}
.inventory-export-options{display:grid;gap:9px;padding:14px 15px;border:1px solid #e0e7f1;border-radius:5px;background:#fafcff}
.inventory-export-options>strong{color:var(--ink);font-size:14px}
.inventory-export-option{display:flex;align-items:center;gap:9px;min-height:30px;padding:4px 6px;border-radius:4px;cursor:pointer}
.inventory-export-option:hover{background:#f1f6ff}
.inventory-export-option input{width:15px;height:15px;accent-color:var(--primary)}
.inventory-export-option input:disabled{cursor:not-allowed}
.inventory-export-option input:disabled+span{color:#a5afbd}
.inventory-export-option span{color:#3f5068}
.inventory-export-option em{font-style:normal;color:var(--muted);font-size:12px}
.inventory-export-summary{padding:15px;border:1px solid #dce7f8;border-radius:5px;background:#f6f9ff}
.inventory-export-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--ink)}
.inventory-export-summary-head span{color:var(--primary);font-size:12px}
.inventory-export-summary p{margin:6px 0 13px;color:var(--muted);font-size:12px}
.inventory-export-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.inventory-export-summary-grid span{display:grid;gap:2px;color:var(--muted);font-size:11px}
.inventory-export-summary-grid strong{color:var(--ink);font-size:16px}
.inventory-export-fields{margin:0;color:var(--muted);font-size:12px;line-height:1.7}
.export-inventory-modal .modal-footer{border-top:1px solid var(--line);padding-top:16px}
@media(max-width:680px){.export-inventory-modal .modal-card{width:calc(100vw - 24px)}.export-inventory-modal .modal-body{padding:16px}.inventory-export-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:420px){.inventory-export-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){
  .batch-inventory-modal .modal-card{width:calc(100vw - 24px)}
  .batch-inventory-modal .modal-body{padding:16px}
  .batch-operation-grid{grid-template-columns:1fr}
  .batch-operation-field-wide{grid-column:auto}
}
@media(max-width:430px){
  .batch-operation-field{grid-template-columns:118px minmax(0,1fr);gap:6px}
  .batch-operation-summary{display:block}
  .batch-operation-summary span{display:block;margin-top:4px}
  .batch-preview-header{display:block}.batch-preview-header>span{display:block;margin-top:4px}.batch-preview-change{display:block}.batch-preview-change strong{display:block;margin-top:3px;text-align:left}
}

/* Transfer operation dialog. */
.transfer-operation-modal{padding:8px}
.transfer-operation-modal .modal-card{width:min(480px,calc(100vw - 16px));max-height:calc(100vh - 16px);border-radius:4px;overflow:hidden}
.transfer-operation-modal .modal-header{height:32px;min-height:32px;padding:8px 14px 0;border:0;justify-content:flex-end}
.transfer-operation-modal .modal-header h3{display:none}
.transfer-operation-modal .modal-header .icon-button{padding:0;color:#8d98a8;font-size:18px;line-height:18px}
.transfer-operation-modal .modal-body{padding:0 16px 16px;overflow-y:auto}
.transfer-operation-form{display:grid;gap:20px;color:#303846}
.transfer-info-card{display:grid;gap:12px;padding:16px;background:#f8fafc;border:1px solid #e4e8ee;border-radius:5px}
.transfer-info-title{display:flex;align-items:center;gap:8px;color:#1f2937;font-size:16px}
.transfer-info-icon,.transfer-section-icon{display:inline-grid;place-items:center;color:var(--primary);font-size:16px;line-height:1}
.transfer-info-grid{display:flex;align-items:center;gap:28px;color:#536075;font-size:13px}
.transfer-info-grid strong{margin-left:8px;color:#303846;font-size:14px}
.transfer-type-chip{display:inline-flex;margin-left:7px;padding:3px 8px;border:1px solid #cfe0ff;border-radius:4px;background:#eff5ff;color:#4e8ddd;font-size:12px;font-weight:600}
.transfer-section{display:grid;gap:11px}
.transfer-section h4{display:flex;align-items:center;gap:8px;margin:0;color:#273244;font-size:15px;font-weight:700}
.transfer-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.transfer-field{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;min-width:0}
.transfer-field-wide{grid-template-columns:70px minmax(0,1fr)}
.transfer-field-label{color:#536075;font-size:13px;white-space:nowrap}
.transfer-field-label em{color:#ef5b5b;font-style:normal;font-weight:700}
.transfer-control{width:100%;height:36px;min-width:0;padding:7px 10px;border:1px solid #d3dbe7;border-radius:7px;background:#fff;color:#5b6678;outline:0;transition:border-color .15s,box-shadow .15s}
.transfer-control:focus{border-color:#8bb7f4;box-shadow:0 0 0 2px rgba(63,131,239,.1)}
.transfer-control:disabled{background:#f8fafc;color:#657287}
.transfer-quantity-row{display:flex;align-items:center;gap:12px;min-width:0}
.transfer-quantity-control{display:flex;width:119px;height:34px;flex:0 0 119px}
.transfer-quantity-control button,.transfer-quantity-control input{height:34px;border:1px solid #d3dbe7;background:#fff;color:#657287;text-align:center}
.transfer-quantity-control button{width:32px;flex:0 0 32px;padding:0;background:#f8fafc;font-size:16px}
.transfer-quantity-control button:first-child{border-radius:7px 0 0 7px}
.transfer-quantity-control button:last-child{border-radius:0 7px 7px 0}
.transfer-quantity-control button:hover{background:#eff5ff;color:var(--primary)}
.transfer-quantity-control input{width:55px;padding:5px;border-left:0;border-right:0;outline:0}
.transfer-available{color:#536075;font-size:13px;white-space:nowrap}
.transfer-available strong{color:#0b9b62;font-weight:700}
.transfer-textarea-wrap{position:relative;display:block;min-width:0}
.transfer-textarea-wrap textarea{display:block;width:100%;height:75px;padding:9px 10px 24px;border:1px solid #d3dbe7;border-radius:7px;background:#fff;color:#4d5a6c;resize:vertical;outline:0}
.transfer-textarea-wrap textarea:focus{border-color:#8bb7f4;box-shadow:0 0 0 2px rgba(63,131,239,.1)}
.transfer-textarea-wrap>span{position:absolute;right:9px;bottom:7px;color:#8d96a3;font-size:12px;pointer-events:none}
.transfer-operation-note{display:flex;align-items:flex-start;gap:9px;padding:13px 14px;border:1px solid #e4e8ee;border-radius:6px;background:#f8fafc;color:#667286;font-size:12px;line-height:1.5}
.transfer-operation-note>span:first-child{color:#f0a522;font-size:14px;line-height:18px}
.transfer-operation-footer{display:flex;justify-content:flex-end;gap:9px;padding-top:1px}
.transfer-operation-footer button{min-width:74px;height:34px;padding:0 13px;border:1px solid #d5dce7;border-radius:4px}
.transfer-operation-footer .primary{border-color:#8fc1fb;background:#8fc1fb}
@media(max-width:520px){
  .transfer-operation-modal .modal-body{padding-left:12px;padding-right:12px}
  .transfer-info-grid{gap:16px}
}
@media(max-width:430px){
  .transfer-field-grid{grid-template-columns:1fr;gap:12px}
  .transfer-info-grid{display:grid;gap:7px}
}
.settings-system-logs{margin-top:18px;overflow:hidden}.settings-log-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}.settings-log-header h3{margin:0 0 4px;font-size:15px}.settings-log-search{display:flex;align-items:center;gap:8px}.settings-log-search input{width:min(330px,32vw);padding:9px 11px;border:1px solid #d8dee8;background:#fff;outline:0;color:var(--ink)}.settings-log-summary{padding:12px 0;color:var(--muted);font-size:12px}.settings-log-table-wrap{max-height:430px;overflow:auto}.settings-log-table{min-width:980px}.settings-log-table th,.settings-log-table td{vertical-align:middle}.log-status{font-size:12px}.log-status.success{color:var(--success)}.log-status.danger{color:var(--danger)}.settings-log-loading,.settings-log-error{padding:24px;color:var(--muted);font-size:13px}.settings-log-error{color:var(--danger)}
.settings-version-panel{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.settings-version-panel h3{margin:0 0 4px}.settings-version-value{margin:0;color:var(--primary);font:600 18px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace}
.settings-version-control{margin-top:18px;overflow:hidden}.settings-version-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}.settings-version-header h3{margin:3px 0 5px;font-size:15px}.settings-version-header .muted{margin:0;line-height:1.55}.settings-version-error{max-width:680px;margin:5px 0 0;color:var(--danger);line-height:1.55}.version-operation-badge,.version-release-tag{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#eef5ff;color:var(--primary);font-size:11px;font-weight:600;white-space:nowrap}.version-release-tag.current{background:#e9f8f0;color:var(--success)}.version-operation-progress{display:flex;align-items:center;gap:9px;margin-top:16px;color:var(--muted);font-size:12px}.version-operation-progress i{display:block;width:8px;height:8px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 5px rgba(37,99,235,.1);animation:version-pulse 1.2s ease-in-out infinite}.version-current-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}.version-current-grid>div{display:grid;gap:7px;min-width:0;padding:13px 14px;border:1px solid #e1e8f1;background:#fafbfd}.version-current-grid span{color:var(--muted);font-size:12px}.version-current-grid strong{overflow:hidden;color:var(--ink);font:600 18px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis}.version-current-grid .version-needs-update{color:var(--warning,#b7791f)}.version-update-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px}.version-release-list{margin-top:15px}.version-release-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:3px}.version-release-list-head strong{font-size:13px}.version-release-list-head span{color:var(--muted);font-size:11px}.version-release-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-top:1px solid #edf0f4}.version-release-main{display:grid;grid-template-columns:auto auto auto;align-items:center;justify-content:start;gap:7px;min-width:0}.version-release-main strong{font:600 13px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace}.version-release-main small{grid-column:1/-1;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.version-release-row button{flex:0 0 auto}.settings-version-control .empty{padding:15px 0}.settings-version-control button:disabled{cursor:not-allowed;opacity:.55}@keyframes version-pulse{0%,100%{opacity:.45;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}
.settings-version-meta{margin:7px 0 0;color:var(--muted);font-size:12px}.settings-version-meta strong{margin-left:4px;color:var(--ink);font-size:15px}
@media(max-width:600px){.settings-log-header{display:block}.settings-log-search{margin-top:12px;flex-wrap:wrap}.settings-log-search input{width:100%;flex:1 1 100%}.settings-version-header{display:block}.settings-version-header button{margin-top:12px}.version-current-grid{grid-template-columns:1fr}.version-release-row{align-items:flex-start}.version-release-main{grid-template-columns:auto auto}.version-release-row button{margin-top:1px}}
.settings-sql-import{margin-top:18px;overflow:hidden}.settings-sql-import-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}.settings-sql-import-header h3{margin:0 0 5px;font-size:15px}.settings-sql-import-help{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.settings-sql-import-form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:14px}.settings-sql-import-form input[type=file]{min-width:260px;max-width:100%;padding:8px;border:1px solid #d8dee8;background:#fff;color:var(--ink);font-size:13px}.settings-sql-import-result{display:grid;gap:7px;margin-top:14px;padding:11px 12px;border:1px solid #dfe8f5;background:#f7faff;color:var(--ink);font-size:12px;line-height:1.5}.settings-sql-import-result.hidden{display:none}.settings-sql-import-error{border-color:#f0c9c9;background:#fff7f7;color:var(--danger)}.sql-import-summary-table{width:100%;margin-top:2px}.sql-import-summary-table th,.sql-import-summary-table td{padding:7px 9px;text-align:left}.sql-import-summary-table th{font-weight:600;color:var(--muted);background:#f0f5fb}.sql-import-unavailable{color:var(--warning,#b7791f)}
@media(max-width:600px){.settings-sql-import-form{display:block}.settings-sql-import-form input[type=file]{width:100%;margin-bottom:10px}.settings-sql-import-form button{width:100%}}
.settings-ops-monitor{margin-top:18px;overflow:hidden}.settings-monitor-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}.settings-monitor-header h3{margin:0 0 4px;font-size:15px}.settings-monitor-status{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:14px 0;color:var(--ink);font-size:13px}.monitor-status-dot{width:8px;height:8px;border-radius:50%;background:#9aa5b5}.monitor-status-dot.success{background:#23a26d}.monitor-status-dot.danger{background:#d14343}.monitor-inline-status.success{color:var(--success)}.monitor-inline-status.danger{color:var(--danger)}.settings-monitor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.monitor-metric{min-height:76px;padding:13px 14px;border:1px solid #e5e9ef;background:#fafbfd}.monitor-metric span{display:block;color:var(--muted);font-size:12px}.monitor-metric strong{display:block;margin-top:8px;color:var(--ink);font-size:18px}.monitor-metric .metric-danger{color:var(--danger)}.settings-monitor-footer{display:flex;justify-content:space-between;gap:12px;padding-top:14px;color:var(--muted);font-size:12px}.settings-monitor-loading,.settings-monitor-error{padding:24px;color:var(--muted);font-size:13px}.settings-monitor-error{color:var(--danger)}
.ops-statistics{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.ops-statistics-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.ops-statistics-header h3{margin:0 0 4px;font-size:15px}.ops-statistics-header .muted{margin:0;line-height:1.55}.ops-statistics-controls{display:flex;align-items:flex-end;gap:8px;flex:0 0 auto}.ops-statistics-controls label{display:grid;gap:4px;color:var(--muted);font-size:11px;font-weight:600}.ops-statistics-controls select{min-width:106px;height:34px;padding:0 26px 0 9px;border:1px solid #d8dee8;border-radius:4px;background-color:#fff;color:var(--ink);outline:0}.ops-statistics-controls select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}.ops-chart-legend{display:flex;align-items:center;gap:18px;margin:14px 0 8px;color:var(--muted);font-size:12px}.ops-chart-legend span{display:inline-flex;align-items:center;gap:6px}.ops-legend-bar{display:inline-block;width:13px;height:10px;border-radius:2px;background:#7aa7f2}.ops-legend-line{position:relative;display:inline-block;width:16px;height:8px;border-top:2px solid #10a9c7}.ops-legend-line:after{content:"";position:absolute;top:-4px;left:6px;width:5px;height:5px;border:2px solid #10a9c7;border-radius:50%;background:#fff}.ops-chart-scroll{overflow-x:auto;border:1px solid #e1e8f1;background:#fbfcfe}.ops-chart{display:block;width:100%;min-width:680px;height:240px}.ops-chart-grid{stroke:#e8edf4;stroke-width:1}.ops-chart-axis,.ops-chart-label{fill:#7b8798;font-size:10px}.ops-chart-bar{fill:#7aa7f2;opacity:.76;transition:opacity .16s}.ops-chart-bar:hover{opacity:1}.ops-chart-line{fill:none;stroke:#10a9c7;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.ops-chart-dot{fill:#fff;stroke:#10a9c7;stroke-width:2}.ops-breakdown-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.ops-breakdown{min-width:0;border:1px solid #e1e8f1;background:#fff}.ops-breakdown h4{margin:0;padding:10px 12px;border-bottom:1px solid #e8edf4;color:var(--ink);font-size:13px}.ops-breakdown .table-wrap{max-height:260px;overflow:auto}.ops-breakdown table{width:100%;min-width:390px;font-size:12px}.ops-breakdown th,.ops-breakdown td{padding:8px 10px;text-align:left;white-space:nowrap}.ops-breakdown th{position:sticky;top:0;background:#f7f9fc;color:var(--muted);font-weight:600}.ops-breakdown td:first-child{max-width:150px;overflow:hidden;text-overflow:ellipsis}.ops-breakdown .empty{text-align:center;color:var(--muted)}
@media(max-width:900px){.settings-monitor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.settings-monitor-footer{display:block}.settings-monitor-footer span{display:block;margin-top:5px}}
.login-screen{display:grid;place-items:center;min-height:100vh;padding:32px 24px;background:#eef3f8}.login-frame{display:grid;grid-template-columns:minmax(300px,1fr) 430px;width:min(960px,100%);min-height:570px;border:1px solid #dbe3ed;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 24px 60px rgba(22,43,71,.14)}.login-aside{position:relative;display:flex;flex-direction:column;justify-content:space-between;padding:42px 44px;background:#152238;color:#fff;overflow:hidden}.login-aside:after{content:"";position:absolute;right:-92px;bottom:78px;width:270px;height:270px;border:1px solid rgba(113,170,255,.22);transform:rotate(45deg)}.login-aside-brand{position:relative;z-index:1;display:flex;align-items:center;gap:12px;color:#dce8fa;font-size:10px;line-height:1.45;letter-spacing:1.5px;font-weight:600}.login-aside-mark{display:grid;place-items:center;width:42px;height:42px;background:var(--primary);color:#fff;font-size:14px;letter-spacing:1px;font-weight:800}.login-aside-content{position:relative;z-index:1;margin:auto 0}.login-aside-kicker{margin:0 0 17px;color:#87b5f4;font-size:12px;letter-spacing:1px}.login-aside-content h2{margin:0;color:#fff;font-size:34px;line-height:1.35;font-weight:500;letter-spacing:0}.login-aside-content h2 strong{color:#8fc1fb;font-weight:700}.login-aside-content>p:last-child{max-width:260px;margin:19px 0 0;color:#aebdd1;font-size:13px;line-height:1.8}.login-aside-footer{position:relative;z-index:1;display:flex;gap:22px;color:#aebdd1;font-size:12px}.login-aside-footer span{display:flex;align-items:center;gap:7px}.login-aside-footer i{display:block;width:7px;height:7px;border-radius:50%;background:#48c38a}.login-panel{display:flex;flex-direction:column;justify-content:center;width:100%;padding:48px 52px;border:0;border-radius:0;box-shadow:none}.login-panel-head{display:flex;align-items:center;gap:14px;margin-bottom:22px}.login-panel-head .brand-mark{flex:0 0 auto;margin:0;width:48px;height:48px;border-radius:6px}.login-panel-head .eyebrow{margin:0 0 3px;color:#91a0b5;font-size:10px;letter-spacing:1.4px}.login-panel-label{margin:0;color:#66758d;font-size:12px}.login-panel h1{margin:0 0 8px;color:#172033;font-size:26px;line-height:1.3;letter-spacing:0;font-weight:700}.login-subtitle{margin:0;font-size:13px}.login-panel .stack-form{gap:17px;margin-top:31px}.login-field{gap:8px!important}.login-field span{color:#41506a;font-size:13px;font-weight:600}.login-panel .login-field input{height:48px;padding:0 13px;border:1px solid #d5deea;border-radius:5px;background:#fbfcfe;transition:border-color .18s,box-shadow .18s,background .18s}.login-panel .login-field input::placeholder{color:#aeb8c7}.login-panel .login-field input:hover{border-color:#b6c6dc;background:#fff}.login-panel .login-field input:focus{border-color:var(--primary);background:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.1)}.login-submit{display:flex;align-items:center;justify-content:center;gap:13px;height:48px;margin-top:4px;border-radius:5px;font-size:14px;letter-spacing:.3px;box-shadow:0 8px 16px rgba(37,99,235,.18);transition:transform .18s,box-shadow .18s}.login-submit b{font-size:19px;line-height:1;font-weight:400;transition:transform .18s}.login-submit:hover{transform:translateY(-1px);box-shadow:0 10px 20px rgba(37,99,235,.24)}.login-submit:hover b{transform:translateX(3px)}.login-panel .form-message{min-height:21px;margin:12px 0 0;padding:0;font-size:12px}.login-footnote{margin-top:auto;padding-top:30px;color:#a0acbc;font-size:11px;text-align:center}
@media(max-width:760px){.login-screen{padding:16px}.login-frame{display:block;width:min(480px,100%);min-height:0}.login-aside{min-height:230px;padding:28px 30px}.login-aside-content{margin:30px 0 10px}.login-aside-content h2{font-size:27px}.login-aside-content>p:last-child{margin-top:10px}.login-panel{padding:34px 30px 30px;border-radius:0}.login-footnote{margin-top:28px;padding-top:0}}
@media(max-width:420px){.login-screen{padding:10px}.login-aside{min-height:210px;padding:23px 22px}.login-aside-content h2{font-size:24px}.login-panel{padding:28px 22px 24px}.login-panel h1{font-size:23px}}
.login-frame{display:block;width:min(430px,100%);min-height:0;border-radius:12px}.login-aside{display:none}.login-panel{min-height:480px;padding:46px 44px;border-radius:12px}.login-panel h1{font-size:24px}.login-footnote{display:none}
@media(max-width:600px){.login-panel{min-height:0;padding:34px 28px 30px}}
.statistics-panel{width:fit-content;max-width:100%;overflow:hidden}
.statistics-toolbar{align-items:flex-start}
.statistics-toolbar .table-context{min-width:180px}
.statistics-controls{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.statistics-controls label{display:grid;gap:4px;color:var(--muted);font-size:11px;font-weight:600}
.statistics-controls select{min-width:126px;height:36px;padding:0 9px;border:1px solid #d8dee8;background:#fff;color:var(--ink);outline:0}
.statistics-controls select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.statistics-target{display:inline-flex;align-items:center;min-height:36px;padding:0 10px;border:1px solid #dfe6f0;background:#f8fafc;color:var(--muted);font-size:12px;white-space:nowrap}
.statistics-target strong{margin-left:5px;color:var(--ink)}
.statistics-summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px}
.statistics-summary strong{color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}
.statistics-table-wrap{max-height:calc(100vh - 285px);overscroll-behavior:contain}
.statistics-panel .statistics-table-wrap{max-width:100%}
.statistics-table{width:max-content;min-width:760px;margin:0 auto;table-layout:auto}
.statistics-table th,.statistics-table td{text-align:center;font-variant-numeric:tabular-nums}
.statistics-table tbody th,.statistics-table tfoot th{text-align:left;color:var(--ink);font-weight:600}
.statistics-table tbody td,.statistics-table tbody th{height:43px}
.statistics-table tfoot th,.statistics-table tfoot td{background:#f8fafc;border-top:1px solid #dce2ec}
.statistics-zero{color:#a6b1c0}
.statistics-total-value{color:var(--ink);font-weight:700}
.statistics-quantity-trigger{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:28px;padding:2px 7px;border:1px solid transparent;border-radius:4px;background:transparent;color:inherit;font-variant-numeric:tabular-nums;cursor:pointer}
.statistics-quantity-trigger:hover,.statistics-quantity-trigger:focus-visible{border-color:#8fb2e7;background:#eef5ff;color:var(--primary);outline:0;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.statistics-quantity-trigger:focus-visible{box-shadow:0 0 0 3px rgba(37,99,235,.16)}
.statistics-quantity-trigger .statistics-total-value{color:inherit}
.statistics-detail-modal .modal-card{width:min(1180px,calc(100vw - 28px));max-height:calc(100vh - 28px)}
.statistics-detail-modal .modal-body{padding:18px 20px}
.statistics-detail-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:10px 12px;border:1px solid #dfe6f0;background:#f8fafc;color:var(--muted);font-size:12px}
.statistics-detail-summary strong{color:var(--ink);font-size:13px}
.statistics-detail-table-wrap{max-height:calc(100vh - 170px);border:1px solid #dfe6f0;overflow:auto}
.statistics-detail-table{width:max-content;min-width:100%;table-layout:auto}
.statistics-detail-table th,.statistics-detail-table td{text-align:center;white-space:nowrap}
.statistics-detail-table th{position:sticky;top:0;z-index:1}
.statistics-detail-table td{padding:9px 12px}
.statistics-detail-table .quantity-zero{color:#a6b1c0}
@media(max-width:760px){.statistics-controls{width:100%;justify-content:flex-start}.statistics-controls label{flex:1 1 135px}.statistics-controls select{width:100%;min-width:0}.statistics-target{flex:1 1 auto;justify-content:center}.statistics-summary{gap:8px 14px;padding:10px}}
.statistics-toolbar .table-context{min-width:0;flex:1}
.statistics-toolbar .statistics-summary{gap:18px;padding:0;border:0}
.statistics-toolbar .statistics-summary span{white-space:nowrap}
.statistics-filter-trigger{display:inline-flex;align-items:center;min-height:28px;padding:3px 9px;border:1px solid #cbd9ec;border-radius:4px;background:#f8fbff;color:#355b8f;white-space:nowrap;cursor:pointer;transition:background .15s,border-color .15s,color .15s,box-shadow .15s}
.statistics-filter-trigger::after{content:"";display:inline-block;width:6px;height:6px;margin:0 1px 3px 7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .15s ease}
.statistics-filter-trigger:hover{border-color:#8fb2e7;background:#eef5ff;color:var(--primary)}
.statistics-filter-trigger:focus-visible{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.statistics-filter-trigger.active{border-color:#8fb2e7;background:#eaf3ff;color:var(--primary);font-weight:600}
@media(max-width:760px){.statistics-panel{width:100%}}
select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.25 4.25 6 8l3.75-3.75' fill='none' stroke='%237890ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:12px 12px;cursor:pointer}
.form-grid select,.settings-form select,.statistics-controls select,.reference-select,.input-shell select,.batch-operation-control select{padding-right:30px!important}
.theme-color-field{display:grid!important;gap:9px!important}
.theme-color-input{width:54px!important;height:36px;min-height:36px!important;padding:3px!important;border:1px solid #cbd5e1!important;border-radius:5px;background:#fff;cursor:pointer}
.theme-color-input:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(37,99,235,.14)!important}
.theme-color-swatches{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.theme-color-swatch{width:24px;height:24px;padding:0;border:2px solid #fff;border-radius:50%;background:var(--swatch-color);box-shadow:0 0 0 1px #cbd5e1;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.theme-color-swatch:hover{transform:translateY(-1px);box-shadow:0 0 0 2px #fff,0 0 0 3px var(--swatch-color)}
.theme-color-swatch.active{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--swatch-color)}
.date-filter-group{display:grid;gap:2px}.date-filter-group-head{display:flex;align-items:center;min-height:30px;color:#526075}.date-filter-group-head label{display:flex;align-items:center;gap:8px;flex:1;padding:4px 2px;font-weight:600}.date-filter-year>.date-filter-group-head{color:#263b5c}.date-filter-month>.date-filter-group-head{padding-left:13px;color:#526075}.date-filter-day>.date-filter-group-head{padding-left:27px;color:#69768a;font-weight:400}.date-filter-group-children{display:grid;gap:2px}.date-filter-group-children.hidden{display:none}.date-filter-toggle,.date-filter-toggle-spacer{flex:0 0 18px;width:18px;height:22px;background:transparent;color:#7c899d;padding:0;position:relative}.date-filter-toggle::before{content:"";position:absolute;left:6px;top:6px;width:6px;height:6px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);transition:transform .15s}.date-filter-toggle[aria-expanded="false"]::before{top:5px;transform:rotate(-45deg)}.date-filter-toggle:hover{color:var(--primary)}.date-filter-day .date-filter-toggle-spacer{height:1px}.date-filter-group-head input{margin:0}
.inventory-quick-filter-stack{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#b8c7dc transparent}
.inventory-quick-filter-stack::-webkit-scrollbar{height:6px}
.inventory-quick-filter-stack::-webkit-scrollbar-thumb{background:#b8c7dc;border-radius:6px}
.inventory-quick-filter-stack::-webkit-scrollbar-track{background:transparent}

.settings-email-section{display:grid;gap:0}
.settings-email-heading h3{margin:0 0 8px;font-size:15px}
.settings-email-toggles{border-bottom:1px solid #edf0f5;padding-bottom:6px}
.settings-email-grid{display:grid;grid-template-columns:minmax(0,1.35fr) 120px minmax(0,1.5fr);gap:12px;align-items:end;margin-top:16px}
.settings-email-grid label,.settings-email-recipient,.settings-email-password{display:grid;gap:6px;min-width:0;color:#4c5870;font-size:13px}
.settings-email-grid input,.settings-email-recipient input,.settings-email-password input{width:100%;min-height:40px;padding:10px 11px;border:1px solid #d8dee8;background:#fff;color:var(--ink);outline:0}
.settings-email-grid input:focus,.settings-email-recipient input:focus,.settings-email-password input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.settings-email-recipient{margin-top:12px}
.settings-email-password{margin-top:12px}
.settings-email-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.settings-email-actions .muted{flex:1 1 260px;margin:0;font-size:12px;line-height:1.55}
.settings-template-section{display:grid;gap:14px}
.settings-template-heading h3{margin:0 0 5px;font-size:15px}
.settings-template-heading .muted{margin:0;font-size:12px}
.settings-template-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}
.settings-template-editor{display:grid;gap:6px;min-width:0;color:#4c5870;font-size:13px}
.settings-template-editor textarea{width:100%;min-height:330px;padding:11px;border:1px solid #d8dee8;background:#101827;color:#dbeafe;font:12px/1.6 Consolas,'Courier New',monospace;resize:vertical;outline:0}
.settings-template-editor textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.settings-template-preview{display:grid;grid-template-rows:auto 1fr;gap:6px;min-width:0;color:#4c5870;font-size:13px}
.settings-template-preview iframe{width:100%;min-height:330px;border:1px solid #d8dee8;background:#f4f7fb}
.settings-template-help{margin:0;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
@media(max-width:600px){.settings-email-grid{grid-template-columns:1fr;gap:12px}.settings-email-actions{align-items:stretch}.settings-email-actions button{width:100%}}
@media(max-width:760px){.settings-template-layout{grid-template-columns:1fr}.settings-template-editor textarea,.settings-template-preview iframe{min-height:260px}}

/* Mobile layout contract: every page keeps its own scroll container and never widens the viewport. */
@media(max-width:768px){
  html,body{max-width:100%;overflow-x:hidden}
  body{min-width:0}
  .app-shell{display:block;min-height:100vh;min-height:100dvh}
  .main-content{width:100%;min-width:0}
  .sidebar{display:none}
  .nav-top .topbar,.nav-side .topbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px 9px;height:auto;min-height:64px;padding:9px 10px 7px}
  .nav-top .topbar-brand,.nav-side .topbar-brand{display:flex;align-items:center;order:1;flex:1 1 auto;min-width:0;max-width:calc(100% - 112px)}
  .topbar-brand .brand-mark.small{width:30px;height:30px;flex:0 0 30px}
  .nav-top .topbar-brand span:last-child,.nav-side .topbar-brand span:last-child{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nav-top .topbar-page,.nav-side .topbar-page{display:none}
  .nav-top .user-menu,.nav-side .user-menu{order:2;flex:0 0 auto;gap:6px;min-width:0}
  .user-menu #current-user{display:block;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nav-top #nav-toggle,.nav-side #nav-toggle{display:none}
  .nav-top .top-nav,.nav-side .top-nav{display:flex;order:3;flex:1 0 100%;width:100%;min-width:0;max-width:100%;gap:4px;overflow-x:auto;padding:4px 0 0;border-top:1px solid var(--line);scrollbar-width:none}
  .nav-top .top-nav::-webkit-scrollbar,.nav-side .top-nav::-webkit-scrollbar{display:none}
  .nav-top .nav-item,.nav-side .nav-item{display:flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:36px;padding:7px 12px;border:0;border-bottom:2px solid transparent;border-radius:4px;background:transparent;color:#74839a;font-size:13px;white-space:nowrap}
  .nav-top .nav-item:hover,.nav-side .nav-item:hover{background:#f3f6fb;color:var(--ink)}
  .nav-top .nav-item.active,.nav-side .nav-item.active{background:#eef4ff;color:var(--primary);border-bottom-color:var(--primary)}
  .nav-top .nav-item span:last-child,.nav-side .nav-item span:last-child{display:inline}
  .nav-top .nav-icon,.nav-side .nav-icon{display:none}
  .view{width:100%;max-width:none;padding:14px 10px 26px}
  .view-head{display:flex;align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:14px}
  .view-head h3{font-size:16px}
  .view-actions{width:100%;margin-top:0;gap:7px}
  .view-actions>*{min-width:0;flex:1 1 auto}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
  .metric{min-width:0;min-height:94px;padding:12px}
  .metric-label{gap:5px;font-size:12px}
  .metric-value{margin-top:8px;font-size:21px}
  .dashboard-grid{grid-template-columns:1fr;gap:10px}
  .panel{min-width:0;padding:14px}
  .panel h3{margin-bottom:12px;font-size:14px}
  .warehouse-row{grid-template-columns:minmax(62px,.8fr) minmax(40px,1fr) 48px;gap:7px;font-size:12px}
  .table-panel{width:100%;min-width:0}
  .table-toolbar{display:flex;align-items:stretch;flex-direction:column;gap:9px;padding:10px}
  .toolbar-left,.toolbar-right{width:100%;min-width:0;margin:0;gap:7px;align-items:center;flex-wrap:wrap}
  .table-context{width:100%;min-width:0;white-space:normal;flex-wrap:wrap;gap:3px 8px}
  .table-context h3{font-size:14px}
  .table-search-group{display:flex;width:100%;flex:1 1 100%;min-width:0;gap:6px}
  .table-global-search{display:flex;flex:1 1 auto;min-width:0}
  .table-global-search input{width:100%;min-width:0;height:36px}
  .advanced-search-toggle{flex:0 0 36px}
  .toolbar-right>button{min-width:0;min-height:36px;flex:1 1 auto;padding:8px 10px;white-space:nowrap}
  .inventory-quick-filter-stack{display:flex;align-items:center;flex:1 1 100%;width:100%;max-width:100%;min-width:0;gap:6px;overflow-x:auto;overflow-y:hidden;padding:1px 0 5px;overscroll-behavior-x:contain;scroll-snap-type:x proximity;touch-action:pan-x;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#b8c7dc transparent}
  .inventory-quick-filter-stack::-webkit-scrollbar{height:5px}
  .inventory-quick-filter-stack::-webkit-scrollbar-thumb{background:#b8c7dc;border-radius:6px}
  .inventory-quick-filter-stack::-webkit-scrollbar-track{background:transparent}
  .inventory-quick-filter-stack .warehouse-filter{scroll-snap-align:start}
  .selection-count{max-width:100%;white-space:normal}
  .table-wrap{width:100%;max-width:100%;height:62vh;height:min(62dvh,560px);max-height:none;overflow:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:auto}
  .table-wrap>table{width:max-content;min-width:100%;table-layout:auto}
  th{height:42px;padding:0 9px;font-size:12px}
  td{height:43px;padding:9px;font-size:12px}
  .table-footer{display:block;padding:10px;line-height:1.6}
  .table-footer-left{display:flex;width:100%;gap:5px 10px;flex-wrap:wrap}
  .table-footer .pagination{width:100%;margin-top:7px;overflow-x:auto;justify-content:flex-start;padding-bottom:2px}
  .recent-flow-carousel{width:100%;justify-content:flex-start;order:3;margin-top:7px;overflow-x:auto;padding-bottom:2px}
  .filter-status{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .filter-popover{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);padding:12px}
  .advanced-search-popover{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:12px}
  .advanced-search-form{grid-template-columns:1fr;gap:9px}
  .advanced-search-range{grid-template-columns:58px minmax(0,1fr) 14px minmax(0,1fr)}
  .advanced-search-actions{display:flex;justify-content:stretch}
  .advanced-search-actions button{flex:1}
  .flow-management-stats,.transfer-management-stats{width:100%;gap:6px}
  .transfer-toolbar-context{display:grid;width:100%;gap:8px}
  .transfer-toolbar-context .transfer-management-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%}
  .transfer-toolbar-context .transfer-management-stats>span{display:flex;align-items:baseline;gap:2px;min-width:0;white-space:nowrap}
  .transfer-toolbar-context .transfer-warehouse-menu{justify-self:start}
  .transfer-management-panel .table-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
  .transfer-management-panel .toolbar-left,.transfer-management-panel .toolbar-right{display:contents}
  .transfer-management-panel .transfer-toolbar-context{display:contents}
  .transfer-management-panel .transfer-management-stats{grid-column:1/-1;grid-row:1}
  .transfer-management-panel .table-global-search{grid-column:1;grid-row:2;width:100%;min-width:0}
  .transfer-management-panel .table-global-search input{width:100%;min-width:0}
  .transfer-management-panel [data-refresh-transfer]{grid-column:2;grid-row:2;width:100%;min-width:70px}
  .transfer-management-panel .transfer-warehouse-menu{grid-column:3;grid-row:2;justify-self:stretch}
  .transfer-management-panel .transfer-warehouse-toggle{width:100%;min-height:36px}
  .flow-stat{padding:4px 6px;font-size:11px}
  .flow-date-filter{margin-left:auto}
  .flow-date-filter-popover{position:fixed;top:112px;left:8px;right:8px;width:auto;max-height:calc(100vh - 120px);max-height:calc(100dvh - 120px);padding:12px;z-index:40}
  .flow-date-presets{grid-template-columns:repeat(3,minmax(0,1fr))}
  .transfer-management-content{width:100%;min-width:0}
  .transfer-flow-record-panel{max-height:46vh;max-height:46dvh;padding:13px 12px}
  .transfer-record-card{grid-template-columns:1fr}
  .transfer-record-field-wide{grid-column:auto}
  .transfer-warehouse-dropdown{left:0;right:0;width:calc(100vw - 36px);max-width:calc(100vw - 36px)}
  .transfer-warehouse-dropdown.is-floating{right:auto;width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:8px}
  .transfer-warehouse-summary-table{width:100%;min-width:0;table-layout:fixed}
  .transfer-warehouse-summary-table th,.transfer-warehouse-summary-table td{padding:6px 3px;white-space:normal;overflow-wrap:anywhere;line-height:1.25}
  .transfer-warehouse-summary-table th:first-child{width:48px}
  .transfer-detail-popover,.transfer-record-popover{max-width:calc(100vw - 20px)}
  .settings-layout{grid-template-columns:1fr;gap:10px}
  .settings-form{gap:14px}
  .warehouse-editor{align-items:flex-start}
  .warehouse-chip{max-width:100%;overflow-wrap:anywhere}
  .settings-log-header,.settings-monitor-header{display:block}
  .settings-log-search{width:100%;margin-top:11px;flex-wrap:wrap}
  .settings-log-search input{width:100%;flex:1 1 100%}
  .settings-log-table-wrap{height:45vh;height:45dvh;max-height:430px}
  .settings-monitor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .monitor-metric{min-width:0;min-height:70px;padding:10px}
  .monitor-metric strong{font-size:16px;overflow-wrap:anywhere}
  .settings-monitor-footer{display:block}
  .settings-monitor-footer span{display:block;margin-top:5px}
  .modal{padding:8px;align-items:center}
  .modal-card{display:flex;flex-direction:column;width:calc(100vw - 16px);max-width:none;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);border-radius:7px}
  .modal-header{flex:0 0 auto;min-height:54px;padding:14px 15px}
  .modal-header h3{min-width:0;overflow-wrap:anywhere;font-size:16px}
  .modal-body{min-height:0;flex:1 1 auto;padding:15px;overflow:auto}
  .form-grid{grid-template-columns:1fr;gap:13px}
  .modal-footer{justify-content:stretch;flex-wrap:wrap;gap:7px}
  .modal-footer>*{min-width:0;flex:1}
  .inventory-reference-modal .modal-card,.edge-modify-modal .modal-card,.batch-inventory-modal .modal-card,.export-inventory-modal .modal-card,.transfer-operation-modal .modal-card{width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
  .inventory-reference-modal .modal-body,.edge-modify-modal .modal-body,.batch-inventory-modal .modal-body,.export-inventory-modal .modal-body,.transfer-operation-modal .modal-body{max-height:none;padding:15px}
  .reference-form-label{width:70px;flex-basis:70px;padding-right:8px;font-size:12px}
  .reference-form-footer{justify-content:stretch;margin-left:-15px;margin-right:-15px;padding-left:15px;padding-right:15px}
  .reference-form-footer button,.edge-modify-footer button,.batch-operation-footer button,.transfer-operation-footer button{min-width:0;flex:1}
  .edge-modify-field>span{width:70px;flex-basis:70px;margin-right:8px;font-size:12px}
  .edge-modify-help{margin-bottom:15px;padding:9px 11px;font-size:12px}
  .batch-operation-grid{grid-template-columns:1fr}
  .batch-operation-field-wide{grid-column:auto}
  .batch-operation-field{grid-template-columns:118px minmax(0,1fr);gap:6px}
  .batch-operation-summary{display:block;padding:10px 11px}
  .batch-operation-summary span{display:block;margin-top:4px}
  .inventory-export-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .transfer-field-grid{grid-template-columns:1fr;gap:12px}
  .transfer-info-grid{display:grid;gap:7px}
  .transfer-operation-modal .modal-body{padding:0 12px 13px}
  .transfer-operation-footer{justify-content:stretch}
  .toast{left:10px;right:10px;top:112px;text-align:center;overflow-wrap:anywhere}
}
.settings-log-table{min-width:1180px}

/* System switcher beside the active product name. */
.topbar-brand .system-name,.sidebar-brand .system-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.system-switcher{display:inline-grid;place-items:center;width:28px;height:28px;flex:0 0 28px;padding:0;border:1px solid #d7e1ee;border-radius:5px;background:#f7faff;color:#6680a3;line-height:1;transition:color .15s ease,background .15s ease,border-color .15s ease}
.system-switcher:hover,.system-switcher:focus-visible{border-color:#aac4e8;background:#eef4ff;color:var(--primary);outline:0}
.system-switcher-icon{display:block;font-size:17px;transform:translateY(-1px);transition:transform .18s ease}
.system-switcher[aria-pressed="true"] .system-switcher-icon{transform:translateY(-1px) rotate(180deg)}
.sidebar-brand .system-switcher{border-color:#3a4b66;background:transparent;color:#adc2de}
.sidebar-brand .system-switcher:hover,.sidebar-brand .system-switcher:focus-visible{border-color:#7899c5;background:#243654;color:#fff}
@media(max-width:980px){.sidebar-brand .system-name{display:none}.nav-side .sidebar-brand .system-switcher{display:none}}
@media(max-width:760px){.nav-top .topbar-brand .system-name,.nav-side .topbar-brand .system-name{display:block}}

/* Mother stock module. */
.mother-page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.mother-page-head h3{margin:4px 0 6px;font-size:22px}.mother-page-head .muted{margin:0;max-width:680px}.mother-metric-grid{grid-template-columns:repeat(7,minmax(120px,1fr));margin-bottom:18px}.mother-metric .metric-value{font-size:25px}.mother-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.mother-breakdown{min-height:180px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-heading h3{margin:0}.mother-breakdown-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #edf1f6;color:#52647c}.mother-breakdown-row strong{color:#1d2b42}.mother-baseline{display:flex;gap:18px;align-items:center;margin-top:16px;padding:12px 14px;border:1px solid #dfe7f2;background:#f8fbff;color:#556a84;font-size:13px}.mother-baseline strong{color:#1d2b42}.mother-filterbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.mother-filterbar input,.mother-filterbar select{min-width:150px;height:36px;padding:0 10px;border:1px solid #d9e2ef;border-radius:5px;background:#fff;color:#26364e}.mother-table-panel{overflow:hidden}.mother-table{width:100%;border-collapse:collapse;font-size:13px}.mother-table th,.mother-table td{padding:11px 12px;border-bottom:1px solid #edf1f6;text-align:left;vertical-align:top;white-space:nowrap}.mother-table th{background:#f7f9fc;color:#60718a;font-weight:600}.mother-table td{color:#33445e}.mother-table tr:hover td{background:#fbfdff}.mother-table .mother-usage{white-space:normal;min-width:160px;max-width:260px}.link-button{padding:0;border:0;background:none;color:var(--primary);font-weight:600;cursor:pointer;text-align:left}.quantity-link{padding:0;border:0;background:none;color:#1d6f59;font-weight:700;cursor:pointer}.quantity-link.quantity-zero{color:#b53e3e}.mother-status,.mother-type{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:4px;font-size:12px;white-space:nowrap}.mother-status.normal{background:#e8f6ef;color:#16734f}.mother-status.low{background:#fff4d8;color:#9b6500}.mother-status.out{background:#fdecec;color:#b23a3a}.mother-type{background:#edf3fb;color:#506b91}.mother-type.purchase_in,.mother-type.opening,.mother-type.return,.mother-type.count_gain{background:#e8f6ef;color:#16734f}.mother-type.outbound,.mother-type.scrap,.mother-type.count_loss{background:#fff0e7;color:#a34b1a}.mother-type.reversal{background:#f0edf9;color:#6952a6}.qty-in{color:#16734f!important;font-weight:700}.qty-out{color:#b23a3a!important;font-weight:700}.mother-detail-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:16px;margin-bottom:16px}.mother-detail-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;color:#70809a;font-size:12px}.mother-detail-fields strong{display:block;margin-top:4px;color:#273a55;font-size:14px;font-weight:600}.mother-detail-note{margin:16px 0 0;padding-top:12px;border-top:1px solid #edf1f6;color:#596c86;white-space:pre-wrap}.mother-stock-highlight{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;color:#687c96}.mother-stock-highlight strong{font-size:42px;line-height:1;color:#1e5d78}.mother-stock-highlight small{font-size:14px;margin-left:4px}.mother-loading{padding:60px;text-align:center;color:#70809a}.back-button{padding:0;border:0;background:none;color:var(--primary);cursor:pointer}.mother-form{display:grid;gap:14px}.mother-form label{display:grid;gap:6px;color:#53667f;font-size:13px}.mother-form input,.mother-form select,.mother-form textarea{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #d9e2ef;border-radius:5px;background:#fff;color:#26364e;font:inherit}.mother-form textarea{resize:vertical}.mother-form-intro{padding:10px 12px;background:#f7faff;color:#273a55;border-left:3px solid var(--primary);font-weight:600}.mother-form-intro span{display:block;margin-top:4px;color:#71829a;font-size:12px;font-weight:400}.mother-detail-grid+.panel,.mother-detail-grid~.panel{margin-bottom:16px}
.mother-data-table{width:max-content;min-width:100%;table-layout:fixed}.mother-data-table th,.mother-data-table td{font-variant-numeric:tabular-nums;min-width:0!important;overflow:hidden;text-overflow:ellipsis}.mother-data-table th.table-frozen,.mother-data-table td.table-frozen{position:sticky}.mother-data-table thead th.table-frozen{z-index:5;background:#f6f8fb}.mother-data-table tbody td.table-frozen{z-index:3;background:#fff}.mother-data-table tbody tr:nth-child(even) td.table-frozen{background:#fbfcfe}.mother-data-table tbody tr:hover td.table-frozen{background:#f5f9ff}.mother-data-table .table-selection-column{z-index:4;text-align:center}.mother-data-table thead .table-selection-column{z-index:6;background:#f6f8fb}.mother-data-table tbody .table-selection-column{background:#fff}.mother-data-table tbody tr:nth-child(even) .table-selection-column{background:#fbfcfe}.mother-data-table tbody tr:hover .table-selection-column{background:#f5f9ff}.mother-data-table .table-cell-content{display:block;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mother-data-table .table-cell-content>*{max-width:100%}.mother-data-table .table-action-column{width:80px;min-width:80px!important;max-width:80px;white-space:nowrap}.mother-data-table tbody td:focus-within{position:relative;z-index:12;overflow:visible}.mother-data-table tbody td.table-frozen:focus-within{position:sticky}
@media(max-width:1100px){.mother-metric-grid{grid-template-columns:repeat(4,minmax(120px,1fr))}.mother-dashboard-grid{grid-template-columns:1fr 1fr}.mother-detail-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.mother-page-head{display:block}.mother-page-head .view-actions{margin-top:12px;display:flex;flex-wrap:wrap}.mother-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mother-dashboard-grid,.mother-detail-grid{grid-template-columns:1fr}.mother-filterbar{display:grid;grid-template-columns:1fr 1fr}.mother-filterbar input,.mother-filterbar select{min-width:0}.mother-baseline{display:grid;gap:6px}.mother-table-wrap,.mother-table-panel .table-wrap{overflow-x:auto}.mother-detail-fields{grid-template-columns:1fr 1fr}}

/* Tablet contract: keep navigation and controls usable between phone and desktop widths. */
@media(min-width:769px) and (max-width:1100px){
  html,body{max-width:100%;overflow-x:hidden}
  .nav-top .sidebar,.nav-side .sidebar{display:none}
  .nav-top .main-content,.nav-side .main-content{width:100%;min-width:0}
  .nav-top .topbar,.nav-side .topbar{display:flex;flex-wrap:wrap;align-items:center;height:auto;min-height:72px;padding:10px 18px;gap:8px 14px}
  .nav-top .topbar-brand,.nav-side .topbar-brand{display:flex;align-items:center;order:1;flex:1 1 auto;min-width:0;max-width:calc(100% - 120px)}
  .nav-top .topbar-brand span:last-child,.nav-side .topbar-brand span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nav-top .topbar-page,.nav-side .topbar-page{display:none}
  .nav-top .user-menu,.nav-side .user-menu{display:flex;order:2;flex:0 0 auto;gap:7px;min-width:0}
  .nav-top #nav-toggle,.nav-side #nav-toggle{display:none}
  .nav-top .top-nav,.nav-side .top-nav{display:flex;order:3;flex:1 0 100%;width:100%;min-width:0;max-width:100%;gap:4px;overflow-x:auto;padding:4px 0 0;border-top:1px solid var(--line);scrollbar-width:thin;scrollbar-color:#b8c7dc transparent}
  .nav-top .top-nav::-webkit-scrollbar,.nav-side .top-nav::-webkit-scrollbar{height:4px}
  .nav-top .top-nav::-webkit-scrollbar-thumb,.nav-side .top-nav::-webkit-scrollbar-thumb{background:#b8c7dc;border-radius:4px}
  .nav-top .nav-item,.nav-side .nav-item{display:flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:36px;padding:7px 12px;border:0;border-bottom:2px solid transparent;border-radius:4px;background:transparent;color:#74839a;font-size:13px;white-space:nowrap}
  .nav-top .nav-item:hover,.nav-side .nav-item:hover{background:#f3f6fb;color:var(--ink)}
  .nav-top .nav-item.active,.nav-side .nav-item.active{background:#eef4ff;color:var(--primary);border-bottom-color:var(--primary)}
  .nav-top .nav-item span:last-child,.nav-side .nav-item span:last-child{display:inline}
  .nav-top .nav-icon,.nav-side .nav-icon{display:none}
  .nav-top .view,.nav-side .view{width:100%;max-width:none;padding:18px 18px 32px}
  .nav-top .table-panel,.nav-side .table-panel,.nav-top .settings-layout,.nav-side .settings-layout{width:100%;min-width:0}
  .nav-top .table-wrap,.nav-side .table-wrap{max-height:calc(100vh - 285px);max-height:calc(100dvh - 285px)}
}
@media(min-width:769px) and (max-width:900px){
  .table-toolbar{display:flex;align-items:stretch;flex-direction:column;gap:10px;padding:12px}
  .table-toolbar .toolbar-left,.table-toolbar .toolbar-right{width:100%;min-width:0;margin:0;flex:0 0 auto;align-items:center;gap:8px;flex-wrap:wrap}
  .table-toolbar .toolbar-right{justify-content:flex-end}
  .table-search-group{flex:1 1 250px;min-width:220px}
  .table-global-search{display:flex;flex:1 1 auto;min-width:0}
  .table-global-search input{width:100%;min-width:0}
  .table-toolbar .toolbar-right>button{flex:0 0 auto;min-width:0;white-space:nowrap}
  .inventory-quick-filter-stack{flex:1 1 100%;width:100%;max-width:100%;min-width:0}
  .table-wrap{height:62vh;height:min(62dvh,560px);max-height:none}
  .transfer-management-panel .table-toolbar{display:flex;align-items:stretch;flex-direction:column;gap:10px}
  .transfer-management-panel .transfer-toolbar-context{display:flex;width:100%;align-items:center;gap:10px;flex-wrap:wrap}
  .transfer-management-panel .transfer-management-stats{flex:1 1 auto;min-width:0}
  .transfer-management-panel .transfer-warehouse-menu{justify-self:auto}
}
@media(min-width:901px) and (max-width:1200px){
  .table-toolbar{display:flex;align-items:stretch;flex-direction:column;gap:10px;padding:12px 14px}
  .table-toolbar .toolbar-left,.table-toolbar .toolbar-right{width:100%;min-width:0;margin:0;flex:0 0 auto;align-items:center;gap:8px;flex-wrap:wrap}
  .table-toolbar .toolbar-right{justify-content:flex-end}
  .table-toolbar .table-search-group{flex:1 1 300px;min-width:260px}
  .table-toolbar .table-global-search{display:flex;flex:1 1 auto;min-width:0}
  .table-toolbar .table-global-search input{width:100%;min-width:0}
  .table-toolbar .toolbar-right>button{flex:0 0 auto;min-width:0;white-space:nowrap}
  .inventory-quick-filter-stack{flex:1 1 auto;min-width:0;max-width:100%}
}

@media(max-width:420px){
  .view{padding-left:8px;padding-right:8px}
  .nav-top .topbar,.nav-side .topbar{padding-left:8px;padding-right:8px}
  .nav-top .topbar-brand,.nav-side .topbar-brand{max-width:calc(100% - 92px)}
  .user-menu #current-user{display:none}
  .nav-top .nav-item,.nav-side .nav-item{padding-left:10px;padding-right:10px;font-size:12px}
  .view-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .view-actions>*{width:100%}
  .toolbar-right>button{flex:1 1 calc(50% - 7px)}
  .table-footer-summary{white-space:normal}
  .advanced-search-range{grid-template-columns:52px minmax(0,1fr) 12px minmax(0,1fr);gap:5px;font-size:10px}
  .settings-monitor-grid{gap:6px}
  .monitor-metric span{font-size:11px}
  .monitor-metric strong{font-size:15px}
}

@media(max-width:600px){
  .flow-audit-modal .modal-body{padding:15px}
  .flow-audit-overview{display:block}
  .flow-audit-overview span{display:block;margin-top:4px}
  .flow-audit-conclusion{display:block}
  .flow-audit-conclusion strong{display:block;margin-top:4px;line-height:1.7}
  .flow-audit-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.inventory-export-mode{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px 15px;border:1px solid #e0e7f1;border-radius:5px;background:#fff}
.inventory-export-mode label{display:grid;gap:6px;color:#536075;font-size:12px}
.inventory-export-mode select{width:100%;min-height:36px;padding:7px 9px;border:1px solid #d8e0ec;background:#fff;color:var(--ink);outline:0}
.inventory-export-mode select:disabled{background:#f4f6f9;color:#9aa6b5}
@media(max-width:520px){.inventory-export-mode{grid-template-columns:1fr}}
.table-search-group{display:flex;align-items:center;gap:6px;min-width:0}
.advanced-search-toggle{position:relative;display:inline-grid;place-items:center;width:36px;height:36px;flex:0 0 36px;padding:0;border:1px solid #d8dee8;border-radius:4px;background:#eef3fb;color:#355b8f;cursor:pointer}
.advanced-search-toggle:hover,.advanced-search-toggle:focus-visible,.advanced-search-toggle.active{border-color:#8fb2e7;background:#eef5ff;color:var(--primary);outline:0}
.advanced-search-toggle b{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;min-width:16px;height:16px;padding:0 3px;border-radius:9px;background:var(--primary);color:#fff;font-size:10px;line-height:1;font-weight:700}
.advanced-search-glyph{display:block;width:17px;height:16px;background:linear-gradient(currentColor,currentColor) 0 2px/17px 1px no-repeat,linear-gradient(currentColor,currentColor) 0 8px/17px 1px no-repeat,linear-gradient(currentColor,currentColor) 0 14px/17px 1px no-repeat}
.advanced-search-popover{position:fixed;z-index:25;width:min(440px,calc(100vw - 20px));max-height:calc(100vh - 20px);overflow:auto;padding:14px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 14px 32px rgba(29,43,67,.2);color:var(--ink)}
.advanced-search-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:11px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.advanced-search-header>div{display:grid;gap:2px;min-width:0}
.advanced-search-header strong{font-size:14px;color:var(--ink)}
.advanced-search-header span{font-size:11px;color:var(--muted)}
.advanced-search-header .clear-filter-link{padding:0;background:transparent;color:var(--primary);font-size:12px;white-space:nowrap}
.advanced-search-header .clear-filter-link:hover{text-decoration:underline}
.advanced-search-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 9px}
.advanced-search-field{display:grid;grid-template-columns:62px minmax(0,1fr);align-items:center;gap:7px;min-width:0;color:#536075;font-size:12px}
.advanced-search-field span,.advanced-search-range>span{white-space:nowrap}
.advanced-search-field input,.advanced-search-field select,.advanced-search-range input{width:100%;min-width:0;height:34px;padding:7px 8px;border:1px solid #d8dee8;border-radius:4px;background:#fff;color:var(--ink);outline:0;font-size:12px}
.advanced-search-field input:focus,.advanced-search-range input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.advanced-search-range{display:grid;grid-column:1/-1;grid-template-columns:62px minmax(0,1fr) 18px minmax(0,1fr);align-items:center;gap:7px;min-width:0;color:#536075;font-size:12px}
.advanced-search-range b{font-weight:400;text-align:center;color:var(--muted)}
.advanced-date-presets{grid-column:1/-1;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:2px 0 1px;color:var(--muted);font-size:11px}
.advanced-date-presets button{min-height:28px;padding:4px 9px;border:1px solid #d6e0ee;border-radius:4px;background:#f8fbff;color:#355b8f;font-size:11px;cursor:pointer}
.advanced-date-presets button:hover,.advanced-date-presets button:focus-visible{border-color:#8fb2e7;background:#eef5ff;color:var(--primary);outline:0}
.advanced-search-actions{display:flex;grid-column:1/-1;justify-content:flex-end;gap:8px;padding-top:3px}
.advanced-search-actions button{min-width:64px;min-height:34px}
@media(max-width:600px){
  .advanced-search-popover{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:12px}
  .advanced-search-form{grid-template-columns:1fr;gap:9px}
  .advanced-search-field{grid-template-columns:58px minmax(0,1fr)}
  .advanced-search-range{grid-template-columns:58px minmax(0,1fr) 14px minmax(0,1fr);gap:5px;font-size:10px}
  .advanced-search-actions{display:flex;justify-content:stretch}
  .advanced-search-actions button{flex:1}
}
/* Mobile browsers rasterize a 3D-flipped layer and can make the statistics text blurry. */
@media(max-width:768px){
  .flow-view-flip{width:100%;}
  .flow-view-flip .flow-view-flip-inner{display:block;transform:none!important;transform-style:flat;transition:none!important;}
  .flow-view-flip .flow-view-front{display:block;}
  .flow-view-flip .flow-view-back{display:none;visibility:hidden;transform:none;}
  .flow-view-flip.is-flipped{width:100%;perspective:none;}
  .flow-view-flip.is-flipped .flow-view-front{display:none;visibility:hidden;}
  .flow-view-flip.is-flipped .flow-view-back{display:block;visibility:visible;transform:none!important;backface-visibility:visible!important;-webkit-backface-visibility:visible!important;}
}
@media(max-width:768px){
  .flow-view-front .table-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
  .flow-view-front .toolbar-left,.flow-view-front .toolbar-right{display:contents}
  .flow-view-front .flow-management-stats{display:contents}
  .flow-view-front .flow-management-summary{grid-column:1/-1;grid-row:1;display:flex;width:100%;gap:6px;min-width:0}
  .flow-view-front .flow-management-actions{display:contents}
  .flow-view-front .flow-management-actions .flow-date-filter{grid-column:1;grid-row:2;justify-self:start;margin-left:0;height:36px;align-items:center}
  .flow-view-front .flow-management-actions .flow-date-filter-toggle{width:36px;height:36px}
  .flow-view-front .flow-management-actions .flow-stat-view-toggle{grid-column:2;grid-row:2;min-width:0;min-height:36px;padding:8px 10px;white-space:nowrap}
  .flow-view-front .toolbar-right>[data-refresh]{grid-column:3;grid-row:2;min-width:0;min-height:36px;padding:8px 10px;white-space:nowrap}
}

/* Premium operations console pass. Keep the information density, refine the hierarchy. */
:root{--canvas:#f3f6fa;--line:#dfe6ef;--shadow:0 10px 28px rgba(24,43,71,.07)}
body{background:var(--canvas);letter-spacing:0}
button,input,select,textarea{transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,color .16s ease,transform .16s ease}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.app-shell{background:var(--canvas)}
.topbar{position:sticky;top:0;z-index:10;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);box-shadow:0 1px 0 rgba(20,35,58,.04)}
.nav-side .sidebar{position:sticky;top:0;height:100vh;padding:24px 14px 18px;border-right:1px solid rgba(255,255,255,.04);box-shadow:8px 0 24px rgba(15,31,55,.06)}
.nav-side .sidebar-brand{padding:0 8px 22px;margin-bottom:15px;border-bottom:1px solid rgba(207,222,245,.13);letter-spacing:.1px}
.nav-side .sidebar-brand .brand-mark{border-radius:7px;box-shadow:0 6px 14px rgba(37,99,235,.25)}
.nav-side .main-nav{gap:4px}
.nav-side .nav-item{position:relative;min-height:43px;padding:10px 12px;border-radius:6px;color:#aebbd0;transition:background-color .16s ease,color .16s ease,transform .16s ease}
.nav-side .nav-item::before{content:"";position:absolute;left:-14px;top:50%;width:3px;height:0;border-radius:0 3px 3px 0;background:#79adf8;transform:translateY(-50%);transition:height .16s ease}
.nav-side .nav-item:hover{background:#1d2f4b;color:#eef5ff;transform:translateX(1px)}
.nav-side .nav-item.active{background:#213654;color:#fff;box-shadow:inset 0 0 0 1px rgba(135,182,247,.1)}
.nav-side .nav-item.active::before{height:21px}
.nav-side .nav-icon{color:#8db8f4}
.nav-side .sidebar-bottom{padding:15px 8px 4px;border-top-color:rgba(207,222,245,.13);color:#8798b1}
.nav-side .main-content{min-height:100vh}
.nav-side .topbar{height:78px;padding:16px 32px}
.nav-side .topbar-page h2{font-size:20px;font-weight:700;letter-spacing:.1px}
.nav-side .topbar-page .eyebrow{color:#8a99ad;font-size:10px;letter-spacing:1.4px}
.nav-side .user-profile-trigger{padding:5px 7px 5px 5px;border:1px solid transparent;border-radius:7px}
.nav-side .user-profile-trigger:hover{background:#f4f7fb;border-color:#e0e7f0}
.nav-side .user-avatar{border-radius:7px}
.nav-side .layout-toggle{margin-left:2px;padding:7px 9px;border-radius:6px;background:#f4f7fb}
.nav-side .layout-toggle:hover{background:#eaf2ff}
.nav-side .view{width:min(100%,1800px);margin:0 auto;padding:30px 32px 46px}
.view:not(.hidden){animation:view-enter .3s ease both}
@keyframes view-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.view-head{margin-bottom:21px}
.view-head h3{font-size:18px;line-height:1.35;letter-spacing:0}
.view-head .muted{margin-top:4px}
.metric-grid{gap:14px;margin-bottom:20px}
.metric,.panel,.table-panel{border-radius:8px;box-shadow:var(--shadow)}
.metric{position:relative;overflow:hidden;padding:18px 20px;border-color:#e1e7ef}
.metric::after{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--primary);opacity:.9}
.metric:nth-child(2)::after{background:#10a9c7}.metric:nth-child(3)::after{background:#28a36a}.metric:nth-child(4)::after{background:#d79a2b}
.metric-label{font-size:12px;letter-spacing:.1px}
.metric-value{font-size:30px;line-height:1.1;margin-top:14px;font-variant-numeric:tabular-nums}
.panel{padding:20px;border-color:#e1e7ef}
.panel h3{font-size:15px;margin-bottom:17px}
.table-panel{border-color:#e1e7ef}
.table-toolbar{min-height:66px;padding:14px 18px;background:#fff}
.toolbar-left,.toolbar-right{gap:8px}
.table-wrap{scrollbar-color:#c3cfdf transparent;scrollbar-width:thin}
th{height:44px;background:#f6f8fb;color:#526075;font-size:12px;letter-spacing:.1px}
td{height:46px;color:#344158;font-size:13px}
tbody tr{transition:background-color .14s ease}
tbody tr:hover{background:#f5f9ff}
.primary,.secondary,.danger,.text-button{border-radius:5px}
.primary{box-shadow:0 5px 12px rgba(37,99,235,.13)}
.primary:hover{background:#1f56c5;transform:translateY(-1px);box-shadow:0 7px 15px rgba(37,99,235,.2)}
.secondary:hover{background:#e3edff;color:#2455a0}
.danger:hover{background:#ffe6e6}
.page-btn{border-radius:4px}
.modal-card{border-radius:9px;box-shadow:0 22px 52px rgba(15,31,55,.23)}
.modal-header{background:#fbfcfe}
.toast{top:88px;border-radius:6px;box-shadow:0 12px 28px rgba(15,31,55,.18)}
.login-screen{position:relative;overflow:hidden;background:#eef3f8}
.login-screen::before{content:"";position:fixed;inset:22px;border:1px solid rgba(128,153,186,.16);pointer-events:none}
.login-frame{position:relative;z-index:1;box-shadow:0 24px 60px rgba(22,43,71,.12)}
.login-panel{background:rgba(255,255,255,.98)}
@media(max-width:768px){
  .nav-side .sidebar{display:none}
  .nav-side .topbar{position:relative;height:auto;padding:10px 12px}
  .nav-side .view{width:100%;max-width:none;padding:18px 12px 30px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

/* Total inventory view mirrors the workbook total sheet with a two-level header. */
.total-inventory-panel{width:fit-content;max-width:100%;margin:0 auto;overflow:hidden}
.total-inventory-toolbar{align-items:center}
.total-inventory-toolbar .table-context{display:flex;align-items:center;gap:10px;min-width:0}
.total-inventory-toolbar .table-context>div{display:grid;gap:2px;min-width:0}
.total-inventory-toolbar .table-context h3{margin:0;color:var(--ink);font-size:16px;font-weight:700}
.total-inventory-back{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid #d4deeb;border-radius:4px;background:#f7faff;color:#35649e;font-size:22px;line-height:1;cursor:pointer}
.total-inventory-back:hover{border-color:#8fb2e7;background:#eef5ff;color:var(--primary)}
.total-inventory-summary{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding:11px 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted);font-size:12px}
.total-inventory-summary strong{margin-left:4px;color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}
.total-inventory-summary-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}
.total-inventory-table-wrap{max-height:calc(100vh - 270px);overflow:auto;overscroll-behavior:contain}
.total-inventory-table{width:max-content;min-width:100%;table-layout:fixed;border-collapse:collapse;background:#fff;color:#18345b;font-size:12px}
.total-inventory-table th,.total-inventory-table td{min-width:0!important;overflow:hidden;text-overflow:ellipsis}
.total-inventory-table .th-inner{min-width:0;overflow:hidden}
.total-inventory-table .th-inner>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.total-inventory-table .total-inventory-comment-trigger{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.total-inventory-table .table-frozen{position:sticky!important;z-index:3}
.total-inventory-table thead .table-frozen{z-index:10!important}
.total-inventory-table tfoot .table-frozen{z-index:3}
.total-inventory-table th,.total-inventory-table td{height:34px;padding:6px 8px;border-right:1px solid #d9e3f1;border-bottom:1px solid #d9e3f1;text-align:center;vertical-align:middle;white-space:nowrap;font-variant-numeric:tabular-nums}
.total-inventory-table thead th{position:sticky;z-index:2;color:#fff;font-weight:700}
.total-inventory-table thead tr:first-child th{top:0;height:34px}
.total-inventory-table thead tr:nth-child(2) th{top:34px;height:28px}
.total-inventory-table .th-inner{justify-content:center;gap:4px}
.total-inventory-table .filter-btn{padding:2px 3px;color:rgba(255,255,255,.68);font-size:11px}
.total-inventory-table .filter-btn:hover,.total-inventory-table .filter-btn.active{color:#fff}
.total-inventory-fixed-header,.total-inventory-total-group{background:#2864db!important}
.total-inventory-fixed-header{z-index:2!important}
.total-inventory-subheader.total-inventory-total-group{background:#2158c7!important}
.total-inventory-warehouse-color-0{background:#0879ad!important}
.total-inventory-warehouse-color-1{background:#11856c!important}
.total-inventory-warehouse-color-2{background:#0875a7!important}
.total-inventory-warehouse-color-3{background:#5b45df!important}
.total-inventory-warehouse-color-4{background:#cf4d13!important}
.total-inventory-warehouse-color-5{background:#ad2460!important}
.total-inventory-table tbody th{background:#f5f8fc;color:#183b68;font-weight:600}
.total-inventory-table tbody tr:nth-child(even) th,.total-inventory-table tbody tr:nth-child(even) td{background:#fbfcfe}
.total-inventory-table tbody tr:hover th,.total-inventory-table tbody tr:hover td{background:#eef5ff}
.total-inventory-table tbody td,.total-inventory-table tbody th{height:34px}
.total-inventory-table .total-inventory-number{font-weight:400}
.total-inventory-table .total-inventory-quantity.is-zero{color:#9aa9bc;font-weight:400}
.total-inventory-table .total-inventory-quantity.is-nonzero{color:#183b68;font-weight:700}
.total-inventory-comment-trigger{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:42px;min-height:25px;padding:2px 7px;border:1px solid transparent;border-radius:3px;background:transparent;color:inherit;cursor:pointer}
.total-inventory-comment-trigger:hover,.total-inventory-comment-trigger:focus-visible{border-color:#8fb2e7;background:#eef5ff;outline:0;box-shadow:0 0 0 2px rgba(37,99,235,.1)}
.total-inventory-comment-marker{position:absolute;top:-1px;right:-1px;width:0;height:0;border-top:8px solid #d94343;border-left:8px solid transparent;pointer-events:none}
.total-inventory-comment-modal{display:grid;gap:12px}
.total-inventory-comment-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dfe6f0;background:#f8fafc;color:var(--ink);font-size:13px}
.total-inventory-comment-head span{color:var(--muted);font-size:12px;white-space:nowrap}
.total-inventory-comment-modal pre{margin:0;padding:13px 14px;border:1px solid #e0e6ef;background:#fffef0;color:#526075;font:12px/1.7 "Segoe UI","Microsoft YaHei",Arial,sans-serif;white-space:pre-wrap;overflow:auto}
.total-inventory-table tfoot th,.total-inventory-table tfoot td{height:38px;background:#e9eff8;color:#183b68;font-weight:700;border-top:1px solid #c6d5e9}
.total-inventory-table tfoot .total-inventory-quantity.is-zero{color:#8d9db2}
.total-inventory-table tr>*:last-child{border-right:0}
@media(max-width:768px){
  .total-inventory-panel{width:100%}
  .total-inventory-toolbar{align-items:flex-start}
  .total-inventory-summary{gap:8px 14px;padding:10px 12px}
  .total-inventory-table-wrap{max-height:calc(100vh - 270px);max-height:calc(100dvh - 270px)}
}

/* Inventory table settings and configurable frozen columns. */
.table-settings-toggle{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid #d4deeb;border-radius:5px;background:#f7faff;color:#4f6f9f;cursor:pointer}
.table-settings-toggle:hover,.table-settings-toggle:focus-visible{border-color:#8fb2e7;background:#eef5ff;color:var(--primary);outline:0}
.table-settings-glyph{font-size:17px;line-height:1}
.table-settings-popover{position:fixed;z-index:30;width:min(360px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;border:1px solid #d4deeb;border-radius:7px;background:#fff;box-shadow:0 16px 36px rgba(25,48,80,.2);color:var(--ink)}
.table-settings-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px 16px 12px;border-bottom:1px solid var(--line)}
.table-settings-header>div{display:grid;gap:3px}
.table-settings-header strong{font-size:14px}
.table-settings-header span{color:var(--muted);font-size:12px}
.table-settings-close{width:25px;height:25px;padding:0;border:0;background:transparent;color:#7f8da2;font-size:19px;line-height:1;cursor:pointer}
.table-settings-close:hover{color:var(--primary);background:#f0f5fc}
.table-settings-form{display:grid;gap:16px;padding:15px 16px 16px}
.table-settings-form section{display:grid;gap:9px}
.table-settings-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#30435f;font-size:12px}
.table-settings-section-head .muted{font-size:11px}
.table-settings-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 8px}
.table-settings-option{display:flex;align-items:center;gap:7px;min-width:0;padding:7px 8px;border:1px solid #e2e8f1;border-radius:4px;background:#fbfcfe;color:#41516a;font-size:12px;cursor:pointer}
.table-settings-option:hover{border-color:#b8cdeb;background:#f3f7fd}
.table-settings-option input{margin:0;accent-color:var(--primary)}
.table-settings-option input:disabled+span{color:#a9b4c3}
.table-settings-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:1px}
.link-button{padding:0;border:0;background:transparent;color:var(--primary);font-size:12px;cursor:pointer}
.link-button:hover{text-decoration:underline}
.inventory-data-table{width:max-content;min-width:100%;table-layout:fixed}
.inventory-data-table th,.inventory-data-table td{font-variant-numeric:tabular-nums}
.inventory-data-table th.table-frozen,.inventory-data-table td.table-frozen{position:sticky}
.inventory-data-table thead th.table-frozen{z-index:5;background:#f6f8fb}
.inventory-data-table tbody td.table-frozen{z-index:3;background:#fff}
.inventory-data-table tbody tr:nth-child(even) td.table-frozen{background:#fbfcfe}
.inventory-data-table tbody tr:hover td.table-frozen{background:#f5f9ff}
.inventory-data-table .table-selection-column{z-index:4;text-align:center}
.inventory-data-table thead .table-selection-column{z-index:6;background:#f6f8fb}
.inventory-data-table tbody .table-selection-column{background:#fff}
.inventory-data-table tbody tr:nth-child(even) .table-selection-column{background:#fbfcfe}
.inventory-data-table tbody tr:hover .table-selection-column{background:#f5f9ff}
.inventory-data-table th[data-column-key]{position:sticky}
.column-resize-handle{position:absolute;top:0;right:0;width:8px;height:100%;z-index:7;cursor:col-resize;touch-action:none;user-select:none}
.column-resize-handle::after{content:"";position:absolute;top:9px;bottom:9px;left:3px;width:1px;background:transparent}
.column-resize-handle:hover::after,.is-resizing-column .column-resize-handle::after{background:#6f9fe8}
.is-resizing-column,.is-resizing-column *{cursor:col-resize!important;user-select:none!important}
.table-settings-actions{flex-wrap:wrap}
.inventory-data-table th,.inventory-data-table td{overflow:hidden;text-overflow:ellipsis}
.inventory-data-table th,.inventory-data-table td{min-width:0!important}
.inventory-data-table .th-inner{min-width:0;overflow:hidden}
.inventory-data-table .th-inner>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inventory-data-table .table-cell-content{display:block;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inventory-data-table .table-cell-content>*{max-width:100%}
.inventory-data-table .table-action-column{width:146px;min-width:146px!important;max-width:146px;white-space:nowrap}
.inventory-data-table tbody td:focus-within{position:relative;z-index:12;overflow:visible}
.inventory-data-table tbody td.table-frozen:focus-within{position:sticky}
.inventory-data-table .table-cell-content:focus{position:relative;z-index:13;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;padding:6px 8px;margin:-6px -8px;background:#fff;border:1px solid #9bbbea;border-radius:3px;box-shadow:0 5px 14px rgba(29,63,110,.16);outline:0}
@media(max-width:768px){
  .table-settings-popover{width:min(340px,calc(100vw - 16px))}
  .table-settings-options{grid-template-columns:1fr 1fr}
}

.purchase-quantity-summary{display:flex;align-items:center;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px}.purchase-summary-group{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.purchase-summary-group>b{color:#526075;font-weight:600}.purchase-summary-group>span{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;background:#f5f8fc;color:#5d6d83}.purchase-summary-group strong{color:var(--ink);font-variant-numeric:tabular-nums}
@media(max-width:760px){.purchase-quantity-summary{width:100%;gap:6px 12px}.purchase-summary-group{width:100%}}

.purchase-search{display:flex;align-items:center;gap:8px}.purchase-search input{width:min(310px,32vw);min-height:36px;padding:8px 10px;border:1px solid #d8dee8;background:#fff;color:var(--ink);outline:0}.purchase-search input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}.purchase-table{min-width:760px}.purchase-table th,.purchase-table td{padding-left:14px;padding-right:14px}.purchase-table th:nth-child(1),.purchase-table td:nth-child(1){width:70px}.purchase-table th:nth-child(6),.purchase-table td:nth-child(6),.purchase-table th:nth-child(7),.purchase-table td:nth-child(7){text-align:right;font-variant-numeric:tabular-nums}.purchase-table .table-action-column{width:130px;white-space:nowrap}.purchase-form-intro{display:flex;align-items:baseline;gap:10px;margin-bottom:20px;color:var(--ink);font-weight:700;font-size:16px}.purchase-form-intro span{color:var(--muted);font-size:12px;font-weight:400}.purchase-record-modal .modal-card{width:min(680px,calc(100vw - 32px))}.purchase-record-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-record-form .modal-footer{margin-top:20px}.purchase-record-form input[type=number]{font-variant-numeric:tabular-nums}@media(max-width:600px){.purchase-search{width:100%}.purchase-search input{width:100%;flex:1}.purchase-record-form .form-grid{grid-template-columns:1fr}.purchase-form-intro{display:block}.purchase-form-intro span{display:block;margin-top:4px}}
.purchase-table th:nth-child(6) .th-inner,.purchase-table th:nth-child(7) .th-inner{justify-content:flex-end}
.version-operation-result{margin:14px 0 0;color:var(--success);font-size:12px;line-height:1.55}
.version-release-time{grid-column:1/-1;color:var(--muted);font-size:11px}.version-release-changes{grid-column:1/-1;color:var(--muted);font-size:11px}.version-release-changes summary{cursor:pointer;color:#5674a1}.version-release-changes ul{margin:7px 0 0;padding-left:18px;line-height:1.6}.version-release-changes li{overflow-wrap:anywhere}.version-release-main{align-items:start}
/* Mother usage management. */
.mother-form-hint{display:block;color:#71829a;font-size:12px;font-weight:400}.mother-usage-picker{display:flex;flex-wrap:wrap;gap:8px;min-height:42px;padding:10px;border:1px solid #d9e2ef;border-radius:5px;background:#f8fafc}.mother-usage-option{display:inline-flex!important;grid-template-columns:none!important;align-items:center;gap:6px;padding:6px 9px;border:1px solid #dfe7f2;border-radius:4px;background:#fff;color:#33445e!important;font-size:13px!important;font-weight:400!important;cursor:pointer}.mother-usage-option input{width:auto;margin:0}.mother-usage-empty{color:#8795a8;font-size:13px;padding:2px}.icon-button.danger{color:#b23a3a}
.mother-usage-management{display:grid;gap:16px}.mother-usage-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:2px 0}.mother-usage-toolbar>div:first-child{display:flex;align-items:baseline;gap:10px;color:#273a55}.mother-usage-toolbar>div:first-child strong{font-size:16px}.mother-usage-count{color:#71829a;font-size:12px}.mother-usage-actions{display:flex;align-items:center;gap:8px}.mother-usage-search{display:flex;align-items:center;width:min(260px,30vw);height:38px;padding:0 10px;border:1px solid #d9e2ef;border-radius:5px;background:#fff}.mother-usage-search:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.1)}.mother-usage-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#26364e}.mother-usage-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.mother-usage-card{min-height:124px;padding:15px 16px;border:1px solid #dfe7f2;border-radius:7px;background:#fff;box-shadow:0 3px 12px rgba(22,38,64,.04);transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.mother-usage-card:hover{border-color:#b9cbea;box-shadow:0 7px 18px rgba(22,38,64,.08);transform:translateY(-1px)}.mother-usage-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.mother-usage-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 7px;border-radius:4px;background:#edf3fb;color:#4b6b99;font-size:11px}.mother-usage-card-actions{display:flex;align-items:center;gap:1px}.mother-usage-card h3{margin:15px 0 12px;color:#273a55;font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mother-usage-card-meta{display:flex;align-items:baseline;gap:7px;color:#71829a;font-size:12px}.mother-usage-card-meta strong{color:#1e5d78;font-size:22px;line-height:1}.mother-usage-empty-state{grid-column:1/-1;padding:64px 20px;text-align:center;color:#8795a8;border:1px dashed #ccd8e7;border-radius:7px;background:#fbfcfe}@media(max-width:1100px){.mother-usage-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.mother-usage-toolbar{display:grid;align-items:stretch}.mother-usage-actions{flex-wrap:wrap}.mother-usage-search{width:100%;order:-1}.mother-usage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.mother-usage-grid{grid-template-columns:1fr}}
/* Compact usage cards. */
.mother-usage-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.mother-usage-card{min-height:94px;padding:10px 12px;border-radius:5px}.mother-usage-card h3{margin:9px 0 8px;font-size:14px}.mother-usage-card-meta{gap:5px;font-size:11px}.mother-usage-card-meta strong{font-size:19px}.mother-usage-badge{padding:2px 6px;font-size:10px}.mother-usage-card-actions .icon-button{width:24px;height:24px;padding:0;font-size:14px}
@media(max-width:1440px){.mother-usage-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1100px){.mother-usage-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.mother-usage-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.mother-usage-card{padding:9px 10px}}
@media(max-width:480px){.mother-usage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Mother item editor. */
.modal-card:has(.mother-edit-form){display:flex;flex-direction:column;width:min(980px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:hidden}
.modal-card:has(.mother-edit-form) .modal-body{flex:1 1 auto;min-height:0;padding:0;overflow:auto}
.mother-edit-form{display:grid;min-width:0;background:#fff}
.mother-edit-section{display:grid;gap:17px;padding:21px 28px;border-bottom:1px solid #e8edf3}
.mother-edit-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.mother-edit-section-head h4{margin:0;color:#1e2e47;font-size:15px;line-height:1.3}
.mother-edit-title-code{display:inline-flex;align-items:center;margin-left:10px;padding:3px 8px;border:1px solid #d5e2f4;border-radius:4px;background:#f2f6fc;color:#5b7598;font-size:11px;font-weight:600;line-height:1.3;vertical-align:middle}
.mother-edit-kicker{margin:0 0 4px;color:#6c8bb8;font-size:10px;font-weight:800;letter-spacing:1.1px}
.mother-edit-section-note{padding-top:14px;color:#8190a3;font-size:12px;text-align:right}
.mother-edit-range-section{gap:8px;padding:13px 20px;background:#fbfcfe}
.mother-edit-range-section-head{align-items:center}
.mother-edit-range-heading-actions{display:flex;align-items:center;gap:8px}
.mother-edit-range-heading-actions .mother-edit-section-note{padding-top:0}
.mother-edit-range-list{display:grid;gap:7px}
.mother-edit-range-row{display:grid;gap:7px;padding:8px 10px;border:1px solid #dfe7f1;border-radius:4px;background:#fff}
.mother-edit-range-row-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mother-edit-range-row-head strong{color:#3e5572;font-size:11px}
.mother-edit-range-row-head>div{display:flex;align-items:center;gap:4px}
.mother-edit-range-row-head .secondary{min-height:25px;padding:4px 9px;font-size:10px}
.mother-edit-range-row-head .mother-edit-range-toggle{min-width:44px}
.mother-edit-range-row-head .icon-button{width:25px;height:25px;padding:0;font-size:14px}
.mother-edit-range-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 10px}
.mother-edit-range-field{display:grid;gap:3px;min-width:0;color:#65758d;font-size:10px;font-weight:600}
.mother-edit-range-field.full{grid-column:1/-1}
.mother-edit-range-field input,.mother-edit-range-field textarea{width:100%;min-height:30px;padding:5px 8px;border:1px solid #d5dfec;border-radius:4px;background:#fff;color:#253650;outline:0;font:inherit;font-weight:400;resize:vertical}
.mother-edit-range-field textarea{min-height:40px;line-height:1.35}
.mother-edit-range-field input:focus,.mother-edit-range-field textarea:focus{border-color:#75a0e3;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.mother-edit-range-empty{padding:20px 12px;border:1px dashed #ccd8e7;border-radius:5px;background:#fff;color:#8795a8;font-size:12px;text-align:center}
@media(max-width:600px){.mother-edit-range-section-head{align-items:flex-start}.mother-edit-range-heading-actions{display:grid;justify-items:start;gap:7px}.mother-edit-range-grid{grid-template-columns:1fr}.mother-edit-range-field.full{grid-column:auto}}
.mother-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px}
.mother-edit-field{display:grid;align-content:start;gap:6px;min-width:0;color:#42516a;font-size:12px;font-weight:600}
.mother-edit-field>span{display:block;line-height:1.25}
.mother-edit-required,.mother-edit-footer-hint b{color:var(--danger)}
.mother-edit-field input,.mother-edit-field select,.mother-edit-field textarea{width:100%;min-height:40px;padding:9px 11px;border:1px solid #d5dfec;border-radius:5px;background:#fff;color:#253650;outline:0;font-variant-numeric:tabular-nums}
.mother-edit-field input:focus,.mother-edit-field select:focus,.mother-edit-field textarea:focus{border-color:#75a0e3;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.mother-edit-field input[readonly]{background:#f7f9fc;color:#60718b;cursor:default}
.mother-edit-field textarea{min-height:78px;resize:vertical;line-height:1.55;font-variant-numeric:normal}
.mother-edit-field small{color:#91a0b2;font-size:11px;font-weight:400;line-height:1.35}
.mother-edit-inventory-remark{grid-column:1/-1}
.mother-edit-inventory-remark textarea{min-height:58px}
.mother-edit-usage-section{gap:14px}
.mother-edit-usage-section>.full{display:grid;gap:7px;color:#42516a;font-size:12px;font-weight:600}
.mother-edit-usage-section>.full>.mother-form-hint{display:none}
.batch-mother-usage-picker{max-height:108px;overflow:auto;gap:6px;padding:8px}
.batch-mother-usage-picker .mother-usage-option{gap:5px;padding:5px 7px;font-size:12px!important}
.batch-mother-usage-picker .mother-usage-option input{width:14px;height:14px;accent-color:var(--primary)}
.mother-edit-usage-section .mother-usage-picker{min-height:0;max-height:112px;overflow:auto;gap:6px;padding:8px;border-color:#d5dfec;background:#f8fafc}
.mother-edit-usage-section .mother-usage-option{gap:6px;padding:6px 8px;border-radius:4px;font-size:12px!important}
.mother-edit-usage-section .mother-usage-option input{width:15px;height:15px;min-height:15px;padding:0;accent-color:var(--primary)}
.mother-edit-alert-grid{display:grid;grid-template-columns:minmax(0,250px) minmax(0,1fr);align-items:center;gap:26px}
.mother-edit-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:40px;padding:8px 12px;border:1px solid #dfe7f1;border-radius:5px;background:#f8fafc;color:#3f4f68;cursor:pointer}
.mother-edit-toggle span{display:grid;gap:2px}.mother-edit-toggle strong{font-size:12px}.mother-edit-toggle small{color:#8190a3;font-size:11px;font-weight:400}
.mother-edit-toggle input{position:absolute;width:1px;height:1px;opacity:0}
.mother-edit-toggle i{position:relative;display:block;flex:0 0 auto;width:38px;height:22px;border-radius:11px;background:#c7d1df;transition:.15s ease}
.mother-edit-toggle i:after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(28,43,68,.22);transition:.15s ease}
.mother-edit-toggle input:checked+i{background:var(--primary)}
.mother-edit-toggle input:checked+i:after{transform:translateX(16px)}
.mother-edit-toggle:focus-within{border-color:#75a0e3;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.mother-edit-note-section{padding-bottom:22px}
.mother-edit-footer{position:sticky;bottom:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 28px;background:rgba(255,255,255,.97);border-top:1px solid #dfe6ef;box-shadow:0 -5px 14px rgba(24,43,71,.04)}
.mother-edit-footer>div{display:flex;gap:8px}.mother-edit-footer button{min-width:82px}.mother-edit-footer button:disabled{opacity:.65;cursor:wait}.mother-edit-footer-hint{color:#8a98aa;font-size:12px}
@media(max-width:840px){.mother-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mother-edit-section{padding-left:20px;padding-right:20px}.mother-edit-footer{padding-left:20px;padding-right:20px}}
@media(max-width:600px){.modal-card:has(.mother-edit-form){width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}.mother-edit-section{padding:17px 16px;gap:14px}.mother-edit-section-head{display:grid;gap:3px}.mother-edit-section-note{padding-top:0;text-align:left}.mother-edit-grid,.mother-edit-alert-grid{grid-template-columns:1fr;gap:12px}.mother-edit-usage-section .mother-usage-picker{max-height:145px}.mother-edit-footer{display:block;padding:12px 16px}.mother-edit-footer-hint{display:block;margin-bottom:10px}.mother-edit-footer>div{display:grid;grid-template-columns:1fr 1fr}.mother-edit-footer button{width:100%}}

/* Mother inventory cell tags. */
.mother-cell-tags{display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-width:0;white-space:normal}
.mother-cell-tag{display:inline-flex;align-items:center;max-width:100%;min-height:24px;padding:2px 7px;border:1px solid #d8e5f5;border-radius:4px;background:#eff5fd;color:#365f91;font-size:12px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mother-cell-tag.unit{border-color:#d4eadf;background:#edf8f3;color:#28765d}
.mother-cell-tag.unit-blue{border-color:#d3e2f7;background:#edf4ff;color:#35679e}
.mother-cell-tag.unit-amber{border-color:#efdfbd;background:#fff7e8;color:#94651b}
.mother-cell-tag.unit-purple{border-color:#ddd3f1;background:#f3effc;color:#6d559c}
.mother-cell-tag.unit-teal{border-color:#cce8e3;background:#e9f8f6;color:#2b756e}
.mother-cell-tag.unit-rose{border-color:#f0d2dc;background:#fff0f3;color:#a64f6b}
.mother-cell-tag.unit-indigo{border-color:#d7dcf5;background:#eef0ff;color:#565fa4}
.mother-cell-tag.unit-slate{border-color:#dbe1e8;background:#f2f4f7;color:#617084}
.mother-data-table td:has(.mother-cell-tags),.mother-data-table td:has(.mother-cell-tag){white-space:normal}
.mother-flow-trigger{padding:4px 7px;color:#1d6f59;font-weight:700;font-variant-numeric:tabular-nums}
.mother-flow-trigger.quantity-zero{color:#98a4b4}
.mother-flow-trigger:hover,.mother-flow-trigger:focus-visible{border-radius:4px;background:#eef4ff;color:var(--primary);outline:0}
.mother-flow-loading,.mother-flow-error{padding:18px 2px;color:#71829a;font-size:12px;text-align:center}
.mother-flow-error{color:var(--danger)}

/* Usage name is the primary content of each management card. */
.mother-usage-card h3{margin:11px 0 6px;font-size:17px;line-height:1.3;font-weight:700;color:#203a5d}
.mother-usage-card-meta{gap:4px;color:#8795a8;font-size:10px}
.mother-usage-card-meta strong{color:#52738e;font-size:15px;font-weight:700}
.mother-usage-badge{padding:2px 5px;font-size:9px}
.mother-usage-card-actions .icon-button{font-size:13px}

/* Mother catalog management. */
.mother-data-management{display:grid;gap:20px}
.mother-data-layout{display:grid;grid-template-columns:168px minmax(0,1fr);align-items:start;gap:24px;min-width:0}
.mother-data-nav{position:sticky;top:18px;min-width:0;padding-right:16px;border-right:1px solid #dce5f0}
.mother-data-nav-title{margin:2px 0 12px;color:#273a55;font-size:14px;font-weight:700}
.mother-data-nav-list{display:grid;gap:4px}
.mother-data-nav-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:38px;padding:8px 10px;border:1px solid transparent;border-radius:5px;background:transparent;color:#627691;font:inherit;font-size:13px;text-align:left;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease}
.mother-data-nav-item strong{color:#91a0b2;font-size:11px;font-weight:600}
.mother-data-nav-item:hover{border-color:#d7e2f0;background:#f6f9fd;color:#315a8d}
.mother-data-nav-item.active{border-color:#c8dbf6;background:#eaf2ff;color:#1f5eb5;font-weight:700}
.mother-data-nav-item.active strong{color:#3976c3}
.mother-data-content{min-width:0}
.mother-catalog-section{display:grid;gap:10px;min-width:0}
.mother-catalog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px}
.mother-catalog-heading{display:flex;align-items:baseline;gap:10px;color:#273a55}
.mother-catalog-heading strong{font-size:16px}
.mother-catalog-heading span{color:#71829a;font-size:12px}
.mother-catalog-actions{display:flex;align-items:center;gap:8px}
.mother-catalog-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.mother-catalog-grid .mother-usage-card{min-height:94px}
.mother-catalog-detail-trigger{cursor:pointer}.mother-catalog-detail-trigger:focus-visible{outline:2px solid #8eb5ef;outline-offset:2px}
@media(max-width:1440px){.mother-catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.mother-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.mother-data-layout{grid-template-columns:1fr;gap:16px}.mother-data-nav{position:static;padding:0 0 12px;border-right:0;border-bottom:1px solid #dce5f0}.mother-data-nav-title{margin-bottom:8px}.mother-data-nav-list{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}.mother-data-nav-item{flex:0 0 auto;width:auto;min-width:92px}}
@media(max-width:760px){.mother-catalog-toolbar{display:grid;align-items:stretch}.mother-catalog-actions{flex-wrap:wrap}.mother-catalog-actions .mother-usage-search{width:100%;order:-1}.mother-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}}
@media(max-width:480px){.mother-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Mother catalog detail dialog. */
.modal-card:has(.mother-catalog-detail){width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 32px)}
.mother-catalog-detail-content{display:grid;gap:20px;min-width:0}
.mother-catalog-detail-intro{display:grid;gap:2px}.mother-catalog-detail-intro h4{margin:0;color:#203a5d;font-size:22px;line-height:1.3;overflow-wrap:anywhere}
.mother-catalog-detail-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mother-catalog-detail-summary>div{display:grid;gap:6px;padding:14px 16px;border:1px solid #dfe7f2;border-radius:6px;background:#f8fbff}.mother-catalog-detail-summary span{color:#71829a;font-size:12px}.mother-catalog-detail-summary strong{color:#1e5d78;font-size:26px;line-height:1;font-variant-numeric:tabular-nums}.mother-catalog-detail-summary small{margin-left:5px;color:#71829a;font-size:12px;font-weight:500}
.mother-catalog-history{display:grid;gap:11px;min-width:0}.mother-catalog-history-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #e5ebf3}.mother-catalog-history-heading strong{color:#273a55;font-size:14px}.mother-catalog-history-heading span{color:#8795a8;font-size:11px}.mother-catalog-history-list{display:grid;gap:10px;max-height:330px;overflow:auto;padding:1px 4px 1px 1px}.mother-catalog-history-item{display:grid;grid-template-columns:9px minmax(0,1fr);gap:11px;padding:12px 12px 12px 10px;border:1px solid #e3eaf3;border-radius:6px;background:#fff}.mother-catalog-history-marker{width:8px;height:8px;margin-top:5px;border-radius:50%;background:#8ca6ca}.mother-catalog-history-marker.create{background:#2b9a70}.mother-catalog-history-marker.update{background:#3c78d1}.mother-catalog-history-marker.delete{background:#c65a5a}.mother-catalog-history-body{display:grid;gap:7px;min-width:0}.mother-catalog-history-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.mother-catalog-history-head strong{color:#304968;font-size:13px}.mother-catalog-history-head time,.mother-catalog-history-body>span{color:#8a98aa;font-size:11px}.mother-catalog-history-body p{margin:0;color:#50637d;font-size:12px;overflow-wrap:anywhere}.mother-catalog-history-change{display:flex;align-items:baseline;gap:9px;min-width:0;color:#8a98aa;font-size:11px}.mother-catalog-history-change strong{display:flex;align-items:center;gap:7px;min-width:0;max-width:100%;font-size:12px;font-weight:600}.mother-catalog-history-change em{min-width:0;padding:3px 6px;border-radius:3px;background:#f2f6fb;color:#45617e;font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mother-catalog-history-change b{color:#8da0b8;font-weight:500}.mother-catalog-history-empty,.mother-catalog-detail-loading,.mother-catalog-detail-error{padding:28px 10px;text-align:center;color:#8795a8;font-size:12px}.mother-catalog-detail-error{color:#b23a3a}
@media(max-width:600px){.modal-card:has(.mother-catalog-detail){width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.mother-catalog-history-heading{display:grid;gap:3px}.mother-catalog-history-head{display:grid;gap:2px}.mother-catalog-history-change{display:grid;gap:4px}.mother-catalog-history-change strong{max-width:100%}}

/* Multi-line machining ranges in the mother inventory table. */
.mother-data-table td:has(.mother-range-stack){vertical-align:top;white-space:normal;overflow:visible}
.mother-data-table .table-cell-content:has(.mother-range-stack){height:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mother-range-stack{display:grid;min-width:0;overflow:hidden}
.mother-range-line{display:block;min-height:23px;padding:2px 0;color:#40536d;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
.mother-range-line+.mother-range-line{border-top:1px dashed #e1e8f1}
.mother-data-table .table-cell-content:has(.mother-range-stack):focus{position:relative;z-index:13;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;padding:6px 8px;margin:-6px -8px;background:#fff;border:1px solid #9bbbea;border-radius:3px;box-shadow:0 5px 14px rgba(29,63,110,.16);outline:0}
.mother-data-table .table-cell-content:has(.mother-range-stack):focus .mother-range-stack{overflow:visible}
.mother-data-table .table-cell-content:has(.mother-range-stack):focus .mother-range-line{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}

/* Keep stock alerts useful but visually secondary in the mother editor. */
.mother-edit-alert-section{gap:7px;padding-top:9px;padding-bottom:9px;background:#fcfdff}
.mother-edit-alert-section .mother-edit-section-head{align-items:center;gap:10px}
.mother-edit-alert-section .mother-edit-kicker{margin-bottom:1px;color:#a0adbd;font-size:8px;letter-spacing:.7px}
.mother-edit-alert-section .mother-edit-section-head h4{color:#53657d;font-size:12px;font-weight:600}
.mother-edit-alert-section .mother-edit-section-note{padding-top:0;color:#a5b0bf;font-size:10px}
.mother-edit-alert-section .mother-edit-alert-grid{grid-template-columns:minmax(0,220px) minmax(0,1fr);gap:14px}
.mother-edit-alert-section .mother-edit-field{gap:4px;color:#718198;font-size:10px;font-weight:600}
.mother-edit-alert-section .mother-edit-field input{min-height:32px;padding:6px 9px;font-size:11px}
.mother-edit-alert-section .mother-edit-toggle{min-height:32px;padding:5px 9px;border-color:#e8edf3;background:#fff;color:#718198}
.mother-edit-alert-section .mother-edit-toggle strong{font-size:10px;font-weight:600}
.mother-edit-alert-section .mother-edit-toggle small{color:#a2adbb;font-size:9px}
.mother-edit-alert-section .mother-edit-toggle i{width:29px;height:16px;border-radius:8px;background:#d1d9e3}
.mother-edit-alert-section .mother-edit-toggle i:after{top:3px;left:3px;width:10px;height:10px}
.mother-edit-alert-section .mother-edit-toggle input:checked+i{background:#8aa5ce}
.mother-edit-alert-section .mother-edit-toggle input:checked+i:after{transform:translateX(13px)}
.mother-edit-alert-section .mother-edit-toggle:focus-within{border-color:#cbd8e9;box-shadow:0 0 0 2px rgba(37,99,235,.05)}
@media(max-width:600px){.mother-edit-alert-section .mother-edit-section-head{align-items:flex-start}.mother-edit-alert-section .mother-edit-alert-grid{gap:10px}}
.mother-catalog-history-marker.initial{background:#8298b6}
