.od-boke-overlay {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1vh 2vw;
    background: rgba(16, 18, 24, .48);
}

.od-boke-dialog-shell.od-boke-dialog {
    --boke-primary: #4a22ef;
    position: relative;
    width: min(96vw, 1600px);
    height: 98vh;
    max-height: 98vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
    pointer-events: auto;
}

.od-boke-modal {
    --primary: #4a22ef;
    --line: #e2e5ee;
    --panel: #fff;
    --changed: #fff8d9;
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    max-height: 98vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    color: #24252a;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    font-size: 13px;
}

.od-boke-modal button,
.od-boke-modal input,
.od-boke-modal select {
    font: inherit;
    color: inherit;
}

.od-boke-modal button,
.od-boke-modal label,
.od-boke-modal select {
    cursor: pointer;
}

.od-boke-head {
    position: relative;
    z-index: 50;
    flex: 0 0 auto;
    height: 6.2vh;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.3vw;
}

.od-boke-title {
    font-size: clamp(20px, 1.45vw, 28px);
    font-weight: 700;
    line-height: 1.2;
}

.od-boke-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #72757f;
    font-size: 24px;
    line-height: 1;
}

.od-boke-close:hover {
    background: #f3f4f8;
    color: #2f3137;
}

.od-boke-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 1.45vw 1.1vh;
    display: flex;
    flex-direction: column;
    gap: .7vh;
    overflow: hidden;
}

.od-boke-top,
.od-boke-file,
.od-boke-tabs,
.od-boke-footer {
    flex: 0 0 auto;
}

.od-boke-top {
    min-height: 5vh;
}

.od-boke-file {
    min-height: 6.2vh;
}

.od-boke-tabs {
    min-height: 4.8vh;
}

.od-boke-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1vw;
}

.od-boke-readonly {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid #e2e5ee;
    border-radius: 12px;
    background: #fbfcff;
}

.od-boke-readonly span {
    color: #8a8e99;
    font-size: 12px;
}

.od-boke-readonly strong,
.od-boke-readonly select {
    font-size: 15px;
    font-weight: 500;
    color: #4b4e58;
    border: 0;
    background: transparent;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.od-boke-file {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    padding: 0 18px;
    border: 1px solid #e0e3eb;
    border-radius: 16px;
    background: #fff;
}

.od-boke-file-title {
    font-size: 15px;
    font-weight: 700;
}

.od-boke-file-row {
    display: flex;
    align-items: center;
    gap: 48px;
    min-width: 0;
}

/* 快布版无左侧标题列：文件区单列，CAD 路径与打孔点选项同行排列 */
.od-kuaibu-dialog .od-boke-file {
    grid-template-columns: 1fr;
}

.od-boke-file-row > .od-boke-file-hint {
    flex: 1 1 auto;
    min-width: 0;
}

.od-boke-file-row > .od-boke-cad-multi {
    flex: 1 1 auto;
    min-width: 0;
}

.od-boke-file-btn {
    position: relative;
    min-width: 72px;
    height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    line-height: 1;
}

.od-boke-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.od-boke-file-hint {
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 打孔点转换选项（CAD 文件字段右侧，隔开排列） */
.od-boke-drill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.od-boke-drill-label {
    color: #666;
    font-size: 13px;
}

.od-boke-drill-opt {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: #4b4e58;
    font-size: 13px;
}

.od-boke-cad-multi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
    grid-column: 1 / -1;
    padding: 8px 0;
}

.od-boke-cad-multi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.od-boke-cad-multi-title {
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
}

.od-boke-cad-multi-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.od-boke-cad-multi-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 4px 8px;
    border-radius: 8px;
    color: #445269;
    font-size: 13px;
}

.od-boke-cad-multi-list li.is-current {
    background: #eef2ff;
}

.od-boke-cad-multi-list li b {
    flex: 0 0 auto;
    max-width: 36%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    color: #1e293b;
}

.od-boke-cad-multi-list li span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.od-boke-cad-multi-list li span.is-empty {
    color: #94a3b8;
    font-weight: 500;
}

.od-boke-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid #e0e3ec;
    border-radius: 12px;
    background: #f6f7fb;
}

.od-boke-tab {
    height: 100%;
    min-height: 30px;
    padding: 0 28px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #676b78;
    font-weight: 600;
}

.od-boke-tab:hover {
    background: #fff;
    border-color: #e0e3ec;
}

.od-boke-tab.active {
    background: #fff;
    color: var(--primary);
    border-color: #d9d3ff;
    box-shadow: 0 4px 12px rgba(74, 34, 239, .1);
}

.od-boke-workspace {
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8f9fc;
    overflow: auto;
}

.od-boke-panel {
    display: none;
    width: 100%;
    min-height: 100%;
    padding: 1.4vh 1vw;
}

.od-boke-panel.active {
    display: block;
}

.od-boke-panel.auto-panel {
    padding: 16px;
    height: 100%;
}

.od-boke-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 38px;
    padding: 0 4px;
}

.od-boke-modal .classic {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.od-boke-modal .classic-title {
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: #fafbfe;
    color: #4f5260;
    font-size: 12px;
    font-weight: 600;
}

.od-boke-modal .classic input[type=text],
.od-boke-modal .classic input[type=number],
.od-boke-modal .classic select,
.od-boke-modal .classic-input {
    height: 30px;
    border: 1px solid #d9dce6;
    border-radius: 6px;
    background: #fff;
    outline: 0;
    padding: 2px 9px;
}

.od-boke-modal .classic input[type=number]::-webkit-inner-spin-button,
.od-boke-modal .classic input[type=number]::-webkit-outer-spin-button {
    opacity: 1;
    height: 22px;
    margin: 0;
}

/* 方向设置：幅宽 / 幅长 / 床号 始终可见增减（对齐原型） */
.od-boke-modal .boke-stepper {
    position: relative;
    display: flex;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    height: 30px;
    border: 1px solid #d9dce6;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.od-boke-modal .boke-stepper:focus-within {
    border-color: #6452df;
    box-shadow: inset 0 0 0 1px #6452df;
}

.od-boke-modal .boke-stepper > input[type=number] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 100%;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    padding: 0 8px;
    background: transparent;
    -moz-appearance: textfield;
}

.od-boke-modal .boke-stepper > input[type=number]::-webkit-inner-spin-button,
.od-boke-modal .boke-stepper > input[type=number]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.od-boke-modal .boke-stepper-btns {
    display: flex;
    flex-direction: column;
    flex: 0 0 18px;
    width: 18px;
    border-left: 1px solid #e4e7ef;
    background: #f7f8fc;
}

.od-boke-modal .boke-stepper-btns button {
    flex: 1 1 50%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-size: 8px;
    line-height: 1;
    cursor: pointer;
}

.od-boke-modal .boke-stepper-btns button + button {
    border-top: 1px solid #e4e7ef;
}

.od-boke-modal .boke-stepper-btns button:hover {
    background: #eef0f7;
    color: #334155;
}

.od-boke-modal .boke-stepper-btns button:active {
    background: #e4e8f5;
}

.od-boke-modal .direction-tools .boke-stepper {
    width: 100%;
}

.od-boke-modal .classic input:focus,
.od-boke-modal .classic select:focus {
    border-color: #6452df;
    box-shadow: inset 0 0 0 1px #6452df;
}

.od-boke-modal .classic-btn {
    min-width: 72px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #d8dbe5;
    border-radius: 6px;
    background: #fff;
    color: #555966;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.od-boke-modal .classic-btn:hover {
    border-color: #8a7cf0;
    color: var(--primary);
}

.od-boke-modal .classic-btn:active {
    background: #f4f2ff;
}

.od-boke-modal .classic-btn.primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.od-boke-modal .classic-btn.primary:hover {
    color: #fff;
}

.od-boke-modal .classic-btn:disabled,
.od-boke-modal .classic-btn.disabled {
    color: #aaa;
    border-color: #e4e6ee;
    background: #f7f8fb;
    cursor: default;
}

.od-boke-modal .save-btn {
    min-width: 112px;
    height: 36px;
}

.od-boke-modal input.changed,
.od-boke-modal select.changed,
.od-boke-modal .classic-input.changed,
.od-boke-modal .od-boke-file-hint.changed,
.od-boke-modal label.changed {
    background: var(--changed) !important;
    box-shadow: inset 0 0 0 1px #ffe69b;
}

.od-boke-modal input[type=checkbox].changed,
.od-boke-modal input[type=radio].changed {
    box-shadow: 0 0 0 3px rgba(255, 230, 155, .85);
}

.od-boke-modal .checks label,
.od-boke-modal .radios label {
    white-space: nowrap;
}

.od-boke-modal input[type=checkbox],
.od-boke-modal input[type=radio] {
    width: 15px;
    height: 15px;
    margin: 0 5px 0 0;
    accent-color: var(--primary);
    vertical-align: -3px;
}

.od-boke-modal .direction-screen {
    width: min(100%, 1180px);
    height: auto;
    max-height: 100%;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 112px;
    gap: 10px;
    padding: 0 1vw;
}

.od-boke-modal .direction-table-wrap {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.od-boke-modal .direction-table-wrap .classic-title {
    height: 38px;
    justify-content: flex-end;
    gap: 16px;
}

.od-boke-modal .direction-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
    font-size: 13px;
    line-height: 36px;
}

.od-boke-modal .direction-table th,
.od-boke-modal .direction-table td {
    height: 36px;
    border-bottom: 1px solid #eceef4;
    padding: 0 14px;
    text-align: left;
    line-height: 36px;
}

.od-boke-modal .direction-table th {
    text-align: center;
    background: #f6f7fb;
    color: #646774;
    font-weight: 600;
}

.od-boke-modal .direction-table .size {
    width: 110px;
    text-align: center;
}

.od-boke-modal .direction-table select {
    width: 100%;
    height: 30px;
    min-height: 0;
    padding: 0 9px;
    border: 1px solid #d9dce6;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    line-height: 30px;
}

.od-boke-modal .table-batch {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 400;
}

.od-boke-modal .table-batch select {
    width: 105px;
    height: 28px;
    border: 1px solid #d9dce6;
    border-radius: 6px;
    background: #fff;
    padding: 0 8px;
}

.od-boke-modal .direction-tools {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 48px minmax(120px, 1fr) 48px minmax(120px, 1fr) 48px minmax(190px, 1.5fr) 48px minmax(110px, .85fr);
    grid-template-rows: 36px 42px;
    align-items: center;
    gap: 8px 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.od-boke-modal .direction-tools > label {
    display: contents;
}

.od-boke-modal .direction-tools span {
    align-self: center;
}

.od-boke-modal .direction-tools input:not([type=checkbox]):not([type=radio]),
.od-boke-modal .direction-tools select {
    width: 100%;
    height: 30px;
}

.od-boke-modal .direction-bottom-row {
    grid-column: 1 / -1;
    display: grid;
    align-items: center;
    min-width: 0;
}

.od-boke-modal .direction-checks {
    display: grid;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
    align-items: center;
    gap: 10px;
}

.od-boke-modal .direction-checks label,
.od-boke-modal .fabric-row .radios label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 20px;
}

.od-boke-modal .direction-checks input,
.od-boke-modal .fabric-row .radios input {
    flex: 0 0 auto;
    margin: 0;
    vertical-align: 0;
}

.od-boke-modal .fabric-screen {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.od-boke-modal .fabric-form {
    width: min(100%, 980px);
    height: 100%;
    min-height: 0;
    margin: auto;
    overflow: hidden;
    padding: 1.2vh 1vw;
    display: grid;
    grid-template-rows: repeat(12, minmax(0, 1fr)) 34px;
    gap: .55vh;
}

.od-boke-modal .fabric-row {
    display: grid;
    grid-template-columns: 110px 1fr 110px 1fr;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.od-boke-modal .fabric-row.single {
    grid-template-columns: 110px minmax(0, 1fr);
}

.od-boke-modal .fabric-row input:not([type=radio]):not([type=checkbox]),
.od-boke-modal .fabric-row select {
    width: 100%;
}

.od-boke-modal .fabric-row .radios {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, max-content));
    gap: 18px;
    align-items: center;
}

.od-boke-modal .fabric-actions {
    display: flex;
    align-items: center;
}

.od-boke-modal .fabric-tail {
    display: grid;
    grid-template-columns: 110px 160px;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.od-boke-modal .fabric-row .inline {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    min-width: 0;
}

.od-boke-modal .fabric-row .inline input {
    min-width: 0;
    flex: 1 1 auto;
}

.od-boke-modal .fabric-row .inline .classic-btn {
    min-width: 68px;
    padding: 0 6px;
    flex: 0 0 auto;
}

.od-boke-modal .auto-screen {
    width: min(100%, 1080px);
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.85fr 1.05fr .82fr 1fr;
    grid-template-rows: minmax(200px, 1.6fr) minmax(100px, 1fr) 45px 45px;
    gap: 10px;
    padding: 10px;
    align-items: stretch;
    border: 1px solid #dce1eb;
    border-radius: 12px;
    background: #f8f9fc;
    font-size: 14px;
}

.od-boke-modal .box {
    min-height: 0;
    padding: 14px 18px;
    border: 1px solid #dce1eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(38, 45, 66, .04);
    overflow: auto;
}

.od-boke-modal .left-top-stack {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    gap: 10px;
}

.od-boke-modal .time-settings .inline {
    height: 100%;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.od-boke-modal .time-settings .inline-field {
    margin: 0;
}

.od-boke-modal .time-settings .inline-field input {
    width: 70px;
}

.od-boke-modal .mix-settings {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 14px;
}

.od-boke-modal .mix-settings .radio-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 10px 12px;
}

.od-boke-modal .mix-settings .radio-stack label {
    margin: 0;
    white-space: nowrap;
}

.od-boke-modal .mix-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    align-items: center;
    font-size: 12px;
}

.od-boke-modal .mix-fields .inline-field {
    display: grid;
    grid-template-columns: max-content 78px;
    gap: 8px;
    margin: 0;
}

.od-boke-modal .mix-fields .inline-field input {
    width: 78px;
}

.od-boke-modal .box-title {
    margin: 0 0 12px;
    color: #30333b;
    font-size: 14px;
    font-weight: 700;
}

.od-boke-modal .radio-stack label {
    display: block;
    margin: 8px 0;
}

.od-boke-modal .inline {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.od-boke-modal .inline-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.od-boke-modal .inline-field input {
    width: 82px;
}

.od-boke-modal .auto-screen input[type=text] {
    height: 30px;
    border: 1px solid #d9dce6;
    border-radius: 6px;
    background: #fff;
    padding: 2px 9px;
}

.od-boke-modal .auto-screen select {
    height: 30px;
    border: 1px solid #d9dce6;
    border-radius: 6px;
    background: #fff;
}

.od-boke-modal .disabled {
    color: #aaa;
}

.od-boke-modal .move-settings {
    grid-column: 2;
    grid-row: 1;
}

.od-boke-modal .tool-stack {
    grid-column: 3;
    grid-row: 1;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    align-content: start;
}

.od-boke-modal .tool-stack .classic-btn {
    width: min(100%, 120px);
    height: 26px;
    justify-self: center;
}

.od-boke-modal .tool-stack .box-title {
    margin-bottom: 1px;
}

.od-boke-modal .tool-stack .inline-field,
.od-boke-modal .tool-stack .inline-field input {
    height: 26px;
    margin: 0;
}

.od-boke-modal .current-layout {
    grid-column: 2 / 4;
    grid-row: 2 / 5;
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    align-content: start;
}

.od-boke-modal .cut-row {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(140px, 1fr);
    gap: 12px;
    align-items: center;
}

.od-boke-modal .cut-row .inline-field {
    display: grid;
    grid-template-columns: 72px 130px;
    margin: 0;
    white-space: nowrap;
}

.od-boke-modal .cut-row .inline-field input {
    width: 130px;
}

.od-boke-modal .cut-row > label {
    margin: 0;
    white-space: nowrap;
}

.od-boke-modal .cut-row .classic-btn {
    width: min(100%, 132px);
    height: 30px;
    justify-self: center;
}

.od-boke-modal .single-setting-row {
    width: min(100%, 132px);
    justify-self: center;
    display: grid;
    grid-template-columns: 1fr 32px;
    gap: 5px;
}

.od-boke-modal .single-setting-row .classic-btn {
    min-width: 0;
    padding: 0 8px;
}

.od-boke-modal .variable-width {
    grid-column: 4;
    grid-row: 2 / 5;
    display: grid;
    align-content: start;
    gap: 12px;
    padding-top: 16px;
}

.od-boke-modal .variable-width .box-title {
    margin-bottom: 2px;
}

.od-boke-modal .variable-width .inline-field {
    margin: 0;
}

.od-boke-modal .material-select {
    grid-column: 4;
    grid-row: 1;
    display: grid;
    gap: 13px;
    align-content: start;
}

.od-boke-modal .material-select input,
.od-boke-modal .material-select select {
    width: 100%;
    min-width: 0;
}

.od-boke-modal .material-select label {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.od-boke-modal .material-select label input {
    width: 15px;
    min-width: 15px;
    flex: 0 0 15px;
}

.od-boke-modal .direction-limits {
    grid-column: 1;
    grid-row: 2;
}

.od-boke-modal .direction-limits .radio-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
}

.od-boke-modal .direction-limits .radio-stack label {
    margin: 0;
}

.od-boke-modal .direction-limits .inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px !important;
    margin-top: 14px !important;
}

.od-boke-modal .scope-settings {
    grid-column: 1;
    grid-row: 3;
}

.od-boke-modal .fabric-type-settings {
    grid-column: 1;
    grid-row: 4;
}

.od-boke-modal .scope-settings,
.od-boke-modal .fabric-type-settings {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
}

.od-boke-modal .scope-settings .inline,
.od-boke-modal .fabric-type-settings .inline {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    flex-wrap: nowrap;
}

.od-boke-confirm {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 22, 28, .36);
    pointer-events: auto;
}

.od-boke-confirm-box {
    width: 360px;
    padding: 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .26);
}

.od-boke-confirm-title {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}

.od-boke-confirm-box p {
    margin: 0 0 20px;
    color: #676b75;
    line-height: 1.7;
}

.od-boke-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 1100px) {
    .od-boke-modal {
        font-size: 11px;
    }

    .od-boke-tab {
        padding: 0 20px;
    }

    .od-boke-modal .direction-screen {
        width: 100%;
    }

    .od-boke-modal .direction-tools {
        grid-template-columns: 42px minmax(80px, 1fr) 42px minmax(80px, 1fr) 42px minmax(110px, 1.35fr) 42px minmax(70px, .75fr);
    }

    .od-boke-modal .direction-checks {
        grid-template-columns: repeat(4, minmax(82px, 1fr));
        gap: 6px;
    }
}

@media (max-height: 800px) {
    .od-boke-panel.auto-panel {
        padding: 10px;
    }

    .od-boke-modal .auto-screen {
        height: 100%;
        gap: 8px;
        padding: 8px;
        font-size: 13px;
    }

    .od-boke-modal .box {
        padding: 10px 14px;
        border-radius: 8px;
    }
}

/* —— 快布方向 / 床次（对齐 009 原型） —— */
/* 壳宽跟内容走，避免沿用博克 1600px 壳导致右侧大片空白 */
.od-boke-dialog-shell.od-kuaibu-dialog {
    width: min(1100px, 96vw);
    height: auto;
    max-height: min(92vh, 900px);
    overflow: hidden;
}

.od-kuaibu-dialog .od-boke-modal {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    font-size: 12px;
    --kb-accent: #5822ff;
    --kb-size: #1aa05a;
    --kb-val: #3b5bdb;
    --kb-subtotal: #ffe8d6;
}

/* 工作区可纵向滚动；页脚留在 body 底部不跟内容滚走 */
.od-kuaibu-dialog .od-boke-body {
    overflow: hidden;
}

.od-kuaibu-dialog .od-boke-tabs {
    gap: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e6e8ef;
    border-radius: 0;
    background: transparent;
}

.od-kuaibu-dialog .od-boke-tab {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #6b7280;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
}

.od-kuaibu-dialog .od-boke-tab:hover {
    background: transparent;
    border-color: transparent;
    color: var(--kb-accent);
}

.od-kuaibu-dialog .od-boke-tab.active {
    background: transparent;
    color: var(--kb-accent);
    border-bottom-color: var(--kb-accent);
    box-shadow: none;
}

.od-kuaibu-dialog .od-boke-workspace {
    border: 0;
    border-radius: 0;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.od-kuaibu-dialog .kb-dir {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 8px 4px 4px;
    font-size: 12px;
}

.od-kuaibu-dialog .kb-batch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 12px;
}

.od-kuaibu-dialog .kb-batch-label {
    margin-right: auto;
    color: #5b5f6a;
    font-weight: 600;
}

.od-kuaibu-dialog .kb-batch label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3a3d46;
}

.od-kuaibu-dialog .kb-batch input {
    width: 110px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d5d9e2;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-family: inherit;
}

.od-kuaibu-dialog .kb-batch input::placeholder {
    color: #b0b4be;
    font-size: 12px;
}

.od-kuaibu-dialog .kb-batch-btn {
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--kb-accent);
    border-radius: 6px;
    background: #fff;
    color: var(--kb-accent);
    font-weight: 600;
}

.od-kuaibu-dialog .kb-batch-btn:hover {
    background: #f4f0ff;
}

.od-kuaibu-dialog .kb-dir-scroll,
.od-kuaibu-dialog .kb-bed-scroll {
    min-height: 0;
    overflow: visible;
    border: 1px solid #e2e5ee;
    border-radius: 8px;
    background: #fff;
}

.od-kuaibu-dialog .kb-dir-table,
.od-kuaibu-dialog .kb-bed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.od-kuaibu-dialog .kb-dir-table th,
.od-kuaibu-dialog .kb-dir-table td,
.od-kuaibu-dialog .kb-bed-table th,
.od-kuaibu-dialog .kb-bed-table td {
    border: 1px solid #e6e8ef;
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    font-family: inherit;
}

.od-kuaibu-dialog .kb-dir-table thead th,
.od-kuaibu-dialog .kb-bed-table thead th {
    background: #f3f4f8;
    color: #4b4f5a;
    font-weight: 600;
}

.od-kuaibu-dialog .kb-dir-table .kb-meta {
    background: #fafbfd;
    color: #2f3340;
}

.od-kuaibu-dialog .kb-dir-table .kb-size {
    color: var(--kb-size);
    font-weight: 600;
}

.od-kuaibu-dialog .kb-dir-table .kb-val input,
.od-kuaibu-dialog .kb-dir-table .kb-total {
    color: var(--kb-val);
    font-weight: 600;
}

.od-kuaibu-dialog .kb-dir-table .kb-val input {
    width: 72px;
    height: 30px;
    margin: 0 auto;
    display: block;
    border: 1px solid #d5d9e2;
    border-radius: 4px;
    text-align: center;
    background: #fff;
    font-size: 12px;
    font-family: inherit;
}

.od-kuaibu-dialog .kb-dir-table tfoot td {
    font-weight: 700;
}

.od-kuaibu-dialog .kb-dir-table tfoot .kb-subtotal-empty {
    background: #fff;
    border-color: transparent;
    border-right-color: #e6e8ef;
}

.od-kuaibu-dialog .kb-dir-table tfoot .kb-subtotal-label,
.od-kuaibu-dialog .kb-dir-table tfoot .kb-total {
    background: var(--kb-subtotal);
    color: var(--kb-val);
}

.od-kuaibu-dialog .kb-bed-table {
    max-width: 720px;
    margin: 0 auto;
}

.od-kuaibu-dialog .kb-bed-table tbody tr:nth-child(even) {
    background: #f8f9fc;
}

.od-kuaibu-dialog .kb-bed-table td:nth-child(1) {
    color: #6b7280;
    width: 72px;
}

.od-kuaibu-dialog .kb-bed-table td:nth-child(2) {
    text-align: left;
    color: #2f3340;
    background: #f7f8fb;
}

.od-kuaibu-dialog .kb-bed-table td:nth-child(3) {
    text-align: left;
}

.od-kuaibu-dialog .kb-bed-table input,
.od-kuaibu-dialog .kb-bed-table select {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--kb-accent);
    font-size: 12px;
    font-family: inherit;
    font-weight: 600;
    appearance: none;
}

.od-kuaibu-dialog .kb-bed-table select {
    background-image: linear-gradient(45deg, transparent 50%, #9aa0ac 50%), linear-gradient(135deg, #9aa0ac 50%, transparent 50%);
    background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 28px;
}

.od-kuaibu-dialog .kb-bed-scroll {
    padding: 12px 16px;
}

/* —— ET（对齐 010 原型） —— */
/* 三列铺满壳宽；工作区纵向滚动，页脚不跟内容滚走 */
.od-boke-dialog-shell.od-boke-dialog.od-et-dialog {
    width: min(1180px, 96vw);
    height: auto;
    max-height: min(92vh, 900px);
    overflow: hidden;
}

.od-et-dialog .od-boke-modal {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    --et-accent: #5822ff;
}

.od-et-dialog .od-boke-body {
    overflow: hidden;
    min-height: 0;
}

.od-et-dialog .od-boke-tabs {
    gap: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e6e8ef;
    border-radius: 0;
    background: transparent;
    min-height: 0;
}

.od-et-dialog .od-boke-top,
.od-et-dialog .od-boke-file {
    min-height: 0;
}

.od-et-dialog .od-boke-tab {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #6b7280;
    box-shadow: none;
}

.od-et-dialog .od-boke-tab:hover {
    background: transparent;
    border-color: transparent;
    color: var(--et-accent);
}

.od-et-dialog .od-boke-tab.active {
    background: transparent;
    color: var(--et-accent);
    border-bottom-color: var(--et-accent);
    box-shadow: none;
}

.od-et-dialog .od-boke-workspace {
    border: 0;
    border-radius: 0;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-height: calc(92vh - 260px);
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.od-et-dialog .od-boke-workspace::-webkit-scrollbar {
    width: 8px;
}

.od-et-dialog .od-boke-workspace::-webkit-scrollbar-thumb {
    background: #c5c9d4;
    border-radius: 8px;
}

.od-et-dialog .od-boke-panel {
    display: none;
    flex-direction: column;
    min-height: 0;
    padding: 10px 8px 8px;
    background: #fff;
}

.od-et-dialog .od-boke-panel.active {
    display: flex;
}

.od-et-dialog .et-scheme {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.5fr) minmax(220px, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    padding: 4px 0;
}

.od-et-dialog .et-scheme-col,
.od-et-dialog .et-bed-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
}

.od-et-dialog .et-scheme-col.et-card {
    height: auto;
    min-height: 0;
    align-self: start;
}

.od-et-dialog .et-scheme-left,
.od-et-dialog .et-scheme-right {
    gap: 12px;
}

.od-et-dialog .et-scheme-left .et-mini-table {
    margin-bottom: 10px;
}

.od-et-dialog .et-scheme-left .et-field {
    margin-top: 4px;
}

.od-et-dialog .et-scheme-center {
    min-height: 0;
}

.od-et-dialog .et-card {
    border: 1px solid #e4e7ee;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.od-et-dialog .et-mini-table,
.od-et-dialog .et-qty-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
}

.od-et-dialog .et-mini-table th,
.od-et-dialog .et-mini-table td,
.od-et-dialog .et-qty-table th,
.od-et-dialog .et-qty-table td {
    border: 1px solid #e6e8ef;
    padding: 7px 8px;
    text-align: center;
    white-space: nowrap;
}

.od-et-dialog .et-mini-table thead th,
.od-et-dialog .et-qty-table thead th {
    background: #f3f4f8;
    color: #4b4f5a;
    font-weight: 600;
}

.od-et-dialog .et-mini-table input,
.od-et-dialog .et-qty-table input,
.od-et-dialog .et-field input,
.od-et-dialog .et-field select,
.od-et-dialog .et-batch input {
    width: 100%;
    min-width: 56px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d5d9e2;
    border-radius: 6px;
    background: #fff;
}

.od-et-dialog .et-qty-table input {
    width: 100%;
    max-width: 88px;
    margin: 0 auto;
    display: block;
    text-align: center;
}

.od-et-dialog .et-field {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.od-et-dialog .et-label {
    flex: 0 0 72px;
    color: #3a3d46;
}

.od-et-dialog .et-unit {
    color: #6b7280;
    flex-shrink: 0;
}

.od-et-dialog .et-inline {
    flex-wrap: wrap;
}

.od-et-dialog .et-paging {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.od-et-dialog .et-paging input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.od-et-dialog .et-paging input:not([type="checkbox"]) {
    width: 96px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d5d9e2;
    border-radius: 6px;
}

.od-et-dialog .et-batch {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.od-et-dialog .et-batch-label {
    flex: 0 0 auto;
    margin-right: 4px;
    font-weight: 600;
    color: #5b5f6a;
    white-space: nowrap;
}

.od-et-dialog .et-batch label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.od-et-dialog .et-batch input {
    width: 88px;
    min-width: 72px;
}

.od-et-dialog .et-batch input::placeholder {
    color: #b0b4be;
    font-size: 12px;
}

.od-et-dialog .et-batch-btn {
    height: 32px;
    min-width: 112px;
    margin-left: auto;
    padding: 0 14px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
}

.od-et-dialog .et-batch-btn.classic-btn.primary {
    border-color: var(--et-accent);
    background: var(--et-accent);
    color: #fff;
}

.od-et-dialog .et-batch-btn.classic-btn.primary:hover {
    filter: brightness(1.05);
    background: var(--et-accent);
    color: #fff;
}

.od-et-dialog .od-boke-footer {
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 4px 2px;
    border-top: 1px solid #eef0f5;
}

.od-et-dialog .od-boke-footer.et-footer-scheme {
    justify-content: space-between;
}

.od-et-dialog .et-scheme-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    border: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.od-et-dialog .et-layout-modes {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid #e4e7ee;
    border-radius: 8px;
    background: #f7f8fb;
}

.od-et-dialog .et-layout-modes > label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #4b4f5a;
    cursor: pointer;
    user-select: none;
}

.od-et-dialog .et-layout-modes > label.is-active {
    background: #fff;
    color: var(--et-accent);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

.od-et-dialog .et-layout-modes input[type="radio"] {
    margin: 0;
    accent-color: var(--et-accent);
}

.od-et-dialog .et-time-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
    padding: 4px 8px 4px 12px;
    border-left: 1px solid #e4e7ee;
}

.od-et-dialog .et-time-field span {
    color: #5b5f6a;
    white-space: nowrap;
}

.od-et-dialog .et-time-field input {
    width: 64px;
    min-width: 64px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #d5d9e2;
    border-radius: 6px;
    background: #fff;
    text-align: center;
}

.od-et-dialog .et-bed {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    width: 100%;
    padding: 4px 0;
    flex: 1 1 auto;
    min-height: 0;
}

.od-et-dialog .et-bed-col.et-card {
    height: 100%;
}

.od-et-dialog .et-box-title {
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 8px;
    color: #2f3340;
}

.od-et-dialog .et-radios,
.od-et-dialog .et-subbox {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.od-et-dialog .et-radios-row {
    flex-direction: row;
    gap: 20px;
    margin: 4px 0 2px;
}

.od-et-dialog .et-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.od-et-dialog .et-subbox {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fafbfe;
}

.od-et-dialog .et-bed-col > .et-card {
    margin-bottom: 0;
}

.od-et-dialog .et-field .et-label {
    flex-basis: 84px;
}

.od-et-dialog .et-field input,
.od-et-dialog .et-field select {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
}

@media (max-width: 1100px) {
    .od-et-dialog .et-scheme {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .od-et-dialog .et-bed {
        grid-template-columns: 1fr;
    }
}

.kb-auto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6b7280;
    font-size: 14px;
}

.kb-auto {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 10px 12px;
    height: 100%;
    overflow: auto;
    font-size: 12px;
    align-content: start;
}

.kb-auto-main {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr) minmax(0, 0.9fr) minmax(0, 0.95fr);
    gap: 10px;
    align-content: start;
    min-width: 0;
}

.kb-auto-box {
    border: 1px solid #d9dde5;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    min-width: 0;
}

.kb-auto-box-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #2f3340;
}

.kb-auto-radios,
.kb-auto-checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kb-auto-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.kb-auto-num {
    width: 56px;
    height: 28px;
    padding: 2px 6px;
    border: 1px solid #c9ced8;
    border-radius: 4px;
    background: #fff;
}

.kb-auto-num-wide {
    width: 72px;
}

.kb-auto-segment-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
}

.kb-auto-segment-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-auto-side {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fafbfe;
    align-self: start;
}

.kb-auto-time {
    font-weight: 600;
}

.kb-auto-icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #c9ced8;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    line-height: 1;
}

.kb-auto-cpu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-auto-cpu input[type=range] {
    flex: 1;
    min-width: 0;
}

.kb-auto-footer-opts {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 14px;
    padding: 8px 4px 0;
    border-top: 1px solid #e5e7eb;
    overflow-x: auto;
    white-space: nowrap;
}

.kb-auto-footer-opts > .kb-auto-inline {
    flex: 0 0 auto;
}

@media (max-width: 1100px) {
    .kb-auto {
        grid-template-columns: 1fr;
    }

    .kb-auto-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .kb-auto-side {
        grid-column: auto;
        grid-row: auto;
    }

    .kb-auto-segment-grid {
        grid-template-columns: 1fr;
    }
}
