@font-face {
    font-family: "JX Noto Sans SC";
    src: url("fonts/NotoSansSC-VF.ttf") format("truetype-variations");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
html, body { margin: 0; font-family: "JX Noto Sans SC", "Noto Sans SC", sans-serif; }
button, input, select, textarea { font: inherit; }
:root {
    --jx-primary: #1e3a8a;
    --jx-primary-hover: #1e40af;
    --jx-primary-light: #eff6ff;
    --jx-danger: #ef4444;
    --jx-danger-hover: #dc2626;
    --jx-text: #374151;
    --jx-muted: #6b7280;
    --jx-border: #e5e7eb;
    --jx-page: #f9fafb;
    --jx-table-head: #f3f4f6;
    --jx-table-stripe: #fafafa;
    --jx-table-hover: #f9fafb;
    --jx-table-selected: #eff6ff;
    --jx-radius: 8px;
    --jx-radius-sm: 6px;
}

html, body { color: var(--jx-text); background: var(--jx-page); font-size: 14px; line-height: 1.55; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #edf4fb, #f7f9fc 55%, #e8f0f7); }
.login-card { width: min(390px, 100%); padding: 34px; border: 1px solid #d6e0e9; border-radius: 12px; background: #fff; box-shadow: 0 16px 50px rgb(35 63 89 / 12%); }
.login-card h1 { margin: 8px 0 4px; color: #182b3a; font-size: 25px; text-align: center; }
.login-subtitle, .login-hint { color: #607383; }
.login-card .login-form { display: grid; gap: 9px; margin-top: 24px; }
.login-card label { margin-top: 7px; color: #344b5e; font-weight: 600; }
.login-card input:not([type="hidden"]), .login-card select { width: 100%; height: 42px; box-sizing: border-box; padding: 0 12px; border: 1px solid #b8c7d3; border-radius: 6px; color: #263746; background-color: #fff; }
.login-card select { padding-right: 36px; cursor: pointer; }
.login-card input:not([type="hidden"]):focus, .login-card select:focus { border-color: #1672ad; outline: 2px solid rgb(22 114 173 / 18%); outline-offset: 0; }
.login-card button { min-height: 44px; margin-top: 14px; border: 0; border-radius: 6px; color: #fff; background: #155f91; cursor: pointer; font-weight: 700; }
.login-card button:hover { background: #104f79; }
.login-error { margin-top: 16px; padding: 10px 12px; border: 1px solid #e9b8b8; border-radius: 6px; color: #8d2424; background: #fff3f3; }
.login-hint { margin: 20px 0 0; text-align: center; font-size: 13px; }
.session-tools { display: flex; gap: 12px; align-items: center; }
.session-tools form { margin: 0; }
.session-tools button { border: 1px solid #a9b9c5; border-radius: 4px; padding: 4px 10px; background: #fff; cursor: pointer; }
.page-card { background: #fff; border: 1px solid var(--jx-border); border-radius: var(--jx-radius); padding: 20px; box-shadow: 0 1px 3px rgb(0 0 0 / 5%); }
.page-card h1 { margin-top: 0; font-size: 22px; color: #111827; }
.wide-card { max-width: 1600px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-header h1 { margin-bottom: 5px; }
.page-header p { margin: 0; color: var(--jx-muted); }
.query-bar, .toolbar, .form-actions, .modal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.query-bar { padding: 16px 20px; border: 1px solid var(--jx-border); border-radius: var(--jx-radius); background: #fff; }
.toolbar { margin: 16px 0; gap: 8px; }
.toolbar-divider { width: 1px; height: 24px; margin: 0 4px; background: var(--jx-border); }
.query-bar input { min-width: 260px; }
.filter-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; padding:12px 14px; border:1px solid #d8e0e7; background:#fff; }
.form-input, .form-select { box-sizing:border-box; height:36px; padding:0 10px; border:1px solid #cfd9e2; border-radius:3px; color:var(--jx-text); background:#fff; }
.form-input:focus, .form-select:focus { outline:0; border-color:var(--jx-primary); box-shadow:0 0 0 2px rgb(30 58 138 / 12%); }
.operation-log-query { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); align-items: end; }
.operation-log-query .form-field input { min-width: 0; width: 100%; }
.operation-log-table { min-width: 1200px; }
.operation-log-message { min-width: 260px; max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button { min-height: 36px; padding: 0 16px; border: 1px solid var(--jx-primary); border-radius: var(--jx-radius-sm); color: #fff; background: var(--jx-primary); cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
button.secondary { border-color: var(--jx-border); color: var(--jx-text); background: #fff; }
button:hover:not(:disabled) { background: var(--jx-primary-hover); box-shadow: 0 2px 8px rgb(30 58 138 / 24%); }
button.secondary:hover:not(:disabled) { border-color: var(--jx-primary); color: var(--jx-primary); background: var(--jx-page); box-shadow: none; }
button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }

/* Header help menu: keep this global as a fallback for isolated CSS during
   prerendering and for clients holding an older scoped-style bundle. */
.header-tools > .header-popover.help-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    display: flex;
    width: 286px;
    min-width: 286px;
    max-width: 286px;
    box-sizing: border-box;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    overflow: hidden;
    border: 1px solid #d3dde5;
    border-radius: 5px;
    color: #344b5e;
    background: #fff;
    box-shadow: 0 8px 24px rgb(31 56 76 / 18%);
    font-size: 13px;
    white-space: normal;
}
.header-tools > .header-popover.help-menu .help-menu-item {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    box-sizing: border-box;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border:  0;
    border-radius: 4px;
    color: #344b5e;
    background: transparent;
    box-shadow: none;
    font: inherit;
    text-align: left;
    white-space: normal;
}
.header-tools > .header-popover.help-menu .help-menu-item:hover,
.header-tools > .header-popover.help-menu .help-menu-item:focus-visible {
    color: #145f91;
    background: #edf4fb;
    outline: none;
}
.header-tools > .header-popover.help-menu .help-menu-item > span:not(.help-menu-icon) {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}
.header-tools > .header-popover.help-menu .help-menu-item strong,
.header-tools > .header-popover.help-menu .help-menu-item small {
    display: block;
}
.header-tools > .header-popover.help-menu .help-menu-item strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-tools > .header-popover.help-menu .help-menu-item small {
    margin-top: 3px;
    overflow: hidden;
    color: #718391;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-tools > .header-popover.help-menu .help-menu-icon {
    display: grid;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    flex: 0 0 28px;
    box-sizing: border-box;
    place-items: center;
    border-radius: 50%;
    color: #145f91;
    background: #eaf2f8;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.header-tools > .header-popover.help-menu .help-menu-icon svg {
    display: block;
    width: 17px;
    height: 17px;
    max-width: 17px;
    max-height: 17px;
    box-sizing: border-box;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.header-tools > .header-popover.help-menu .help-menu-icon svg * {
    fill: none;
}
@media (max-width: 600px) {
    .header-tools > .header-popover.help-menu {
        right: -4px;
        width: min(286px, calc(100vw - 24px));
        min-width: min(286px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { border-color: var(--jx-primary); color: #fff; background: var(--jx-primary); }
.btn-secondary { border-color: var(--jx-border); color: var(--jx-text); background: #fff; }
.btn-danger { border-color: var(--jx-danger); color: #fff; background: var(--jx-danger); }
.btn-danger:hover:not(:disabled) { border-color: var(--jx-danger-hover); background: var(--jx-danger-hover); box-shadow: 0 2px 8px rgb(239 68 68 / 24%); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, tr:focus-visible { outline: 3px solid rgb(30 58 138 / 18%); outline-offset: 1px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; border: 1px solid var(--jx-border); background: #fff; }
.data-table th { position:relative; height:46px; min-width:56px; padding:0 12px; text-align:left; color:var(--jx-text); background:var(--jx-table-head); border-right:1px solid var(--jx-border); border-bottom:1px solid var(--jx-border); font-weight:600; white-space:nowrap; user-select:none; }
.data-table td { height: 44px; padding: 0 12px; border-right: 1px solid var(--jx-border); border-bottom: 1px solid var(--jx-border); }
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table tbody tr:not(:has(.state-cell)) { cursor: pointer; }
.data-table tbody tr:nth-child(even) { background: var(--jx-table-stripe); }
.data-table tbody tr:hover { background: var(--jx-table-hover); }
.data-table tbody tr.selected { background: var(--jx-table-selected) !important; }
.selection-column { width: 54px; }
.state-cell { height: 90px !important; color: #607383; text-align: center; }
.status-badge { display: inline-block; min-width: 38px; padding: 3px 8px; border-radius: 12px; text-align: center; font-size: 13px; }
.status-badge.enabled { color: #17663a; background: #e3f5ea; }
.status-badge.disabled { color: #7a3d3d; background: #f8e7e7; }
.status-badge.status-normal { color:#087443; background:#d9f7e8; }
.status-badge.status-disabled { color:#7a3d3d; background:#f8e7e7; }
.table-container { border:1px solid #d8e0e7; border-radius:0; overflow:auto; background:#fff; }
.table-container .data-table { border:0; min-width:860px; }
.table-container .data-table th { background:#fff; border-bottom:1px solid #d8e0e7; font-size:13px; font-weight:500; }
.table-container .data-table td { height:47px; }
.pagination { min-height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 0; padding: 12px 14px; border: 1px solid var(--jx-border); border-top: 0; color: #657786; background: #fff; font-size: 14px; }
.pagination-summary, .pagination-controls { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.pagination-summary { min-width: max-content; }
.pagination-summary strong, .pagination-position strong { color: #263746; font-weight: 500; }
.pagination-separator { width: 1px; height: 16px; margin: 0 2px; background: #dce4e9; }
.pagination-page-size { width: 84px; min-width: 84px; height: 30px; box-sizing: border-box; padding: 0 28px 0 10px; border: 1px solid #d5e0e7; border-radius: 0; color: #263746; background-color: #fff; font: inherit; }
.pagination-button { width: 34px; height: 28px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 0; color: #6f8290; background: #f5f8f9; font: 18px/1 Arial, sans-serif; cursor: pointer; }
.pagination-button:hover:not(:disabled) { border-color: #c7d5de; color: var(--jx-primary); background: #eef4f7; }
.pagination-button:disabled { color: #cbd4d9; background: #f7f9fa; cursor: not-allowed; }
.pagination-position { min-width: 54px; color: #263746; text-align: center; }
.pagination-jump-input { width: 50px; height: 30px; box-sizing: border-box; padding: 0 8px; border: 1px solid #d5e0e7; border-radius: 0; color: #263746; background: #fff; font: inherit; text-align: center; }
.pagination-jump-input::-webkit-inner-spin-button, .pagination-jump-input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.pagination-jump-input { appearance: textfield; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px 22px; }
.form-grid.single-column { grid-template-columns: 1fr; }
.form-field { display: grid; align-content: start; gap: 6px; }
.form-field label, .form-grid > label { font-weight: 600; color: var(--jx-text); }
.form-field input, .form-field select, .form-field textarea, .query-bar input, .form-grid > input { box-sizing: border-box; min-height: 36px; padding: 7px 10px; border: 1px solid var(--jx-border); border-radius: var(--jx-radius-sm); background: #fff; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .query-bar input:focus, .form-grid > input:focus { outline: 0; border-color: var(--jx-primary); box-shadow: 0 0 0 3px rgb(30 58 138 / 10%); }
.form-field textarea { min-height: 84px; resize: vertical; }
.span-two { grid-column: 1 / -1; }
.field-help { color: #667987; font-size: 13px; }
.field-error, .validation-message { color: #a32222; }
.form-field.field-error input, .form-field.field-error select, .form-field.field-error textarea { border-color: #dc2626; background: #fff7f7; }
.field-error-text { display: block; margin-top: 4px; color: #b42318; font-size: 12px; line-height: 1.35; }
.alert-error, .alert-success, .info-banner { margin: 12px 0; padding: 11px 13px; border-radius: 4px; }
.alert-error { border: 1px solid #e5b5b5; color: #862626; background: #fff1f1; }
.alert-success { border: 1px solid #a9d7b9; color: #17643a; background: #edf9f1; }
.info-banner { border: 1px solid #b8d2e6; color: #255a7e; background: #edf6fc; }
.alert-error small { display: block; margin-top: 4px; color: #805858; }
.link-button { min-height: 28px; margin-left: 4px; padding: 0 8px; border: 0; color: var(--jx-primary); background: transparent; font-size: 13px; font-weight: 500; text-decoration: none; box-shadow: none; }
.link-button:hover:not(:disabled) { color: var(--jx-primary-hover); background: var(--jx-primary-light); box-shadow: none; }
.link-button.danger-text { color: #b91c1c; }
.link-button.danger-text:hover:not(:disabled) { color: #991b1b; background: #fef2f2; }
.choice-panel, .warehouse-scope, .permission-matrix { margin-top: 20px; padding: 16px; border: 1px solid #d9e1e8; border-radius: 5px; }
.choice-panel legend, .warehouse-scope h2, .permission-matrix h2 { font-size: 17px; font-weight: 700; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; margin-top: 10px; }
.check-option { display: flex; align-items: flex-start; gap: 7px; }
.check-option input { margin-top: 3px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin: 20px 0 0; }
.detail-grid div { padding: 12px; border: 1px solid #e0e6eb; background: #f8fafc; }
.detail-grid dt { color: #667987; font-size: 13px; }
.detail-grid dd { margin: 5px 0 0; }
.form-actions { margin-top: 22px; }
.warehouse-scope > label { display: inline-flex; gap: 6px; margin-right: 20px; }
.permission-matrix h3 { margin: 22px 0 8px; color: #174f76; }
.permission-table { min-width: 1000px; }
.permission-table td { padding-top: 5px; padding-bottom: 5px; }
.permission-table select { min-height: 32px; }
.permission-table-horizontal { min-width: 1400px; table-layout: fixed; }
.permission-table-horizontal th, .permission-table-horizontal td { box-sizing: border-box; }
.permission-feature-column { width: 210px; }
.permission-action-column { width: 68px; text-align: center !important; }
.permission-scope-column { width: 92px; text-align: center !important; }
.permission-feature-cell { position: sticky; left: 0; z-index: 1; color: #243b4c; background: #fff; font-weight: 600; }
.permission-table-horizontal thead .permission-feature-column { position: sticky; left: 0; z-index: 3; background: #eef3f7; }
.permission-table-horizontal tbody tr:hover .permission-feature-cell { background: #edf6fc; }
.permission-feature-cell small { display: block; margin-top: 2px; color: #a05a16; font-size: 12px; font-weight: 500; }
.permission-action-cell, .permission-scope-cell { text-align: center; }
.permission-action-cell input[type="checkbox"] { width: 17px; height: 17px; margin: 0; vertical-align: middle; cursor: pointer; }
.not-applicable { color: #9aa8b3; font-size: 13px; }
button.compact { min-height: 30px; padding: 0 10px; font-size: 13px; }
.scope-config-row, .scope-config-row:hover { background: #f3f8fc !important; }
.scope-config-row > td { height: auto; padding: 12px 16px 14px; }
.scope-config-panel { border-left: 3px solid #4b91bd; padding-left: 14px; }
.scope-config-title { margin-bottom: 10px; color: #245a7e; font-weight: 700; }
.scope-editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.scope-editor-card { display: grid; align-content: start; gap: 9px; min-height: 94px; padding: 12px; border: 1px solid #ccdae5; border-radius: 5px; background: #fff; }
.scope-editor-card > strong { color: #243b4c; }
.scope-editor-card label { display: grid; gap: 5px; color: #526879; font-size: 13px; }
.scope-editor-card label.inline-check { display: flex; align-items: center; gap: 6px; color: #344b5e; }
.inline-check input { margin: 0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px; background: rgb(0 0 0 / 40%); animation: jx-fade-in .15s ease; }
.modal-backdrop-front { z-index: 920; }
.modal-panel-wide { width: min(1200px, calc(100vw - 40px)); }
.modal-panel-wide .modal-body { max-height: calc(100vh - 180px); overflow: auto; }
.goods-editor { width: min(1080px, calc(100vw - 32px)); height: min(860px, calc(100vh - 32px)); max-height: calc(100vh - 32px); }
.goods-editor-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.goods-editor-titlebar { display: flex; align-items: center; justify-content: space-between; padding-right: 14px; border-bottom: 1px solid var(--jx-border); background: #fafbfc; }
.goods-editor-titlebar h2 { flex: 1; border-bottom: 0; }
.goods-editor-close { width: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 4px; color: #6b7280; background: transparent; font-size: 24px; line-height: 1; }
.goods-editor-close:hover:not(:disabled) { color: #111827; background: #eef1f4; box-shadow: none; }
.goods-editor-tabs { display: flex; align-items: center; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--jx-border); background: #fff; }
.goods-editor-tabs button { min-height: 42px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #5b6b79; background: transparent; font-weight: 500; }
.goods-editor-tabs button:hover:not(:disabled) { color: var(--jx-primary); background: #f6f8fb; box-shadow: none; }
.goods-editor-tabs button.active { border-bottom-color: var(--jx-primary); color: var(--jx-primary); font-weight: 600; background: transparent; }
.goods-editor .goods-editor-body { min-height: 0; flex: 1; padding: 0; }
.goods-editor .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.goods-editor .form-field { gap: 5px; min-width: 0; }
.goods-editor .form-field-wide { grid-column: 1 / -1; }
.goods-editor .modal-body > .goods-editor-section + .goods-editor-section { border-top: 1px solid #edf0f3; }
.goods-editor-section { padding: 18px 24px 20px; }
.goods-editor-section:first-child { padding-top: 20px; }
.goods-editor-section h3 { margin: 0 0 12px; color: #374151; font-size: 14px; font-weight: 600; }
.goods-collapsible-header { display: flex; width: 100%; min-height: 28px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 0; border: 0; color: #374151; background: transparent; text-align: left; }
.goods-collapsible-header:hover:not(:disabled) { color: var(--jx-primary); background: transparent; box-shadow: none; }
.goods-collapsible-header h3 { margin: 0; }
.goods-collapsible-indicator { color: #6b7280; font-size: 12px; font-weight: 400; }
.goods-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.goods-section-heading h3 { margin: 0; }
.goods-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.goods-form-grid-spaced { margin-top: 14px; }
.goods-checkbox-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--jx-border); background: #f9fafb; }
.goods-check-option { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--jx-text); font-weight: 500; }
.goods-check-option input { width: 16px; height: 16px; margin: 0; }
.goods-editor .goods-child-table { max-height: 240px; }
.goods-editor .goods-child-table .data-table { min-width: 920px; }
.goods-editor .goods-child-table .data-table th { height: 38px; padding: 0 8px; }
.goods-editor .goods-child-table .data-table td { height: 42px; padding: 4px 6px; }
.goods-editor .goods-child-table input, .goods-editor .goods-child-table select { min-width: 72px; width: 100%; min-height: 32px; padding: 4px 6px; }
.goods-image-column { width: 64px; min-width: 64px !important; text-align: center !important; }
.goods-image-cell { width: 64px; padding: 4px !important; text-align: center; }
.goods-thumb { display: inline-block; width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--jx-border); border-radius: 4px; cursor: zoom-in; background: #f8fafc; }
.goods-image-editor-row { display: flex; align-items: flex-start; gap: 16px; }
.goods-image-preview { display: flex; align-items: center; justify-content: center; width: 128px; height: 128px; flex: 0 0 128px; overflow: hidden; border: 1px dashed #b8c7d3; border-radius: 6px; color: var(--jx-muted); background: #f8fafc; font-size: 12px; }
.goods-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.goods-image-actions { display: flex; min-height: 128px; flex-direction: column; align-items: flex-start; gap: 8px; }
.goods-image-actions small { max-width: 360px; color: var(--jx-muted); }
.goods-image-lightbox { position: relative; display: flex; align-items: center; justify-content: center; width: min(720px, calc(100vw - 48px)); height: min(720px, calc(100vh - 48px)); padding: 16px; border-radius: 8px; background: #111827; box-shadow: 0 24px 80px rgb(0 0 0 / 35%); }
.goods-image-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.goods-image-close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgb(255 255 255 / 18%); font-size: 24px; line-height: 30px; }
.form-field-wide { grid-column: 1 / -1; }
.modal-panel { width: min(760px, calc(100vw - 48px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; padding: 0; border-radius: 10px; background: #fff; box-shadow: 0 24px 80px rgb(0 0 0 / 20%), 0 8px 24px rgb(0 0 0 / 12%); animation: jx-slide-up .2s ease; }
.stock-shortage-dialog { width: min(1120px, calc(100vw - 48px)); }
.stock-shortage-body { max-height: min(520px, calc(100vh - 220px)); overflow: auto; padding: 20px 24px; }
.stock-shortage-lead { margin: 0 0 14px; color: #374151; }
.stock-shortage-lines { display: grid; gap: 8px; }
.stock-shortage-line { padding: 11px 13px; border: 1px solid #f3c7c7; border-left: 3px solid #d14343; border-radius: 5px; background: #fff8f8; color: #5b1b1b; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.modal-panel.modal-wide { width: min(1120px, calc(100vw - 48px)); }
.modal-panel.modal-management { width: min(1180px, calc(100vw - 32px)); height: min(900px, calc(100vh - 32px)); max-height: calc(100vh - 32px); }
.modal-panel.modal-role-management { width: calc(100vw - 32px); height: calc(100vh - 32px); max-height: calc(100vh - 32px); }
.modal-body { overflow-x: hidden; overflow-y: auto; padding: 20px 24px; }
.modal-body > .form-grid { margin: 0; }
.modal-panel h2 { margin: 0; padding: 16px 24px; border-bottom: 1px solid var(--jx-border); color: #111827; font-size: 15px; font-weight: 600; background: #fafbfc; }
.modal-panel h2::before { display: inline-block; width: 3px; height: 16px; margin-right: 8px; vertical-align: -3px; border-radius: 2px; background: var(--jx-primary); content: ""; }
.modal-panel > p, .modal-panel > .form-grid, .modal-panel > .alert-error { margin-right: 24px; margin-left: 24px; }
.modal-panel > p { margin-top: 20px; margin-bottom: 0; }
.modal-panel > .form-grid { margin-top: 20px; }
.modal-actions { justify-content: flex-end; margin-top: 20px; padding: 14px 24px; border-top: 1px solid var(--jx-border); background: #fafbfc; }
.col-settings-wrapper { position:relative; display:inline-block; }
.col-settings-panel { position:absolute; top:calc(100% + 4px); right:0; z-index:1000; width:280px; max-height:420px; display:flex; flex-direction:column; border:1px solid #d8e0e7; border-radius:4px; background:#fff; box-shadow:0 8px 26px rgb(0 0 0 / 16%); }
.col-settings-header { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600; }
.col-reset { min-height:26px; padding:0 8px; border:0; color:var(--jx-primary); background:transparent; font-size:12px; }
.col-settings-list { overflow:auto; padding:5px 0; }
.col-settings-item { display:flex; align-items:center; gap:8px; padding:7px 12px; }
.col-settings-item:hover { background:#f5f8fb; }
.col-settings-item label { display:flex; align-items:center; gap:7px; flex:1; font-size:13px; }
.col-order-buttons { display:flex; gap:3px; }
.col-order-buttons button { min-height:24px; width:25px; padding:0; border:1px solid #d2dbe4; color:#52606d; background:#fff; font-size:12px; }
.col-settings-footer { padding:8px 12px; border-top:1px solid #e5e7eb; color:#7b8794; font-size:11px; }
.col-resize-handle { position:absolute; right:0; top:0; bottom:0; width:8px; margin-right:-4px; cursor:col-resize; z-index:3; background:transparent; transition:background .15s; touch-action:none; }
/* The table header already supplies the single column boundary.  Do not draw a
   second permanent line from the resize hit area; it made every boundary look
   thicker across all tables. */
.col-resize-handle:hover { background:rgb(59 130 246 / 12%); }
.col-resize-handle::after { display:none; }
.embedded-editor { flex:1; min-height:0; overflow:auto; border:0; border-radius:0; box-shadow:none; }
.embedded-editor .page-header { position:sticky; top:-20px; z-index:5; margin:-20px -20px 18px; padding:16px 20px; border-bottom:1px solid var(--jx-border); background:#fff; }
.embedded-editor .form-actions { position:sticky; bottom:-20px; z-index:5; margin:20px -20px -20px; padding:14px 20px; border-top:1px solid var(--jx-border); background:#fafbfc; }
.audit-detail-panel { width: min(1040px, 100%); }
.audit-detail-content { overflow: auto; padding: 0 24px 20px; }
.audit-detail-grid { margin-top: 20px; }
.audit-json-section { margin-top: 18px; }
.audit-json-section h3 { margin: 0 0 8px; color: #174f76; font-size: 14px; }
.audit-json-section p { margin: 0; overflow-wrap: anywhere; }
.audit-json-section pre { max-height: 220px; margin: 0; padding: 12px; overflow: auto; border: 1px solid #d9e1e8; border-radius: 4px; background: #f8fafc; color: #253746; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.state-panel { padding: 40px; color: #607383; text-align: center; }
.user-center-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.profile-section { margin-top: 20px; }
.profile-section:first-child { margin-top: 0; }
.profile-section h2, .password-panel h2 { margin: 0 0 10px; color: #174f76; font-size: 17px; }
.profile-details { grid-template-columns: repeat(4, minmax(130px, 1fr)); margin: 0; }
.role-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #c9d9e4; border-radius: 4px; color: #29495d; background: #f5f9fc; }
.role-chip small { color: #738794; font-size: 11px; }
.profile-section h3 { margin: 16px 0 8px; color: #245a7e; font-size: 15px; }
.user-permission-table { min-width: 650px; }
.user-permission-table th, .user-permission-table td { height: 38px; padding: 0 10px; }
.password-panel { padding: 16px; border: 1px solid #d9e1e8; border-radius: 5px; background: #f8fafc; }
.language-panel { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #d9e1e8; }
.language-panel h2 { margin: 0 0 10px; color: #174f76; font-size: 17px; }
.language-panel form { display: grid; gap: 12px; }
.language-panel select { width: 100%; }
.password-section h2 { margin: 0 0 10px; color: #174f76; font-size: 17px; }
.password-panel form { display: grid; gap: 12px; }
.password-panel button { width: 100%; }
.password-note { margin: 14px 0 0; color: #667987; font-size: 12px; line-height: 1.6; }
.empty-hint { color: #667987; }
button.danger { border-color: var(--jx-danger); background: var(--jx-danger); color: #fff; }
button.danger:hover:not(:disabled) { border-color: var(--jx-danger-hover); background: var(--jx-danger-hover); box-shadow: 0 2px 8px rgb(239 68 68 / 22%); }
.confirm-panel { width: min(480px, 100%); }
.confirm-panel h2 { color: #111827; }
.confirm-panel p { color: var(--jx-text); }
@keyframes jx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes jx-slide-up { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 1050px) { .user-center-grid { grid-template-columns: 1fr; } .password-panel { max-width: 520px; } }
@media (max-width: 1050px) { .goods-checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .form-grid, .operation-log-query, .goods-editor .form-grid { grid-template-columns: 1fr; } .span-two { grid-column: auto; } .detail-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); } .goods-editor { width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: calc(100vh - 16px); } .goods-editor-section { padding-right: 16px; padding-left: 16px; } .goods-checkbox-grid { grid-template-columns: 1fr; } .goods-image-editor-row { flex-direction: column; } }
@media (max-width: 760px) { .pagination { align-items: flex-start; flex-direction: column; gap: 12px; } .pagination-controls { max-width: 100%; overflow-x: auto; } }

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Wide business editors (including BOM) must override the base modal width. */
.modal-panel.modal-panel-wide {
    width: min(1280px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
}

.modal-panel.modal-panel-wide .modal-body {
    max-height: calc(100vh - 150px);
    overflow: auto;
}

/* Language maintenance needs room for long translated names and action buttons. */
.base-language-dialog {
    width: min(1080px, calc(100vw - 32px));
}

.base-language-dialog .table-container {
    overflow-x: auto;
}

.base-language-table {
    min-width: 900px !important;
    table-layout: fixed;
}

.base-language-table .base-language-col {
    width: 150px;
}

.base-language-table .base-language-name-col {
    width: auto;
    min-width: 470px;
}

.base-language-table .base-language-actions-col {
    width: 210px;
}

.base-language-name-col .form-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.base-language-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

/* Production plan editor: persistent header summary and business tabs. */
.plan-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--jx-border);
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
}

.plan-summary strong {
    margin-left: 4px;
    color: #0f172a;
    font-weight: 600;
}

.plan-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--jx-border);
}

.plan-tabs button {
    padding: 8px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.plan-tabs button:hover {
    color: var(--jx-primary);
}

.plan-tabs button.active {
    border-bottom-color: var(--jx-primary);
    color: var(--jx-primary);
    font-weight: 600;
}

.data-table td.num,
.data-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Production plan editor keeps a fixed frame so switching tabs never resizes the dialog. */
.modal-panel.modal-panel-plan {
    height: min(880px, calc(100vh - 32px));
}

.modal-panel.modal-panel-plan .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.modal-panel.modal-panel-plan > form,
.modal-panel.modal-panel-plan > .modal-form {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.modal-panel.modal-panel-plan .modal-actions {
    flex: 0 0 auto;
    margin-top: 0;
}

/* Draggable business editor: header acts as the drag handle. */
.modal-panel.modal-panel-draggable {
    position: relative;
    will-change: transform;
}

.modal-panel.modal-panel-draggable .modal-drag-handle {
    cursor: move;
    user-select: none;
}

.modal-panel.modal-panel-draggable.is-dragging {
    transition: none;
    box-shadow: 0 32px 100px rgb(0 0 0 / 28%), 0 12px 32px rgb(0 0 0 / 16%);
}

.plan-section {
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--jx-border);
    border-radius: 6px;
}

.plan-section-title {
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid var(--jx-primary);
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.modal-panel.modal-panel-plan .form-field label {
    font-size: 12px;
}

.modal-panel.modal-panel-plan .form-field {
    margin-bottom: 8px;
}

/* Production plan editor uses horizontal label/input rows so the basics tab stays compact. */
.modal-panel.modal-panel-plan .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
}

.modal-panel.modal-panel-plan .form-field {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.modal-panel.modal-panel-plan .form-field > label {
    margin: 0;
    color: #475569;
    font-weight: 500;
    text-align: right;
}
/* Account login channels use two aligned columns and collapse cleanly on narrow screens. */
.login-access-switches { display: grid; grid-template-columns: repeat(2, minmax(140px, 180px)); gap: 12px; max-width: 372px; }
.toggle-option { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 12px; border: 1px solid var(--jx-border); border-radius: 4px; background: #fff; cursor: pointer; }
.toggle-option > span:last-child { order: -1; color: var(--jx-text); }
.toggle-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.toggle-track { position: relative; width: 34px; height: 18px; border: 1px solid #9aa9b5; border-radius: 10px; background: #dfe5ea; transition: background-color .12s ease, border-color .12s ease; }
.toggle-track::after { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); content: ""; transition: transform .12s ease; }
.toggle-option input:checked + .toggle-track { border-color: #145f91; background: #145f91; }
.toggle-option input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle-option input:focus-visible + .toggle-track { outline: 2px solid #78a9c9; outline-offset: 2px; }
@media (max-width: 640px) {
    .login-access-switches { grid-template-columns: minmax(0, 1fr); max-width: none; }
}
