:root {
    --bg: #f5f7f9;
    --panel: #ffffff;
    --text: #17202a;
    --muted: #667085;
    --line: #d9e0e7;
    --primary: #176b87;
    --primary-strong: #0f4f66;
    --green: #237b4b;
    --red: #b42318;
    --amber: #9a6700;
    --blue-soft: #e7f2f6;
    --green-soft: #e9f7ef;
    --red-soft: #fff0ed;
    --amber-soft: #fff6db;
    --radius: 8px;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    align-items: center;
    gap: 20px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 800;
    color: var(--primary-strong);
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    color: #4b5563;
    white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
    background: var(--blue-soft);
    color: var(--primary-strong);
}

.userbar {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.userbar a {
    color: var(--primary);
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.install-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f5f7f9 0%, #e8f1f4 100%);
}

.install-shell {
    width: min(520px, 100%);
}

.auth-panel,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
}

.auth-logo {
    display: block;
    width: min(320px, 88%);
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
}

.auth-panel h1 {
    margin: 0 0 20px;
    color: var(--primary-strong);
    text-align: center;
}

.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 3px 0 0;
    font-size: 28px;
    line-height: 1.25;
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    line-height: 1;
}

.panel {
    margin-bottom: 18px;
    overflow-x: auto;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.panel-title h2,
.request-card h2 {
    margin: 0;
    font-size: 18px;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(240px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}

.filter-bar label {
    min-width: 180px;
}

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 600;
}

.check-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
}

.check-row input {
    width: auto;
    min-height: auto;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #cbe7ef;
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #b8c6d1;
    border-radius: 6px;
    background: #ffffff;
    color: #243443;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary-strong);
}

.btn.primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.btn.primary:hover {
    background: var(--primary-strong);
    color: #ffffff;
}

.btn.success {
    border-color: #16a34a;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
}

.btn.success:hover {
    border-color: #15803d;
    background: #15803d;
    color: #ffffff;
}

.btn.danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #e11d48;
}

.btn.danger:hover {
    border-color: #fb7185;
    background: #ffe4e6;
    color: #be123c;
}

.btn.small {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
}

.btn.wide {
    width: 100%;
}

.notice {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.notice.success {
    background: var(--green-soft);
    color: var(--green);
    border-color: #bde4cb;
}

.notice.error {
    background: var(--red-soft);
    color: var(--red);
    border-color: #ffc9c0;
}

.help-box {
    min-height: 100%;
    padding: 18px;
    border-radius: var(--radius);
    background: #f8fafc;
    border: 1px solid var(--line);
    color: var(--muted);
}

.help-box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
}

.help-box p {
    margin: 0;
    line-height: 1.7;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #475467;
    font-size: 13px;
    font-weight: 800;
    background: #f8fafc;
}

td {
    color: #26313d;
}

code {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 5px;
    background: #eef2f6;
    color: #1f2937;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    word-break: break-all;
}

.muted {
    color: var(--muted);
}

.empty {
    color: var(--muted);
    padding: 18px;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #eef2f6;
    color: #344054;
}

.badge.issued,
.badge.pending {
    background: var(--amber-soft);
    color: var(--amber);
}

.badge.written_off,
.badge.completed,
.badge.paid {
    background: var(--green-soft);
    color: var(--green);
}

.badge.approved {
    background: var(--blue-soft);
    color: var(--primary-strong);
}

.badge.cancelled,
.badge.rejected {
    background: var(--red-soft);
    color: var(--red);
}

.request-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.request-card {
    display: grid;
    grid-template-columns: 1fr max-content;
    gap: 18px;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.request-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.serial-box {
    display: grid;
    justify-items: center;
    gap: 8px;
}

.serial-box img {
    width: 132px;
    height: 132px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.request-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.scan-video {
    width: 100%;
    max-height: 320px;
    border-radius: 8px;
    background: #0f172a;
}

.scan-tip {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.serial-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    min-width: 330px;
}

.serial-item {
    display: grid;
    gap: 7px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.serial-item img {
    width: 112px;
    height: 112px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.budget-bar {
    width: 180px;
    max-width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eaf0;
}

.budget-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.inline-form,
.inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inline-actions.stacked {
    display: grid;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-actions input {
    min-width: 160px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.system-card {
    display: grid;
    gap: 7px;
    min-height: 96px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, #ffffff, #f5fbfd);
}

.system-card strong {
    font-size: 18px;
}

.system-card span {
    color: var(--muted);
}

.system-card.accent-a { background: linear-gradient(135deg, #eef8f0, #fff); }
.system-card.accent-b { background: linear-gradient(135deg, #e7f2f6, #fff); }
.system-card.accent-c { background: linear-gradient(135deg, #fff6db, #fff); }
.system-card.accent-d { background: linear-gradient(135deg, #f2edff, #fff); }
.system-card.accent-e { background: linear-gradient(135deg, #fff0ed, #fff); }

.config-output {
    min-height: 180px;
    margin-top: 16px;
    font-family: Consolas, Monaco, monospace;
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px;
    }

    .userbar {
        justify-content: space-between;
    }

    .metrics,
    .request-grid,
    .two-col {
        grid-template-columns: 1fr;
    }

    .page-head {
        align-items: start;
        flex-direction: column;
    }

    .request-card {
        grid-template-columns: 1fr;
    }
}

/* v4.8 layout polish: wider work area, cleaner order/detail panels, and live A5 quote. */
.content,
.page,
.shell {
    max-width: min(1880px, calc(100vw - 28px));
}

.panel,
.page-head {
    max-width: 100%;
}

.order-table-wide,
.panel > table,
.table-scroll > table {
    min-width: 1180px;
}

.table-actions {
    min-width: 220px;
}

.table-actions .btn,
.table-actions button {
    white-space: nowrap;
}

.quote-detail-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #0f3f7a;
}

.quote-detail-table {
    width: 100%;
    table-layout: fixed;
}

.quote-detail-table th:nth-child(1),
.quote-detail-table td:nth-child(1) {
    width: 120px;
}

.quote-detail-table th:nth-child(2),
.quote-detail-table td:nth-child(2) {
    width: auto;
}

.quote-detail-table th:nth-child(3),
.quote-detail-table td:nth-child(3),
.quote-detail-table th:nth-child(4),
.quote-detail-table td:nth-child(4),
.quote-detail-table th:nth-child(5),
.quote-detail-table td:nth-child(5) {
    width: 110px;
    white-space: nowrap;
    text-align: center;
}

.quote-detail-table td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
}

.quote-order-row.is-open {
    background: #fff4c8 !important;
}

.assembly-page-actions {
    display: none !important;
}

.assembly-status-tabs {
    margin-bottom: 14px;
}

.share-preview-frame {
    width: min(1100px, 92vw);
    height: min(760px, 78vh);
    border: 0;
    background: #fff;
}

.image-modal-panel {
    width: min(1240px, 96vw);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-filter-panel {
    margin-bottom: 16px;
}

.live-machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.live-machine-card {
    min-height: 150px;
    border: 1px solid rgba(15, 104, 220, 0.16);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 104, 220, 0.08);
    padding: 14px;
}

.live-machine-card span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 900;
    color: #0c2d57;
}

.live-machine-card span b {
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef5ff;
    font-size: 12px;
}

.live-machine-card em {
    display: block;
    margin-top: 8px;
    color: #f04444;
    font: 900 24px/1.1 "Smiley Sans", "Microsoft YaHei", sans-serif;
}

.live-machine-grid-visual .live-status-idle .live-machine-card { background: #f1f5f9; }
.live-machine-grid-visual .live-status-listed .live-machine-card { background: #dcfce7; }
.live-machine-grid-visual .live-status-modifying .live-machine-card { background: #fef3c7; }
.live-machine-grid-visual .live-status-sold .live-machine-card { background: #fee2e2; }

.live-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px;
    gap: 14px;
    margin-bottom: 12px;
}

.live-external-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.live-editor-form.is-readonly .live-a5-sheet input {
    pointer-events: none;
    color: #111;
}

@font-face {
    font-family: "Smiley Sans";
    src: url("fonts/SmileySans-Oblique.woff2") format("woff2");
    font-display: swap;
}

.live-a5-wrap {
    display: flex;
    justify-content: center;
    overflow: auto;
}

.live-a5-sheet.live-a5-new {
    width: 148mm;
    height: 210mm;
    overflow: hidden;
    background: #fff;
    border: 1.6px solid #111;
    padding: 2mm 5mm 6mm;
    font-family: "Smiley Sans", "Microsoft YaHei", sans-serif;
    color: #000;
    transform-origin: top center;
    box-sizing: border-box;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.live-a5-top-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.live-a5-top {
    display: block;
    width: 100%;
    height: auto;
}

.live-savings-overlay {
    position: absolute;
    left: 5%;
    bottom: 2%;
    color: #f04444;
    font-size: 46px;
    font-weight: 900;
    line-height: 1;
    font-family: inherit;
    white-space: nowrap;
}

.live-a5-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 16px;
}

.live-a5-table th,
.live-a5-table td {
    border: 1px solid #111;
    padding: 2mm 2mm;
    line-height: 1.15;
}

.live-a5-table tbody tr:nth-child(odd) {
    background: #d9d9d9;
}

.live-a5-table th:nth-child(1),
.live-a5-table td:nth-child(1) { width: 16%; }
.live-a5-table th:nth-child(3),
.live-a5-table td:nth-child(3),
.live-a5-table th:nth-child(4),
.live-a5-table td:nth-child(4) { width: 14%; text-align: center; }

.live-a5-table input {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: inherit;
}

.live-a5-table td:nth-child(2) input {
    text-align: center;
}

.live-a5-table tfoot td {
    background: #fff;
    font-weight: 900;
    color: #f04444;
}

.live-bottom-total {
    display: grid;
    grid-template-columns: 3fr 1fr;
    align-items: center;
    border: 1px solid #111;
    border-top: 0;
}

.live-bottom-total strong {
    color: #f04444;
    font-size: 88px;
    text-align: center;
    line-height: 1;
}

.live-bottom-total strong input {
    font: inherit;
    color: inherit;
    border: 0;
    background: transparent;
    text-align: center;
    width: 100%;
    display: block;
}

.live-bottom-total .live-shipping-text,
.live-bottom-total span {
    color: #f04444;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    border: 0;
    background: transparent;
    width: 100%;
    display: block;
    font-family: inherit;
}

/* High-specificity overrides to win over the late .live-a5-table block */
.live-a5-new .live-a5-table {
    font-size: 16px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.live-a5-new .live-a5-table th,
.live-a5-new .live-a5-table td {
    height: 30px;
    border: 1px solid #111;
    padding: 0 2mm;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    line-height: 30px;
    color: #000;
}

.live-a5-new .live-a5-table thead th {
    font-weight: 700;
    font-size: 17px;
    background: #fff;
    line-height: 30px;
}

.live-a5-new .live-a5-table tbody tr:nth-last-child(1) td,
.live-a5-new .live-a5-table tbody tr:nth-last-child(2) td {
    height: 36px;
    line-height: 36px;
}

.live-a5-new .live-a5-table tfoot td {
    font-weight: 900;
    font-size: 16px;
    background: #fff;
    color: #f04444;
}

.live-a5-new .live-a5-table tfoot td:first-child {
    text-align: right;
    padding-right: 3mm;
}

.live-a5-new .live-a5-table input {
    height: 30px;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    display: block;
    line-height: 30px;
}

/* Column widths — must all total 100% to prevent overflow */
.live-a5-new .live-a5-table th:nth-child(1),
.live-a5-new .live-a5-table td:nth-child(1) { width: 14%; }

.live-a5-new .live-a5-table th:nth-child(2),
.live-a5-new .live-a5-table td:nth-child(2) { width: 58%; }

.live-a5-new .live-a5-table th:nth-child(3),
.live-a5-new .live-a5-table td:nth-child(3),
.live-a5-new .live-a5-table th:nth-child(4),
.live-a5-new .live-a5-table td:nth-child(4) { width: 14%; }

.live-image-preview-body {
    display: flex;
    justify-content: center;
    max-height: 78vh;
    overflow: auto;
    background: #eef7ff;
    padding: 16px;
}

@media (max-width: 900px) {
    .content,
    .page,
    .shell {
        max-width: 100vw;
    }

    .modal-panel,
    .modal-panel.wide,
    .image-modal-panel {
        width: 96vw !important;
        max-height: 88vh;
    }

    .modal-panel form.form-grid,
    .live-toolbar {
        grid-template-columns: 1fr;
    }

    .share-preview-frame {
        width: 92vw;
        height: 72vh;
    }

    .live-a5-sheet.live-a5-new {
        transform: scale(.78);
        margin-bottom: -42mm;
    }

    .live-machine-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .live-machine-card {
        min-height: 132px;
        padding: 12px;
    }
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.order-table-wide {
    min-width: 1280px;
}

.order-table-wide th,
.order-table-wide td,
.nowrap {
    white-space: nowrap;
}

.order-table-wide td:nth-child(5) {
    white-space: normal;
    min-width: 240px;
}

.quote-order-row td,
.quote-order-row code,
.quote-order-row .badge {
    white-space: nowrap;
}

.quote-order-row + .quote-detail-row td {
    white-space: normal;
}

.quote-history-panel table,
.quote-orders-panel table {
    min-width: 1180px;
}

.assembly-list-panel .table-actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.assembly-list-panel .table-actions select {
    min-width: 92px;
}

.transfer-request-list {
    display: grid;
    gap: 10px;
}

.transfer-request-card {
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    border: 1px solid rgba(0, 125, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
}

.assembly-form-photo {
    width: min(100%, 680px);
    max-height: 420px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-grid .wide-field,
.detail-grid img {
    grid-column: 1 / -1;
}

.permission-group-title {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(0, 125, 255, 0.14), rgba(19, 194, 194, 0.08));
    color: #0f3d75;
    font-weight: 900;
}

.badge.working,
.badge.assembly_working {
    background: #dcfce7;
    color: #166534;
}

.badge.reviewed,
.badge.assembly_done {
    background: #d1fae5;
    color: #047857;
}

@media (max-width: 720px) {
    .order-table-wide {
        min-width: 980px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* v4.1 visual repair: one coherent management-system skin */
:root {
    --bg: #f3f6f8;
    --panel: #ffffff;
    --text: #16202b;
    --muted: #667085;
    --line: #dde5ec;
    --primary: #146c78;
    --primary-strong: #0d4e59;
    --primary-soft: #e7f4f6;
    --green: #217a52;
    --green-soft: #eaf7f0;
    --red: #ba3326;
    --red-soft: #fff0ed;
    --amber: #a15c00;
    --amber-soft: #fff5dd;
    --violet: #6256a8;
    --violet-soft: #f0edff;
    --radius: 10px;
}

body {
    background:
        radial-gradient(circle at top left, rgba(20, 108, 120, 0.10), transparent 32rem),
        linear-gradient(180deg, #f8fafb 0%, var(--bg) 42%);
    color: var(--text);
    font-size: 14px;
}

.app-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(221, 229, 236, 0.9);
    box-shadow: 0 8px 24px rgba(19, 42, 52, 0.07);
}

.app-header .topbar {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 10px;
}

.brand {
    color: #132a34;
    font-size: 17px;
}

.brand-logo {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 0;
    object-fit: contain;
}

.about-logo {
    display: block;
    width: 220px;
    height: auto;
    border-radius: 0;
    object-fit: contain;
}

.global-search input {
    min-height: 42px;
    border: 1px solid #d6e0e8;
    border-radius: 12px;
    background: #f8fbfc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.global-search input:focus {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(20, 108, 120, 0.12);
}

.userbar {
    gap: 8px;
}

.userbar a,
.userbar span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    color: #425466;
    background: #f7fafb;
}

.module-nav,
.sub-nav {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    scrollbar-width: thin;
}

.module-nav {
    padding-bottom: 8px;
}

.module-link {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #516170;
    background: transparent;
}

.module-link:hover {
    background: #f4f8fa;
    color: var(--primary-strong);
}

.module-link.active {
    border-color: rgba(20, 108, 120, 0.18);
    background: #102a33;
    color: #fff;
    box-shadow: 0 8px 18px rgba(16, 42, 51, 0.14);
}

.module-task-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.28);
}

.sub-nav {
    gap: 6px;
    padding-bottom: 14px;
}

.nav-link {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    color: #667085;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.shell {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 56px;
}

.page-head {
    align-items: center;
    min-height: 48px;
}

.page-head h1 {
    font-size: 26px;
    font-weight: 850;
}

.eyebrow {
    color: var(--primary);
    letter-spacing: 0;
}

.panel,
.metric,
.request-card,
.auth-panel {
    border: 1px solid rgba(215, 225, 233, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 28px rgba(30, 50, 62, 0.06);
}

.panel {
    padding: 20px;
}

.metrics {
    gap: 12px;
}

.metric {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.metric::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), #f0a429);
}

.metric span {
    color: #647383;
    font-weight: 700;
}

.metric strong {
    color: #132a34;
    font-size: 26px;
    font-weight: 850;
}

.system-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.system-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(215, 225, 233, 0.95);
    background: linear-gradient(135deg, #fff, #f8fbfc);
    box-shadow: 0 8px 20px rgba(30, 50, 62, 0.05);
}

.system-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -30px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(20, 108, 120, 0.08);
}

.system-card strong {
    color: #132a34;
    font-size: 17px;
}

.system-card span {
    line-height: 1.55;
}

.system-card:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 108, 120, 0.25);
    box-shadow: 0 14px 28px rgba(30, 50, 62, 0.10);
}

.btn {
    min-height: 38px;
    border-radius: 9px;
    border-color: #cfdae3;
    background: #fff;
    color: #334451;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
}

.btn:hover {
    background: #f8fbfc;
}

.btn.primary {
    border-color: var(--primary);
    background: linear-gradient(180deg, #1d7f8c, var(--primary));
    color: #fff;
    box-shadow: 0 8px 18px rgba(20, 108, 120, 0.22);
}

.btn.small {
    min-height: 30px;
    border-radius: 8px;
}

input,
select,
textarea {
    min-height: 40px;
    border-color: #d2dee7;
    border-radius: 9px;
    background: #fff;
}

textarea {
    min-height: 86px;
}

label {
    color: #3d4d5c;
    font-size: 13px;
}

.filter-bar {
    align-items: end;
    padding: 2px;
}

.filter-bar label {
    min-width: 190px;
}

table {
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    background: #f6f9fb;
    color: #536473;
    font-size: 12px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #edf2f5;
}

tbody tr:hover td {
    background: #fbfdfe;
}

code {
    border: 1px solid #dde6ec;
    background: #f5f8fa;
    color: #20313d;
}

.badge {
    min-height: 24px;
    border-radius: 999px;
    font-weight: 850;
}

.modal-panel {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.modal-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f5;
}

.toast-stack {
    top: 16px;
}

.toast {
    border-radius: 12px;
}

.about-hero {
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(231, 244, 246, 0.95), rgba(255, 247, 230, 0.95)),
        #fff;
}

@media (max-width: 900px) {
    .app-header .topbar,
    .module-nav,
    .sub-nav,
    .shell {
        width: calc(100% - 20px);
    }

    .app-header .topbar {
        padding-top: 10px;
    }

    .brand {
        font-size: 16px;
    }

    .global-search input {
        min-height: 40px;
    }

    .module-link,
    .nav-link {
        min-height: 36px;
    }

    .shell {
        margin-top: 16px;
    }

    .page-head {
        gap: 10px;
        margin-bottom: 12px;
    }

    .page-head h1 {
        font-size: 22px;
    }

    .panel,
    .metric,
    .request-card {
        padding: 14px;
        border-radius: 12px;
    }

    .metrics,
    .system-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .metric strong {
        font-size: 22px;
    }

    .system-card {
        min-height: 98px;
        padding: 14px;
    }

    .filter-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filter-bar label {
        min-width: 0;
    }

    .table-actions,
    .inline-actions,
    .inline-form {
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 13px;
    }

    .app-header .topbar,
    .module-nav,
    .sub-nav,
    .shell {
        width: calc(100% - 16px);
    }

    .userbar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .userbar a,
    .userbar span {
        justify-content: center;
        padding: 0 8px;
    }

    .metrics,
    .system-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        overflow-x: auto;
    }

    table {
        min-width: 680px;
    }
}

.quote-panel {
    width: min(1180px, calc(100% - 28px));
}

.quote-meta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

.quote-no {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbfc;
}

.quote-sheet-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.quote-sheet {
    min-width: 1060px;
    border-collapse: separate;
    border-spacing: 0;
}

.quote-sheet th {
    background: #edf5f7;
    color: #36515b;
}

.quote-sheet td {
    padding: 6px;
}

.quote-sheet input,
.quote-sheet select {
    min-height: 34px;
    border-radius: 6px;
    padding: 5px 7px;
}

.quote-sheet td:first-child {
    width: 46px;
    text-align: center;
    color: var(--muted);
    background: #f7fafb;
    font-weight: 800;
}

.quote-profit-line {
    display: inline-block;
    min-width: 80px;
    color: var(--green);
}

.quote-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fbfc, #fff);
}

.quote-summary span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--muted);
}

.quote-summary strong {
    color: #132a34;
    font-size: 18px;
}

@media (max-width: 900px) {
    .quote-meta {
        grid-template-columns: 1fr;
    }
    .quote-panel {
        width: 100%;
    }
}

/* PC quote sheet: fixed Excel-like DIY table */
.quote-panel {
    width: 100%;
}

.quote-form {
    display: grid;
    gap: 14px;
}

.quote-inline-panel {
    padding: 16px;
    overflow: visible;
}

.quote-form .quote-meta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
}

.quote-form .quote-meta label {
    display: grid;
    gap: 6px;
    color: #53616a;
    font-size: 13px;
    font-weight: 700;
}

.quote-no {
    justify-self: start;
    border-radius: 6px;
    border-color: #d8c5ff;
    background: #fbf8ff;
    color: #5a31a2;
}

.quote-sheet-wrap {
    width: min(920px, 100%);
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: 0 16px 40px rgba(91, 45, 170, 0.14);
    overflow-x: auto;
}

.quote-sheet {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
    border: 4px solid #ad72f4;
}

.quote-col-category {
    width: 12.2%;
}

.quote-col-name {
    width: 65.8%;
}

.quote-col-qty {
    width: 8.4%;
}

.quote-col-price {
    width: 13.6%;
}

.quote-sheet th,
.quote-sheet td {
    border: 1px solid #e4e4e4;
    padding: 0;
    height: 40px;
}

.quote-sheet thead th {
    background: #ad72f4;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.quote-title-row th {
    height: 58px;
}

.quote-title-row input {
    width: 100%;
    height: 52px;
    border: 0;
    background: transparent;
    color: #ffffff;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
}

.quote-title-row input::placeholder {
    color: rgba(255, 255, 255, 0.84);
}

.quote-title-row span,
.quote-title-row small {
    display: block;
    color: #ffffff;
}

.quote-title-row small {
    margin-top: 6px;
    font-size: 16px;
}

.quote-notice-row th {
    height: 38px;
    background: #ffffff;
    color: #1d2026;
}

.quote-notice-row span {
    display: inline-block;
    margin-right: 18px;
    color: #222833;
}

.quote-notice-row input {
    width: min(980px, 78%);
    border: 0;
    background: transparent;
    color: #222833;
    font-size: 16px;
    font-weight: 700;
}

.quote-config-row th,
.quote-note-row th,
.quote-summary-row th {
    background: #ad72f4;
    color: #ffffff;
    letter-spacing: 0;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
}

.quote-config-row td,
.quote-note-row td {
    background: #ffffff;
}

.quote-summary-row th,
.quote-summary-row td,
.quote-summary-row.slim td {
    background: #ad72f4;
    color: #ffffff;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
}

.quote-sheet input {
    width: 100%;
    height: 38px;
    min-height: 38px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #1f2933;
    font-size: 16px;
    text-align: center;
}

.quote-sheet input:focus {
    outline: 2px solid #ffc857;
    outline-offset: -2px;
}

.quote-config-row td:nth-child(2) {
    position: relative;
    padding: 0 14px;
}

.quote-config-row .quote-name {
    height: 38px;
    text-align: left;
    background: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.quote-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 10px;
    z-index: 30;
    width: min(100%, 690px);
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid #d7dce2;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.quote-suggestions::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 180px;
    width: 14px;
    height: 14px;
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid #d7dce2;
    border-top: 1px solid #d7dce2;
    background: #ffffff;
}

.quote-suggestion {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    background: #ffffff;
    padding: 0 22px;
    color: #343a40;
    text-align: left;
    font-size: 17px;
    cursor: pointer;
}

.quote-suggestion[hidden],
.quote-suggestions[hidden] {
    display: none !important;
}

.quote-suggestion-name {
    flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    max-height: 2.7em;
    overflow: hidden;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.quote-suggestion-price {
    flex: 0 0 96px;
    margin-left: auto;
    white-space: nowrap;
    text-align: right;
    align-self: center;
}

.quote-suggestion:hover,
.quote-suggestion:focus,
.quote-suggestion.active {
    background: #f7f3ff;
}

.quote-suggestion mark {
    background: transparent;
    color: #ff1616;
}

.quote-suggestion span {
    color: #6b7280;
    font-size: 14px;
}

.quote-suggestion-price {
    color: #6b7280;
    font-size: 15px;
}

.quote-suggestion-erp {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.quote-suggestion-erp.linked {
    color: #059669;
}

.quote-suggestion-erp.unlinked,
.quote-suggestion-erp.confirm_required {
    color: #b45309;
}

.quote-suggestion-erp.abnormal,
.quote-suggestion-erp.need_purchase {
    color: #dc2626;
}

.quote-suggestion-erp.no_need {
    color: #475569;
}

.quote-summary-row input,
.quote-summary-row strong {
    display: block;
    width: 100%;
    height: 44px;
    line-height: 44px;
    background: #ad72f4;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.quote-summary-row input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.quote-actions {
    display: flex;
    flex-wrap: wrap;
    width: min(920px, 100%);
    margin: 0 auto;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.quote-actions .btn {
    min-width: 104px;
}

.quote-actions .ghost {
    background: #ad72f4;
    border-color: #ad72f4;
    color: #ffffff;
}

.quote-actions .ghost strong {
    margin-left: 4px;
}

@media (max-width: 900px) {
    .quote-form .quote-meta {
        grid-template-columns: 1fr;
    }

    .quote-sheet {
        min-width: 920px;
    }

    .quote-title-row input {
        font-size: 22px;
    }
}

.share-quote-page {
    min-height: 100vh;
    background: #ffffff;
    color: #20242a;
}

.share-quote-shell {
    width: min(940px, calc(100% - 24px));
    margin: 28px auto;
}

.share-quote-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.share-quote-head div {
    display: grid;
    gap: 4px;
}

.share-quote-head strong {
    color: #5f35ad;
}

.share-quote-head span {
    color: #65727c;
}

.share-quote-sheet {
    width: 940px;
    min-width: 940px;
}

.share-quote-sheet .quote-wire-row th:first-child,
.share-quote-sheet .quote-wire-row th:first-child strong {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}

.share-quote-sheet .quote-title-row th span {
    display: block;
    color: #fff;
    font-size: 24px;
}

.share-quote-sheet .quote-notice-row strong {
    color: #222833;
    font-size: 16px;
}

.share-quote-sheet td {
    padding: 0 6px;
    font-size: inherit;
    font-weight: inherit;
}

.share-quote-sheet .quote-config-row td:nth-child(2),
.share-quote-sheet .quote-note-row td,
.share-quote-sheet .quote-summary-row td:nth-child(2) {
    text-align: left;
}

@media (max-width: 520px) {
    .shell {
        width: min(100% - 20px, 1180px);
        margin-top: 18px;
    }

    .auth-panel,
    .panel,
    .metric,
    .request-card {
        padding: 16px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .inline-actions {
        display: grid;
        width: 100%;
    }
}

/* v4 visual refresh */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 79, 102, 0.08);
    backdrop-filter: blur(10px);
}

.app-header .topbar {
    position: static;
    grid-template-columns: max-content minmax(240px, 1fr) max-content;
    border-bottom: 0;
    box-shadow: none;
    padding-bottom: 8px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.about-logo {
    display: block;
    width: 240px;
    height: auto;
    object-fit: contain;
}

.global-search input {
    min-height: 38px;
    border-radius: 999px;
    background: #f8fbfd;
}

.module-nav,
.sub-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 28px 10px;
}

.module-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: #475467;
    font-weight: 800;
    white-space: nowrap;
}

.module-link.active {
    background: #17202a;
    color: #fff;
}

.sub-nav {
    padding-top: 0;
    padding-bottom: 12px;
}

.toast-stack {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 100;
    display: grid;
    gap: 10px;
    width: min(460px, calc(100% - 24px));
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    margin: 0;
    box-shadow: 0 14px 36px rgba(17, 24, 39, 0.16);
    animation: toast-in 0.22s ease-out;
}

.toast.leaving {
    opacity: 0;
    transform: translateY(-8px);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.status-tabs a {
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475467;
    font-weight: 700;
    white-space: nowrap;
}

.status-tabs a.active {
    border-color: var(--primary);
    background: var(--blue-soft);
    color: var(--primary-strong);
}

.modal[hidden],
.print-sheet {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.modal-panel {
    position: relative;
    width: min(620px, calc(100% - 28px));
    max-height: calc(100vh - 44px);
    margin: 22px auto;
    overflow: auto;
    padding: 22px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.modal-panel.wide {
    width: min(980px, calc(100% - 28px));
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-head h2 {
    margin: 0;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px 14px;
}

.mini-qr {
    width: 72px;
    height: 72px;
}

.permission-grid,
.component-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.check-card input {
    width: auto;
    min-height: auto;
}

.about-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e7f2f6, #fff7e6);
    border: 1px solid var(--line);
}

.about-logo {
    width: min(260px, 42vw);
    height: auto;
}

.timeline {
    line-height: 1.9;
}

.badge.accepted,
.badge.shooting,
.badge.editing,
.badge.review {
    background: var(--blue-soft);
    color: var(--primary-strong);
}

.badge.reviewed,
.badge.published {
    background: var(--green-soft);
    color: var(--green);
}

@media print {
    body * {
        visibility: hidden;
    }
    .print-sheet.active,
    .print-sheet.active *,
    body.printing-quote .quote-inline-panel,
    body.printing-quote .quote-inline-panel *,
    body.share-quote-page .share-quote-shell,
    body.share-quote-page .share-quote-shell * {
        visibility: visible;
    }
    .print-sheet.active {
        display: block;
        position: absolute;
        inset: 0 auto auto 0;
    }
    body.printing-quote .quote-inline-panel {
        position: absolute;
        inset: 0;
        width: 100%;
        padding: 0;
        border: 0;
        box-shadow: none;
    }
    body.printing-quote .quote-meta,
    body.printing-quote .quote-actions,
    body.printing-quote .panel-title,
    body.printing-quote .quote-suggestions {
        display: none !important;
    }
    body.printing-quote .quote-sheet-wrap {
        overflow: visible;
        box-shadow: none;
    }
    body.printing-quote .quote-sheet {
        min-width: 0;
        page: quotePage;
    }
    body.share-quote-page .share-quote-shell {
        position: absolute;
        inset: 0;
        width: 100%;
        margin: 0;
    }
    body.share-quote-page .share-quote-head {
        display: none;
    }
    body.share-quote-page .share-quote-sheet {
        width: 100%;
    }
    .print-label {
        display: grid;
        grid-template-columns: 1.65cm 1fr;
        gap: 0.12cm;
        width: 6cm;
        height: 4cm;
        padding: 0.22cm;
        page-break-after: always;
        border: 1px solid #111;
        font-size: 10px;
        page: labelPage;
    }
    .print-label img {
        width: 1.55cm;
        height: 1.55cm;
    }
    .print-label strong,
    .print-label span,
    .print-label small {
        display: block;
        word-break: break-all;
    }
    @page labelPage {
        size: 6cm 4cm;
        margin: 0;
    }
    @page quotePage {
        size: A4 landscape;
        margin: 8mm;
    }
}

@media (max-width: 900px) {
    .app-header .topbar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .module-nav,
    .sub-nav {
        padding-left: 12px;
        padding-right: 12px;
    }
    .global-search {
        order: 3;
    }
    .modal-panel {
        width: 100%;
        min-height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    .print-only-pc {
        display: none;
    }
    table {
        min-width: 760px;
    }
}

/* v4.2.6 logo-color theme refresh */
:root {
    --bg: #eef7ff;
    --panel: rgba(255, 255, 255, 0.96);
    --text: #102033;
    --muted: #607187;
    --line: #cfe0ee;
    --primary: #075eea;
    --primary-strong: #053b99;
    --primary-soft: #e4f2ff;
    --cyan: #06c9df;
    --cyan-soft: #dcfbff;
    --accent: #ffad2f;
    --accent-soft: #fff2d8;
    --green: #0d9067;
    --green-soft: #ddf8ef;
    --red: #d73528;
    --red-soft: #fff0ee;
    --violet: #7157ff;
    --violet-soft: #f0edff;
    --radius: 12px;
}

body {
    background:
        linear-gradient(180deg, rgba(232, 248, 255, 0.98) 0%, #f6fbff 34%, #edf5ff 100%);
    color: var(--text);
}

a,
button,
.btn,
.module-link,
.nav-link,
.system-card,
.metric,
.panel,
input,
select,
textarea {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.app-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(7, 94, 234, 0.12);
    box-shadow: 0 14px 36px rgba(5, 59, 153, 0.10);
}

.brand {
    color: #082653;
    font-weight: 900;
}

.brand-logo {
    filter: drop-shadow(0 6px 12px rgba(7, 94, 234, 0.18));
}

.global-search input {
    border: 1px solid rgba(7, 94, 234, 0.16);
    background: #f4fbff;
}

.global-search input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(6, 201, 223, 0.85);
    box-shadow: 0 0 0 4px rgba(6, 201, 223, 0.16);
}

.userbar a,
.userbar span {
    background: #eef8ff;
    color: #16456f;
}

.userbar a:hover {
    background: #dff6ff;
    color: var(--primary-strong);
    transform: translateY(-1px);
}

.module-link {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.54);
    color: #34516f;
}

.module-link:hover {
    border-color: rgba(6, 201, 223, 0.32);
    background: #e8fbff;
    color: #064cae;
    transform: translateY(-1px);
}

.module-link.active {
    border-color: rgba(255, 255, 255, 0.58);
    background: linear-gradient(135deg, #075eea 0%, #06c9df 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(7, 94, 234, 0.24);
}

.nav-link {
    color: #53657a;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #e2f5ff, #f4fbff);
    color: var(--primary-strong);
    box-shadow: inset 0 0 0 1px rgba(7, 94, 234, 0.13);
}

.shell {
    animation: page-rise 0.28s ease-out;
}

@keyframes page-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-head {
    padding: 4px 2px;
}

.page-head h1 {
    color: #0b2b56;
    letter-spacing: 0;
}

.eyebrow {
    color: var(--primary);
}

.panel,
.metric,
.request-card,
.auth-panel {
    border-color: rgba(7, 94, 234, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(5, 59, 153, 0.08);
}

.panel:hover,
.metric:hover,
.request-card:hover {
    border-color: rgba(6, 201, 223, 0.28);
    box-shadow: 0 20px 42px rgba(5, 59, 153, 0.11);
}

.metric {
    position: relative;
    overflow: hidden;
}

.metric::before {
    background: linear-gradient(90deg, #075eea, #06c9df, #ffad2f);
}

.metric strong {
    color: #063a88;
}

.system-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(7, 94, 234, 0.12);
    background: linear-gradient(135deg, #ffffff 0%, #edf9ff 100%);
}

.system-card:hover {
    transform: translateY(-3px);
    border-color: rgba(6, 201, 223, 0.34);
    box-shadow: 0 18px 36px rgba(7, 94, 234, 0.12);
}

.system-card::after {
    background: linear-gradient(135deg, rgba(7, 94, 234, 0.14), rgba(6, 201, 223, 0.08));
}

.system-card.accent-a { background: linear-gradient(135deg, #e2fff3, #ffffff); }
.system-card.accent-b { background: linear-gradient(135deg, #e2f5ff, #ffffff); }
.system-card.accent-c { background: linear-gradient(135deg, #fff2d8, #ffffff); }
.system-card.accent-d { background: linear-gradient(135deg, #f0edff, #ffffff); }
.system-card.accent-e { background: linear-gradient(135deg, #fff0ee, #ffffff); }

.btn {
    border-color: rgba(7, 94, 234, 0.18);
    background: #ffffff;
    color: #123d6a;
}

.btn:hover {
    border-color: rgba(6, 201, 223, 0.54);
    background: #ecfbff;
    color: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(7, 94, 234, 0.12);
}

.btn.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #075eea 0%, #06c9df 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(7, 94, 234, 0.20);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #064fd0 0%, #00b9d3 100%);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #edf8ff;
    color: #244766;
}

tbody tr:hover td {
    background: #f5fcff;
}

.badge.pending,
.badge.draft,
.badge.planning {
    background: var(--accent-soft);
    color: #9a5b00;
}

.badge.approved,
.badge.accepted,
.badge.shooting,
.badge.editing,
.badge.review {
    background: var(--cyan-soft);
    color: #066174;
}

.badge.completed,
.badge.paid,
.badge.reviewed,
.badge.published {
    background: var(--green-soft);
    color: var(--green);
}

.toast {
    border-color: rgba(7, 94, 234, 0.14);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.modal-mask {
    background: rgba(6, 24, 49, 0.50);
    backdrop-filter: blur(4px);
}

.modal-panel {
    border: 1px solid rgba(7, 94, 234, 0.16);
    box-shadow: 0 26px 90px rgba(5, 59, 153, 0.25);
}

.install-page {
    background:
        linear-gradient(135deg, #eaf8ff 0%, #f6fbff 48%, #eef4ff 100%);
}

.auth-panel {
    border-color: rgba(7, 94, 234, 0.15);
}

.about-hero {
    border-color: rgba(7, 94, 234, 0.14);
    background: linear-gradient(135deg, #e6f8ff, #ffffff 58%, #fff4dc);
}

.quote-panel,
.quote-inline-panel {
    background: rgba(255, 255, 255, 0.96);
}

.quote-sheet {
    border-color: #1684ff;
}

.quote-sheet thead th,
.quote-config-row th,
.quote-note-row th,
.quote-summary-row th,
.quote-summary-row td,
.quote-summary-row.slim td,
.quote-summary-row input,
.quote-summary-row strong {
    background: linear-gradient(135deg, #1268f3 0%, #14c9df 100%);
}

.quote-suggestion mark {
    color: #ff2e2e;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 900px) {
    body {
        background: #f3f9ff;
        font-size: 15px;
    }

    .app-header {
        position: sticky;
        top: 0;
    }

    .app-header .topbar {
        width: calc(100% - 20px);
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 10px 0 8px;
    }

    .brand {
        min-width: 0;
        font-size: 16px;
    }

    .brand span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
        flex: 0 0 auto;
    }

    .global-search {
        grid-column: 1 / -1;
        order: 3;
    }

    .global-search input {
        min-height: 44px;
        font-size: 15px;
    }

    .userbar {
        justify-content: flex-end;
        gap: 6px;
    }

    .userbar a {
        min-height: 38px;
        padding: 0 10px;
    }

    .userbar a:first-child {
        display: none;
    }

    .module-nav,
    .sub-nav {
        width: 100%;
        gap: 8px;
        padding: 0 10px 8px;
        scroll-snap-type: x proximity;
    }

    .module-link,
    .nav-link {
        min-height: 42px;
        padding: 0 14px;
        scroll-snap-align: start;
    }

    .shell {
        width: calc(100% - 18px);
        margin-top: 14px;
        margin-bottom: 84px;
    }

    .page-head {
        gap: 10px;
        margin-bottom: 12px;
    }

    .page-head h1 {
        font-size: 23px;
    }

    .page-actions,
    .quick-actions,
    .table-actions,
    .inline-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 8px;
    }

    .btn,
    button,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .btn.small {
        min-height: 40px;
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .metric {
        padding: 14px;
    }

    .metric strong {
        font-size: 24px;
    }

    .system-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .system-card {
        min-height: 82px;
        padding: 14px;
    }

    .panel,
    .auth-panel,
    .request-card {
        padding: 14px;
        border-radius: 14px;
    }

    .panel-title {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filter-bar label,
    .inline-form input {
        min-width: 0;
        width: 100%;
    }

    .quote-sheet-wrap {
        width: 100%;
    }

    .quote-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .metrics {
        grid-template-columns: 1fr;
    }

    .page-actions,
    .quick-actions,
    .table-actions,
    .inline-actions,
    .quote-actions {
        grid-template-columns: 1fr;
    }

    .auth-logo {
        width: min(280px, 92%);
    }

    .about-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .about-logo {
        width: min(260px, 100%);
    }
}

/* v4.2.6 quote remake: black-header computer build sheet */
.quote-inline-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-top: 4px;
}

.quote-inline-panel:hover {
    border-color: transparent;
    box-shadow: none;
}

.quote-inline-panel .panel-title,
.quote-no {
    width: min(1710px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.quote-form .quote-meta {
    width: min(940px, 100%);
    margin-left: calc((100% - min(1710px, 100%)) / 2 + 210px);
    margin-right: auto;
    grid-template-columns: 1.5fr 0.8fr 0.8fr;
}

.quote-editor-head {
    align-items: end;
    margin-bottom: 8px;
    padding-top: 0;
    padding-bottom: 0;
}

.quote-editor-head h1 {
    font-size: 26px;
}

.quote-editor-head .page-actions {
    transform: translateX(-180px);
    gap: 18px;
}

.page-actions {
    gap: 14px;
}

.btn.exit-edit,
.btn.danger.exit-edit {
    border-color: #fecaca;
    background: linear-gradient(135deg, #ef4444, #fb7185);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.quote-head-no {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-left: 14px;
    padding: 0 12px;
    border: 1px solid #c7d8ec;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #0b63ce;
    font-size: 18px;
    vertical-align: middle;
}

.quote-inline-panel .panel-title {
    width: min(1320px, 100%);
    margin-bottom: 8px;
    transform: translateX(-92px);
}

.quote-inline-panel .panel-title h2 {
    font-size: 18px;
}

.quote-inline-panel .panel-title .btn {
    min-height: 30px;
}

.quote-form {
    gap: 8px;
}

.quote-form .quote-meta {
    width: min(850px, 100%);
    margin-left: calc((100% - min(1600px, 100%)) / 2 + 40px);
    grid-template-columns: 1.45fr 0.78fr 0.78fr;
    gap: 8px;
}

.quote-form .quote-meta label {
    gap: 4px;
}

.quote-form .quote-meta input {
    min-height: 36px;
    padding: 7px 10px;
}

.quote-no {
    width: min(850px, 100%);
    margin-left: calc((100% - min(1600px, 100%)) / 2 + 190px);
    margin-right: auto;
    padding: 7px 10px;
}

.quote-builder-layout {
    display: grid;
    grid-template-columns: 170px 940px 430px;
    align-items: start;
    justify-content: center;
    gap: 26px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    transform: translateX(-145px);
}

.quote-left-tools {
    display: grid;
    gap: 28px;
    align-self: start;
    /* 左移让出配置单左侧空白，避免挡住“更新/新增”悬浮按钮 */
    position: relative;
    left: -84px;
}

.quote-template-panel {
    align-self: start;
    padding: 12px;
    border: 1px solid #d7e0eb;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(20, 36, 56, 0.08);
}

.quote-template-title {
    margin-bottom: 10px;
    color: #142338;
    font-weight: 900;
}

.quote-template-panel label {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
    color: #526071;
    font-size: 12px;
    font-weight: 700;
}

.quote-template-panel input,
.quote-template-panel select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #d7e0eb;
    border-radius: 6px;
    padding: 0 8px;
}

.quote-version-launch {
    justify-self: center;
    min-width: 150px;
    min-height: 44px;
    border: 2px solid #fb7185;
    background: #fff1f2;
    color: #ef4444;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.12);
}

.quote-readonly .quote-builder-layout {
    grid-template-columns: 940px;
}

.quote-remake-wrap {
    width: min(940px, 100%);
    margin: 0;
    overflow: visible;
    box-shadow: none;
}

.quote-sheet.quote-remake {
    width: 100%;
    min-width: 940px;
    border: 2px solid #252a30;
    border-collapse: collapse;
    table-layout: fixed;
    background: rgba(255, 255, 255, 0.92);
    font-family: "Microsoft YaHei", "SimSun", "PingFang SC", serif;
}

.quote-remake .quote-col-category { width: 13%; }
.quote-remake .quote-col-name { width: 50%; }
.quote-remake .quote-col-price { width: 14%; }
.quote-remake .quote-col-qty { width: 8%; }
.quote-remake .quote-col-subtotal { width: 15%; }

.quote-remake.quote-pro .quote-col-category { width: 13%; }
.quote-remake.quote-pro .quote-col-name { width: 50%; }
.quote-remake.quote-pro .quote-col-price { width: 14%; }
.quote-remake.quote-pro .quote-col-qty { width: 8%; }
.quote-remake.quote-pro .quote-col-subtotal { width: 15%; }

.quote-remake th,
.quote-remake td {
    height: 38px;
    padding: 0 6px;
    border: 1.5px solid #252a30;
    color: #050505;
    background: rgba(255, 255, 255, 0.92);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    vertical-align: middle;
}

.quote-remake input {
    width: 100%;
    height: 36px;
    min-height: 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #050505;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    text-align: center;
    outline: none;
    letter-spacing: 0;
    word-spacing: 0;
}

.quote-remake .quote-shop-row th {
    height: 54px;
    background: #343a40;
}

.quote-remake .quote-shop-row input,
.quote-remake .quote-shop-row span {
    display: block;
    width: 100%;
    height: 50px;
    color: var(--quote-headline-color, #ffffff);
    font-size: 28px;
    font-weight: 900;
    line-height: 50px;
    letter-spacing: 1px;
    opacity: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    -webkit-text-fill-color: var(--quote-headline-color, #ffffff);
}

.quote-remake .quote-wire-row th {
    height: 36px;
    background: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.quote-remake .quote-wire-row th:first-child input {
    color: var(--quote-notice-color, #111111);
    font-size: 22px;
    font-weight: 900;
}

.quote-remake .quote-wire-row th:first-child input::selection,
.quote-remake .quote-wire-row th:first-child input {
    text-shadow: none;
}

.quote-remake .quote-wire-row th:first-child {
    color: var(--quote-notice-color, #111111);
}

.quote-remake .red,
.quote-platform-row strong,
.quote-pay-row .red {
    color: #f04545;
}

.quote-remake .quote-wire-row th:last-child span {
    display: block !important;
    width: 100%;
    color: #050505 !important;
    font-size: 22px;
    font-weight: 500;
    line-height: 36px;
    text-align: center;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-text-fill-color: #050505;
}

.quote-remake .quote-request-row th,
.quote-remake .quote-request-row td {
    height: 38px;
    background: #fff25a;
    color: #050505;
    font-size: 22px;
}

.quote-remake .quote-request-row th:first-child,
.quote-remake .quote-request-label {
    background: #ffffff;
    color: #050505;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

.quote-remake .quote-request-row td {
    background: #ffffff;
    color: #050505;
    font-size: 22px;
    letter-spacing: 1px;
}

.quote-remake .quote-request-row th:nth-child(2) input {
    text-align: left;
    padding-left: 14px;
}

.quote-remake .quote-column-row th {
    height: 36px;
    background: #ffffff;
    color: #050505;
    font-size: 24px;
    font-weight: 500;
    line-height: 36px;
    opacity: 1;
    -webkit-text-fill-color: #050505;
}

.quote-remake .quote-config-row th {
    background: #ffffff;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0;
}

.quote-remake .quote-config-row td {
    background: rgba(250, 251, 252, 0.9);
}

.quote-remake .quote-config-row td:nth-child(3),
.quote-remake .quote-config-row td:nth-child(5) {
    position: relative;
}

.quote-remake .quote-config-row.has-price td:nth-child(3):not(.quote-price-cell)::before {
    content: "￥";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #050505;
    font-family: Consolas, "Courier New", monospace;
    font-size: 21px;
    font-weight: 900;
    pointer-events: none;
}

.quote-remake .quote-config-row.has-subtotal td:last-child:not(.quote-subtotal-cell)::before {
    content: "￥";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #050505;
    font-family: Consolas, "Courier New", monospace;
    font-size: 21px;
    font-weight: 900;
    pointer-events: none;
}

.quote-remake .quote-config-row td:nth-child(2) {
    position: relative;
    padding: 0 26px 0 10px;
}

.quote-remake .quote-name {
    height: 36px;
    color: #050505;
    background: transparent;
    font-family: Consolas, "Courier New", "Microsoft YaHei", monospace;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0;
}

.quote-remake .quote-config-row td:nth-child(2)::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 0;
    height: 0;
    transform: translateY(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #9099a3;
    pointer-events: none;
}

.quote-remake.quote-pro {
    border-color: #0e1116;
}

.quote-remake.quote-pro th,
.quote-remake.quote-pro td {
    border-color: #0e1116;
}

.quote-pro .quote-shop-row th {
    height: 44px;
    background: #20262d;
}

.quote-pro .quote-pro-shop-row th {
    padding: 0 18px;
}

.quote-pro .quote-pro-shop-row th,
.quote-pro .quote-pro-shop-row span {
    color: #ffffff;
    font-size: 27px;
    font-weight: 900;
    line-height: 44px;
    letter-spacing: 1px;
    -webkit-text-fill-color: currentColor;
}

.quote-pro .quote-pro-shop-row input {
    height: 44px;
    min-height: 44px;
    color: #ffffff;
    font-size: 27px;
    font-weight: 900;
    line-height: 44px;
    text-align: center;
    white-space: nowrap;
    -webkit-text-fill-color: #ffffff;
}

.quote-pro .quote-pro-wire-row th {
    height: 32px;
    background: #ffffff;
}

.quote-pro .quote-pro-wire-row th:first-child input,
.quote-pro .quote-pro-wire-row th:first-child span,
.quote-pro .quote-pro-wire-row th:first-child strong {
    color: var(--quote-notice-color, #ef4444);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    -webkit-text-fill-color: var(--quote-notice-color, #ef4444);
}

.quote-pro .quote-pro-wire-row .quote-time-title,
.quote-pro .quote-pro-wire-row th:nth-child(2),
.quote-pro .quote-pro-wire-row th:nth-child(3) {
    color: #050505;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.quote-pro .quote-pro-request-row th,
.quote-pro .quote-pro-request-row td {
    height: 34px;
}

.quote-pro .quote-pro-request-row th:nth-child(2) {
    background: #fff45c;
}

.quote-pro .quote-pro-request-row th:nth-child(2) input {
    text-align: left;
    padding-left: 18px;
}

.quote-pro .quote-pro-request-row td {
    color: #050505;
    font-size: 18px;
    font-weight: 900;
    background: #ffffff;
    white-space: nowrap;
}

.quote-pro .quote-pro-request-row td strong {
    color: #ef4444;
    margin-right: 6px;
    -webkit-text-fill-color: #ef4444;
}

.quote-pro .quote-pro-request-row td span {
    display: inline;
    white-space: nowrap;
}

.quote-pro .quote-config-row th {
    font-family: "Microsoft YaHei", "SimSun", serif;
    font-size: 24px;
    letter-spacing: 0;
}

.quote-pro .quote-config-row th,
.quote-pro .quote-config-row td {
    height: 30px;
}

.quote-pro .quote-config-row td:nth-child(2) {
    background: rgba(250, 251, 252, 0.86);
    font-size: 23px;
    font-weight: 800;
}

.quote-pro .quote-name {
    height: 29px;
    min-height: 29px;
    font-size: 23px;
    font-weight: 800;
}

.quote-pro .quote-config-row .quote-qty,
.quote-pro .quote-config-row td:nth-child(4) input {
    font-size: 22px;
    font-weight: 900;
}

.quote-pro .quote-config-row[data-quote-category="fan"] .quote-qty {
    color: #ef4444;
    -webkit-text-fill-color: #ef4444;
}

.quote-pro .quote-pro-gift-row th {
    letter-spacing: 6px;
}

.quote-pro .quote-pro-gift-row td,
.quote-pro .quote-pro-gift-row input {
    background: #ffffff;
    color: #ef4444;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    -webkit-text-fill-color: #ef4444;
}

.quote-pro .quote-include-row td:first-of-type,
.quote-pro .quote-platform-row th,
.quote-pro .quote-pay-row td {
    text-align: left;
}

.quote-pro .quote-include-row td:first-of-type {
    font-size: 18px;
    font-weight: 700;
}

.quote-pro .quote-platform-row strong {
    color: #ef4444;
    -webkit-text-fill-color: #ef4444;
}

.quote-pro .quote-pay-row strong {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 36px;
    line-height: 1.08;
    text-align: center;
    white-space: nowrap;
}

.quote-pro .quote-pay-row td:last-child {
    text-align: center;
    vertical-align: middle;
}

.quote-pro .quote-pro-extra-row td {
    height: 30px;
    color: var(--quote-footer-color, #ef4444);
    background: #ffffff;
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
    -webkit-text-fill-color: var(--quote-footer-color, #ef4444);
}

.quote-pro .quote-pro-extra-row input {
    height: 29px;
    min-height: 29px;
    color: var(--quote-footer-color, #ef4444);
    font-size: 17px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    -webkit-text-fill-color: var(--quote-footer-color, #ef4444);
}

.quote-remake .quote-request-row th:nth-child(2),
.quote-remake .quote-request-row th:nth-child(2) input {
    color: var(--quote-remark-color, #050505);
    -webkit-text-fill-color: var(--quote-remark-color, #050505);
}

.quote-color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0 10px;
}

.quote-color-controls label {
    margin: 0;
}

.quote-color-controls input[type="color"] {
    min-height: 30px;
    padding: 2px;
    cursor: pointer;
}

.quote-style-pro .quote-meta {
    margin-top: -6px;
    margin-bottom: -2px;
}

.quote-style-pro .quote-builder-layout {
    transform: scale(0.92);
    transform-origin: top center;
    margin-bottom: -70px;
}

.quote-style-pro .quote-actions {
    margin-top: 12px;
    position: relative;
    z-index: 5;
}

.quote-style-pro .quote-pro .quote-shop-row th,
.quote-style-pro .quote-pro .quote-pro-shop-row input {
    height: 34px;
    min-height: 34px;
    line-height: 34px;
}

.quote-style-pro .quote-pro .quote-pro-wire-row th,
.quote-style-pro .quote-pro .quote-pro-request-row th,
.quote-style-pro .quote-pro .quote-pro-request-row td,
.quote-style-pro .quote-pro .quote-column-row th {
    height: 24px;
}

.quote-style-pro .quote-pro .quote-config-row th,
.quote-style-pro .quote-pro .quote-config-row td {
    height: 23px;
}

.quote-style-pro .quote-pro .quote-name {
    height: 24px;
    min-height: 24px;
    font-size: 21px;
    font-weight: 800;
}

.quote-remake .quote-price,
.quote-remake .quote-qty,
.quote-remake .quote-line-subtotal {
    font-family: Consolas, "Courier New", monospace;
    font-size: 22px;
    font-weight: 900;
    text-align: right;
}

.quote-remake .quote-price {
    padding-left: 34px;
}

.quote-remake .quote-qty {
    text-align: center;
}

.quote-remake .quote-line-subtotal {
    display: block;
    color: #111111;
    padding-left: 34px;
    white-space: nowrap;
}

.quote-remake .quote-qty.hot {
    color: #f04545;
}

.quote-remake .quote-include-row th,
.quote-remake .quote-include-row td,
.quote-remake .quote-platform-row th,
.quote-remake .quote-platform-row td,
.quote-remake .quote-pay-row th,
.quote-remake .quote-pay-row td {
    height: 38px;
    background: #ffffff;
}

.quote-remake .quote-include-row th,
.quote-remake .quote-pay-row th {
    font-size: 23px;
    font-weight: 500;
}

.quote-remake .quote-include-row td:nth-child(2),
.quote-remake .quote-pay-row td:nth-child(2) {
    text-align: left;
}

.quote-remake .quote-include-row input {
    text-align: left;
    font-size: 20px;
    font-weight: 600;
}

.quote-remake .quote-service-fee {
    font-family: Consolas, "Courier New", monospace;
    font-size: 20px;
    white-space: nowrap;
}

.quote-remake .quote-platform-row th {
    text-align: left;
    white-space: nowrap;
}

.quote-remake .quote-platform-row strong {
    margin-right: 18px;
    font-size: 22px;
    color: #050505;
}

.quote-remake .quote-platform-row span {
    color: #050505;
    font-size: 20px;
    font-weight: 900;
}

.quote-remake .quote-platform-row label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    color: #050505;
    font-size: 19px;
    font-weight: 900;
    white-space: nowrap;
}

.quote-remake .quote-platform-row input {
    width: 118px;
    color: #050505;
    font-family: Consolas, "Courier New", monospace;
    font-size: 20px;
    font-weight: 900;
    text-align: left;
    pointer-events: none;
}

.quote-remake .quote-pay-row td:nth-child(2) {
    font-size: 20px;
    line-height: 1.35;
}

.quote-remake .quote-pay-row td:last-child {
    text-align: left;
    white-space: nowrap;
}

.quote-remake .quote-pay-row td:last-child strong {
    display: block;
    font-size: 24px;
    font-weight: 900;
    line-height: 0.95;
    white-space: nowrap;
    transform: translateY(-3px);
}

.quote-remake .quote-total-note {
    display: block;
    margin-top: 3px;
    color: var(--quote-footer-color, #ef4444);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    -webkit-text-fill-color: var(--quote-footer-color, #ef4444);
}

.quote-remake .quote-pay-row td:last-child span {
    display: inline-block;
    max-width: 100%;
    font-size: 0.95em;
    white-space: nowrap;
}

.quote-remake .quote-standard-extra-row td {
    height: 28px;
    background: #ffffff;
    color: #ef4444;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    -webkit-text-fill-color: #ef4444;
}

.quote-remake .quote-standard-extra-row td:last-child {
    font-size: 16px;
}

.quote-form .quote-price,
.quote-form .quote-qty {
    appearance: textfield;
    -moz-appearance: textfield;
}

.quote-form .quote-price::-webkit-outer-spin-button,
.quote-form .quote-price::-webkit-inner-spin-button,
.quote-form .quote-qty::-webkit-outer-spin-button,
.quote-form .quote-qty::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.quote-remake .quote-suggestions {
    left: 0;
    top: calc(100% + 4px);
    width: min(100%, 610px);
    border: 1px solid #dadde2;
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.quote-remake .quote-suggestions::before {
    display: none;
}

.quote-remake .quote-suggestion {
    min-height: 38px;
    height: auto;
    justify-content: flex-start;
    padding: 7px 14px;
    gap: 12px;
    font-size: 19px;
    font-family: Consolas, "Courier New", "Microsoft YaHei", monospace;
    letter-spacing: 0;
    word-spacing: 0;
}

.quote-remake .quote-suggestion.active,
.quote-remake .quote-suggestion:hover,
.quote-remake .quote-suggestion:focus {
    background: #f5f0ff;
}

.quote-remake .quote-suggestion mark,
.quote-remake .quote-suggestion span {
    margin: 0;
    letter-spacing: 0;
    word-spacing: 0;
}

.quote-remake .quote-suggestion-name {
    flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    max-height: 2.45em;
    overflow: hidden;
    line-height: 1.22;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.quote-remake .quote-suggestion-price {
    flex: 0 0 108px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 16px;
    text-align: right;
    white-space: nowrap;
}

.quote-remake .quote-suggestion span {
    color: #444;
}

.quote-remake .quote-suggestion mark {
    color: #f04545;
    font-weight: 900;
}

.share-quote-sheet .quote-wire-row th:first-child,
.share-quote-sheet .quote-wire-row th:first-child strong {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}

.quote-actions {
    width: min(940px, 100%);
    margin: 8px auto 0;
    transform: none;
    justify-content: center;
    gap: 8px;
}

.quote-actions .quote-assembly-action {
    margin-left: 0;
}

.quote-actions .quote-assembly-cancel {
    border-color: rgba(239, 68, 68, 0.24);
    color: #dc2626;
}

.quote-workbench {
    width: 430px;
    padding-top: 128px;
    color: #20262d;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.quote-workbench-grid {
    display: grid;
    grid-template-columns: 140px 278px;
    align-items: start;
    gap: 12px;
}

.quote-workbench-only {
    justify-items: stretch;
}

.quote-workbench-only .quote-workbench-totals {
    min-width: 0;
}

.quote-workbench-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 0 0 1px #d8dde5;
}

.quote-cost-table {
    width: 100px;
    min-width: 100px;
}

.quote-workbench-table th,
.quote-workbench-table td {
    height: 38px;
    padding: 0 4px;
    border: 1px solid #d8dde5;
    color: #20262d;
    font-size: 13px;
    line-height: 1.1;
    vertical-align: middle;
}

.quote-workbench-table thead th {
    height: 36px;
    background: #ffffff;
    font-weight: 600;
    text-align: left;
}

.quote-cost-table thead th {
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
}

.quote-workbench-table tbody th {
    width: 48px;
    border-color: #252a30;
    color: #050505;
    font-size: 17px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.quote-cost-table th:nth-child(1),
.quote-cost-table td:nth-child(1) {
    width: 100px;
    border-color: #252a30;
}

.quote-workbench-table input {
    width: 100%;
    height: 28px;
    border: 0;
    background: transparent;
    color: #20262d;
    font: 600 12px Consolas, "Courier New", monospace;
    text-align: right;
    outline: none;
}

.quote-workbench-name {
    display: block;
    min-height: 18px;
}

.quote-workbench-totals {
    display: grid;
    grid-template-columns: 90px 138px 1fr;
    gap: 0;
    margin-top: 0;
    padding: 0;
    background: transparent;
    min-height: 0;
}

.quote-workbench-totals label {
    display: contents;
}

.quote-workbench-totals label > span {
    grid-column: 1;
    min-height: 34px;
    padding: 7px 6px 0 0;
    color: #20262d;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
}

.quote-workbench-totals label > strong,
.quote-workbench-totals label > input {
    grid-column: 2;
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid #f1e75f;
    background: #fff45c;
    color: #ff4242;
    font: 900 17px Consolas, "Courier New", monospace;
    text-align: left;
}

.quote-workbench-totals label > input {
    color: #20262d;
    border-radius: 8px;
    outline: none;
}

.quote-workbench-totals label > em {
    grid-column: 3;
    min-height: 34px;
    padding: 7px 0 0 8px;
    color: #20262d;
    font: 500 15px Consolas, "Courier New", monospace;
    font-style: normal;
}

.quote-workbench-spacer::before {
    content: "";
    display: block;
    grid-column: 1 / -1;
    min-height: 52px;
}

.component-sheet-panel {
    padding: 10px;
}

.component-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.component-category-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cfe0f4;
    border-radius: 8px;
    background: #ffffff;
    color: #12385f;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.component-category-tabs a:hover,
.component-category-tabs a.active {
    background: linear-gradient(135deg, #075eea, #06c9df);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(7, 94, 234, 0.18);
    transform: translateY(-1px);
}

.component-sheet {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.component-col-erp { width: 14%; }
.component-col-category { width: 9%; }
.component-col-name { width: 40%; }
.component-col-price,
.component-col-cost,
.component-col-profit { width: 8%; }
.component-col-active { width: 6%; }

.component-sheet th,
.component-sheet td {
    height: 42px;
    padding: 0;
    border: 1px solid #cfd8e3;
}

.component-sheet th {
    padding: 0 10px;
    background: #eaf6ff;
    color: #0b2b56;
    text-align: left;
    resize: horizontal;
    overflow: auto;
}

.component-sheet input,
.component-sheet select {
    width: 100%;
    height: 40px;
    min-height: 40px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-weight: 700;
}

.component-sheet input:focus,
.component-sheet select:focus {
    outline: 2px solid #07a9df;
    outline-offset: -2px;
}

.component-profit {
    display: block;
    padding: 0 10px;
    color: #0c7a43;
    font-family: Consolas, "Courier New", monospace;
    text-align: right;
}

.component-new-row td {
    background: #f8fcff;
}

.component-new-row input,
.component-new-row select {
    font-weight: 800;
}

.erp-link-cell {
    padding: 6px 8px !important;
}

.erp-link-meta {
    display: block;
    max-width: 100%;
    margin: 3px 0 5px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.erp-pill.linked,
.erp-pill.ready_pick,
.erp-pill.pushed,
.erp-pill.approved {
    background: #dcfce7;
    color: #047857;
}

.erp-pill.unlinked,
.erp-pill.confirm_required,
.erp-pill.partial_pick,
.erp-pill.pending_review,
.erp-pill.draft {
    background: #fef3c7;
    color: #92400e;
}

.erp-pill.abnormal,
.erp-pill.need_purchase,
.erp-pill.failed,
.erp-pill.cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.erp-pill.no_need,
.erp-pill.unknown {
    background: #e0f2fe;
    color: #0369a1;
}

.erp-current-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
    color: #12385f;
}

.erp-current-card span,
.erp-candidate-table small,
.erp-check-table small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.erp-modal-panel {
    width: min(780px, calc(100vw - 40px));
}

.erp-candidate-table,
.erp-check-table {
    width: 100%;
    border-collapse: collapse;
}

.erp-candidate-table th,
.erp-candidate-table td,
.erp-check-table th,
.erp-check-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #e5edf6;
    text-align: left;
    vertical-align: top;
}

.erp-candidate-table th,
.erp-check-table th {
    background: #f1f7ff;
    color: #0b2b56;
    font-size: 13px;
}

/* 第2/3项：关联候选 —— 弹窗内搜索 + 单行紧凑行 + 限高滚动 */
.erp-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.erp-search-bar .erp-search-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    font-size: 14px;
    background: #fbfcfe;
}
.erp-search-bar .erp-search-input:focus {
    outline: none;
    border-color: #075eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(7, 94, 234, 0.12);
}
.erp-cand-scroll {
    max-height: 44vh;
    overflow: auto;
    border: 1px solid #e5edf6;
    border-radius: 10px;
}
.erp-cand-scroll .erp-candidate-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}
/* 候选行：一行显示，超长省略 */
.erp-cand-scroll .erp-candidate-table td {
    white-space: nowrap;
    vertical-align: middle;
}
.erp-cand-score b { color: #075eea; }
.erp-cand-name {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-cand-name .erp-cand-meta {
    color: #8a95a4;
    font-size: 12px;
    margin-left: 8px;
}
.erp-cand-sku {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #52627a;
}
.erp-cand-stock { color: #52627a; }
.erp-cand-op .inline-form { margin: 0; }

.erp-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}

.erp-modal-actions label {
    min-width: 220px;
}

.erp-settings-panel {
    display: grid;
    gap: 16px;
}

.erp-settings-grid .wide-field {
    grid-column: 1 / -1;
}

.erp-purchase-item {
    display: grid;
    gap: 2px;
    padding: 4px 0;
}

.erp-purchase-item span {
    color: #64748b;
    font-size: 12px;
}

.erp-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0 12px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.erp-push-details {
    margin-top: 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #fbfdff;
    overflow: hidden;
}

.erp-push-details summary {
    cursor: pointer;
    padding: 11px 13px;
    color: #0b2b56;
    font-weight: 900;
    list-style-position: inside;
}

.erp-push-details[open] summary {
    border-bottom: 1px solid #e5edf6;
    background: #f1f7ff;
}

.erp-modal-panel.wide {
    width: min(1180px, calc(100vw - 40px));
}

.danger-text {
    display: block;
    color: #dc2626;
    font-weight: 800;
    line-height: 1.35;
}

.page-size-form {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}

.page-size-form label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #526071;
    font-size: 13px;
    font-weight: 800;
}

.page-size-form select {
    min-height: 34px;
    border: 1px solid #cfe0f4;
    border-radius: 999px;
    background: #ffffff;
    padding: 0 12px;
    color: #12385f;
    font-weight: 900;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    color: #526071;
    font-size: 13px;
    font-weight: 800;
}

.pagination-bar .btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.template-preview {
    display: grid;
    gap: 10px;
}

.template-preview p {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch span {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.switch span::after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    margin: 3px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.switch input:checked + span {
    background: linear-gradient(135deg, #075eea, #06c9df);
}

.switch input:checked + span::after {
    transform: translateX(18px);
}

.quote-order-row {
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.quote-order-row:hover,
.quote-order-row.is-open {
    background: #f1fbff;
}

.badge.saved { background: #e0f2fe; color: #075985; }
.badge.assembly_pending,
.badge.pending,
.badge.claim_pending { background: #fef3c7; color: #92400e; }
.badge.assembly_assigned,
.badge.assigned { background: #dbeafe; color: #1d4ed8; }
.badge.assembly_accepted,
.badge.accepted,
.badge.assembly_working { background: #dcfce7; color: #166534; }
.badge.assembly_completed,
.badge.assembly_review { background: #ede9fe; color: #6d28d9; }
.badge.assembly_done,
.badge.assembly_reviewed,
.badge.completed { background: #d1fae5; color: #047857; }
.badge.cancelled { background: #fee2e2; color: #b91c1c; }
.badge.purchase-none,
.badge.erp-order-not_pushed { background: #e5e7eb; color: #374151; }
.badge.purchase-not_required,
.badge.purchase-purchased,
.badge.erp-order-success { background: #dcfce7; color: #166534; }
.badge.purchase-shortage,
.badge.purchase-requested,
.badge.purchase-purchasing,
.badge.erp-order-pending,
.badge.erp-order-pushed { background: #fef3c7; color: #92400e; }
.badge.purchase-cancelled,
.badge.erp-order-failed,
.badge.erp-order-cancelled { background: #fee2e2; color: #b91c1c; }

.quote-detail-row td {
    background: #f8fbff;
}

.quote-detail-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.quote-detail-table th,
.quote-detail-table td {
    border: 1px solid #d6e4f2;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.quote-detail-table th {
    background: #eaf6ff;
    color: #0b315b;
    font-weight: 900;
}

.quote-detail-table td:nth-child(3),
.quote-detail-table td:nth-child(4),
.quote-detail-table td:nth-child(5) {
    text-align: right;
    font-family: "JetBrains Mono", "Consolas", monospace;
}

.quote-detail-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
}

.quote-detail-box span {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
    color: #18324a;
}

.quote-detail-box strong {
    color: #075eea;
}

.toast {
    min-width: min(420px, calc(100vw - 28px));
    border-width: 2px;
    box-shadow: 0 18px 38px rgba(5, 59, 153, 0.18);
    padding: 16px 22px;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.toast.success {
    border-color: rgba(255, 255, 255, 0.7);
    background: linear-gradient(135deg, #075eea, #08b8d8);
    color: #ffffff;
    box-shadow: 0 20px 46px rgba(7, 94, 234, 0.32);
}

.toast.error {
    border-color: rgba(225, 29, 72, 0.28);
    background: linear-gradient(135deg, #fff1f2, #ffffff);
}

.modal-panel {
    width: min(1180px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
}

.quote-image-panel {
    width: min(1500px, calc(100vw - 28px));
}

.quote-image-order {
    margin: -4px 0 12px;
    color: #17324d;
    font-weight: 800;
}

.quote-image-order strong {
    color: #075eea;
    font-size: 20px;
}

.quote-image-preview-body {
    max-height: calc(100vh - 170px);
    overflow: auto;
    padding: 18px;
    border-radius: 14px;
    background: #edf7ff;
}

.quote-image-card {
    width: max-content;
    min-width: 0;
    margin: 0 auto;
    padding: 16px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(6, 47, 93, 0.14);
}

.quote-image-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #13263b;
    font-weight: 900;
}

.quote-image-card-head span {
    color: #60738a;
}

.quote-image-card-head strong {
    color: #075eea;
    font-size: 20px;
}

.quote-image-sheet {
    width: 940px !important;
    min-width: 940px !important;
    max-width: 940px !important;
    transform: none;
}

.quote-image-sheet.quote-pro {
    width: 980px !important;
    min-width: 980px !important;
    max-width: 980px !important;
}

.quote-image-sheet .quote-suggestions {
    display: none !important;
}

.modal-panel.wide {
    width: min(1380px, calc(100vw - 32px));
}

.quote-version-panel {
    width: min(1680px, calc(100vw - 24px));
}

.template-sheet-preview {
    overflow: auto;
    padding: 12px;
    background: #eef6ff;
}

.template-sheet-preview .quote-sheet.quote-remake {
    margin: 0 auto;
    transform: scale(0.92);
    transform-origin: top center;
}

.live-machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.live-machine-card-wrap {
    display: grid;
    gap: 8px;
}

.live-machine-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid #d7e6f8;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #edf8ff);
    color: #0b2b56;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(7, 94, 234, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.live-machine-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(7, 94, 234, 0.16);
}

.live-machine-card span {
    color: #0877e8;
    font-size: 13px;
    font-weight: 900;
}

.live-machine-card strong {
    font-size: 20px;
}

.live-machine-card small,
.live-machine-card em {
    color: #526071;
    font-style: normal;
    font-weight: 700;
}

.live-machine-menu {
    display: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid rgba(7, 94, 234, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.live-machine-card-wrap.show-delete .live-machine-menu {
    display: flex;
}

.quote-remake.quote-pro .quote-config-row td:nth-child(2),
.quote-remake.quote-pro .quote-name {
    font-size: 23px;
    font-weight: 800;
}

.quote-style-pro .quote-remake.quote-pro .quote-config-row td:nth-child(2),
.quote-style-pro .quote-remake.quote-pro .quote-name {
    font-size: 21px;
    font-weight: 800;
}

.quote-remake.quote-pro .quote-pay-row td:last-child {
    text-align: center !important;
    vertical-align: middle;
}

.quote-remake.quote-pro .quote-pay-row td:last-child strong {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 36px !important;
    line-height: 1.08 !important;
    text-align: center;
    white-space: nowrap;
    transform: none !important;
}

.live-editor-panel {
    overflow: auto;
}

.live-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.live-meta label {
    display: grid;
    gap: 5px;
    color: #526071;
    font-size: 12px;
    font-weight: 800;
}

.live-a5-wrap {
    display: flex;
    justify-content: center;
}

.live-a5-sheet {
    width: 148mm;
    min-height: 210mm;
    padding: 7mm;
    border: 1px solid #111827;
    background: #ffffff;
    color: #000000;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

.live-a5-sheet input,
.live-a5-sheet textarea {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    outline: none;
}

.live-headline {
    height: 36px;
    font-size: 30px !important;
    font-weight: 900 !important;
}

.live-subline {
    font-size: 13px;
    font-weight: 800;
}

.live-hero {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.live-badge {
    min-height: 52px;
    color: #f04242 !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    text-align: left !important;
}

.live-hero strong {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.live-price-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.live-price-row span {
    color: #f04242;
    font-size: 34px;
    font-weight: 900;
}

.live-price-row input {
    color: #f00000;
    font-size: 22px !important;
    font-weight: 900 !important;
}

.live-a5-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.live-a5-table th,
.live-a5-table td {
    height: 28px;
    border: 1px solid #222;
    padding: 0 4px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.live-a5-table tbody tr:nth-child(odd) td {
    background: #d8d8d8;
}

.live-a5-table th:nth-child(1) { width: 14%; }
.live-a5-table th:nth-child(2) { width: 58%; }
.live-a5-table th:nth-child(3),
.live-a5-table th:nth-child(4) { width: 14%; }

.live-a5-table td:nth-child(2) input {
    text-align: left;
}

.live-a5-table td:nth-child(2) {
    position: relative;
}

.live-a5-table .quote-suggestions {
    left: 0;
    top: calc(100% + 2px);
    width: min(100%, 520px);
    z-index: 60;
}

.live-a5-table td:nth-child(3) input,
.live-a5-table td:nth-child(4) input {
    font-style: italic;
}

.live-a5-table tfoot td {
    color: #f04242;
    font-size: 18px;
    font-weight: 900;
}

.live-total {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    min-height: 56px;
    border: 1px solid #222;
    border-top: 0;
}

.live-total strong {
    color: #f00000;
    font-size: 56px;
    font-weight: 900;
    text-align: center;
}

.live-total input {
    color: #f04242;
    font-size: 22px !important;
    font-weight: 900 !important;
}

.live-a5-sheet textarea {
    min-height: 44px;
    margin-top: 8px;
    resize: vertical;
    text-align: left;
}

.second-quote-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.second-quote-form {
    display: grid;
    gap: 14px;
    justify-items: center;
}

.second-quote-form .quote-meta {
    width: min(900px, 100%);
}

.second-a5-sheet {
    width: 148mm;
    min-height: 210mm;
    padding: 7mm;
    border: 2px solid #111827;
    background: #ffffff;
    color: #000000;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

.second-a5-sheet input {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    outline: none;
}

.second-brand {
    min-height: 40px;
    text-align: center;
    font-size: 30px;
    font-weight: 900;
}

.second-title {
    margin: 10px 0;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
}

.second-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.second-promo span,
.second-promo strong,
.second-promo em {
    color: #f04242;
    font-style: normal;
    font-weight: 900;
}

.second-promo span {
    font-size: 28px;
}

.second-promo strong {
    font-size: 36px;
}

.second-promo em {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 22px;
}

.second-a5-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.second-a5-table th,
.second-a5-table td {
    height: 30px;
    border: 1px solid #222;
    padding: 0 4px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.second-a5-table tbody tr:nth-child(odd) td {
    background: #d8d8d8;
}

.second-a5-table th:nth-child(1) { width: 14%; }
.second-a5-table th:nth-child(2) { width: 58%; }
.second-a5-table th:nth-child(3),
.second-a5-table th:nth-child(4) { width: 14%; }

.second-a5-table td:nth-child(2) input {
    text-align: center;
}

.second-a5-table td:nth-child(2) {
    position: relative;
}

.second-a5-table .quote-suggestions {
    left: 0;
    top: calc(100% + 2px);
    width: min(100%, 520px);
    z-index: 50;
}

.second-a5-table td:nth-child(3) input,
.second-a5-table td:nth-child(4) input {
    font-style: italic;
    text-align: center;
}

.second-a5-table tfoot td {
    color: #f04242;
    font-weight: 900;
}

.second-total {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    min-height: 58px;
    border: 1px solid #222;
    border-top: 0;
}

.second-total strong {
    color: #f00000;
    font-size: 52px;
    font-weight: 900;
    text-align: center;
}

.second-total span {
    color: #f04242;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

@media print {
    @page {
        margin: 8mm;
        size: A4 portrait;
    }

    body.printing-live .app-header,
    body.printing-live .page-head,
    body.printing-live .live-meta,
    body.printing-live .form-actions,
    body.printing-live .toast-stack {
        display: none !important;
    }

    body.printing-live .shell,
    body.printing-live .panel,
    body.printing-live .live-a5-wrap {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    body.printing-live .live-a5-sheet {
        width: 148mm !important;
        height: 210mm !important;
        border: 0 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    body.printing-live .live-a5-table tbody tr:nth-child(odd) {
        background: #d9d9d9 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    body.printing-quote,
    body.printing-quote .content,
    body.printing-quote .page {
        background: #ffffff !important;
    }

    .quote-workbench {
        display: none !important;
    }

    body.printing-quote .quote-template-panel,
    body.printing-quote .quote-left-tools,
    body.printing-quote .quote-meta,
    body.printing-quote .quote-actions,
    body.printing-quote .panel-title,
    body.printing-quote .quote-no {
        display: none !important;
    }

    body.printing-quote .quote-inline-panel,
    body.printing-quote .quote-remake-wrap,
    body.printing-quote .quote-sheet.quote-remake {
        width: 190mm !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        box-shadow: none !important;
    }

    body.printing-quote .quote-sheet.quote-remake,
    body.printing-quote .quote-sheet.quote-remake * {
        color: #000000 !important;
        text-shadow: none !important;
        -webkit-text-fill-color: #000000 !important;
    }

    body.printing-quote .quote-remake .quote-shop-row th,
    body.printing-quote .quote-remake .quote-shop-row input,
    body.printing-quote .quote-remake .quote-shop-row span {
        background: #000000 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    body.printing-quote .quote-remake th,
    body.printing-quote .quote-remake td {
        border-color: #000000 !important;
        background: #ffffff !important;
    }

    body.printing-quote .quote-remake .quote-request-row th:nth-child(2) {
        background: #ffffff !important;
    }

    body.printing-quote .quote-remake .quote-request-row th:nth-child(2) input {
        background: transparent !important;
    }

}

@media (max-width: 900px) {
    .assembly-list-panel table,
    .assembly-list-panel thead,
    .assembly-list-panel tbody,
    .assembly-list-panel tr,
    .assembly-list-panel th,
    .assembly-list-panel td {
        display: block;
        min-width: 0;
    }

    .assembly-list-panel thead {
        display: none;
    }

    .assembly-list-panel tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid #dbeafe;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(7, 94, 234, 0.08);
    }

    .assembly-list-panel td {
        border: 0;
        padding: 6px 0;
    }

    .assembly-list-panel td:nth-child(1)::before { content: "订单号："; font-weight: 900; color: #53657a; }
    .assembly-list-panel td:nth-child(2)::before { content: "来源："; font-weight: 900; color: #53657a; }
    .assembly-list-panel td:nth-child(3)::before { content: "客户："; font-weight: 900; color: #53657a; }
    .assembly-list-panel td:nth-child(4)::before { content: "摘要："; font-weight: 900; color: #53657a; }
    .assembly-list-panel td:nth-child(5)::before { content: "状态："; font-weight: 900; color: #53657a; }
    .assembly-list-panel td:nth-child(6)::before { content: "接单人："; font-weight: 900; color: #53657a; }

    .assembly-list-panel .table-actions,
    .assembly-list-panel .inline-form,
    .assembly-list-panel .inline-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }

    .assembly-list-panel .btn,
    .quick-actions .btn {
        min-height: 44px;
    }

    .quote-builder-layout {
        display: block;
        width: 100%;
        transform: none;
    }

    .quote-actions {
        transform: none;
    }

    .quote-form .quote-meta {
        width: 100%;
        margin-left: 0;
    }

    .quote-no,
    .quote-inline-panel .panel-title {
        width: 100%;
        margin-left: 0;
        transform: none;
    }

    .quote-remake-wrap {
        overflow-x: auto;
        width: 100%;
    }

    .quote-sheet.quote-remake {
        min-width: 940px;
    }

    .quote-workbench {
        width: 100%;
        padding-top: 0;
        margin-top: 18px;
        overflow-x: auto;
    }

    .quote-workbench-grid {
        grid-template-columns: 1fr;
    }

    .quote-workbench-table,
    .quote-workbench-totals {
        min-width: 250px;
    }
}

/* ¥ symbol in price and subtotal cells (edit form). */
.quote-remake .quote-price-cell,
.quote-remake .quote-subtotal-cell {
    position: relative;
}

.quote-remake .quote-price-cell .quote-yuan,
.quote-remake .quote-subtotal-cell .quote-yuan {
    display: none;
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #050505;
    font: 900 22px Consolas, "Courier New", monospace;
    line-height: 1;
    pointer-events: none;
}

.quote-remake .quote-config-row.has-price .quote-price-cell .quote-yuan,
.quote-remake .quote-config-row.has-subtotal .quote-subtotal-cell .quote-yuan {
    display: block;
}

/* Workbench cost editor styling. */
.quote-cost-table .quote-cost-editor {
    width: 100%;
    height: 28px;
    border: 0;
    background: transparent;
    color: #050505;
    font: 900 16px Consolas, "Courier New", monospace;
    text-align: right;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.quote-cost-table .quote-cost-editor::-webkit-outer-spin-button,
.quote-cost-table .quote-cost-editor::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Final order-detail override: compact numeric columns, wide name column. */
.quote-detail-row .quote-detail-table {
    width: 100% !important;
    table-layout: fixed !important;
}

.quote-detail-row .quote-detail-table th:nth-child(1),
.quote-detail-row .quote-detail-table td:nth-child(1) {
    width: 96px !important;
}

.quote-detail-row .quote-detail-table th:nth-child(2),
.quote-detail-row .quote-detail-table td:nth-child(2) {
    width: auto !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.quote-detail-row .quote-detail-table th:nth-child(3),
.quote-detail-row .quote-detail-table td:nth-child(3),
.quote-detail-row .quote-detail-table th:nth-child(4),
.quote-detail-row .quote-detail-table td:nth-child(4),
.quote-detail-row .quote-detail-table th:nth-child(5),
.quote-detail-row .quote-detail-table td:nth-child(5) {
    width: 92px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* v4.12.0 live A5 sheet: editor, image preview, and print share one fixed 4-column layout. */
.live-a5-sheet.live-a5-new {
    width: 148mm !important;
    height: 210mm !important;
    min-height: 210mm !important;
    max-height: 210mm !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
}

.live-a5-new .live-a5-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 18px !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
}

.live-a5-new .live-a5-table col:nth-child(1) { width: 14% !important; }
.live-a5-new .live-a5-table col:nth-child(2) { width: 58% !important; }
.live-a5-new .live-a5-table col:nth-child(3),
.live-a5-new .live-a5-table col:nth-child(4) { width: 14% !important; }

.live-a5-new .live-a5-table th,
.live-a5-new .live-a5-table td {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    line-height: 31px !important;
    padding: 0 1mm !important;
    border: 1px solid #111 !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #000 !important;
    vertical-align: middle !important;
}

.live-a5-new .live-a5-table thead th {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    line-height: 31px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    background: #fff !important;
    color: #000 !important;
}

.live-a5-new .live-a5-table tbody tr:nth-last-child(1) td,
.live-a5-new .live-a5-table tbody tr:nth-last-child(2) td {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    line-height: 31px !important;
}

.live-a5-new .live-a5-table input,
.live-a5-new .live-a5-table span.live-autocomplete,
.live-a5-new .live-a5-table span.live-xianyu,
.live-a5-new .live-a5-table span.live-jd {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    min-height: 0 !important;
    max-height: 31px !important;
    line-height: 31px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000 !important;
    display: block !important;
    outline: none !important;
}

.live-a5-new .live-a5-table td:nth-child(2) input,
.live-a5-new .live-a5-table td:nth-child(2) span {
    text-align: center !important;
}

.live-a5-new .live-a5-table td:nth-child(3) input,
.live-a5-new .live-a5-table td:nth-child(4) input,
.live-a5-new .live-a5-table td:nth-child(3) span,
.live-a5-new .live-a5-table td:nth-child(4) span {
    text-align: center !important;
    font-style: normal !important;
}

.live-a5-new .live-a5-table th:nth-child(1),
.live-a5-new .live-a5-table td:nth-child(1) {
    width: 14% !important;
}

.live-a5-new .live-a5-table th:nth-child(2),
.live-a5-new .live-a5-table td:nth-child(2) {
    width: 58% !important;
}

.live-a5-new .live-a5-table th:nth-child(3),
.live-a5-new .live-a5-table td:nth-child(3),
.live-a5-new .live-a5-table th:nth-child(4),
.live-a5-new .live-a5-table td:nth-child(4) {
    width: 14% !important;
}

.live-a5-new .live-a5-table tfoot td {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    line-height: 31px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    background: #fff !important;
    color: #f04444 !important;
}

.live-a5-new .live-a5-table tfoot td:first-child {
    text-align: right !important;
    padding-right: 3mm !important;
}

.live-image-preview-body .live-a5-sheet.live-a5-new {
    flex: 0 0 auto !important;
}

/* v4.12.1 live quote refinements. */
.live-a5-new .live-savings-overlay {
    left: 6% !important;
    bottom: 6% !important;
    font-size: 34px !important;
    line-height: 1 !important;
    z-index: 2 !important;
}

.live-a5-new .live-a5-table td:nth-child(3),
.live-a5-new .live-a5-table td:nth-child(4),
.live-a5-new .live-a5-table td:nth-child(3) input,
.live-a5-new .live-a5-table td:nth-child(4) input,
.live-a5-new .live-a5-table td:nth-child(3) span,
.live-a5-new .live-a5-table td:nth-child(4) span {
    text-align: center !important;
    justify-content: center !important;
}

.live-a5-new .live-bottom-total {
    border: 0 !important;
    border-top: 0 !important;
    min-height: 30mm !important;
    padding-top: 4mm !important;
    background: #fff !important;
}

.live-a5-new .live-bottom-total strong,
.live-a5-new .live-bottom-total input {
    border: 0 !important;
    box-shadow: none !important;
}

.live-a5-new .live-bottom-total .live-shipping-text {
    border: 0 !important;
    box-shadow: none !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #f04444 !important;
}

.live-a5-table .quote-suggestions {
    width: 640px !important;
    max-width: 640px !important;
    max-height: 210px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    left: 0 !important;
    z-index: 300 !important;
}

.live-a5-table .quote-suggestion {
    padding: 4px 10px 4px 14px !important;
    gap: 8px !important;
}

.live-a5-table .quote-suggestion-name {
    flex: 1 1 auto !important;
    padding-right: 12px !important;
}

.live-a5-table .quote-suggestion-price {
    flex: 0 0 78px !important;
    margin-left: auto !important;
    text-align: right !important;
}

.live-image-preview-body {
    align-items: flex-start !important;
}

/* v4.12.1 final live A5 output locks: keep editor, image preview and print identical. */
.live-a5-new .live-a5-table tfoot td:nth-child(3),
.live-a5-new .live-a5-table tfoot td:nth-child(4) {
    text-align: center !important;
    vertical-align: middle !important;
}

.live-a5-new .live-bottom-total,
#live-print-root .live-bottom-total {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.live-a5-new .live-bottom-total strong,
#live-print-root .live-bottom-total strong {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.live-a5-new .live-bottom-total .live-discount-price,
#live-print-root .live-bottom-total .live-discount-price {
    font-size: 78px !important;
    line-height: 1 !important;
}

.live-a5-new .live-bottom-total .live-shipping-text,
#live-print-root .live-bottom-total .live-shipping-text {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font-size: 32px !important;
    line-height: 1.1 !important;
}

.live-a5-new .live-savings-overlay,
#live-print-root .live-savings-overlay {
    font-size: 30px !important;
    left: 7% !important;
    bottom: 5.5% !important;
}

.live-a5-table .quote-suggestions {
    position: absolute !important;
    width: min(560px, calc(100vw - 80px)) !important;
    max-width: min(560px, calc(100vw - 80px)) !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    pointer-events: auto !important;
    z-index: 999 !important;
}

.live-a5-table .quote-suggestion-name {
    min-width: 0 !important;
    max-width: calc(100% - 96px) !important;
}

.live-a5-table .quote-suggestion-price {
    flex: 0 0 88px !important;
    min-width: 88px !important;
    margin-left: auto !important;
    text-align: right !important;
}

.live-a5-new .live-a5-table td:nth-child(3),
.live-a5-new .live-a5-table td:nth-child(4),
.live-a5-new .live-a5-table tfoot td:nth-child(3),
.live-a5-new .live-a5-table tfoot td:nth-child(4) {
    text-align: center !important;
    vertical-align: middle !important;
}

.live-a5-new .live-a5-table td:nth-child(3) input,
.live-a5-new .live-a5-table td:nth-child(4) input,
.live-a5-new .live-a5-table td:nth-child(3) span,
.live-a5-new .live-a5-table td:nth-child(4) span {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
}

/* v4.12.3 live machine editor: fixed suggestions, live centered prices, and root-only print. */
.live-a5-table .quote-suggestions.live-floating-suggestions {
    position: fixed !important;
    left: var(--live-suggest-left) !important;
    top: var(--live-suggest-top) !important;
    width: var(--live-suggest-width) !important;
    max-width: var(--live-suggest-width) !important;
    max-height: var(--live-suggest-max-height) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    pointer-events: auto !important;
    z-index: 2147483647 !important;
}

.live-a5-table .quote-suggestions.live-floating-suggestions::before {
    display: none !important;
}

.live-a5-new .live-a5-table td:nth-child(3),
.live-a5-new .live-a5-table td:nth-child(4),
.live-a5-new .live-a5-table tfoot td:nth-child(3),
.live-a5-new .live-a5-table tfoot td:nth-child(4) {
    text-align: center !important;
    vertical-align: middle !important;
}

.live-a5-new .live-a5-table td:nth-child(3) input,
.live-a5-new .live-a5-table td:nth-child(4) input,
.live-a5-new .live-a5-table td:nth-child(3) span,
.live-a5-new .live-a5-table td:nth-child(4) span {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    font-style: normal !important;
}

.live-a5-new .live-a5-table td:nth-child(3) input[type="number"],
.live-a5-new .live-a5-table td:nth-child(4) input[type="number"] {
    appearance: textfield !important;
    -moz-appearance: textfield !important;
}

.live-a5-new .live-a5-table td:nth-child(3) input[type="number"]::-webkit-outer-spin-button,
.live-a5-new .live-a5-table td:nth-child(3) input[type="number"]::-webkit-inner-spin-button,
.live-a5-new .live-a5-table td:nth-child(4) input[type="number"]::-webkit-outer-spin-button,
.live-a5-new .live-a5-table td:nth-child(4) input[type="number"]::-webkit-inner-spin-button {
    margin: 0 !important;
    -webkit-appearance: none !important;
}

#live-print-root {
    position: fixed !important;
    left: -10000px !important;
    top: 0 !important;
    width: 148mm !important;
    min-height: 210mm !important;
    background: #fff !important;
    pointer-events: none !important;
}

@media print {
    @page {
        size: A5 portrait;
        margin: 0;
    }

    body.printing-live,
    body.printing-live .content,
    body.printing-live .page,
    body.printing-live .shell {
        width: 148mm !important;
        min-width: 148mm !important;
        min-height: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        overflow: hidden !important;
    }

    body.printing-live > *:not(#live-print-root) {
        display: none !important;
    }

    body.printing-live * {
        visibility: hidden !important;
    }

    body.printing-live #live-print-root,
    body.printing-live #live-print-root * {
        visibility: visible !important;
    }

    body.printing-live #live-print-root {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 148mm !important;
        height: 210mm !important;
        min-height: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        overflow: hidden !important;
    }

    body.printing-live #live-print-root .live-a5-sheet.live-a5-new {
        width: 148mm !important;
        height: 210mm !important;
        min-height: 210mm !important;
        max-height: 210mm !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    body.printing-live #live-print-root .quote-suggestions {
        display: none !important;
    }
}

/* v4.12.4 live print scale lock: printed A5 must match editor and image preview size. */
@media print {
    body.printing-live #live-print-root {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 148mm !important;
        height: 210mm !important;
        min-height: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        overflow: hidden !important;
        transform: none !important;
        transform-origin: 0 0 !important;
    }

    body.printing-live #live-print-root .live-a5-sheet.live-a5-new {
        width: 148mm !important;
        height: 210mm !important;
        min-height: 210mm !important;
        max-height: 210mm !important;
        padding: 7mm !important;
        margin: 0 !important;
        border: 1px solid #111827 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        transform: none !important;
        transform-origin: 0 0 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

/* v4.12.5 live A5 visual tuning. */
@font-face {
    font-family: "Eagle Book";
    src: url("fonts/Eagle-Book-2.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

.live-a5-new .live-savings-overlay,
#live-print-root .live-savings-overlay {
    left: 11% !important;
    bottom: 1.2% !important;
    font-size: 42px !important;
    line-height: 1 !important;
}

.live-a5-new .live-a5-table td:nth-child(2) input,
.live-a5-new .live-a5-table td:nth-child(2) span.live-autocomplete,
.live-a5-new .live-a5-table tbody td:nth-child(2) {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}

.live-a5-new .live-bottom-total,
#live-print-root .live-bottom-total {
    min-height: 24mm !important;
    padding-top: 1.5mm !important;
    align-items: start !important;
}

.live-a5-new .live-bottom-total strong,
#live-print-root .live-bottom-total strong {
    align-self: start !important;
    margin-top: 0 !important;
}

.live-a5-new .live-bottom-total .live-discount-price,
#live-print-root .live-bottom-total .live-discount-price {
    font-family: "Eagle Book", "Segoe UI Black", "Arial Black", sans-serif !important;
    font-size: 92px !important;
    line-height: .92 !important;
}

.live-a5-new .live-bottom-total .live-shipping-text,
#live-print-root .live-bottom-total .live-shipping-text {
    align-self: start !important;
    margin-top: 7mm !important;
}

/* v4.12.6 live A5 interaction polish. */
.live-a5-new .live-link-overlay,
#live-print-root .live-link-overlay {
    position: absolute !important;
    right: 6.8% !important;
    top: 5.2% !important;
    width: 30.2% !important;
    height: 13.2% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-family: "Microsoft YaHei", sans-serif !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    pointer-events: none !important;
    z-index: 3 !important;
}

.live-a5-new .live-savings-overlay,
#live-print-root .live-savings-overlay {
    left: 9.2% !important;
    bottom: 1.1% !important;
    font-size: 44px !important;
}

.live-a5-new .live-a5-table td:nth-child(2) input,
.live-a5-new .live-a5-table td:nth-child(2) span.live-autocomplete {
    font-size: var(--live-name-font-size, 20px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
}

.live-a5-new .live-a5-table td:nth-child(3),
.live-a5-new .live-a5-table td:nth-child(4),
.live-a5-new .live-a5-table tfoot td:nth-child(3),
.live-a5-new .live-a5-table tfoot td:nth-child(4),
.live-a5-new .live-a5-table td:nth-child(3) input,
.live-a5-new .live-a5-table td:nth-child(4) input,
.live-a5-new .live-a5-table td:nth-child(3) span,
.live-a5-new .live-a5-table td:nth-child(4) span {
    font-size: 19px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
}

.live-a5-table .quote-suggestions.live-floating-suggestions {
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18) !important;
}

.live-a5-table .quote-suggestion {
    min-height: 38px !important;
    padding: 6px 10px 6px 12px !important;
    align-items: center !important;
    font-size: 16px !important;
    line-height: 1.22 !important;
}

.live-a5-table .quote-suggestion-name {
    max-width: calc(100% - 84px) !important;
}

.live-a5-table .quote-suggestion-price {
    flex: 0 0 78px !important;
    min-width: 78px !important;
    font-size: 15px !important;
}

.live-a5-new .live-bottom-total,
#live-print-root .live-bottom-total,
.live-a5-new .live-bottom-total .live-discount-price,
#live-print-root .live-bottom-total .live-discount-price,
.live-a5-new .live-bottom-total .live-shipping-text,
#live-print-root .live-bottom-total .live-shipping-text {
    color: #f04444 !important;
    -webkit-text-fill-color: #f04444 !important;
}

.live-save-state {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
    font-size: 14px;
    font-weight: 800;
    transition: all .2s ease;
}

.live-save-state.is-dirty {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #ea580c;
}

.ncm-tool-panel {
    padding: 0 !important;
    overflow: hidden;
}

.ncm-tool-frame {
    display: block;
    width: 100%;
    height: min(76vh, 860px);
    min-height: 620px;
    border: 0;
    background: #ffffff;
}

/* Keep the new-machine cost column locked to the quote rows without changing width. */
.quote-cost-table,
.quote-cost-table thead,
.quote-cost-table tbody,
.quote-cost-table tr,
.quote-cost-table th,
.quote-cost-table td {
    box-sizing: border-box !important;
}

.quote-cost-table th,
.quote-cost-table td {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    vertical-align: middle !important;
}

.quote-cost-table .quote-cost-editor {
    display: block !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
}

/* v4.12.11 second-hand quote A5 redesign. */
.second-a5-sheet.second-a5-redesign {
    width: 148mm !important;
    height: 210mm !important;
    min-height: 210mm !important;
    max-height: 210mm !important;
    padding: 3mm !important;
    border: 1px solid #111 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    font-family: "Smiley Sans", "Microsoft YaHei", sans-serif !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
}

.second-quote-form .second-a5-sheet.second-a5-redesign {
    overflow: visible !important;
}

.second-a5-redesign .second-top-wrap {
    position: relative !important;
    width: 100% !important;
    margin: 0 0 1.5mm !important;
}

.second-a5-redesign .second-top-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

.second-a5-redesign .second-saving-overlay {
    position: absolute !important;
    left: 3.2% !important;
    bottom: 2.5% !important;
    color: #f04444 !important;
    -webkit-text-fill-color: #f04444 !important;
    font-family: "Microsoft YaHei", "Arial Black", sans-serif !important;
    font-size: 34px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.second-a5-redesign .second-a5-table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    box-sizing: border-box !important;
}

.second-a5-redesign .second-a5-table colgroup {
    display: table-column-group !important;
}

.second-a5-redesign .second-a5-table col {
    display: table-column !important;
}

.second-a5-redesign .second-a5-table thead {
    display: table-header-group !important;
}

.second-a5-redesign .second-a5-table tbody {
    display: table-row-group !important;
}

.second-a5-redesign .second-a5-table tfoot {
    display: table-footer-group !important;
}

.second-a5-redesign .second-a5-table tr {
    display: table-row !important;
}

.second-a5-redesign .second-a5-table col.second-col-category {
    width: 13% !important;
}

.second-a5-redesign .second-a5-table col.second-col-name {
    width: 59% !important;
}

.second-a5-redesign .second-a5-table col.second-col-price {
    width: 14% !important;
}

.second-a5-redesign .second-a5-table th,
.second-a5-redesign .second-a5-table td {
    display: table-cell !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    padding: 0 3px !important;
    border: 1px solid #111 !important;
    color: #000 !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 29px !important;
    text-align: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    min-width: 0 !important;
}

.second-a5-redesign .second-a5-table thead th {
    height: 30px !important;
    line-height: 30px !important;
    background: #fff !important;
    font-size: 19px !important;
}

.second-a5-redesign .second-a5-table th:nth-child(1),
.second-a5-redesign .second-a5-table td:nth-child(1) {
    width: 13% !important;
}

.second-a5-redesign .second-a5-table th:nth-child(2),
.second-a5-redesign .second-a5-table td:nth-child(2) {
    width: 59% !important;
    position: relative !important;
    overflow: visible !important;
}

.second-a5-redesign .second-a5-table th:nth-child(3),
.second-a5-redesign .second-a5-table td:nth-child(3),
.second-a5-redesign .second-a5-table th:nth-child(4),
.second-a5-redesign .second-a5-table td:nth-child(4) {
    width: 14% !important;
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.second-a5-redesign .second-a5-table tbody tr:nth-child(odd) td {
    background: #d9d9d9 !important;
}

.second-a5-redesign .second-a5-table input,
.second-a5-redesign .second-a5-table span.quote-autocomplete,
.second-a5-redesign .second-a5-table span.second-xianyu,
.second-a5-redesign .second-a5-table span.second-jd {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 29px !important;
    min-height: 0 !important;
    max-height: 29px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font: inherit !important;
    line-height: 29px !important;
    text-align: center !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.second-a5-redesign .second-a5-table td:nth-child(2),
.second-a5-redesign .second-a5-table td:nth-child(2) input,
.second-a5-redesign .second-a5-table td:nth-child(2) span {
    font-family: "Microsoft YaHei", "SimHei", sans-serif !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.second-a5-redesign .second-a5-table td:nth-child(3),
.second-a5-redesign .second-a5-table td:nth-child(4),
.second-a5-redesign .second-a5-table td:nth-child(3) input,
.second-a5-redesign .second-a5-table td:nth-child(4) input,
.second-a5-redesign .second-a5-table td:nth-child(3) span,
.second-a5-redesign .second-a5-table td:nth-child(4) span {
    font-size: 19px !important;
    font-style: italic !important;
}

.second-a5-redesign .second-a5-table td:nth-child(3) input,
.second-a5-redesign .second-a5-table td:nth-child(4) input {
    appearance: textfield !important;
    -moz-appearance: textfield !important;
}

.second-a5-redesign .second-a5-table td:nth-child(3) input::-webkit-outer-spin-button,
.second-a5-redesign .second-a5-table td:nth-child(3) input::-webkit-inner-spin-button,
.second-a5-redesign .second-a5-table td:nth-child(4) input::-webkit-outer-spin-button,
.second-a5-redesign .second-a5-table td:nth-child(4) input::-webkit-inner-spin-button {
    margin: 0 !important;
    -webkit-appearance: none !important;
}

.second-a5-redesign .second-a5-table tfoot td {
    height: 30px !important;
    line-height: 30px !important;
    background: #fff !important;
    color: #f04444 !important;
    -webkit-text-fill-color: #f04444 !important;
    font-size: 20px !important;
    font-style: italic !important;
}

.second-a5-redesign .second-a5-table tfoot td:first-child {
    text-align: right !important;
    padding-right: 4mm !important;
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    font-style: normal !important;
}

.second-a5-redesign .second-total {
    display: grid !important;
    grid-template-columns: 26% 49% 25% !important;
    align-items: center !important;
    min-height: 30mm !important;
    border: 1px solid #111 !important;
    border-top: 0 !important;
    background: #fff !important;
}

.second-a5-redesign .second-total em,
.second-a5-redesign .second-total strong,
.second-a5-redesign .second-total span {
    border: 0 !important;
    color: #f00000 !important;
    -webkit-text-fill-color: #f00000 !important;
    font-style: italic !important;
    font-weight: 900 !important;
    text-align: center !important;
}

.second-a5-redesign .second-total em {
    font-size: 42px !important;
}

.second-a5-redesign .second-total strong {
    font-family: "Segoe UI Black", "Arial Black", sans-serif !important;
    font-size: 68px !important;
    line-height: .9 !important;
}

.second-a5-redesign .second-total span {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    font-size: 28px !important;
}

.second-a5-redesign > input[name="note"] {
    display: none !important;
}

.second-a5-redesign .quote-suggestions {
    left: 0 !important;
    top: calc(100% + 2px) !important;
    width: min(520px, calc(100vw - 80px)) !important;
    max-height: 240px !important;
    z-index: 2000 !important;
}

@media print {
    body.printing-second .second-quote-form .second-a5-sheet.second-a5-redesign {
        overflow: hidden !important;
    }

    body.printing-second .second-a5-sheet.second-a5-redesign {
        width: 148mm !important;
        height: 210mm !important;
        min-height: 210mm !important;
        max-height: 210mm !important;
        padding: 3mm !important;
        margin: 0 !important;
        border: 1px solid #111 !important;
        overflow: hidden !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

/* v4.12.7 live A5 final detail fixes. */
.live-a5-new .live-savings-overlay,
#live-print-root .live-savings-overlay {
    left: 6.6% !important;
    bottom: 1.35% !important;
    font-size: 38px !important;
}

.live-a5-new .live-link-overlay,
#live-print-root .live-link-overlay {
    right: 3.8% !important;
    top: 12.4% !important;
    width: 28.8% !important;
    height: 11.2% !important;
    color: #f04444 !important;
    -webkit-text-fill-color: #f04444 !important;
    font-family: "Smiley Sans", "Microsoft YaHei", sans-serif !important;
    font-size: 30px !important;
    font-style: italic !important;
    font-weight: 900 !important;
    text-shadow:
        1px 0 #fff,
        -1px 0 #fff,
        0 1px #fff,
        0 -1px #fff,
        2px 2px 0 rgba(255, 255, 255, .8) !important;
}

.live-a5-table .quote-suggestions.live-floating-suggestions {
    width: min(var(--live-suggest-width), 480px) !important;
    max-width: min(var(--live-suggest-width), 480px) !important;
}

.live-a5-table .quote-suggestion {
    min-height: 36px !important;
    font-size: 16.5px !important;
}

/* ====================================================
   v5 全面视觉重构 — PC 精化 + 手机端优化
   ==================================================== */

/* ─── 全局细节优化 ─── */

body {
    background:
        radial-gradient(ellipse 120% 60% at 50% -10%, rgba(7,94,234,0.07) 0%, transparent 55%),
        linear-gradient(180deg, #f6faff 0%, #f0f5ff 40%, #eef3ff 100%);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(7,94,234,0.22); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(7,94,234,0.4); }

/* ─── 顶栏 & 导航 ─── */

.app-header {
    border-bottom-color: rgba(7,94,234,0.07);
    box-shadow: 0 1px 0 rgba(7,94,234,0.06), 0 3px 16px rgba(7,94,234,0.05);
}

.brand {
    font-weight: 900;
    letter-spacing: -0.01em;
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.global-search input {
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    border-color: rgba(7,94,234,0.14);
    font-size: 13.5px;
    padding-left: 16px;
    min-height: 38px;
}

.global-search input::placeholder {
    color: #99aabb;
}

.module-link {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    border-radius: 999px;
}

.module-link.active {
    background: linear-gradient(130deg, #075eea 0%, #05b0cb 100%);
    box-shadow: 0 4px 14px rgba(7,94,234,0.30);
}

.nav-link {
    font-size: 13px;
    border-radius: 8px;
    padding: 0 11px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(7,94,234,0.07);
    color: var(--primary-strong);
    box-shadow: none;
}

/* ─── 按钮全面升级 ─── */

.btn {
    min-height: 36px;
    padding: 0 15px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 5px;
}

.btn:active {
    transform: scale(0.97) translateY(1px) !important;
    transition-duration: 0.07s;
}

.btn.primary {
    background: linear-gradient(150deg, #2076f5 0%, #075eea 55%, #054fcb 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(7,94,234,0.28), 0 1px 2px rgba(7,94,234,0.18);
}

.btn.primary:hover {
    background: linear-gradient(150deg, #2b80ff 0%, #0e68f6 55%, #0656d8 100%);
    box-shadow: 0 4px 16px rgba(7,94,234,0.38), 0 2px 4px rgba(7,94,234,0.22);
    transform: translateY(-1px);
    color: #fff;
}

.btn.success {
    background: linear-gradient(150deg, #22d470, #16a34a);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22,163,74,0.24);
}

.btn.success:hover {
    background: linear-gradient(150deg, #28e07a, #17b352);
    box-shadow: 0 4px 14px rgba(22,163,74,0.34);
    transform: translateY(-1px);
}

.btn.danger {
    background: linear-gradient(150deg, #fff6f5, #fff0ef);
    border-color: rgba(215,53,40,0.16);
    color: #c8291e;
    box-shadow: none;
}

.btn.danger:hover {
    background: linear-gradient(150deg, #ffdcda, #ffd4d2);
    border-color: rgba(215,53,40,0.34);
    box-shadow: 0 3px 10px rgba(215,53,40,0.14);
    color: #b8241a;
}

.btn.small {
    min-height: 30px;
    padding: 0 11px;
    font-size: 12.5px;
    border-radius: 7px;
}

.btn.wide {
    justify-content: center;
}

/* 默认按钮边框颜色统一 */
.btn:not(.primary):not(.success):not(.danger) {
    border-color: rgba(7,94,234,0.14);
    color: #1e3a5a;
}

.btn:not(.primary):not(.success):not(.danger):hover {
    background: rgba(7,94,234,0.04);
    border-color: rgba(7,94,234,0.28);
    color: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(7,94,234,0.1);
}

/* ─── 卡片 & 面板 ─── */

.panel,
.metric,
.request-card,
.auth-panel {
    border-radius: 14px;
    border-color: rgba(7,94,234,0.08);
    box-shadow: 0 1px 3px rgba(7,94,234,0.04), 0 4px 20px rgba(7,94,234,0.04);
    background: rgba(255,255,255,0.97);
}

.panel:hover {
    border-color: rgba(7,94,234,0.13);
    box-shadow: 0 2px 8px rgba(7,94,234,0.06), 0 8px 28px rgba(7,94,234,0.06);
}

.metric {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(7,94,234,0.1) !important;
}

.metric::before {
    background: linear-gradient(180deg, #075eea 0%, #06c9df 55%, #ffad2f 100%);
}

.metric strong {
    font-size: 26px;
    font-weight: 850;
    color: #0a2b5a;
}

/* ─── 表格 ─── */

th {
    background: rgba(7,94,234,0.035);
    color: #244a6e;
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    border-bottom-width: 2px;
    border-bottom-color: rgba(7,94,234,0.08);
}

td {
    border-bottom-color: rgba(7,94,234,0.055);
}

tbody tr:hover td {
    background: rgba(7,94,234,0.022);
}

/* ─── 输入框 & 标签 ─── */

input,
select,
textarea {
    border-color: rgba(7,94,234,0.15);
    border-radius: 9px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(7,94,234,0.12) !important;
    outline: none !important;
}

label {
    font-size: 13px;
    font-weight: 700;
    color: #2e3f52;
}

/* ─── 弹窗 ─── */

.modal-mask {
    background: rgba(6,18,46,0.52);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.modal-panel {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 8px 32px rgba(6,18,46,0.18), 0 32px 80px rgba(7,94,234,0.13);
    animation: v5-modal-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes v5-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
    padding-bottom: 14px;
    border-bottom-color: rgba(7,94,234,0.08);
}

.modal-head h2 {
    font-size: 17px;
    font-weight: 850;
    color: #08244e;
}

.icon-btn {
    border-radius: 8px;
    width: 32px;
    height: 32px;
    border-color: rgba(7,94,234,0.12);
    color: #607a94;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.icon-btn:hover {
    background: rgba(7,94,234,0.06);
    border-color: rgba(7,94,234,0.22);
    color: #0a2540;
}

/* ─── 仪表盘 & 快捷卡片 ─── */

.system-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.system-card {
    border-radius: 14px;
    border-color: rgba(7,94,234,0.09);
    background: linear-gradient(145deg, #fff 0%, #f5faff 100%);
    box-shadow: 0 1px 4px rgba(7,94,234,0.06), 0 4px 16px rgba(7,94,234,0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    min-height: 108px;
}

.system-card:hover {
    transform: translateY(-3px);
    border-color: rgba(7,94,234,0.2);
    box-shadow: 0 6px 22px rgba(7,94,234,0.14);
}

.system-card strong {
    font-size: 16px;
    font-weight: 850;
    color: #0a2540;
}

.system-card span {
    font-size: 12.5px;
    color: #607a94;
    line-height: 1.55;
}

/* ─── 徽章 Badge ─── */

.badge {
    font-size: 11.5px;
    font-weight: 850;
    letter-spacing: 0.02em;
    padding: 0 10px;
}

/* ─── 状态标签页 ─── */

.status-tabs a {
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    border-color: rgba(7,94,234,0.1);
    background: rgba(255,255,255,0.85);
    padding: 6px 14px;
    min-height: 32px;
}

.status-tabs a.active {
    background: linear-gradient(130deg, #075eea, #06c9df);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(7,94,234,0.28);
}

/* ─── 页面标题 ─── */

.page-head h1 {
    font-size: 24px;
    font-weight: 875;
    color: #06264e;
    letter-spacing: -0.01em;
}

.eyebrow {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── 提成统计卡 (stats-grid / stat-card) ─── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 14px;
    border-radius: 14px;
    border: 1px solid rgba(7,94,234,0.1);
    background: linear-gradient(145deg, #fff, #f0f7ff);
    box-shadow: 0 2px 10px rgba(7,94,234,0.06);
    text-align: center;
    transition: all 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7,94,234,0.12);
    border-color: rgba(7,94,234,0.2);
}

.stat-card span {
    font-size: 12.5px;
    font-weight: 700;
    color: #607a94;
}

.stat-card strong {
    font-size: 22px;
    font-weight: 875;
    color: #075eea;
    line-height: 1.1;
}

.stat-card small {
    font-size: 11.5px;
    font-weight: 600;
    color: #99aabb;
}

/* ─── 转单卡片 ─── */

.transfer-request-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(7,94,234,0.11);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,248,255,0.95));
    box-shadow: 0 2px 8px rgba(7,94,234,0.06);
}

/* ─── 装机完成图 & 详情图片自适应 ─── */

.assembly-form-photo,
.detail-grid img {
    width: 100%;
    max-width: 680px;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(7,94,234,0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: block;
}

/* ─── Toast 通知 ─── */

.toast {
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    padding: 13px 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 8px 28px rgba(6,18,42,0.14);
}

/* ─── 权限卡片 ─── */

.check-card {
    border-radius: 10px;
    border-color: rgba(7,94,234,0.11);
    padding: 11px 13px;
    transition: all 0.15s;
}

.check-card:hover {
    border-color: rgba(7,94,234,0.28);
    background: rgba(7,94,234,0.03);
}

/* ─── 帮助盒 ─── */

.help-box {
    border-radius: 12px;
    background: rgba(7,94,234,0.025);
    border-color: rgba(7,94,234,0.09);
}

/* ─── 提示框 ─── */

.notice {
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
}

/* ─── 代码块 ─── */

code {
    background: rgba(7,94,234,0.05);
    border-color: rgba(7,94,234,0.1);
    color: #0a3a7e;
    border-radius: 6px;
    font-size: 12.5px;
}

/* ─── 直播机器卡 ─── */

.live-machine-card {
    border-radius: 12px;
    border-color: rgba(7,94,234,0.1);
    transition: all 0.18s ease;
}

.live-machine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7,94,234,0.14);
}

/* ─── 引用报价面板 ─── */

.quote-filter-panel {
    margin-bottom: 14px;
}

/* ─── 关于页面 ─── */

.about-hero {
    border-radius: 16px;
}

/* ─── 手机端专属元素: PC 隐藏 ─── */

.mobile-menu-btn,
.mobile-quick-bar {
    display: none;
}

/* ====================================================
   手机端重设计 (≤900px)
   ==================================================== */

@media (max-width: 900px) {

    /* ── 页面背景简化 ── */

    body {
        background: #f3f8ff;
        font-size: 14.5px;
    }

    /* ── 顶栏紧凑化 ── */

    .app-header .topbar {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px 14px !important;
        width: 100% !important;
        grid-template-columns: unset !important;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 15.5px;
    }

    .brand span {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    /* 搜索栏: 默认隐藏，展开导航时显示 */
    .global-search {
        display: none !important;
        grid-column: unset !important;
        order: unset !important;
    }

    .app-header.mobile-nav-open .global-search {
        display: block !important;
        padding: 0 14px 10px;
        width: 100%;
    }

    /* 用户栏: 精简，隐藏姓名 */
    .userbar {
        flex-direction: row;
        gap: 4px;
        flex-shrink: 0;
    }

    .userbar a:first-child {
        display: none;
    }

    .userbar a:not(:first-child) {
        min-height: 34px;
        padding: 0 9px;
        font-size: 12.5px;
        border-radius: 8px;
        background: rgba(7,94,234,0.05);
        color: #2a4260;
    }

    .userbar a:not(:first-child):hover {
        background: rgba(7,94,234,0.1);
        color: var(--primary-strong);
    }

    /* ── 汉堡按钮 ── */

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border: 1.5px solid rgba(7,94,234,0.14);
        border-radius: 9px;
        background: rgba(7,94,234,0.04);
        color: var(--primary);
        cursor: pointer;
        transition: all 0.15s;
        font-size: 0;
    }

    .mobile-menu-btn:hover {
        background: rgba(7,94,234,0.1);
        border-color: rgba(7,94,234,0.28);
    }

    .app-header.mobile-nav-open .mobile-menu-btn {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
        box-shadow: 0 2px 8px rgba(7,94,234,0.3);
    }

    /* ── 模块导航 & 子导航: 默认隐藏 ── */

    .module-nav,
    .sub-nav {
        display: none !important;
        width: 100%;
        padding: 8px 14px 10px;
        background: rgba(255,255,255,0.98);
        border-top: 1px solid rgba(7,94,234,0.06);
        flex-wrap: wrap;
    }

    .app-header.mobile-nav-open .module-nav,
    .app-header.mobile-nav-open .sub-nav {
        display: flex !important;
    }

    .module-link,
    .nav-link {
        min-height: 38px;
        padding: 0 13px;
        font-size: 13px;
    }

    /* ── 手机快捷栏 ── */

    .mobile-quick-bar {
        display: flex;
        flex-direction: column;
        background: rgba(255,255,255,0.98);
        border-top: 1px solid rgba(7,94,234,0.06);
    }

    .mqb-toggle {
        display: flex;
        align-items: center;
        gap: 7px;
        width: 100%;
        padding: 7px 14px;
        background: linear-gradient(90deg,
            rgba(7,94,234,0.04) 0%,
            rgba(6,201,223,0.04) 100%);
        border: none;
        border-bottom: 1px solid rgba(7,94,234,0.06);
        color: var(--primary);
        font: 700 12px/1 inherit;
        letter-spacing: 0.02em;
        cursor: pointer;
        text-align: left;
        transition: background 0.15s;
    }

    .mqb-toggle:hover {
        background: rgba(7,94,234,0.07);
    }

    .mqb-chevron {
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        color: rgba(7,94,234,0.6);
    }

    .app-header.mobile-nav-open .mqb-chevron {
        transform: rotate(180deg);
    }

    .mqb-links {
        display: flex;
        gap: 8px;
        padding: 9px 14px 11px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mqb-links::-webkit-scrollbar { display: none; }

    .mqb-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        height: 33px;
        padding: 0 15px;
        border-radius: 999px;
        border: 1.5px solid rgba(7,94,234,0.15);
        background: #fff;
        color: #2a4260;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
        transition: all 0.15s;
    }

    .mqb-link:hover {
        border-color: rgba(7,94,234,0.34);
        background: rgba(7,94,234,0.04);
    }

    .mqb-link.active {
        border-color: transparent;
        background: linear-gradient(130deg, #075eea 0%, #05b4cc 100%);
        color: #fff;
        box-shadow: 0 3px 12px rgba(7,94,234,0.30);
    }

    /* ── Shell ── */

    .shell {
        width: calc(100% - 16px) !important;
        margin-top: 16px;
        margin-bottom: 36px;
    }

    /* ── 页面标题 ── */

    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }

    .page-head h1 {
        font-size: 20px;
    }

    .page-head > .btn {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }

    /* ── 面板 ── */

    .panel,
    .metric,
    .request-card {
        padding: 14px;
        border-radius: 12px;
    }

    /* ── 数据指标 ── */

    .metrics {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .metric strong {
        font-size: 22px;
    }

    /* ── 提成统计 ── */

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* ── 快捷系统卡 ── */

    .system-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .system-card {
        min-height: 72px;
        padding: 14px 16px;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        display: flex !important;
    }

    .system-card::after { display: none; }

    .system-card strong { font-size: 15px; }

    /* ── 按钮 ── */

    .btn,
    button:not(.mobile-menu-btn):not(.mqb-toggle):not(.icon-btn):not([class*="live"]) {
        min-height: 42px;
    }

    .btn.small,
    button.small {
        min-height: 36px;
    }

    /* ── 筛选栏 ── */

    .filter-bar {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .filter-bar label {
        min-width: 0;
    }

    /* ── 表单 ── */

    .form-grid {
        gap: 12px;
    }

    .two-col,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid .wide-field,
    .detail-grid img {
        grid-column: 1 / -1;
    }

    /* ── 弹窗 ── */

    .modal-panel,
    .modal-panel.wide,
    .image-modal-panel {
        width: calc(100% - 18px) !important;
        max-height: 92vh;
        margin: 4vh auto;
        border-radius: 16px !important;
    }

    .modal-panel form.form-grid {
        grid-template-columns: 1fr;
    }

    /* ── 图片自适应 ── */

    .assembly-form-photo,
    .detail-grid img {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 55vw !important;
        height: auto !important;
    }

    /* ── 状态标签 ── */

    .status-tabs {
        padding: 2px 0;
    }

    .status-tabs a {
        min-height: 30px;
        padding: 5px 11px;
        font-size: 12.5px;
    }

    /* ── 申请单卡片 ── */

    .request-card {
        grid-template-columns: 1fr;
    }

    /* ── 页面操作区 ── */

    .page-actions,
    .quick-actions,
    .table-actions,
    .inline-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .inline-form {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    /* ── 直播机器网格 ── */

    .live-machine-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .live-machine-card {
        min-height: 120px;
        padding: 12px;
    }

    /* ── 直播 A5 缩放 ── */

    .live-a5-sheet.live-a5-new {
        transform: scale(0.78);
        margin-bottom: -44mm;
    }

    /* ── 转单卡片 ── */

    .transfer-request-card {
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    /* ── 报价单截图按钮组 ── */

    .quote-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .quote-actions .btn {
        flex: 1 1 140px;
        justify-content: center;
    }
}

/* ── 极小屏幕 (≤480px) ── */

@media (max-width: 480px) {

    body { font-size: 13.5px; }

    .metrics {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-actions,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .panel-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .table-actions,
    .inline-actions {
        grid-template-columns: 1fr;
    }

    .mqb-link {
        font-size: 12.5px;
        height: 31px;
        padding: 0 12px;
    }
}

/* ── 打印时排除手机专属元素 ── */

@media print {
    .mobile-menu-btn,
    .mobile-quick-bar,
    .side-rail,
    .tab-bar {
        display: none !important;
    }
    body.has-sidebar {
        padding-left: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.2  直播机器卡片重设计 — 状态色向内渐变 + 发光边框
   每个状态：外缘为状态色，向卡片中心渐变为浅白，配深色发光边框。
   ═══════════════════════════════════════════════════════════════════════ */

.live-machine-grid-visual .live-machine-card {
    border-width: 1.6px !important;
    border-style: solid !important;
    transition: transform 0.18s ease, box-shadow 0.2s ease !important;
}

/* ── 空闲: 冷灰 ── */
.live-machine-grid-visual .live-status-idle .live-machine-card {
    background: radial-gradient(circle at 50% 32%, #ffffff 0%, #ffffff 46%, #e6eaf0 100%) !important;
    border-color: #94a3b8 !important;
    box-shadow:
        0 0 0 3px rgba(148, 163, 184, 0.12),
        0 0 16px rgba(100, 116, 139, 0.16),
        0 6px 16px rgba(0, 0, 0, 0.05) !important;
}
.live-machine-grid-visual .live-status-idle .live-machine-card b { color: #64748b; }

/* ── 已保存: 蓝色 ── */
.live-machine-grid-visual .live-status-saved .live-machine-card {
    background: radial-gradient(circle at 50% 32%, #ffffff 0%, #ffffff 44%, #dbe8ff 100%) !important;
    border-color: #2563eb !important;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.14),
        0 0 18px rgba(37, 99, 235, 0.20),
        0 6px 16px rgba(37, 99, 235, 0.10) !important;
}
.live-machine-grid-visual .live-status-saved .live-machine-card b { color: #1d4ed8; }
.live-machine-grid-visual .live-status-saved .live-machine-card em { color: #2563eb !important; }

/* ── 上架: 深绿 ── */
.live-machine-grid-visual .live-status-listed .live-machine-card {
    background: radial-gradient(circle at 50% 32%, #ffffff 0%, #ffffff 44%, #d3f3e3 100%) !important;
    border-color: #059669 !important;
    box-shadow:
        0 0 0 3px rgba(5, 150, 105, 0.15),
        0 0 20px rgba(5, 150, 105, 0.24),
        0 6px 16px rgba(5, 150, 105, 0.10) !important;
}
.live-machine-grid-visual .live-status-listed .live-machine-card b { color: #047857; }
.live-machine-grid-visual .live-status-listed .live-machine-card em { color: #059669 !important; }

/* ── 改配中: 琥珀橙 ── */
.live-machine-grid-visual .live-status-modifying .live-machine-card {
    background: radial-gradient(circle at 50% 32%, #ffffff 0%, #ffffff 44%, #fcebcf 100%) !important;
    border-color: #d97706 !important;
    box-shadow:
        0 0 0 3px rgba(217, 119, 6, 0.15),
        0 0 20px rgba(217, 119, 6, 0.24),
        0 6px 16px rgba(217, 119, 6, 0.09) !important;
}
.live-machine-grid-visual .live-status-modifying .live-machine-card b { color: #b45309; }
.live-machine-grid-visual .live-status-modifying .live-machine-card em { color: #d97706 !important; }

/* ── 已售出: 红 ── */
.live-machine-grid-visual .live-status-sold .live-machine-card {
    background: radial-gradient(circle at 50% 32%, #ffffff 0%, #ffffff 44%, #fcdcdc 100%) !important;
    border-color: #dc2626 !important;
    box-shadow:
        0 0 0 3px rgba(220, 38, 38, 0.13),
        0 0 18px rgba(220, 38, 38, 0.20),
        0 6px 16px rgba(220, 38, 38, 0.08) !important;
}
.live-machine-grid-visual .live-status-sold .live-machine-card b { color: #b91c1c; }
.live-machine-grid-visual .live-status-sold .live-machine-card em { color: #dc2626 !important; }

/* hover：上浮 + 加强发光 */
.live-machine-grid-visual .live-machine-card:hover { transform: translateY(-3px); }
.live-machine-grid-visual .live-status-idle .live-machine-card:hover {
    box-shadow: 0 0 0 4px rgba(148,163,184,0.2), 0 0 22px rgba(100,116,139,0.2), 0 10px 22px rgba(0,0,0,0.08) !important;
}
.live-machine-grid-visual .live-status-saved .live-machine-card:hover {
    box-shadow: 0 0 0 4px rgba(37,99,235,0.22), 0 0 26px rgba(37,99,235,0.3), 0 10px 22px rgba(37,99,235,0.14) !important;
}
.live-machine-grid-visual .live-status-listed .live-machine-card:hover {
    box-shadow: 0 0 0 4px rgba(5,150,105,0.22), 0 0 28px rgba(5,150,105,0.32), 0 10px 22px rgba(5,150,105,0.14) !important;
}
.live-machine-grid-visual .live-status-modifying .live-machine-card:hover {
    box-shadow: 0 0 0 4px rgba(217,119,6,0.22), 0 0 26px rgba(217,119,6,0.32), 0 10px 22px rgba(217,119,6,0.12) !important;
}
.live-machine-grid-visual .live-status-sold .live-machine-card:hover {
    box-shadow: 0 0 0 4px rgba(220,38,38,0.2), 0 0 24px rgba(220,38,38,0.26), 0 10px 22px rgba(220,38,38,0.1) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.1  手机端 — 接单大厅 / 我的装机单 隐藏搜索筛选面板
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    body[data-page="assembly_hall"] .panel:has(.filter-bar),
    body[data-page="assembly_mine"] .panel:has(.filter-bar) {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.1  新机配置单编辑界面美化
   ═══════════════════════════════════════════════════════════════════════ */

/* meta 信息区域 */
.quote-meta {
    display: grid;
    grid-template-columns: 1.7fr 0.75fr 0.75fr;
    gap: 10px;
    margin: 12px 0 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(7,94,234,0.03), rgba(6,201,223,0.04));
    border: 1px solid rgba(7, 94, 234, 0.12);
    border-radius: 12px;
    width: min(950px, 100%);
}

.quote-meta label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7a8d;
    letter-spacing: 0.02em;
}

.quote-meta label input {
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d0dcea;
    border-radius: 8px;
    background: #ffffff;
    color: #1a2030;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.quote-meta label input:focus {
    border-color: #075eea;
    box-shadow: 0 0 0 3px rgba(7, 94, 234, 0.1);
    outline: none;
}

/* 模板面板 */
.quote-template-panel {
    background: linear-gradient(160deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #c7daf6;
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quote-template-title {
    font-size: 12px;
    font-weight: 800;
    color: #075eea;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 6px;
    border-bottom: 1.5px solid rgba(7, 94, 234, 0.15);
    margin-bottom: 2px;
}

.quote-template-panel label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: #5a6a7e;
}

.quote-template-panel label input,
.quote-template-panel label select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #c5d6ef;
    border-radius: 7px;
    background: #ffffff;
    color: #1a2030;
    font-size: 13px;
}

.quote-template-panel label input:focus,
.quote-template-panel label select:focus {
    border-color: #075eea;
    box-shadow: 0 0 0 2px rgba(7, 94, 234, 0.1);
    outline: none;
}

.quote-template-panel .btn.small {
    height: 30px;
    font-size: 12px;
    border-radius: 7px;
}

/* 颜色控件小标签 */
.quote-color-controls label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7a8d;
    gap: 4px;
}

.quote-color-controls input[type="color"] {
    width: 100%;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #c5d6ef;
    padding: 2px;
    cursor: pointer;
}

/* quote-panel 整体 */
.quote-inline-panel.quote-panel {
    border-radius: 16px;
    border: 1px solid #dce8f8;
    background: linear-gradient(160deg, #f7faff 0%, #ffffff 60%);
    padding: 20px 22px 24px;
    box-shadow: 0 2px 20px rgba(7, 94, 234, 0.06);
}

/* 版本回溯按钮 */
.btn.quote-version-launch {
    margin-top: 8px;
    background: #ffffff;
    color: #5a6a7e;
    border: 1px solid #d0dcea;
    font-size: 12px;
    font-weight: 600;
    height: 30px;
    border-radius: 8px;
}
.btn.quote-version-launch:hover {
    border-color: #075eea;
    color: #075eea;
    background: #f5f9ff;
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.1  整体外观优化补丁
   ═══════════════════════════════════════════════════════════════════════ */

/* page-head 渐变下划线 */
.page-head {
    position: relative;
}
.page-head::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(7,94,234,0.18) 20%, rgba(6,201,223,0.18) 80%, transparent);
    pointer-events: none;
}

/* panel 卡片圆角增强 */
.panel {
    border-radius: 14px !important;
}

/* 按钮通用过渡 */
.btn {
    transition: box-shadow 0.18s, transform 0.14s, background 0.18s !important;
}
.btn:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12) !important;
}
.btn.primary:hover:not(:disabled) {
    box-shadow: 0 4px 18px rgba(7, 94, 234, 0.3) !important;
}
.btn.danger:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25) !important;
}

/* modal 圆角增强 */
.modal-box {
    border-radius: 18px !important;
}

/* 表格 hover 行 */
table tbody tr:hover td {
    background: rgba(7, 94, 234, 0.03);
}

/* 直播机器卡片 badge 标题样式 */
.live-machine-card > span {
    font-size: 15px;
    font-weight: 700;
    color: #1a2030;
}
.live-machine-card > em {
    font-style: normal;
    font-size: 20px;
    font-weight: 900;
    font-family: Consolas, "Courier New", monospace;
}
.live-machine-card > small {
    color: #5a6a7e;
    font-size: 12.5px;
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.2  直播机器回溯版本横幅 + 版本表操作
   ═══════════════════════════════════════════════════════════════════════ */

.live-version-banner {
    margin: 0 0 14px;
    padding: 11px 16px;
    border: 1px solid #c9a227;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff8e6, #fffdf5);
    color: #8a6d0b;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.12);
}
.live-version-banner a {
    color: #075eea;
    font-weight: 700;
    text-decoration: underline;
}

#live-version-modal .version-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}
#live-version-modal tr.is-current-version td {
    background: rgba(7, 94, 234, 0.07);
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.3  配件资料逐行自动保存状态指示（第9项）
   ═══════════════════════════════════════════════════════════════════════ */

.component-sheet tbody tr.row-saving > td {
    box-shadow: inset 3px 0 0 #f59e0b;
}
.component-sheet tbody tr.row-saved > td {
    box-shadow: inset 3px 0 0 #16a34a;
    animation: rowSavedFade 1.4s ease forwards;
}
.component-sheet tbody tr.row-error > td {
    box-shadow: inset 3px 0 0 #dc2626;
    background: rgba(220, 38, 38, 0.045);
}
@keyframes rowSavedFade {
    0% { background: rgba(22, 163, 74, 0.12); }
    100% { background: transparent; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.5  左侧图标栏 + 顶部标签页（第5项，仅 PC；手机端保持紧凑栏）
   ═══════════════════════════════════════════════════════════════════════ */

:root { --rail-w: 96px; }

.side-rail { display: none; }

@media (min-width: 901px) {
    body.has-sidebar { padding-left: var(--rail-w); }

    .side-rail {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: var(--rail-w);
        padding: 12px 0;
        background: linear-gradient(180deg, #0b2b56 0%, #0a3f86 55%, #075eea 100%);
        box-shadow: 2px 0 20px rgba(7, 30, 70, 0.20);
        overflow-y: auto;
        z-index: 60;
    }
    .side-rail::-webkit-scrollbar { width: 0; }

    .side-brand {
        display: flex; align-items: center; justify-content: center;
        padding: 4px 0 14px;
    }
    .side-brand img {
        width: 42px; height: 42px; border-radius: 11px;
        background: #fff; padding: 5px; box-sizing: border-box;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    }

    .side-modules { display: flex; flex-direction: column; gap: 2px; }
    .side-module {
        position: relative;
        display: flex; flex-direction: column; align-items: center; gap: 5px;
        padding: 11px 4px;
        color: rgba(255, 255, 255, 0.82);
        font-size: 12px; font-weight: 600; text-decoration: none;
        transition: background 0.16s ease, color 0.16s ease;
    }
    .side-module .side-ico { width: 24px; height: 24px; display: grid; place-items: center; }
    .side-module .module-task-badge {
        position: absolute;
        top: 5px;
        right: 8px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        margin-left: 0;
        font-size: 10px;
        box-shadow: 0 4px 10px rgba(239, 68, 68, 0.32);
    }
    .side-module .side-ico svg { width: 22px; height: 22px; }
    .side-module:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
    .side-module.active { color: #fff; background: rgba(255, 255, 255, 0.16); }
    .side-module.active::before {
        content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
        width: 3px; background: #06c9df; border-radius: 0 3px 3px 0;
    }

    /* PC：侧栏取代顶部模块导航，topbar 的 logo 隐藏（侧栏已有） */
    .app-header .module-nav { display: none; }
    .app-header .topbar .brand { display: none; }
    .mobile-quick-bar { display: none; }

    /* 顶部标签页 */
    .tab-bar {
        display: flex; align-items: stretch; gap: 4px;
        padding: 7px 14px 0;
        background: #eef3fb;
        border-bottom: 1px solid #dbe6f5;
        overflow-x: auto;
        min-height: 39px;
    }
    .tab-bar::-webkit-scrollbar { height: 4px; }
    .tab-bar::-webkit-scrollbar-thumb { background: #c3d4ea; border-radius: 4px; }
    .tab-item {
        display: inline-flex; align-items: center; gap: 7px;
        height: 32px; padding: 0 9px 0 14px;
        background: #f8fbff; color: #3a4a5e;
        border: 1px solid #dbe6f5; border-bottom: none;
        border-radius: 9px 9px 0 0;
        font-size: 13px; font-weight: 600; white-space: nowrap;
        text-decoration: none; cursor: pointer; max-width: 190px;
        transition: background 0.14s ease, color 0.14s ease;
    }
    .tab-item:hover { background: #fff; }
    .tab-item .tab-text { overflow: hidden; text-overflow: ellipsis; }
    .tab-item.active {
        background: #fff; color: #075eea; border-color: #cfe0f4;
        box-shadow: inset 0 -2px 0 #075eea;
    }
    .tab-item .tab-close {
        display: inline-grid; place-items: center;
        width: 17px; height: 17px; border-radius: 50%;
        font-size: 15px; line-height: 1; color: #9aa7b6;
    }
    .tab-item .tab-close:hover { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
    /* 第2项：标签超 50% 时右侧“关闭其他”按钮（吸附右边，始终可见） */
    .tab-close-others {
        position: sticky; right: 6px; align-self: center; flex: 0 0 auto;
        margin-left: 6px; height: 28px; padding: 0 12px;
        border: 1px solid #cbd8ea; border-radius: 8px;
        background: #fff; color: #d4381f; font-size: 12px; font-weight: 800;
        white-space: nowrap; cursor: pointer;
        box-shadow: -10px 0 12px -6px rgba(15, 40, 90, 0.18);
    }
    .tab-close-others:hover { background: #fff2f0; border-color: #f4b7ab; }
}

@media (max-width: 900px) {
    .side-rail { display: none !important; }
    body.has-sidebar { padding-left: 0 !important; }
    .tab-bar { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.5  第10项：成本计算列逐行对齐加固 —— 单元格严格按同步高度渲染，
   不让输入框默认高度（28px）把 PRO 版(23px)的行撑高造成逐行漂移。
   ═══════════════════════════════════════════════════════════════════════ */

.quote-cost-table th,
.quote-cost-table td {
    box-sizing: border-box;
    overflow: hidden;
    vertical-align: middle;
}
.quote-cost-table input {
    box-sizing: border-box;
    padding: 0;
    min-height: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.6  第12项：整体外观/动效统一润色（保守、附加式，不动既有结构）
   ═══════════════════════════════════════════════════════════════════════ */

/* 页头淡入（仅透明度，避免影响依赖定位测算的配置单编辑器） */
.page-head { animation: mcFade 0.3s ease both; }
@keyframes mcFade { from { opacity: 0; } to { opacity: 1; } }

/* 子导航胶囊化，呼应顶部标签页（PC） */
@media (min-width: 901px) {
    .app-header .sub-nav {
        gap: 6px;
        padding: 9px 16px;
        background: #ffffff;
        border-bottom: 1px solid #eaf0f8;
    }
    .app-header .sub-nav .nav-link {
        padding: 6px 14px;
        border-radius: 999px;
        font-weight: 600;
        color: #46566b;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .app-header .sub-nav .nav-link:hover { background: #eef4fd; color: #075eea; }
    .app-header .sub-nav .nav-link.active {
        background: linear-gradient(135deg, #075eea, #06c9df);
        color: #fff;
        box-shadow: 0 4px 12px rgba(7, 94, 234, 0.22);
    }
}

/* 细滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c8d6e8; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a9bdd6; }

/* 模态弹出（仅透明度，兼容任意居中方式，不破坏 transform 定位） */
.modal:not([hidden]) .modal-panel,
.modal:not([hidden]) .modal-box {
    animation: mcFade 0.2s ease both;
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.7  第10项（重做）：成本计算列改为绝对定位逐行对齐
   每条成本行由 JS 按对应配件行的实测位置精确放置，彻底消除逐行累积偏差。
   ═══════════════════════════════════════════════════════════════════════ */

.quote-cost-list { position: relative; width: 100%; }

.quote-cost-list-head {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #252a30;
    background: #ffffff;
    color: #20262d;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    min-height: 36px;
}

.quote-cost-lines { position: relative; width: 100%; }

.quote-cost-line {
    position: absolute;
    left: 0;
    right: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border: 1px solid #d3d9e2;
    border-top: none;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}
.quote-cost-line:first-child { border-top: 1px solid #d3d9e2; }
.quote-cost-line.quote-cost-gift-row { background: #f3f6fa; }

.quote-cost-line .quote-cost-editor {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color: #20262d;
    font: 600 13px Consolas, "Courier New", monospace;
    text-align: right;
    padding: 0 12px;
    box-sizing: border-box;
    outline: none;
}
.quote-cost-line .quote-cost-editor:focus {
    background: #fffbe6;
    box-shadow: inset 0 0 0 2px #07a9df;
}

/* 第5项：手动改价标记 —— “手改”徽标浮在“成本计算列”左侧的空白里（靠近成本计算列），
   不进成本计算列、不覆盖主表小计；手动改价的报价单元格保持原样、不变色。 */
.quote-cost-line.has-manual-price {
    overflow: visible; /* 让徽标溢出到左侧空白，编辑器本身不会溢出 */
}
.quote-cost-line.has-manual-price::before {
    content: "手改";
    position: absolute;
    right: 100%;
    margin-right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font: 700 10px/1 "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #b45309;
    background: #fff1cf;
    border: 1px solid #f2ce7f;
    border-radius: 4px;
    padding: 2px 5px;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 6;
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.7  第12项：新机配置单编辑器收纳留白，降低凌乱感（保守附加）
   ═══════════════════════════════════════════════════════════════════════ */

/* 左侧工具列：清爽竖向卡片，按钮等宽不再参差 */
.quote-left-tools {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.quote-template-panel { gap: 9px; }
.quote-template-panel .btn.small {
    width: 100%;
    justify-content: center;
    text-align: center;
}
.quote-color-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

/* 成本速算工作台：标签/数值规整为一张干净小卡片 */
.quote-workbench-totals {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f7faff;
    border: 1px solid #dde8f7;
    border-radius: 10px;
    row-gap: 4px;
}

/* 三栏之间留出更舒适的间距（第5项：加宽表格与成本计算列的间距，给“手改”徽标留白） */
.quote-builder-layout { gap: 46px; }

/* ═══════════════════════════════════════════════════════════════════════
   v5.8  第3+4项：二级菜单移入左侧悬浮飞出 + 顶部账号区美化（仅 PC）
   ═══════════════════════════════════════════════════════════════════════ */

@media (min-width: 901px) {
    /* 二级菜单改为侧栏悬浮飞出，隐藏顶部子导航条 */
    .app-header .sub-nav { display: none; }

    .side-rail { overflow: visible; }   /* 让飞出菜单不被裁剪 */
    .side-module-wrap { position: relative; }

    .side-flyout {
        position: absolute;
        left: 100%;
        top: 0;
        min-width: 186px;
        padding: 8px;
        background: #ffffff;
        border: 1px solid #e3ebf5;
        border-radius: 0 12px 12px 0;
        box-shadow: 10px 12px 30px rgba(7, 30, 70, 0.16);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-6px);
        transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
        z-index: 80;
    }
    .side-module-wrap:hover .side-flyout {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    .side-flyout-title {
        padding: 4px 12px 8px;
        font-size: 13px;
        font-weight: 800;
        color: #0b2b56;
        border-bottom: 1px solid #eef2f8;
        margin-bottom: 6px;
    }
    .side-flyout .nav-link {
        display: block;
        padding: 8px 12px;
        border-radius: 8px;
        color: #46566b;
        font-size: 13.5px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: background 0.13s ease, color 0.13s ease;
    }
    .side-flyout .nav-link:hover { background: #eef4fd; color: #075eea; }
    .side-flyout .nav-link.active {
        background: linear-gradient(135deg, #075eea, #06c9df);
        color: #fff;
    }

    /* 顶部账号区美化 */
    .topbar .userbar { gap: 8px; align-items: center; }
    .topbar .userbar a {
        padding: 7px 15px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        color: #46566b;
        text-decoration: none;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .topbar .userbar a[href*="profile"] {
        background: linear-gradient(135deg, rgba(7, 94, 234, 0.1), rgba(6, 201, 223, 0.12));
        color: #075eea;
    }
    .topbar .userbar a[href*="profile"]::before {
        content: "";
        display: inline-block;
        width: 7px;
        height: 7px;
        margin-right: 7px;
        border-radius: 50%;
        background: #22c55e;
        vertical-align: middle;
    }
    .topbar .userbar a:hover { background: #eef4fd; color: #075eea; }
    .topbar .userbar a[href*="logout"]:hover { background: #fdecec; color: #dc2626; }
}

/* 第2项：标签页可左右拖动 */
@media (min-width: 901px) {
    .tab-bar { cursor: grab; scroll-behavior: auto; }
    .tab-bar.dragging { cursor: grabbing; user-select: none; }
    .tab-item { user-select: none; }
    .tab-item.tab-home { font-weight: 700; }
    .tab-item.tab-home .tab-close { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v5.9  第1/2项：直播机器展示图片（编辑器左侧面板 + 首页卡片悬停弹图）
   ═══════════════════════════════════════════════════════════════════════ */

.live-editor-panel.has-live-images { display: flex; align-items: flex-start; gap: 22px; }
.live-editor-panel.has-live-images > .live-editor-form { flex: 1; min-width: 0; }

.live-image-panel {
    width: 264px;
    flex: 0 0 264px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e3ebf5;
    border-radius: 14px;
    background: linear-gradient(160deg, #f8fbff 0%, #ffffff 70%);
    box-shadow: 0 2px 14px rgba(7, 94, 234, 0.05);
    position: sticky;
    top: 16px;
}
.live-image-panel-head { font-size: 14px; font-weight: 800; color: #0b2b56; }
.live-image-panel-head small { font-weight: 600; color: #8a95a4; margin-left: 4px; }
.live-image-thumbs { display: flex; flex-direction: column; gap: 12px; }
.live-image-thumb { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 2px solid #e3ebf5; background: #f1f5f9; }
.live-image-thumb.is-display { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }
.live-image-thumb img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: contain; background: #fff; }
.live-image-badge { position: absolute; left: 6px; top: 6px; background: #16a34a; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.live-image-thumb-actions { display: flex; gap: 6px; padding: 6px; background: rgba(255, 255, 255, 0.92); justify-content: center; }
.btn.tiny { height: 24px; padding: 0 9px; font-size: 11px; line-height: 1; border-radius: 6px; }
.live-image-empty { padding: 18px 12px; text-align: center; color: #9aa5b4; font-size: 13px; line-height: 1.7; background: #f5f8fc; border-radius: 10px; }
.live-image-upload { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.live-image-pick { text-align: center; cursor: pointer; }
.live-image-hint { font-size: 11px; color: #9aa5b4; text-align: center; }
.live-image-download { width: 100%; }

/* 直播机器：商城标题 / 商城价格输入行 */
.live-shop-fields { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 10px; }
.live-shop-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #24344d; flex: 1; min-width: 220px; }
.live-shop-fields label small { font-weight: 400; color: #8a97ad; }
.live-shop-fields input { width: 100%; }
.live-shop-fields input[readonly] { background: #f4f6fa; color: #8a97ad; }
@media print { .live-shop-fields { display: none !important; } }

/* 自营商城状态块（直播机器左侧面板） */
.live-shop-status { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #dbe3ef; display: flex; flex-direction: column; gap: 6px; }
.live-shop-status .live-image-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-shop-status-form { display: flex; gap: 6px; align-items: center; }
.live-shop-status-form select { flex: 1; min-width: 0; }

/* 首页卡片悬停弹出展示图 */
.live-machine-card-wrap { position: relative; }
.live-card-hover-img {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) scale(0.96);
    width: 244px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e3ebf5;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(7, 30, 70, 0.24);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 90;
    pointer-events: none;
}
.live-card-hover-img img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: 8px; }
.live-machine-card-wrap.has-card-img:hover .live-card-hover-img { opacity: 1; visibility: visible; transform: translateY(-50%) scale(1); }

@media (max-width: 900px) {
    .live-editor-panel.has-live-images { display: block; }
    .live-image-panel { width: auto; flex: none; position: static; margin-bottom: 16px; }
    .live-card-hover-img { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v6.0  第2项：直播卡片柔光 + 柔和内渐变重做（去掉生硬实色描边环，
   渐变更轻柔，悬停更亮、上浮更明显）
   ═══════════════════════════════════════════════════════════════════════ */

.live-machine-grid-visual .live-machine-card {
    border-width: 1.5px !important;
    border-radius: 15px !important;
    transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.32s ease, border-color 0.32s ease, background 0.32s ease !important;
}
.live-machine-grid-visual .live-machine-card:hover { transform: translateY(-5px) !important; }

/* 空闲 · 灰 */
.live-machine-grid-visual .live-status-idle .live-machine-card {
    background: radial-gradient(130% 96% at 50% -12%, #ffffff 0%, #ffffff 64%, #eef1f5 100%) !important;
    border-color: rgba(148, 163, 184, 0.42) !important;
    box-shadow: 0 0 16px rgba(100, 116, 139, 0.10), 0 8px 22px rgba(15, 23, 42, 0.05) !important;
}
.live-machine-grid-visual .live-status-idle .live-machine-card:hover {
    border-color: rgba(148, 163, 184, 0.85) !important;
    box-shadow: 0 0 30px rgba(100, 116, 139, 0.20), 0 16px 32px rgba(15, 23, 42, 0.10) !important;
}

/* 已保存 · 蓝 */
.live-machine-grid-visual .live-status-saved .live-machine-card {
    background: radial-gradient(130% 96% at 50% -12%, #ffffff 0%, #ffffff 64%, #e9f1ff 100%) !important;
    border-color: rgba(37, 99, 235, 0.40) !important;
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.12), 0 8px 22px rgba(37, 99, 235, 0.07) !important;
}
.live-machine-grid-visual .live-status-saved .live-machine-card:hover {
    border-color: rgba(37, 99, 235, 0.92) !important;
    box-shadow: 0 0 36px rgba(37, 99, 235, 0.30), 0 16px 34px rgba(37, 99, 235, 0.16) !important;
}

/* 上架 · 绿 */
.live-machine-grid-visual .live-status-listed .live-machine-card {
    background: radial-gradient(130% 96% at 50% -12%, #ffffff 0%, #ffffff 64%, #e9f9f1 100%) !important;
    border-color: rgba(5, 150, 105, 0.42) !important;
    box-shadow: 0 0 18px rgba(5, 150, 105, 0.13), 0 8px 22px rgba(5, 150, 105, 0.07) !important;
}
.live-machine-grid-visual .live-status-listed .live-machine-card:hover {
    border-color: rgba(5, 150, 105, 0.95) !important;
    box-shadow: 0 0 38px rgba(5, 150, 105, 0.32), 0 16px 34px rgba(5, 150, 105, 0.17) !important;
}

/* 改配中 · 橙 */
.live-machine-grid-visual .live-status-modifying .live-machine-card {
    background: radial-gradient(130% 96% at 50% -12%, #ffffff 0%, #ffffff 64%, #fdf3e1 100%) !important;
    border-color: rgba(217, 119, 6, 0.42) !important;
    box-shadow: 0 0 18px rgba(217, 119, 6, 0.13), 0 8px 22px rgba(217, 119, 6, 0.07) !important;
}
.live-machine-grid-visual .live-status-modifying .live-machine-card:hover {
    border-color: rgba(217, 119, 6, 0.95) !important;
    box-shadow: 0 0 38px rgba(217, 119, 6, 0.32), 0 16px 34px rgba(217, 119, 6, 0.16) !important;
}

/* 已售出 · 红 */
.live-machine-grid-visual .live-status-sold .live-machine-card {
    background: radial-gradient(130% 96% at 50% -12%, #ffffff 0%, #ffffff 64%, #fdeded 100%) !important;
    border-color: rgba(220, 38, 38, 0.38) !important;
    box-shadow: 0 0 16px rgba(220, 38, 38, 0.11), 0 8px 22px rgba(220, 38, 38, 0.06) !important;
}
.live-machine-grid-visual .live-status-sold .live-machine-card:hover {
    border-color: rgba(220, 38, 38, 0.90) !important;
    box-shadow: 0 0 34px rgba(220, 38, 38, 0.28), 0 16px 34px rgba(220, 38, 38, 0.15) !important;
}

/* v6.1 顶栏账号显示 [公司名]姓名 */
.userbar-user { display: inline-flex; align-items: center; gap: 2px; }
.userbar-company { color: #075eea; font-weight: 800; margin-right: 3px; }
.userbar-link { background: none; border: 0; cursor: pointer; font: inherit; color: inherit; padding: 0; }
.userbar-link:hover { color: #075eea; }
.login-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; margin: -4px 0 14px; cursor: pointer; }
.login-remember input { width: 15px; height: 15px; }

/* ═══════════════════════════════════════════════════════════════════════
   v6.4  第13项：首页数据看板 + 自定义快捷入口
   ═══════════════════════════════════════════════════════════════════════ */
.dash-head h1 { font-size: 30px; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 2px 0 6px; }
.dash-card {
    display: flex; flex-direction: column; gap: 2px;
    padding: 18px 18px 15px 22px; border-radius: 16px; text-decoration: none;
    background: #fff; border: 1px solid #e8eef6;
    box-shadow: 0 10px 26px rgba(28, 98, 160, 0.07);
    position: relative; overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.24s ease;
}
.dash-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(28, 98, 160, 0.16); }
.dash-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.dash-ico { font-size: 21px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 8px; }
.dash-val { font-size: 34px; font-weight: 900; line-height: 1.05; color: #101827; }
.dash-label { font-size: 13px; color: #64748b; font-weight: 600; }
.dash-a::before { background: #3b82f6; } .dash-a .dash-ico { background: #e0edff; }
.dash-b::before { background: #06b6d4; } .dash-b .dash-ico { background: #d5f6fb; }
.dash-c::before { background: #22c55e; } .dash-c .dash-ico { background: #dcfce7; }
.dash-d::before { background: #f59e0b; } .dash-d .dash-ico { background: #fef3c7; }
.dash-e::before { background: #f97316; } .dash-e .dash-ico { background: #ffedd5; }
.dash-f::before { background: #ef4444; } .dash-f .dash-ico { background: #fee2e2; }
.dash-g::before { background: #8b5cf6; } .dash-g .dash-ico { background: #ede9fe; }
.dash-h::before { background: #ec4899; } .dash-h .dash-ico { background: #fce7f3; }
.dash-quick { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-quick-btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 10px 16px 10px 10px; border-radius: 12px;
    background: linear-gradient(135deg, #f7faff, #eef4fd);
    border: 1px solid #dbe6f5; color: #1a2740; font-weight: 700; text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.dash-quick-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(7, 94, 234, 0.16); }
.dash-quick-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, #075eea, #06c9df); color: #fff; font-weight: 800; }
.dash-custom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 900px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-custom-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 打印时排除手机专属元素（已移至上方，此为补充） ── */


/* qingzhan brand tagline */
.brand .brand-text,
.login-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.brand .brand-text strong,
.login-brand .brand-text strong {
    font-size: 1em;
}

.brand .brand-text small,
.login-brand .brand-text small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.login-brand .brand-text small {
    color: rgba(21, 32, 58, 0.68);
}

/* ═══════════════════════════════════════════════════════════════════════
   第1项：iframe 标签页外壳 —— 每个标签一个 iframe，切换只显示/隐藏，永不重载
   ═══════════════════════════════════════════════════════════════════════ */
.tab-host-main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    animation: none !important;
}
.tab-host {
    position: relative;
    width: 100%;
    min-height: 360px;
}
.tab-views {
    position: relative;
    width: 100%;
    height: 100%;
}
.tab-view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #f4f7fc;
    display: none;
}
.tab-view.active {
    display: block;
}
/* embed 页（iframe 内）：无侧栏留白，内容自身居中 */
body.is-embed {
    padding-left: 0 !important;
    background:
        radial-gradient(circle at top left, rgba(20, 108, 120, 0.10), transparent 32rem),
        linear-gradient(180deg, #f8fafb 0%, var(--bg) 42%);
}
/* 第2项：放大内容显示区域 —— 列表/资料/管理等页面尽量占满可用宽度。 */
body.is-embed .embed-shell {
    margin-top: 14px;
    width: min(1920px, calc(100% - 40px));
}
/* 铁律：只有“配置单编辑器 / 配置单模板 / 直播机器配置”保持原始窄宽，
   放大显示区域绝不影响这些配置单的编辑与打印；而“全部订单/二手改配订单”等列表页用放大宽度。 */
body.is-embed.is-config-sheet .embed-shell {
    width: min(1280px, calc(100% - 32px));
}

/* 第2项：装机订单操作按钮 —— 自动换行、不再挤成一行 */
.assembly-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    white-space: normal;
}
.assembly-row-actions .inline-form,
.assembly-row-actions .inline-actions {
    margin: 0;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   第3项：手机端快速上传直播机器展示图 + 手机端布局收紧
   ═══════════════════════════════════════════════════════════════════════ */
.qup-panel { display: flex; flex-direction: column; gap: 12px; }
.qup-label { font-weight: 700; color: #0b2b56; font-size: 14px; }
.qup-machines { display: flex; flex-wrap: wrap; gap: 8px; }
.qup-chip {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 58px; height: 42px; padding: 0 14px;
    border-radius: 11px; border: 1px solid #d7e0eb; background: #f7fafd;
    color: #33465c; font-weight: 800; text-decoration: none;
}
.qup-chip.active {
    background: linear-gradient(135deg, #075eea, #06c9df); color: #fff;
    border-color: transparent; box-shadow: 0 6px 14px rgba(7, 94, 234, 0.24);
}
.qup-chip.live-status-listed { box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.35); }
.qup-chip.live-status-sold { opacity: 0.65; }
.qup-images { display: flex; flex-wrap: wrap; gap: 10px; }
.qup-thumb { position: relative; width: 120px; }
.qup-thumb img {
    width: 120px; height: 120px; object-fit: cover;
    border-radius: 10px; border: 1px solid #e3ebf5; background: #f1f5f9; display: block;
}
.qup-thumb form { position: absolute; right: 4px; top: 4px; margin: 0; }
.qup-upload { display: flex; flex-direction: column; gap: 12px; }
.qup-pick {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 24px 16px; border: 2px dashed #b9cbe6; border-radius: 14px;
    background: #f6faff; color: #3a6ea5; font-weight: 800; cursor: pointer; text-align: center;
}
.qup-pick input[type="file"] { width: 100%; max-width: 320px; }
.btn.wide { width: 100%; justify-content: center; }

.erp-push-total-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px 14px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d8e8ff;
    border-radius: 10px;
    background: #f7fbff;
}
.erp-push-total-bar label {
    min-width: 220px;
    font-weight: 800;
    color: #0b2b56;
}
.erp-push-total-bar input {
    margin-top: 6px;
}

/* 手机端整体收紧一点，减少拥挤 */
@media (max-width: 900px) {
    .panel { padding: 14px; }
    .page-head { flex-wrap: wrap; gap: 6px 10px; align-items: center; }
    .page-head h1 { font-size: 21px; }
    .filter-bar { flex-wrap: wrap; gap: 8px; }
    .quick-actions { gap: 6px; }
    .qup-thumb, .qup-thumb img { width: 100px; height: 100px; }
    .qup-chip { min-width: 52px; height: 40px; padding: 0 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   订单中心（page=orders）：整屏工作区 —— 页面不滚动，
   上=订单列表（内部滚动），下=选中订单操作区（内部滚动）。
   ═══════════════════════════════════════════════════════════════════════ */
body.is-embed[data-page="orders"] { overflow: hidden; }
body.is-embed[data-page="orders"] .embed-shell {
    height: calc(100vh - 20px);
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.orders-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.orders-top { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
/* 打开操作区后：列表区压缩为约 4 成高度，操作区占约 6 成，各自内部滚动 */
.orders-page.has-dock .orders-top { flex: 0 1 42%; }
.orders-page.has-dock .orders-dock { flex: 1 1 58%; }

.orders-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.orders-toolbar-title h1 { margin: 0; font-size: 20px; font-weight: 850; color: #0b2b56; }
.orders-search { display: flex; gap: 6px; flex: 1; min-width: 220px; max-width: 460px; }
.orders-search input[name="q"] { flex: 1; min-width: 0; height: 34px; border: 1px solid #d7dee8; border-radius: 9px; padding: 0 10px; background: #fbfcfe; }
.orders-toolbar-links { display: flex; gap: 6px; margin-left: auto; }
.orders-chips { padding: 0; }

.orders-list-wrap {
    flex: 1;
    min-height: 0;
    border: 1px solid rgba(215, 225, 233, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 28px rgba(30, 50, 62, 0.06);
    overflow: hidden;
    display: flex;
}
.orders-list-scroll { flex: 1; overflow: auto; }
.orders-list-scroll thead th { position: sticky; top: 0; z-index: 2; background: #f1f7ff; }
.orders-list tr.orders-row { cursor: pointer; }
.orders-list tr.orders-row:hover td { background: rgba(7, 94, 234, 0.05); }
.orders-list tr.orders-row.selected td { background: rgba(7, 94, 234, 0.10); box-shadow: inset 3px 0 0 #075eea; }
.orders-summary { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-purchase-cell { max-width: 150px; }
.orders-purchase-no { display: inline-block; margin-right: 6px; font-family: Consolas, monospace; font-size: 12px; font-weight: 700; color: #075eea; text-decoration: underline dotted; }
.orders-purchase-no.pushed { color: #16a34a; }
.orders-purchase-no.failed { color: #dc2626; }

.orders-dock {
    border-top: 3px solid #075eea;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
}
.orders-dock[hidden] { display: none; }
.orders-dock-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin-bottom: 8px; flex: 0 0 auto; }
.orders-dock-title { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.orders-dock-title strong { font-family: Consolas, monospace; }
.orders-dock-meta { display: flex; align-items: center; gap: 14px; color: #52627a; font-size: 13px; }
.orders-dock-ops { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.orders-dock-ops .inline-actions, .orders-dock-ops .inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.orders-dock-ops select { height: 32px; border: 1px solid #d7dee8; border-radius: 8px; padding: 0 8px; background: #fff; }
.dock-op-label { font-size: 13px; font-weight: 700; color: #52627a; }
.orders-dock-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid #e3ebf5; margin-bottom: 10px; flex: 0 0 auto; }
.dock-tab {
    border: 0; background: transparent; cursor: pointer;
    padding: 8px 15px; font-size: 14px; font-weight: 700; color: #52627a;
    border-radius: 9px 9px 0 0; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.dock-tab:hover { background: #f1f7ff; color: #075eea; }
.dock-tab.active { color: #075eea; background: #f1f7ff; border-bottom-color: #075eea; }
.orders-dock-body { flex: 1; min-height: 0; overflow: auto; }
.dock-pane { display: none; }
.dock-pane.active { display: block; }
.dock-pane h3 { margin: 4px 0 10px; font-size: 15px; color: #0b2b56; }
.dock-total-label { text-align: right; font-weight: 700; }
.dock-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.dock-purchase-lock { font-size: 13px; font-weight: 700; color: #b45309; background: #fff7e8; border: 1px solid #f2ce7f; border-radius: 8px; padding: 6px 10px; }
.orders-detail-pre { white-space: pre-wrap; background: #f7fafd; border: 1px solid #e3ebf5; border-radius: 10px; padding: 12px; font-size: 13px; }
.dock-purchase-request { border: 1px solid #e3ebf5; border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: #fbfdff; }
.dock-pr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }

@media (max-width: 900px) {
    /* 手机端保持普通文档流滚动，避免固定高度局促 */
    body.is-embed[data-page="orders"] { overflow: auto; }
    body.is-embed[data-page="orders"] .embed-shell { height: auto; display: block; }
    .orders-page.has-dock .orders-top { flex: none; }
    .orders-list-scroll { max-height: 46vh; }
    .orders-summary { max-width: 140px; }
    .orders-toolbar-links { margin-left: 0; }
}

/* 订单页 v2 细化：分栏拖动、紧凑勾选、来源徽标、自定义下拉 */
.orders-resizer {
    flex: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: row-resize;
    touch-action: none;
    user-select: none;
}
.orders-resizer span {
    width: 64px; height: 4px; border-radius: 999px;
    background: #c7d6ea;
}
.orders-resizer:hover span { background: #075eea; }
.orders-resizer[hidden] { display: none; }
body.orders-resizing { cursor: row-resize; user-select: none; }
body.orders-resizing iframe { pointer-events: none; }

/* 紧凑表格：小勾选框、窄勾选列、来源列 */
.erp-compact-table th, .erp-compact-table td { padding: 6px 8px; }
.erp-compact-table .erp-check-col { width: 40px; text-align: center; }
.erp-check-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; vertical-align: middle; accent-color: #075eea; }
.erp-src-col { width: 58px; text-align: center; }
.erp-src {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.erp-src.linked { color: #15803d; background: #dcfce7; border: 1px solid #bbf7d0; }
.erp-src.manual { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }
.erp-src.none { color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; }

/* 自定义 ERP 下拉建议框（替代原生 datalist） */
.erp-suggest-box {
    position: fixed;
    z-index: 4000;
    max-height: 260px;
    max-width: min(520px, 92vw);
    overflow: auto;
    background: #fff;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(7, 30, 70, 0.18);
    padding: 4px;
}
.erp-suggest-box[hidden] { display: none; }
.erp-suggest-item {
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: #24344d;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-suggest-item:hover, .erp-suggest-item.active { background: #eef5ff; color: #075eea; }
@media (max-width: 900px) {
    .orders-resizer { display: none; }
}

/* 订单列表：紧凑行高，同屏可见更多订单 */
.orders-list th { padding: 7px 8px; font-size: 12px; }
.orders-list td { padding: 5px 8px; font-size: 13px; line-height: 1.35; }
.orders-list .badge { min-height: 20px; padding: 0 7px; font-size: 11px; }
.orders-list code { padding: 1px 6px; font-size: 12px; }
.orders-list .orders-purchase-no { font-size: 11px; }

/* 订单操作区：整体紧凑（头部、页签、表格、输入框、采购需求卡片） */
.orders-dock { padding: 10px 14px; }
.orders-dock-head { margin-bottom: 4px; gap: 4px 12px; }
.orders-dock-title { font-size: 15px; gap: 8px; }
.orders-dock-title .badge { min-height: 20px; padding: 0 7px; font-size: 11px; }
.orders-dock-meta { font-size: 12px; gap: 10px; }
.orders-dock-ops { gap: 4px 8px; }
.orders-dock-ops .btn.small { min-height: 26px; padding: 0 10px; font-size: 12px; }
.orders-dock-ops select { height: 26px; font-size: 12px; padding: 0 6px; }
.orders-dock-tabs { margin-bottom: 8px; gap: 4px; }
.orders-dock .dock-tab { padding: 5px 12px; font-size: 13px; }
.orders-dock .dock-pane h3 { margin: 2px 0 6px; font-size: 14px; }
.orders-dock .erp-check-table th { padding: 5px 8px; font-size: 12px; }
.orders-dock .erp-check-table td { padding: 4px 8px; font-size: 13px; line-height: 1.35; }
.orders-dock .erp-check-table input:not([type="checkbox"]),
.orders-dock .erp-check-table select {
    height: 28px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 13px;
}
.orders-dock .erp-pill { padding: 1px 8px; font-size: 11px; }
.orders-dock .erp-src { padding: 1px 7px; font-size: 11px; }
.orders-dock .dock-actions { margin: 6px 0; gap: 6px; }
.orders-dock .dock-actions .btn.small { min-height: 26px; padding: 0 10px; font-size: 12px; }
.orders-dock .dock-purchase-request { padding: 8px 10px; margin-top: 8px; }
.orders-dock .dock-pr-head { gap: 8px; margin-bottom: 5px; font-size: 13px; }
.orders-dock .erp-push-form label { font-size: 13px; }
.orders-dock .erp-push-form select { height: 30px; min-height: 30px; font-size: 13px; padding: 0 8px; }
.orders-dock .erp-push-total-bar { gap: 8px; margin: 8px 0; }
.orders-dock .erp-push-total-bar input { height: 28px; min-height: 28px; font-size: 13px; }
.orders-dock .form-actions { margin-top: 6px; }
.orders-dock .detail-grid p { margin: 4px 0; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════
   ★ 青栈 v7 主题层 —— 全局 UI 重构（附加覆盖层，不触碰配置单/打印内部样式）
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --qz-bg: #f2f4f8;
    --qz-panel: #ffffff;
    --qz-line: #e5eaf2;
    --qz-primary: #2f6bff;
    --qz-primary-deep: #1d4fd7;
    --qz-ink: #1c2634;
    --qz-ink-2: #55637a;
    --qz-radius: 12px;
}

/* 背景与文字基调 */
body.has-sidebar,
body.is-embed {
    background: var(--qz-bg) !important;
    color: var(--qz-ink);
}

/* 面板：干净的白卡片、细边框、极轻阴影 */
.panel, .metric, .request-card, .stat-card, .orders-list-wrap, .dash-card {
    border: 1px solid var(--qz-line) !important;
    border-radius: var(--qz-radius) !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(16, 30, 54, 0.04) !important;
}

/* 表格：更轻的表头、干净分隔线 */
th { background: #f7f9fc !important; color: #5c6b82 !important; font-weight: 700; }
td { border-bottom: 1px solid #eef2f7 !important; }
tbody tr:hover td { background: #f7faff; }

/* 按钮体系：统一圆角与层级 */
.btn {
    border-radius: 9px !important;
    font-weight: 600;
    border: 1px solid #d8dfea;
    background: #fff;
    color: #33445c;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.btn:hover { border-color: #b9c6da; background: #f7faff; transform: none; box-shadow: none; }
.btn.primary { background: var(--qz-primary); border-color: var(--qz-primary); color: #fff; }
.btn.primary:hover { background: var(--qz-primary-deep); border-color: var(--qz-primary-deep); }
.btn.success { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.success:hover { background: #15803d; border-color: #15803d; }
.btn.danger { background: #fff; border-color: #f3b4b4; color: #dc2626; }
.btn.danger:hover { background: #fef2f2; border-color: #ef4444; }
.btn.warning { background: #fff7ed; border-color: #fdba74; color: #c2410c; }

/* 输入控件 */
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
    border-radius: 9px;
    border-color: #d8dfea;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--qz-primary) !important;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.13) !important;
}

/* 徽章：柔和色块 */
.badge { border-radius: 7px; font-weight: 700; }

/* 侧栏：更深的石墨蓝 + 活跃高亮块 */
@media (min-width: 901px) {
    .side-rail {
        background: linear-gradient(180deg, #101d33 0%, #14264a 60%, #173059 100%);
        box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
    }
    .side-module { border-radius: 10px; margin: 1px 6px; padding: 10px 2px; }
    .side-module:hover { background: rgba(255, 255, 255, 0.08); }
    .side-module.active { background: rgba(74, 128, 255, 0.28); }
    .side-module.active::before { background: #6ea0ff; }
}

/* ── 第1项：去掉顶栏（PC），标签页置顶，右侧账户区 ── */
@media (min-width: 901px) {
    .app-header .topbar { display: none; }
    .tab-topline {
        display: flex;
        align-items: stretch;
        background: #eef2f9;
        border-bottom: 1px solid #dde5f0;
    }
    .tab-topline .tab-bar { flex: 1; min-width: 0; border-bottom: 0; background: transparent; }
    .tab-userzone {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 12px 0 10px;
        border-left: 1px solid #dde5f0;
        white-space: nowrap;
    }
    .tab-user-search {
        display: grid; place-items: center;
        width: 28px; height: 28px; border-radius: 8px;
        color: #5c6b82; background: #fff; border: 1px solid #dde5f0;
    }
    .tab-user-search:hover { color: var(--qz-primary); border-color: var(--qz-primary); }
    .tab-user-name { font-size: 13px; font-weight: 700; color: #24344d; text-decoration: none; }
    .tab-user-name b { color: var(--qz-primary); font-weight: 800; margin-right: 2px; }
    .tab-user-name:hover { color: var(--qz-primary); }
    .tab-user-logout {
        font-size: 12px; font-weight: 700; color: #8a95a4; text-decoration: none;
        padding: 4px 9px; border-radius: 8px;
    }
    .tab-user-logout:hover { background: #fdeeee; color: #dc2626; }
    /* 标签样式随主题微调 */
    .tab-item { border-radius: 8px 8px 0 0; background: transparent; border-color: transparent; }
    .tab-item:hover { background: rgba(255, 255, 255, 0.75); }
    .tab-item.active { background: #fff; border-color: #dde5f0; box-shadow: inset 0 -2px 0 var(--qz-primary); }
}
@media (max-width: 900px) {
    .tab-topline { display: none; }
}

/* ── 第9项：站内确认弹窗 ── */
.qz-confirm { position: fixed; inset: 0; z-index: 5000; }
.qz-confirm[hidden] { display: none; }
.qz-confirm-mask { position: absolute; inset: 0; background: rgba(15, 25, 42, 0.45); opacity: 0; transition: opacity 0.16s ease; }
.qz-confirm-card {
    position: absolute; left: 50%; top: 38%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(400px, calc(100vw - 48px));
    background: #fff; border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 25, 42, 0.28);
    padding: 22px 22px 18px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.16s ease, transform 0.16s ease;
}
.qz-confirm.show .qz-confirm-mask { opacity: 1; }
.qz-confirm.show .qz-confirm-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.qz-confirm-icon {
    width: 42px; height: 42px; margin: 0 auto 10px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #fff4e5; color: #d97706;
    font-size: 22px; font-weight: 900;
}
.qz-confirm-msg { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: #33445c; word-break: break-all; }
.qz-confirm-actions { display: flex; gap: 10px; justify-content: center; }
.qz-confirm-actions .btn { min-width: 96px; justify-content: center; }

/* ── 弹窗整体美化（第9项） ── */
.modal-panel {
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(15, 25, 42, 0.26) !important;
    border: 0 !important;
    animation: qzModalIn 0.18s ease-out;
}
.modal-mask { background: rgba(15, 25, 42, 0.45); backdrop-filter: blur(2px); }
@keyframes qzModalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head h2 { font-size: 17px; }

/* ── 第4项：列宽拖动手柄 ── */
.col-grip {
    position: absolute;
    right: -3px; top: 0; bottom: 0;
    width: 7px;
    cursor: col-resize;
    z-index: 5;
    touch-action: none;
}
.col-grip:hover { background: linear-gradient(to right, transparent 40%, rgba(47, 107, 255, 0.5) 40%, rgba(47, 107, 255, 0.5) 60%, transparent 60%); }

/* ── 第4项：全新主机/二手改配 底部配置详情坞 ── */
.qsplit-dock {
    position: sticky;
    bottom: 8px;
    z-index: 30;
    margin-top: 12px;
    border-top: 3px solid var(--qz-primary) !important;
    box-shadow: 0 -10px 30px rgba(15, 25, 42, 0.12) !important;
    padding: 4px 14px 12px;
}
.qsplit-dock[hidden] { display: none; }
.qsplit-resizer { display: flex; justify-content: center; padding: 3px 0; cursor: row-resize; touch-action: none; user-select: none; }
.qsplit-resizer span { width: 64px; height: 4px; border-radius: 999px; background: #c7d6ea; }
.qsplit-resizer:hover span { background: var(--qz-primary); }
.qsplit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.qsplit-head strong { font-size: 14px; color: #0b2b56; }
.qsplit-body { overflow: auto; }

/* 列表 dock 重构：左侧版本回溯列 + 右侧明细；行更紧凑 */
.qdetail-wrap { display: flex; gap: 12px; align-items: flex-start; }
.qdetail-versions {
    flex: 0 0 148px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 100%;
    overflow-y: auto;
    border-right: 1px solid #e5eaf2;
    padding-right: 10px;
}
.qdetail-versions .qdetail-edit { margin-bottom: 4px; text-align: center; }
.qdetail-version {
    border: 1px solid #dbe3ef;
    background: #f8fafd;
    border-radius: 7px;
    padding: 4px 8px;
    font-size: 12px;
    color: #43536e;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.qdetail-version small { color: #8a97ad; font-size: 11px; }
.qdetail-version:hover { border-color: var(--qz-primary); }
.qdetail-version.active { background: #eaf1ff; border-color: var(--qz-primary); color: #0b2b56; font-weight: 700; }
.qdetail-main { flex: 1; min-width: 0; overflow-x: auto; }
.qdetail-version-meta { margin: 0 0 6px; font-size: 12px; }
.qsplit-body .quote-detail-table th,
.qsplit-body .quote-detail-table td { padding: 4px 10px; font-size: 12px; line-height: 1.35; }
.qsplit-body .quote-detail-table .erp-link-meta { font-size: 11px; }
.qsplit-body .quote-detail-table .erp-pill { font-size: 11px; padding: 1px 8px; }

/* 订单中心：列标题排序链接 */
.orders-sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.orders-sort-link:hover { color: var(--qz-primary); }
.orders-sort-link.active { color: var(--qz-primary); }
tr.quote-order-row.is-open td { background: rgba(47, 107, 255, 0.08); box-shadow: inset 3px 0 0 var(--qz-primary); }
tr.quote-order-row { cursor: pointer; }

/* ── 第5项：拿货状态 ── */
.erp-src.picked { color: #b45309; background: #fef3c7; border: 1px solid #fde68a; }
tr.pr-item-picked td { background: #fffdf5; }
tr.pr-item-pushed td { background: #f6fef9; }
.pr-item-ops { display: flex; gap: 4px; align-items: center; }
.btn.tiny.primary { background: var(--qz-primary); border-color: var(--qz-primary); color: #fff; }
.btn.tiny.success { background: #16a34a; border-color: #16a34a; color: #fff; }

/* 滚动条精修 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c8d3e4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #a9b9d2; }
::-webkit-scrollbar-track { background: transparent; }

/* 打印安全：主题层不干扰打印 */
@media print {
    .qsplit-dock, .qz-confirm, .tab-topline { display: none !important; }
}

/* 配置单↔资料联动按钮（更新/新增），浮在行左侧空白，打印/出图自动剔除 */
.qlib-holder { position: relative; }
.qlib-btn {
    position: absolute;
    left: -78px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    border: 0;
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 25, 42, 0.18);
}
.qlib-btn.qlib-update { background: #2f6bff; color: #fff; }
.qlib-btn.qlib-add { background: #16a34a; color: #fff; }
/* 更新按钮方向配色：当前价比资料高=红，低=绿，方向不一=蓝 */
.qlib-btn.qlib-update.qlib-up { background: #dc2626; }
.qlib-btn.qlib-update.qlib-down { background: #0e9f6e; }
.qlib-btn:disabled { opacity: 0.6; cursor: wait; }
@media print { .qlib-btn { display: none !important; } }

/* 第3项：二手改配 A5 配置单收紧，保证内容不超出 A5 比例 */
.second-a5-sheet .second-brand { font-size: 24px; min-height: 32px; }
.second-a5-sheet .second-title { font-size: 22px; margin: 6px 0; }
.second-a5-sheet .second-promo { margin: 6px 0; }
.second-a5-sheet .second-promo span { font-size: 22px; }
.second-a5-sheet .second-promo strong { font-size: 30px; }
.second-a5-sheet .second-promo em { font-size: 18px; }
.second-a5-table th, .second-a5-table td { height: 26px; font-size: 15px; }
.second-a5-sheet { height: 210mm; }

/* 直播机器：联动按钮放在行右侧（左侧被展示图面板遮挡），并恢复新机配置单原背景 */
.qlib-live-holder { position: relative; }
.qlib-live-holder .qlib-btn { left: auto; right: -78px; }
body.is-embed.is-config-sheet {
    background:
        radial-gradient(circle at top left, rgba(20, 108, 120, 0.10), transparent 32rem),
        linear-gradient(180deg, #f8fafb 0%, var(--bg) 42%) !important;
}

/* 采购需求状态胶囊：未拿货 / 部分拿货 / 已拿货待推送 */
.erp-pill.none { color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; }
.erp-pill.picked { color: #b45309; background: #fef3c7; border: 1px solid #fde68a; }

/* ═══════ v7.1 批量优化 ═══════ */

/* 第2项：全新主机 / 二手改配 列表整屏工作区（编辑器 is-config-sheet 不受影响） */
@media (min-width: 901px) {
    body.is-embed[data-page="pc_quotes"]:not(.is-config-sheet),
    body.is-embed[data-page="second_quotes"]:not(.is-config-sheet) { overflow: hidden; }
    body.is-embed[data-page="pc_quotes"]:not(.is-config-sheet) .embed-shell,
    body.is-embed[data-page="second_quotes"]:not(.is-config-sheet) .embed-shell {
        height: calc(100vh - 20px);
        margin: 10px auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    body.is-embed[data-page="pc_quotes"]:not(.is-config-sheet) .embed-shell > section.panel:has(tr.quote-order-row),
    body.is-embed[data-page="second_quotes"]:not(.is-config-sheet) .embed-shell > section.panel:has(tr.quote-order-row) {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }
    body.is-embed[data-page="pc_quotes"]:not(.is-config-sheet) .embed-shell section.panel:has(tr.quote-order-row) thead th,
    body.is-embed[data-page="second_quotes"]:not(.is-config-sheet) .embed-shell section.panel:has(tr.quote-order-row) thead th {
        position: sticky; top: -20px; z-index: 2;
    }
    /* 配置详情坞在整屏布局里固定为下半块，内部滚动 */
    body.is-embed[data-page="pc_quotes"]:not(.is-config-sheet) .qsplit-dock,
    body.is-embed[data-page="second_quotes"]:not(.is-config-sheet) .qsplit-dock {
        position: static;
        flex: 0 0 auto;
        margin-top: 8px;
    }
    /* 第4项：两个列表页的表格统一撑满面板宽度（二手改配之前明显偏窄） */
    body.is-embed[data-page="pc_quotes"]:not(.is-config-sheet) .embed-shell section.panel:has(tr.quote-order-row) > table,
    body.is-embed[data-page="second_quotes"]:not(.is-config-sheet) .embed-shell section.panel:has(tr.quote-order-row) > table {
        width: 100%;
    }
}
/* 第2项：行高压缩 */
tr.quote-order-row td { padding: 5px 8px !important; font-size: 13px; line-height: 1.35; }
tr.quote-order-row .badge { min-height: 20px; padding: 0 7px; font-size: 11px; }
tr.quote-order-row code { padding: 1px 6px; font-size: 12px; }
tr.quote-order-row .btn.small { min-height: 24px; padding: 0 8px; font-size: 12px; }

/* 第3项：去掉选中/聚焦的蓝色线条 */
.orders-list tr.orders-row.selected td { box-shadow: none; }
tr.quote-order-row.is-open td { box-shadow: none; }
.orders-list tr.orders-row:focus,
.orders-list tr.orders-row:focus-visible,
tr.quote-order-row:focus,
tr.quote-order-row:focus-visible { outline: none; }
td:focus, td:focus-visible { outline: none; }

/* 第5项：订单操作列 —— 不可用时黑色禁用 */
.orders-ops-cell { display: flex; gap: 4px; align-items: center; }
.btn.tiny.op-dead {
    background: #2b2f36 !important;
    border-color: #2b2f36 !important;
    color: #8a8f98 !important;
    cursor: not-allowed;
    opacity: 1;
}

/* 第6/7项：采购需求 dock 与选中行 */
.dock-pr-slim { padding: 8px 12px; }
tr.pr-row-selected td { background: rgba(47, 107, 255, 0.10) !important; }
.pr-dock { border-top: 3px solid #16a34a !important; margin-top: 12px; }
.pr-dock-log-title { margin: 14px 0 8px; font-size: 14px; color: #0b2b56; }

/* 采购页 dock 重构：标签页 + 内部滚动 + 整行可点 */
tr.pr-row { cursor: pointer; }
tr.pr-row:hover td { background: rgba(47, 107, 255, 0.05); }
.pr-batch-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pr-dock .orders-dock-head { flex-wrap: wrap; gap: 8px; }
.pr-dock-tabs { display: flex; gap: 4px; }
.pr-dock-tabs button {
    border: 1px solid #dbe3ef;
    background: #f4f7fc;
    color: #43536e;
    border-radius: 8px 8px 0 0;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.pr-dock-tabs button.active { background: #fff; color: #0b2b56; border-bottom-color: #fff; border-top: 2px solid #16a34a; }
.pr-dock .orders-dock-body.pr-dock-scroll { overflow-y: auto; max-height: 52vh; padding-right: 4px; }
.pr-dock [data-pr-pane] { padding-top: 4px; }
.pr-dock .dock-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 第12项：权限分组 */
.perm-group { border: 1px solid #e5eaf2; border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #fbfdff; }
.perm-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 800; color: #24344d; font-size: 13px; cursor: pointer; }
.perm-group-head span::before { content: "▾"; display: inline-block; margin-right: 6px; color: #2f72ff; transition: transform .18s ease; }
.perm-group.is-collapsed .perm-group-head span::before { transform: rotate(-90deg); }
.perm-group-body { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.perm-group.is-collapsed .perm-group-body { display: none; }

/* 第13项：回收编辑窗口 */
.recycle-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .recycle-meta { grid-template-columns: 1fr; } }

/* v7.1.1: protect quote sheets from the global table theme */
.quote-sheet.quote-remake,
.quote-sheet.quote-remake th,
.quote-sheet.quote-remake td {
    border-color: #252a30 !important;
}
.quote-sheet.quote-remake th,
.quote-sheet.quote-remake td {
    border-width: 1.5px !important;
    color: #050505 !important;
}
.quote-sheet.quote-remake .quote-shop-row th {
    background: #343a40 !important;
    color: var(--quote-headline-color, #fff) !important;
}
.quote-sheet.quote-remake .quote-shop-row input,
.quote-sheet.quote-remake .quote-shop-row span {
    color: var(--quote-headline-color, #fff) !important;
    -webkit-text-fill-color: var(--quote-headline-color, #fff) !important;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35) !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-wire-row th,
.quote-sheet.quote-remake:not(.quote-pro) .quote-column-row th,
.quote-sheet.quote-remake:not(.quote-pro) .quote-config-row th,
.quote-sheet.quote-remake:not(.quote-pro) .quote-include-row th,
.quote-sheet.quote-remake:not(.quote-pro) .quote-platform-row th,
.quote-sheet.quote-remake:not(.quote-pro) .quote-pay-row th {
    background: #fff !important;
    color: #050505 !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-wire-row th input,
.quote-sheet.quote-remake:not(.quote-pro) .quote-wire-row th span,
.quote-sheet.quote-remake:not(.quote-pro) .quote-column-row th {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-request-row th:first-child,
.quote-sheet.quote-remake:not(.quote-pro) .quote-request-row td {
    background: #fff !important;
    color: #050505 !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-request-row th:nth-child(2) {
    background: #fff25a !important;
    color: #050505 !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-request-row th:nth-child(2) input {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
    font-weight: 900 !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-config-row td {
    background: rgba(250, 251, 252, 0.92) !important;
    color: #050505 !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-config-row:hover td {
    background: rgba(250, 251, 252, 0.92) !important;
}
.quote-sheet.quote-remake:not(.quote-pro) .quote-include-row td,
.quote-sheet.quote-remake:not(.quote-pro) .quote-platform-row td,
.quote-sheet.quote-remake:not(.quote-pro) .quote-pay-row td,
.quote-sheet.quote-remake:not(.quote-pro) .quote-standard-extra-row td {
    background: #fff !important;
    color: #050505 !important;
}
.quote-sheet.quote-remake .quote-name,
.quote-sheet.quote-remake .quote-price,
.quote-sheet.quote-remake .quote-qty,
.quote-sheet.quote-remake .quote-line-subtotal,
.quote-sheet.quote-remake .quote-service-fee,
.quote-sheet.quote-remake .quote-total-amount {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}
.quote-sheet.quote-remake .quote-qty.hot {
    color: #ef4444 !important;
    -webkit-text-fill-color: #ef4444 !important;
}
.quote-sheet.quote-remake .quote-pay-row td:nth-child(2) {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}
.quote-sheet.quote-remake .quote-pay-row td:nth-child(2) .red,
.quote-sheet.quote-remake .quote-total-note {
    color: #ef4444 !important;
    -webkit-text-fill-color: #ef4444 !important;
}
.quote-sheet.quote-remake.quote-pro .quote-pro-gift-row .quote-name,
.quote-sheet.quote-remake.quote-pro .quote-pro-gift-row input,
.quote-sheet.quote-remake.quote-pro .quote-config-row[data-quote-category="fan"] .quote-qty,
.quote-sheet.quote-remake.quote-pro .quote-pro-extra-row td,
.quote-sheet.quote-remake.quote-pro .quote-pro-extra-row input {
    color: var(--quote-footer-color, #ef4444) !important;
    -webkit-text-fill-color: var(--quote-footer-color, #ef4444) !important;
}
.quote-sheet.quote-remake.quote-pro .quote-pro-request-row td strong {
    color: #ef4444 !important;
    -webkit-text-fill-color: #ef4444 !important;
}

/* v7.1.3: put add/update buttons outside the tables */
.quote-sheet.quote-remake .quote-config-row > th.qlib-holder,
.second-a5-redesign .quote-config-row > td.qlib-holder,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child {
    position: relative !important;
    overflow: visible !important;
}
.quote-sheet.quote-remake .quote-config-row > th.qlib-holder > .qlib-btn,
.second-a5-redesign .quote-config-row > td.qlib-holder > .qlib-btn,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child > .qlib-btn {
    left: auto !important;
    right: calc(100% + 8px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 80 !important;
    min-width: 56px !important;
    text-align: center !important;
    padding: 7px 12px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}
.second-quote-form .second-a5-sheet.second-a5-redesign,
.live-editor-form .live-a5-sheet.live-a5-new {
    overflow: visible !important;
}
.second-a5-redesign .quote-config-row > td.qlib-holder > .qlib-btn,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child > .qlib-btn {
    right: calc(100% + 5px) !important;
    min-width: 32px !important;
    padding: 1px 5px !important;
    font-size: 9px !important;
}
.quote-image-preview-body .qlib-btn,
.live-image-preview-body .qlib-btn,
body.printing-live .qlib-btn,
body.printing-quote .qlib-btn,
body.printing-second .qlib-btn {
    display: none !important;
}

/* v7.1.1: keep the second-hand quote inside the A5 canvas */
.second-a5-sheet.second-a5-redesign {
    width: 148mm !important;
    min-width: 148mm !important;
    max-width: 148mm !important;
    height: 210mm !important;
    max-height: 210mm !important;
    padding: 3mm !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.second-quote-form .second-a5-sheet.second-a5-redesign {
    overflow: visible !important;
}
.second-a5-redesign .second-top-wrap {
    margin-bottom: 1.2mm !important;
}
.second-a5-redesign .second-top-image {
    max-height: 67mm !important;
    object-fit: contain !important;
}
.second-a5-redesign .second-a5-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}
.second-a5-redesign .second-a5-table col.second-col-category { width: 13% !important; }
.second-a5-redesign .second-a5-table col.second-col-name { width: 55% !important; }
.second-a5-redesign .second-a5-table col.second-col-price { width: 16% !important; }
.second-a5-redesign .second-a5-table th,
.second-a5-redesign .second-a5-table td {
    height: 24px !important;
    line-height: 24px !important;
    padding: 0 2px !important;
    font-size: 16px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.second-a5-redesign .second-a5-table thead th {
    font-size: 18px !important;
    background: #fff !important;
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
}
.second-a5-redesign .second-a5-table tbody tr:nth-child(odd) td {
    background: #d9d9d9 !important;
}
.second-a5-redesign .second-a5-table tbody tr:nth-child(even) td,
.second-a5-redesign .second-a5-table tfoot td {
    background: #fff !important;
}
.second-a5-redesign .second-a5-table tbody tr:nth-child(odd):hover td {
    background: #d9d9d9 !important;
}
.second-a5-redesign .second-a5-table tbody tr:nth-child(even):hover td {
    background: #fff !important;
}
.second-a5-redesign .second-a5-table th:nth-child(2),
.second-a5-redesign .second-a5-table td:nth-child(2) input,
.second-a5-redesign .second-a5-table td:nth-child(2) span {
    font-size: 17px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
}
.second-a5-redesign .second-a5-table td:nth-child(2) {
    font-size: 17px !important;
    white-space: nowrap !important;
    overflow: visible !important;
}
.second-a5-redesign .second-a5-table th:nth-child(3),
.second-a5-redesign .second-a5-table td:nth-child(3),
.second-a5-redesign .second-a5-table th:nth-child(4),
.second-a5-redesign .second-a5-table td:nth-child(4),
.second-a5-redesign .second-a5-table td:nth-child(3) input,
.second-a5-redesign .second-a5-table td:nth-child(4) input,
.second-a5-redesign .second-a5-table td:nth-child(3) span,
.second-a5-redesign .second-a5-table td:nth-child(4) span {
    font-size: 17px !important;
}
.second-a5-redesign .second-a5-table tfoot td {
    height: 24px !important;
    line-height: 24px !important;
    font-size: 18px !important;
}
.second-a5-redesign .second-total {
    min-height: 23mm !important;
    grid-template-columns: 26% 49% 25% !important;
}
.second-a5-redesign .second-total em { font-size: 34px !important; }
.second-a5-redesign .second-total strong { font-size: 58px !important; }
.second-a5-redesign .second-total span { font-size: 23px !important; }
.second-a5-redesign .quote-suggestions {
    width: min(430px, calc(100vw - 80px)) !important;
    max-height: 180px !important;
}
.second-a5-redesign .quote-config-row > td.qlib-holder {
    position: relative !important;
    overflow: visible !important;
}

/* v7.1.5: final override, keep component add/update buttons outside quote tables */
.quote-sheet.quote-remake .quote-config-row > th.qlib-holder,
.second-a5-redesign .quote-config-row > td.qlib-holder,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child {
    position: relative !important;
    overflow: visible !important;
}
.quote-sheet.quote-remake .quote-config-row > th.qlib-holder > .qlib-btn,
.second-a5-redesign .quote-config-row > td.qlib-holder > .qlib-btn,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child > .qlib-btn {
    left: auto !important;
    right: calc(100% + 10px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 30 !important;
}
.second-a5-redesign .quote-config-row > td.qlib-holder > .qlib-btn,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child > .qlib-btn {
    right: calc(100% + 42px) !important;
}
.modal:not([hidden]) .qlib-btn,
.quote-image-modal:not([hidden]) ~ .qlib-btn,
.live-image-preview-body .qlib-btn,
.quote-image-preview-body .qlib-btn {
    display: none !important;
}

/* ERP 下拉建议：命中关键字标红（与配置单编辑器一致） */
.erp-suggest-item mark {
    background: transparent;
    color: #e02020;
    font-weight: 800;
}
/* 推送ERP：开单价列（只读） */
.erp-quote-price { color: #52627a; font-weight: 700; }

/* ═══════ 第13项：采购页整屏工作区（同订单中心逻辑：页面不滚动，上列表/下详情各自滚动） ═══════ */
@media (min-width: 901px) {
    body.is-embed[data-page="erp_purchase_requests"] { overflow: hidden; }
    body.is-embed[data-page="erp_purchase_requests"] .embed-shell {
        height: calc(100vh - 20px);
        margin: 10px auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .pr-workspace { flex: 1; min-height: 0; }
    .pr-workspace .orders-top { gap: 8px; }
    .pr-workspace .orders-top > .page-head,
    .pr-workspace .orders-top > .panel { flex: 0 0 auto; margin: 0; }
    .pr-workspace .orders-top > .panel.pr-list-panel {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .pr-workspace .pr-list-panel .table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
    .pr-workspace .pr-list-panel thead th { position: sticky; top: 0; z-index: 2; background: #f1f7ff; }
    .pr-workspace.has-dock .orders-top { flex: 0 1 45%; }
    .pr-workspace .pr-dock { flex: 1 1 55%; min-height: 0; display: flex; flex-direction: column; margin-top: 0; }
    .pr-workspace .pr-dock .orders-dock-body.pr-dock-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
}

/* 第13项：采购列表行浓缩 */
.pr-list tr td { padding: 4px 8px; font-size: 12.5px; line-height: 1.35; }
.pr-list .erp-purchase-item { display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; margin: 1px 0; }
.pr-list .erp-purchase-item strong { font-weight: 600; }
.pr-list .btn.small { min-height: 22px; padding: 0 7px; font-size: 12px; }
.pr-list .erp-pill { font-size: 11px; padding: 1px 8px; }
.pr-list td small { display: block; line-height: 1.3; }

/* ═══════ 本批优化（客户要求 / 合并拿货 / dock 细节） ═══════ */

/* 下拉建议：显示成本价（二手/直播），重复项标红 */
.quote-suggestion .sugg-cost { color: #8a97ad; font-size: 11px; margin-left: auto; margin-right: 8px; }
.erp-suggest-item.erp-suggest-dup { color: #dc2626; }

/* 客户要求面板（新机编辑器左列） */
.quote-req-panel .req-check { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #33465c; margin-bottom: 6px; }
.quote-req-panel .req-check input[type="checkbox"] { width: 14px; height: 14px; }
.quote-req-panel .req-os-row { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 0 0 8px 20px; }
.quote-req-panel .req-gifts { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; padding: 6px 8px; background: #f7fafd; border-radius: 8px; }
.quote-req-panel .req-gifts-title { font-size: 11.5px; color: #8a97ad; font-weight: 700; margin-bottom: 2px; }

/* 客户要求展示（订单 dock 选项卡 + 开始装机弹窗）：放大标红 */
.req-labels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-label-item {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    color: #b91c1c;
    font-size: 15px;
    font-weight: 800;
    border-radius: 8px;
    padding: 8px 14px;
}
.req-labels-big .req-label-item { font-size: 18px; padding: 12px 16px; }
.req-confirm-panel { max-width: 560px; }

/* 合并拿货弹窗 */
#merge-pick-modal .merge-pick-body { max-height: 62vh; overflow-y: auto; }
#merge-pick-modal .erp-picker-cell input { min-width: 200px; }

/* 第9项：侧栏二级飞出菜单太长时可滚动；靠底部的模块向上展开 */
@media (min-width: 901px) {
    .side-flyout { max-height: calc(100vh - 32px); overflow-y: auto; }
    .side-module-wrap:nth-last-child(-n+4) .side-flyout { top: auto; bottom: 0; border-radius: 12px 12px 12px 0; }
    /* 财务(14项)/连接等长菜单：靠模块顶部对齐会溢出屏幕下方被裁。改为固定夹在视口内、整段可滚，
       保证「财务分类」等长二级菜单能完整显示。用 :has 精确命中「≥10 项(标题+10 链接=第11个子元素是链接)」的长菜单。 */
    .side-module-wrap:has(.side-flyout > .nav-link:nth-child(11)):hover .side-flyout {
        position: fixed;
        left: var(--rail-w);
        top: 10px;
        bottom: 10px;
        height: auto;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
        border-radius: 0 12px 12px 0;
    }
}

/* 第6项：采购列表勾选框缩小 */
.pr-list input[type="checkbox"],
.pr-list [data-pr-check-all] { width: 15px; height: 15px; margin: 0; }
.pr-list .erp-check-col { width: 34px; text-align: center; }

/* 第10项：采购页筛选 + 搜索合并一行 */
.pr-filter-panel { padding: 8px 12px; }
.pr-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-filter-row .status-tabs { margin: 0; flex: 1; min-width: 260px; }
.pr-search-inline { display: flex; gap: 6px; align-items: center; }
.pr-search-inline input[name="q"] { height: 30px; border: 1px solid #d7dee8; border-radius: 8px; padding: 0 10px; min-width: 180px; }
.pr-filter-row .page-size-form { margin-left: auto; }

/* 第12项：订单 dock 采购管理 / 推送ERP 行再浓缩 */
.orders-dock .erp-check-table th,
.orders-dock .erp-check-table td { padding: 3px 6px; font-size: 12px; line-height: 1.3; }
.orders-dock .erp-check-table input:not([type="checkbox"]),
.orders-dock .erp-check-table select { min-height: 24px; height: 24px; padding: 1px 6px; font-size: 12px; }
.orders-dock .erp-check-table .btn.tiny { min-height: 20px; padding: 0 6px; font-size: 11px; }
.orders-dock .erp-src { font-size: 10.5px; padding: 1px 6px; }
.orders-dock .erp-check-table input[type="checkbox"] { width: 14px; height: 14px; }

/* v7.7.1: 门店 / 维修 DOCK 工作台 */
.qz-dock-page {
    display: grid;
    grid-template-rows: auto;
    gap: 14px;
    min-height: 0;
}
.qz-dock-master,
.qz-dock-detail {
    min-width: 0;
}
.qz-dock-table {
    min-width: 1120px;
}
.qz-dock-table th,
.qz-dock-table td {
    white-space: nowrap;
    vertical-align: middle;
}
.qz-dock-table td small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}
.qz-dock-table tr.selected td {
    background: #eef7ff;
    box-shadow: inset 0 1px 0 rgba(37, 99, 235, .18), inset 0 -1px 0 rgba(37, 99, 235, .18);
}
.qz-dock-detail {
    border-color: #bfdbfe;
    box-shadow: 0 18px 44px rgba(37, 99, 235, .10);
}
.qz-dock-form {
    align-items: end;
}
.qz-dock-items {
    max-height: 34vh;
    overflow: auto;
}
.qz-repair-add-item input {
    min-width: 120px;
}
/* 提成审核/管理：业务单详情 dock + 强关联标注 */
.commission-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 8px; }
.commission-detail-item { background: #f8fafc; border: 1px solid #e5eaf2; border-radius: 8px; padding: 8px 10px; }
.commission-detail-item span { display: block; color: #64748b; font-size: 12px; margin-bottom: 2px; }
.commission-detail-item strong { font-size: 14px; word-break: break-all; }
.commission-has-tag { display: inline-block; margin-left: 6px; font-style: normal; font-size: 11px; color: #b45309; background: #fef3c7; border-radius: 4px; padding: 1px 6px; }
.commission-relate-tabs { flex-wrap: wrap; }
@media (min-width: 901px) {
    body.is-embed[data-page="accessory_sales"],
    body.is-embed[data-page="onsite_orders"],
    body.is-embed[data-page="repair_orders"] {
        overflow: hidden;
    }
    body.is-embed[data-page="accessory_sales"] .embed-shell,
    body.is-embed[data-page="onsite_orders"] .embed-shell,
    body.is-embed[data-page="repair_orders"] .embed-shell {
        width: min(1680px, 96vw);
        height: calc(100vh - 20px);
        margin: 10px auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    body.is-embed[data-page="accessory_sales"] .qz-dock-page,
    body.is-embed[data-page="onsite_orders"] .qz-dock-page,
    body.is-embed[data-page="repair_orders"] .qz-dock-page {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    body.is-embed[data-page="accessory_sales"] .qz-dock-master,
    body.is-embed[data-page="onsite_orders"] .qz-dock-master,
    body.is-embed[data-page="repair_orders"] .qz-dock-master {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    body.is-embed[data-page="accessory_sales"] .qz-dock-master .table-scroll,
    body.is-embed[data-page="onsite_orders"] .qz-dock-master .table-scroll,
    body.is-embed[data-page="repair_orders"] .qz-dock-master .table-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }
    .qz-dock-page.has-dock .qz-dock-master {
        flex-basis: 48%;
    }
    .qz-dock-page.has-dock .qz-dock-detail {
        flex: 1 1 52%;
        min-height: 0;
        overflow: auto;
    }
}

/* 提成审核/管理/我的提成：与「全部订单」一致的上下分屏工作台——整页不滚动，
   上=列表(内部滚动)，下=AJAX dock(内部滚动，标签页切换)，中间可拖动调整高度；点击行只刷新 dock。 */
@media (min-width: 901px) {
    body.is-embed[data-page="finance_commissions"],
    body.is-embed[data-page="finance_my_commissions"],
    body.is-embed[data-page="finance_commission_manage"],
    body.is-embed[data-page="assembly_commissions"],
    body.is-embed[data-page="assembly_my_commissions"] { overflow: hidden; }
    body.is-embed[data-page="finance_commissions"] .embed-shell,
    body.is-embed[data-page="finance_my_commissions"] .embed-shell,
    body.is-embed[data-page="finance_commission_manage"] .embed-shell,
    body.is-embed[data-page="assembly_commissions"] .embed-shell,
    body.is-embed[data-page="assembly_my_commissions"] .embed-shell {
        width: min(1680px, 96vw); height: calc(100vh - 20px); margin: 10px auto; display: flex; flex-direction: column; min-height: 0;
    }
    .qz-comm-page { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
    .qz-comm-page > .page-head,
    .qz-comm-page > .stats-grid,
    .qz-comm-page > .qz-comm-filter { flex: 0 0 auto; margin: 0; }
    .qz-comm-split { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .qz-comm-top { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; overflow: hidden; margin: 0; }
    .qz-comm-page.has-dock .qz-comm-top { flex: 0 1 42%; }
    .qz-comm-list-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
    .qz-comm-list-scroll thead th { position: sticky; top: 0; z-index: 2; background: #f1f7ff; }
    .qz-comm-dock { flex: 1 1 58%; min-height: 0; overflow: auto; margin: 0; }
    .qz-comm-resizer { flex: 0 0 10px; display: flex; align-items: center; justify-content: center; cursor: row-resize; touch-action: none; user-select: none; }
    .qz-comm-resizer span { width: 64px; height: 4px; border-radius: 999px; background: #c7d6ea; }
    .qz-comm-resizer:hover span { background: #075eea; }
    .qz-comm-resizer[hidden] { display: none; }
}
@media (max-width: 900px) {
    .qz-comm-list-scroll { max-height: 46vh; overflow: auto; }
    .qz-comm-resizer { display: none; }
}
/* 浓缩列表：提成审核/管理的行更紧凑，一屏能看更多 */
body.is-embed[data-page="finance_commissions"] .qz-dock-table th,
body.is-embed[data-page="finance_my_commissions"] .qz-dock-table th,
body.is-embed[data-page="finance_commission_manage"] .qz-dock-table th,
body.is-embed[data-page="assembly_commissions"] .qz-dock-table th,
body.is-embed[data-page="assembly_my_commissions"] .qz-dock-table th,
body.is-embed[data-page="finance_commissions"] .qz-dock-table td,
body.is-embed[data-page="finance_my_commissions"] .qz-dock-table td,
body.is-embed[data-page="finance_commission_manage"] .qz-dock-table td,
body.is-embed[data-page="assembly_commissions"] .qz-dock-table td,
body.is-embed[data-page="assembly_my_commissions"] .qz-dock-table td {
    padding: 4px 9px; font-size: 12.5px; line-height: 1.28;
}
body.is-embed[data-page="finance_commissions"] .qz-dock-table .table-actions .btn.small,
body.is-embed[data-page="finance_commission_manage"] .qz-dock-table .table-actions .btn.small,
body.is-embed[data-page="assembly_commissions"] .qz-dock-table .table-actions .btn.small {
    min-height: 24px; padding: 0 8px; font-size: 11.5px;
}
body.is-embed[data-page="finance_commissions"] .qz-dock-table .mini-input,
body.is-embed[data-page="finance_commission_manage"] .qz-dock-table .mini-input {
    height: 26px; padding: 1px 6px;
}
/* 装机完成表单（提成审核/管理 dock 内展示） */
.commission-completion-form { margin: 4px 0 8px; }
.commission-completion-photo { display: inline-block; margin-top: 8px; max-width: 260px; border: 1px solid #e5eaf2; border-radius: 8px; overflow: hidden; }
.commission-completion-photo img { display: block; max-width: 100%; height: auto; }
.commission-row { cursor: pointer; }
.commission-row:hover td { background: #f5f9ff; }
.commission-items-title { margin: 12px 0 6px; font-size: 14px; font-weight: 600; color: #334155; }
.commission-detail-pre { white-space: pre-wrap; word-break: break-all; background: #f8fafc; border: 1px solid #e5eaf2; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin: 4px 0; }
.btn.warn { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn.warn:hover { background: #d97706; border-color: #d97706; }

/* 接单大厅只保留接单流程，采购/ERP能力在全部接单订单和采购管理中处理 */
body.is-embed[data-page="assembly_hall"] .assembly-status-tabs {
    display: none !important;
}
.assembly-page-actions {
    display: none !important;
}

/* v7.7.3: 回收订单编辑器 */
.recycle-editor-panel {
    overflow: visible;
}
.recycle-editor .recycle-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
}
.recycle-table {
    min-width: 1180px;
}
.recycle-table th,
.recycle-table td {
    vertical-align: middle;
}
.recycle-actions-col {
    width: 168px;
}
.recycle-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.recycle-row-actions .btn.tiny[disabled] {
    opacity: .48;
    cursor: not-allowed;
}
.recycle-table input,
.recycle-table select {
    min-height: 34px;
}
.recycle-table [data-recycle-name],
.recycle-table [data-recycle-erp-label] {
    min-width: 260px;
}
.required-mark {
    color: #ef4444;
    font-weight: 900;
    margin-left: 3px;
}
/* 标签文字与必填星号同一行（label 本身是 grid，用 caption 包裹让星号跟文字走） */
.field-cap {
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.recycle-table [data-recycle-line-total],
.recycle-table [data-recycle-adjusted] {
    background: #f8fafc;
    color: #0f2d52;
    font-weight: 800;
}
.recycle-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.recycle-summary-grid article {
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #f8fbff, #eef7ff);
    border-radius: 12px;
    padding: 10px 12px;
}
.recycle-summary-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}
.recycle-summary-grid strong {
    color: #0f2d52;
    font-size: 18px;
}
.recycle-low-profit {
    color: #dc2626 !important;
    font-weight: 900 !important;
}
@media (max-width: 900px) {
    .recycle-editor .recycle-meta,
    .recycle-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* v7.7.1: 新机编辑左侧客户要求面板压缩，避免占用太多纵向空间 */
.quote-left-tools {
    gap: 8px !important;
    margin-top: -10px !important;
    padding-top: 0 !important;
}
.quote-left-tools .quote-template-panel {
    padding: 10px 12px !important;
    gap: 6px !important;
}
.quote-left-tools .quote-template-title {
    margin-bottom: 6px !important;
}
.quote-req-panel .req-check {
    min-height: 20px !important;
    margin-bottom: 1px !important;
    padding-block: 0 !important;
    line-height: 1.25 !important;
}
.quote-req-panel .req-check input[type="checkbox"] {
    width: 13px !important;
    height: 13px !important;
}
.quote-req-panel .req-os-row {
    margin: 0 0 4px 16px !important;
    gap: 4px !important;
}
.quote-req-panel .req-gifts {
    gap: 0 !important;
    margin: 1px 0 4px !important;
    padding: 4px 6px !important;
}
.quote-req-panel .req-gifts-title {
    margin-bottom: 1px !important;
}

/* ═══════ 本批（v7.8）：已推送绿色 / 客户要求排版 / 编辑器上移 / 回收编辑器工作区 ═══════ */

/* 第3项：已推送状态全局绿色 */
.erp-pill.pushed { color: #15803d; background: #dcfce7; border: 1px solid #bbf7d0; }
.badge.pushed, .badge.erp-order-pushed, .badge.purchase-pushed { color: #15803d; background: #dcfce7; border-color: #bbf7d0; }

/* 第2项：订单中心采购需求列换行显示，不再撑长 */
.orders-purchase-cell { white-space: normal !important; max-width: 170px; }
.orders-purchase-no { display: inline-block; }

/* 第4项：dock 客户要求栅格排版 */
.orders-dock .req-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.orders-dock .req-label-item { font-size: 13.5px; padding: 7px 12px; }

/* 第6项：新机编辑器左栏上移、底部按钮上移 */
.quote-left-tools { top: -64px; }
.quote-inline-panel .quote-actions { margin-top: 4px; }

/* 第1项：版本行 + 编辑回溯按钮 */
.qdetail-version-row { display: flex; gap: 4px; align-items: stretch; }
.qdetail-version-row .qdetail-version { flex: 1; min-width: 0; }
.qdetail-version-edit { flex: 0 0 auto; display: flex; align-items: center; padding: 0 8px; border: 1px solid #dbe3ef; border-radius: 7px; color: #075eea; text-decoration: none; font-size: 13px; background: #f8fafd; }
.qdetail-version-edit:hover { border-color: var(--qz-primary); }

/* 第7项：dock 推送快捷操作列 */
.erp-quick-ops { white-space: nowrap; }
.erp-quick-ops .btn.tiny { margin-right: 2px; }

/* 第8项：下拉建议里的规格 */
.erp-suggest-spec { color: #8a97ad; font-size: 11px; margin-left: 8px; }

/* 第9项：回收编辑器 —— 整屏工作区，合计/备注/按钮固定底部，表格内部滚动 */
@media (min-width: 901px) {
    body.is-embed[data-page="recycle_quotes"]:has(.recycle-editor-form) { overflow: hidden; }
    body.is-embed[data-page="recycle_quotes"]:has(.recycle-editor-form) .embed-shell {
        height: calc(100vh - 20px);
        margin: 10px auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .recycle-editor-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
    .recycle-editor-form { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
    .recycle-editor-form .table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
    .recycle-editor-form .recycle-bottom-fixed { flex: 0 0 auto; border-top: 1px solid #e5eaf2; padding-top: 8px; background: #fff; }
}
.recycle-erp-view { display: block; font-size: 11px; color: #8a97ad; margin-top: 2px; }
.recycle-erp-view.linked { color: #15803d; font-weight: 700; }
#recycle-erp-picker .rep-list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.rep-item { display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 1px solid #e3ebf5; background: #fbfdff; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.rep-item:hover { border-color: var(--qz-primary); background: #eef4fd; }

/* 回收关联弹窗：相似度徽标 */
.rep-item .rep-score { flex: 0 0 auto; min-width: 44px; text-align: center; font-weight: 800; font-size: 12px; color: #8a97ad; background: #f1f5f9; border-radius: 6px; padding: 2px 6px; }
.rep-item .rep-score.rep-score-mid { color: #b45309; background: #fef3c7; }
.rep-item .rep-score.rep-score-high { color: #15803d; background: #dcfce7; }
.rep-item { justify-content: flex-start; align-items: center; }
.badge.draft { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; }

/* ═══════ 权限管理重构（左员工列表 + 右分页签编辑器，开关式允许/禁止） ═══════ */
.permx-layout { display: flex; gap: 12px; align-items: stretch; }
.permx-users { flex: 0 0 240px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 170px); }
.permx-filter { width: 100%; height: 32px; border: 1px solid #d7dee8; border-radius: 8px; padding: 0 10px; }
.permx-user-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.permx-user { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid transparent; text-decoration: none; color: #33465c; }
.permx-user:hover { background: #f3f7fd; }
.permx-user.active { background: #eaf1ff; border-color: #075eea; }
.permx-user-name { font-weight: 700; }
.permx-user small { color: #8a97ad; }
.permx-role { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: #64748b; }
.permx-role.admin { background: #eaf1ff; color: #075eea; }
.permx-editor { flex: 1; min-width: 0; display: flex; flex-direction: column; max-height: calc(100vh - 170px); }
.permx-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.permx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.permx-head h2 { margin: 0; font-size: 17px; color: #0b2b56; }
.permx-tabs { display: flex; gap: 4px; }
.permx-tabs button { border: 1px solid #dbe3ef; background: #f4f7fc; color: #43536e; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.permx-tabs button.active { background: #075eea; border-color: #075eea; color: #fff; }
.permx-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.permx-group { border: 1px solid #e5eaf2; border-radius: 10px; margin-bottom: 10px; background: #fbfdff; }
.permx-group-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #eef2f8; font-weight: 800; color: #24344d; font-size: 13px; }
.permx-group-ops { display: flex; gap: 4px; }
.permx-group-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; padding: 6px 12px 10px; }
.permx-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 7px; cursor: pointer; font-size: 13px; color: #33465c; }
.permx-item:hover { background: #f3f7fd; }
.permx-item-label { flex: 1; min-width: 0; }
.permx-item input { display: none; }
.permx-state { flex: 0 0 auto; min-width: 42px; text-align: center; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.permx-item input:not(:checked) + .permx-state { color: #b91c1c; background: #fee2e2; }
.permx-item input:not(:checked) + .permx-state::after { content: '禁止'; }
.permx-item input:checked + .permx-state { color: #15803d; background: #dcfce7; }
.permx-item input:checked + .permx-state::after { content: '允许'; }
.permx-salary-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.permx-salary-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: #33465c; }
.permx-footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; border-top: 1px solid #eef2f8; padding-top: 10px; margin-top: 8px; }
@media (max-width: 900px) { .permx-layout { flex-direction: column; } .permx-users { flex: none; max-height: 40vh; } }

/* ═══════ v8.1 第1项：dock 客户要求左右分栏（左勾选 / 右紧凑展示） ═══════ */
.req-split { display: flex; gap: 16px; align-items: flex-start; }
.req-split .req-edit { flex: 0 0 340px; border-right: 1px solid #eef2f8; padding-right: 14px; }
.req-split .req-show { flex: 1; min-width: 0; }
.req-split-title { font-size: 13px; font-weight: 800; color: #24344d; margin-bottom: 8px; }
.orders-req-form { display: flex; flex-direction: column; gap: 4px; }
.orders-req-form label.checkbox { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 0; }
.orders-req-form .req-gifts { display: flex; flex-wrap: wrap; gap: 2px 12px; background: #f7fafd; border-radius: 8px; padding: 6px 8px; margin: 4px 0; }
.orders-req-form .req-gifts strong { flex: 0 0 100%; font-size: 12px; color: #8a97ad; }
.orders-req-form .form-actions { margin-top: 6px; }
.req-labels-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.req-labels-compact .req-label-item { font-size: 12.5px; padding: 5px 10px; border-left-width: 3px; font-weight: 700; }
@media (max-width: 900px) { .req-split { flex-direction: column; } .req-split .req-edit { flex: none; border-right: 0; padding-right: 0; } }

/* ═══════ v8.1 第2项：新机编辑器四区布局重构 ═══════
   顶=客户信息 / 左=模版+客户要求 / 中=配置单（模版只换这里） / 右=成本速算 / 底=操作按钮。
   铁律：配置单表格自身宽度与打印不变，只是页面壳加宽、去掉平移等历史 hack。 */
@media (min-width: 1101px) {
    body.is-embed[data-page="pc_quotes"].is-config-sheet .embed-shell {
        width: min(1780px, calc(100% - 32px));
    }
    .quote-form .quote-meta {
        width: 100%;
        max-width: 1180px;
        margin: 0 auto 8px;
    }
    .quote-no { margin-left: auto; margin-right: auto; }
    .quote-builder-layout {
        grid-template-columns: 236px minmax(0, max-content) minmax(360px, 460px);
        width: 100%;
        max-width: 100%;
        justify-content: center;
        transform: none;
        gap: 22px;
        margin: 0;
    }
    .quote-readonly .quote-builder-layout { grid-template-columns: minmax(0, max-content); }
    .quote-left-tools { position: static; left: 0; top: 0; }
    /* 配置单左侧留白：容纳「更新/新增」悬浮按钮，不挡左栏 */
    .quote-remake-wrap { margin-left: 64px; }
    .quote-inline-panel .quote-actions { margin-top: 12px; justify-content: center; }
}

/* ═══════ v8.1.1 新机编辑器：整屏固定工作区（页面不滚动，仅中间配置单区滚动） ═══════
   区块：页头/客户信息/底部按钮固定；左栏独立滚动；中间（配置单+成本速算同一滚动容器）滚动。
   打印走 @media print 原样式，不受影响。 */
@media screen and (min-width: 1101px) {
    body.is-embed[data-page="pc_quotes"].is-config-sheet { overflow: hidden; }
    body.is-embed[data-page="pc_quotes"].is-config-sheet .embed-shell {
        height: calc(100vh - 16px);
        margin: 8px auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
        width: min(1780px, calc(100% - 32px));
    }
    body.is-embed[data-page="pc_quotes"].is-config-sheet .embed-shell > .page-head { flex: 0 0 auto; margin-bottom: 6px; }
    body.is-embed[data-page="pc_quotes"].is-config-sheet .quote-inline-panel {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .quote-inline-panel .quote-form {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .quote-form .quote-meta { flex: 0 0 auto; }
    .quote-form .quote-no { flex: 0 0 auto; }
    /* 三栏：左工具（独立滚动）+ 中间滚动容器（配置单+速算，同一滚动上下文保证对齐） */
    .quote-builder-layout {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        gap: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        transform: none;
        align-items: stretch;
        justify-content: flex-start;
    }
    .quote-style-pro .quote-builder-layout { transform: none; margin-bottom: 0; }
    .quote-left-tools {
        position: static;
        left: 0;
        top: 0;
        flex: 0 0 240px;
        min-height: 0;
        overflow-y: auto;
        padding: 2px 10px 16px 2px;
        border-right: 1px solid #eef2f8;
        align-content: start;
    }
    .quote-center-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        display: grid;
        grid-template-columns: minmax(0, max-content) minmax(360px, 460px);
        column-gap: 40px;
        align-items: start;
        justify-content: center;
        padding: 4px 10px 24px 70px;
    }
    .quote-readonly .quote-center-scroll { grid-template-columns: minmax(0, max-content); padding-left: 10px; }
    .quote-remake-wrap { margin-left: 0; }
    /* 底部按钮固定 */
    .quote-inline-panel .quote-actions {
        flex: 0 0 auto;
        margin: 0;
        padding: 10px 0 2px;
        border-top: 1px solid #eef2f8;
        justify-content: center;
        transform: none;
        position: static;
        z-index: 5;
        background: transparent;
    }
}
/* 手改徽标：缩小并限制外扩距离，避免盖到配置单表格 */
.quote-cost-line.has-manual-price::before {
    font-size: 9.5px;
    padding: 1px 5px;
    letter-spacing: 0;
    margin-right: 3px;
    max-width: 34px;
}

/* ═══════ v8.1.2 新机编辑器分区修正 ═══════
   表单整体改 Grid：左栏从顶部（与客户信息条同高）一直到按钮区上方；
   按钮独占底行居中；配置单与成本列间距拉大，手改徽标/更新新增按钮都落在空隙里。 */
@media screen and (min-width: 1101px) {
    .quote-inline-panel .quote-form {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        grid-template-areas: "left meta" "left no" "left center" "actions actions";
        column-gap: 14px;
    }
    .quote-form .quote-meta { grid-area: meta; width: 100%; max-width: 1180px; margin: 0 auto 4px; }
    .quote-form > .quote-no { grid-area: no; }
    .quote-builder-layout { display: contents; }
    .quote-left-tools {
        grid-area: left;
        min-height: 0;
        overflow-y: auto;
        padding: 2px 10px 10px 2px;
        border-right: 1px solid #eef2f8;
    }
    .quote-center-scroll {
        grid-area: center;
        min-height: 0;
        overflow: auto;
        padding: 4px 10px 24px 96px;
        column-gap: 64px;
    }
    .quote-inline-panel .quote-actions {
        grid-area: actions;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 10px 0 2px;
        border-top: 1px solid #eef2f8;
    }
    /* 只读模式没有左栏 */
    .quote-readonly.quote-form,
    .quote-inline-panel .quote-form.quote-readonly {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "meta" "no" "center" "actions";
    }
}

/* v8.1.3：底部按钮真正居中（撑满整行再居中）；更新/新增悬浮按钮缩小 */
@media screen and (min-width: 1101px) {
    .quote-inline-panel .quote-actions {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }
}
.qlib-btn { padding: 4px 8px; font-size: 12px; border-radius: 7px; left: -64px; }
.qlib-live-holder .qlib-btn { right: -64px; }
.quote-sheet.quote-remake .quote-config-row > th.qlib-holder > .qlib-btn,
.second-a5-redesign .quote-config-row > td.qlib-holder > .qlib-btn,
.live-a5-new .live-config-row > td.qlib-live-holder:first-child > .qlib-btn {
    min-width: 40px !important;
    padding: 3px 7px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
}
.qdetail-loading { opacity: 0.45; pointer-events: none; transition: opacity 0.15s ease; }

/* v8.1.4：成本计算列对齐修正 —— 中间滚动区两列改为固定宽度轨道（940 配置单 + 460 速算），
   容器不够宽时横向滚动，绝不再把成本列挤到配置单上面；手改徽标落在 72px 空隙里。 */
@media screen and (min-width: 1101px) {
    .quote-center-scroll {
        grid-template-columns: 940px 460px;
        column-gap: 72px;
        justify-content: start;
    }
    .quote-readonly .quote-center-scroll,
    .quote-form.quote-readonly .quote-center-scroll { grid-template-columns: 940px; }
    .quote-center-scroll .quote-remake-wrap { width: 940px; max-width: none; margin-left: 0; }
    .quote-center-scroll .quote-sheet.quote-remake { width: 940px; min-width: 940px; max-width: 940px; }
    .quote-center-scroll .quote-workbench { width: 430px; }
}

/* v8.1.6：PRO 版总价 5 位数不换行不溢出 */
.quote-sheet.quote-remake.quote-pro .quote-pay-row td strong {
    font-size: 22px;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* v8.1.8：dock 客户要求排版重做（保存按钮置顶、行内紧凑勾选、右侧不出滚动） */
.orders-req-form { display: flex; flex-direction: column; gap: 2px; }
.req-edit-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #eef2f8; }
.req-edit-head .req-split-title { margin-bottom: 0; }
.orders-req-form .req-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 3px 2px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #33465c;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
}
.orders-req-form .req-row:hover { background: #f3f7fd; }
.orders-req-form .req-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.orders-req-form .req-row span { flex: 0 1 auto; white-space: nowrap; }
.orders-req-form .req-row-os select { flex: 1; max-width: 140px; min-height: 28px; }
.orders-req-form .req-row-other { cursor: default; }
.orders-req-form .req-row-other input { flex: 1; min-width: 0; min-height: 28px; }
.orders-req-form .req-gifts-box { display: flex; flex-wrap: wrap; gap: 0 10px; background: #f7fafd; border-radius: 8px; padding: 6px 8px; margin: 4px 0; }
.orders-req-form .req-gifts-box .req-gifts-caption { flex: 0 0 100%; font-size: 12px; color: #8a97ad; font-weight: 700; margin-bottom: 2px; }
.req-split .req-edit { flex: 0 0 320px; }
.req-split .req-show { align-self: stretch; }

/* v8.1.12 全站 Toast 轻提示 + 登录安全提醒 */
#toast-container,
#toast-stack,
.toast-stack {
    position: fixed !important;
    top: 22px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: min(520px, calc(100vw - 28px)) !important;
    max-width: calc(100vw - 28px) !important;
    transform: translateX(-50%) !important;
    pointer-events: none !important;
}

.toast.qz-toast,
.qz-toast {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: auto !important;
    min-width: min(260px, calc(100vw - 36px)) !important;
    max-width: min(520px, calc(100vw - 28px)) !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.88) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1f2937 !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    pointer-events: auto !important;
    animation: qz-toast-enter 0.22s ease-out both !important;
    transition: opacity 0.22s ease, transform 0.22s ease !important;
}

.qz-toast.leaving,
.qz-toast.qz-toast-leaving {
    opacity: 0 !important;
    transform: translateY(-10px) !important;
}

.qz-toast-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.qz-toast-content {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.qz-toast--info .qz-toast-icon { background: #1677ff; }
.qz-toast--success .qz-toast-icon { background: #16a34a; }
.qz-toast--warning .qz-toast-icon { background: #f59e0b; }
.qz-toast--error .qz-toast-icon { background: #ef4444; }
.qz-toast--loading .qz-toast-icon {
    border: 2px solid #dbeafe;
    border-top-color: #1677ff;
    background: transparent;
    animation: qz-toast-spin 0.82s linear infinite;
}

.qz-toast--warning {
    border-color: rgba(245, 158, 11, 0.28) !important;
}

.qz-toast--error {
    border-color: rgba(239, 68, 68, 0.25) !important;
}

@keyframes qz-toast-enter {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes qz-toast-spin {
    to { transform: rotate(360deg); }
}

.qz-security-alert {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99998;
    width: 330px;
    max-width: calc(100vw - 28px);
    padding: 16px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
    color: #1f2937;
    animation: qz-security-enter 0.26s ease-out both;
}

.qz-security-alert.qz-security-leaving {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.qz-security-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.qz-security-close:hover {
    background: #f1f5f9;
    color: #334155;
    transform: rotate(90deg);
}

.qz-security-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 28px;
    margin-bottom: 14px;
}

.qz-security-head-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(22, 119, 255, 0.1);
    color: #1677ff;
    font-weight: 900;
}

.qz-security-head strong {
    font-size: 16px;
}

.qz-security-list {
    display: grid;
    gap: 10px;
}

.qz-security-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qz-security-item-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(22, 119, 255, 0.09);
    color: #1677ff;
    font-weight: 900;
}

.qz-security-item small {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.qz-security-item b {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.qz-security-foot {
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.qz-security-foot.warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #b45309;
}

@keyframes qz-security-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    #toast-container,
    #toast-stack,
    .toast-stack {
        top: 12px !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }

    .toast.qz-toast,
    .qz-toast {
        min-width: 0 !important;
        width: fit-content !important;
        max-width: calc(100vw - 20px) !important;
        padding: 12px 14px !important;
        font-size: 14px !important;
    }

    .qz-security-alert {
        display: none !important;
    }
}

/* ═══════ 上门订单：dock 详情表单 / 服务项目 / 关联弹窗 ═══════ */
.onsite-form { display: flex; flex-direction: column; gap: 12px; }
.onsite-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.onsite-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #344054; }
.onsite-grid label.wide-field { grid-column: 1 / -1; }
.onsite-grid input, .onsite-grid select, .onsite-grid textarea { min-height: 34px; border: 1px solid #d7e0eb; border-radius: 8px; padding: 4px 10px; }
.onsite-grid input[readonly] { background: #f4f6fa; color: #475569; }
.onsite-relate-cell { display: flex; gap: 6px; align-items: center; }
.onsite-relate-cell input { flex: 1; min-width: 0; }
.onsite-services { border: 1px solid #e5eaf2; border-radius: 10px; padding: 10px 12px; background: #fbfdff; }
.onsite-services-head { font-weight: 800; color: #24344d; font-size: 13px; margin-bottom: 8px; }
.onsite-services-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.onsite-services-pick select { flex: 1; min-height: 34px; border: 1px solid #d7e0eb; border-radius: 8px; padding: 4px 10px; }
.onsite-services-table { width: 100%; border-collapse: collapse; }
.onsite-services-table th, .onsite-services-table td { border-bottom: 1px solid #eef2f8; padding: 5px 8px; font-size: 13px; text-align: left; }
.onsite-services-table th { color: #8a97ad; font-weight: 700; font-size: 12px; }
.onsite-services-table .empty { color: #94a3b8; text-align: center; }
.onsite-relate-tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.onsite-relate-tabs button { border: 1px solid #dbe3ef; background: #f4f7fc; color: #43536e; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.onsite-relate-tabs button.active { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.onsite-relate-list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.onsite-relate-item { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 1px solid #e3ebf5; background: #fbfdff; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.onsite-relate-item:hover { border-color: #2f6bff; background: #eef4fd; }
.onsite-relate-item strong { color: #0b2b56; font-family: Consolas, monospace; }
.onsite-relate-item span { font-size: 12.5px; color: #475569; }
.onsite-relate-item small { font-size: 11.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .onsite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .onsite-grid { grid-template-columns: 1fr; } }
