:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #eef3f7;
    --text: #18202a;
    --muted: #697386;
    --line: #d9e0e8;
    --primary: #1f6feb;
    --primary-dark: #1456bd;
    --green: #147d64;
    --amber: #b7791f;
    --red: #c24135;
    --shadow: 0 10px 30px rgba(20, 36, 56, .08);
}

/* ===== 普票详情、票面解析与进项票前置 ===== */
.plain-invoice-flow {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin-bottom: 5px;
}

.plain-invoice-flow span {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding-top: 10px;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.plain-invoice-flow span::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    width: 6px;
    height: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%);
}

.plain-invoice-flow span:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 5px;
    left: calc(50% + 5px);
    width: calc(100% - 10px);
    height: 1px;
    background: #dbe5ef;
}

.plain-invoice-flow span.done {
    color: #16865b;
}

.plain-invoice-flow span.done::before {
    border-color: #22a06b;
    background: #22a06b;
}

.plain-invoice-flow span.current {
    color: #b45309;
    font-weight: 700;
}

.plain-invoice-flow span.current::before {
    border-color: #f59e0b;
    background: #f59e0b;
}

.plain-invoice-parse-card {
    margin-top: 10px;
    padding: 11px;
    border: 1px solid #d9e5f2;
    border-radius: 7px;
    background: #f8fbff;
}

.plain-invoice-parse-head,
.plain-invoice-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plain-invoice-parse-head > div {
    display: grid;
    gap: 2px;
}

.plain-invoice-parse-head strong,
.plain-invoice-items-head strong {
    color: #17243a;
    font-size: 13px;
}

.plain-invoice-parse-head span {
    color: #64748b;
    font-size: 11.5px;
}

.plain-parse-status {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef3f8;
    color: #64748b !important;
}

.plain-parse-status.loading,
.plain-parse-status.ready {
    background: #edf7ff;
    color: #1769aa !important;
}

.plain-parse-status.error {
    background: #fff7ed;
    color: #b45309 !important;
}

.plain-invoice-document-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.plain-invoice-document-grid label,
.plain-detail-file,
.plain-detail-reason {
    display: grid;
    gap: 4px;
    color: #526176;
    font-size: 11.5px;
}

.plain-invoice-document-grid label.wide {
    grid-column: span 2;
}

.plain-invoice-document-grid input,
.plain-detail-file input,
.plain-detail-reason textarea {
    width: 100%;
    min-height: 31px;
    padding: 5px 8px;
    border: 1px solid #cbd9e8;
    border-radius: 6px;
    background: #fff;
    color: #17243a;
    font: inherit;
}

.plain-invoice-items {
    margin-top: 10px;
}

.plain-invoice-item-row {
    display: grid;
    grid-template-columns: minmax(150px, 2fr) repeat(7, minmax(58px, 1fr)) 42px;
    gap: 5px;
    margin-top: 6px;
}

.plain-invoice-item-row input {
    min-width: 0;
    height: 29px;
    padding: 4px 6px;
    border: 1px solid #d4deea;
    border-radius: 5px;
    font-size: 11px;
}

.plain-invoice-item-remove {
    border: 0;
    background: transparent;
    color: #c2414b;
    font-size: 11px;
}

.plain-invoice-detail-page {
    width: 100%;
    min-width: 0;
}

.plain-invoice-detail-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.plain-detail-back {
    color: #1769d2;
    font-size: 12px;
}

.plain-invoice-detail-header h1 {
    margin: 5px 0 2px;
    color: #142038;
    font-size: 22px;
}

.plain-invoice-detail-header p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.plain-detail-status {
    display: flex;
    gap: 6px;
}

.plain-detail-status span,
.plain-detail-status strong {
    padding: 5px 9px;
    border: 1px solid #cfe0f2;
    border-radius: 6px;
    background: #f8fbff;
    color: #28527d;
    font-size: 12px;
}

.plain-detail-status strong {
    border-color: #f5c4c4;
    background: #fff7f7;
    color: #c2414b;
}

.plain-invoice-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 12px;
    align-items: start;
}

.plain-invoice-detail-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.plain-detail-section,
.plain-invoice-cost-card {
    border: 1px solid #d9e3ee;
    border-radius: 7px;
    background: #fff;
}

.plain-detail-section {
    padding: 12px;
}

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

.plain-detail-summary div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.plain-detail-summary span,
.plain-detail-note span {
    color: #718096;
    font-size: 11px;
}

.plain-detail-summary strong {
    overflow: hidden;
    color: #17243a;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-detail-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.plain-detail-section-head h2,
.plain-invoice-cost-card h2 {
    margin: 0 0 3px;
    color: #17243a;
    font-size: 15px;
}

.plain-detail-section-head p,
.plain-invoice-cost-card > p {
    margin: 0;
    color: #718096;
    font-size: 11.5px;
}

.plain-customer-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.plain-customer-info-list > div {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 5px;
    background: #f7f9fc;
}

.plain-customer-info-list span {
    flex: 1;
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-customer-info-list button {
    border: 0;
    background: transparent;
    color: #1769d2;
    font-size: 11px;
}

.plain-detail-note {
    display: grid;
    gap: 3px;
    margin-top: 8px;
    color: #334155;
    font-size: 12px;
}

.plain-document-layout {
    display: grid;
    grid-template-columns: minmax(280px, 44%) minmax(0, 1fr);
    gap: 12px;
}

.plain-document-preview {
    min-height: 260px;
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 6px;
    background: #f7f9fc;
}

.plain-document-preview iframe,
.plain-document-preview img {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
    object-fit: contain;
}

.plain-ofd-preview {
    padding: 12px;
}

.plain-ofd-preview pre {
    max-height: 290px;
    overflow: auto;
    color: #475569;
    font-size: 11px;
    white-space: pre-wrap;
}

.plain-document-facts h3 {
    margin: 0 0 3px;
    color: #17243a;
    font-size: 13px;
}

.plain-document-facts > p {
    margin: 0 0 9px;
    color: #718096;
    font-size: 11px;
}

.plain-document-facts dl,
.plain-invoice-cost-card dl {
    margin: 0;
}

.plain-document-facts dl > div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #edf1f5;
}

.plain-document-facts dt {
    color: #718096;
    font-size: 11px;
}

.plain-document-facts dd {
    margin: 0;
    color: #26364d;
    font-size: 12px;
}

.plain-document-facts dd small {
    display: block;
    color: #718096;
}

.plain-document-items {
    margin-top: 8px;
}

.plain-document-items p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 11px;
}

.plain-detail-empty,
.plain-detail-gate {
    padding: 12px;
    border-radius: 6px;
    background: #f7f9fc;
    color: #64748b;
    font-size: 12px;
}

.plain-detail-gate {
    background: #fff8eb;
    color: #9a5a00;
}

.plain-detail-upload {
    margin-top: 10px;
    border-top: 1px solid #e7edf4;
    padding-top: 9px;
}

.plain-detail-upload > summary,
.plain-detail-history > summary {
    color: #1769d2;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.plain-detail-upload form {
    display: grid;
    gap: 9px;
    margin-top: 9px;
}

.plain-detail-reason textarea {
    min-height: 58px;
    resize: vertical;
}

.plain-detail-history {
    margin-top: 10px;
}

.plain-detail-history > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 7px 0;
    border-bottom: 1px solid #edf1f5;
    font-size: 11.5px;
}

.plain-detail-history small {
    color: #718096;
}

.plain-invoice-cost-card {
    position: sticky;
    top: 12px;
    padding: 13px;
}

.plain-invoice-cost-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1f5;
    color: #334155;
    font-size: 12px;
}

.plain-invoice-cost-card dl .sub {
    padding-top: 0;
    color: #718096;
    font-size: 11px;
}

.plain-invoice-cost-card dl .total {
    color: #17243a;
    font-size: 13px;
    font-weight: 700;
}

.plain-invoice-flow.detail {
    margin: 14px 0 10px;
}

.plain-cost-next {
    padding: 9px;
    border-radius: 6px;
    background: #f7f9fc;
}

.plain-cost-next span,
.plain-cost-next p {
    color: #718096;
    font-size: 11px;
}

.plain-cost-next strong {
    display: block;
    margin-top: 2px;
    color: #17243a;
    font-size: 14px;
}

.plain-cost-next p {
    margin: 6px 0 0;
}

.plain-operation-timeline article {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 3px 12px;
    padding: 7px 0;
    border-bottom: 1px solid #edf1f5;
}

.plain-operation-timeline time,
.plain-operation-timeline span {
    color: #718096;
    font-size: 11px;
}

.plain-operation-timeline strong {
    color: #334155;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .plain-invoice-detail-layout {
        grid-template-columns: 1fr;
    }
    .plain-invoice-cost-card {
        position: static;
    }
    .plain-invoice-document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .plain-detail-summary,
    .plain-document-layout,
    .plain-customer-info-list {
        grid-template-columns: 1fr;
    }
    .plain-invoice-document-grid {
        grid-template-columns: 1fr;
    }
    .plain-invoice-document-grid label.wide {
        grid-column: auto;
    }
    .plain-invoice-item-row {
        grid-template-columns: 1fr 1fr;
    }
}

.order-status-correction {
    margin: 0 0 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

.order-status-correction summary {
    padding: 8px 12px;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
}

.status-correction-grid {
    display: grid;
    grid-template-columns: minmax(180px, .55fr) minmax(320px, 1.45fr);
    gap: 10px;
    padding: 0 12px 8px;
}

.business-correction-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 0 12px 8px;
}

.order-entry-redesign .status-correction-grid .field,
.order-entry-redesign .business-correction-grid .field {
    min-width: 0;
    grid-column: auto;
}

.order-entry-redesign .business-correction-grid .field-supplier_refund_note {
    grid-column: span 2;
}

.correction-field-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 5px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: #64748b;
    background: #fff;
    font-size: 11px;
    font-weight: 500;
}

.order-status-correction > p {
    margin: 0;
    padding: 0 12px 10px;
    color: #7c8798;
    font-size: 12px;
}

@media (max-width: 900px) {
    .status-correction-grid,
    .business-correction-grid {
        grid-template-columns: 1fr;
    }

    .order-entry-redesign .business-correction-grid .field-supplier_refund_note {
        grid-column: auto;
    }
}

.legacy-special-invoice-note,
.online-invoice-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f5f7fa;
    color: #64748b;
    font-size: 12px;
}

.order-fallback-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -1px 12px 9px;
    padding: 7px 9px;
    border: 1px solid #dbe5f0;
    border-radius: 7px;
    background: #f8fafc;
}

.order-fallback-summary > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.order-fallback-summary strong {
    flex: 0 0 auto;
    color: #334155;
    font-size: 12px;
}

.order-fallback-summary span {
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-button {
    min-height: 27px;
    padding: 3px 8px;
    white-space: nowrap;
}

.legacy-special-invoice-note {
    border-left: 3px solid #d97706;
    background: #fffbeb;
}

.legacy-special-invoice-note strong {
    color: #92400e;
}

.order-edit-warning-list {
    margin-top: 10px;
    padding: 9px 10px;
    border-left: 3px solid #d97706;
    background: #fffbeb;
}

.order-edit-warning-list strong {
    color: #92400e;
    font-size: 12px;
}

.order-edit-warning-list p {
    margin: 4px 0 0;
    color: #7c5a18;
    font-size: 12px;
    line-height: 1.45;
}

.customer-aftersale-dialog {
    width: min(620px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
}

.customer-aftersale-dialog::backdrop {
    background: rgba(15, 23, 42, .35);
}

.customer-aftersale-form {
    padding: 18px;
}

.customer-aftersale-head,
.customer-aftersale-order,
.customer-aftersale-form .form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.customer-aftersale-head span,
.customer-aftersale-order span {
    color: #718096;
    font-size: 12px;
}

.customer-aftersale-head h2 {
    margin: 2px 0 0;
    font-size: 20px;
}

.customer-aftersale-order {
    margin: 14px 0;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.customer-aftersale-form fieldset {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
}

.customer-aftersale-form legend {
    padding: 0 4px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.customer-aftersale-form fieldset label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    line-height: 1.4;
}

.customer-aftersale-form fieldset label > span {
    display: grid;
    gap: 2px;
}

.customer-aftersale-form fieldset label small {
    color: #94a3b8;
    font-size: 11px;
}

.customer-aftersale-form fieldset label.is-disabled {
    color: #94a3b8;
}

.customer-aftersale-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 10px;
}

.customer-aftersale-grid label > span {
    display: block;
    margin-bottom: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.customer-aftersale-grid em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 400;
}

.order-no-ship-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.order-no-ship-grid label > span {
    display: block;
    margin-bottom: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.order-no-ship-grid em {
    color: #b45309;
    font-style: normal;
    font-weight: 600;
}

.order-no-ship-boundary {
    margin: -3px 0 12px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.customer-aftersale-result {
    margin: 12px 0;
    padding: 9px 10px;
    border-left: 3px solid #2563eb;
    background: #eff6ff;
    color: #1e4f91;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .order-edit-flow-strip {
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .order-edit-flow-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-correction-grid,
    .customer-aftersale-form fieldset,
    .customer-aftersale-grid,
    .order-no-ship-grid {
        grid-template-columns: 1fr;
    }
}

.order-row:target,
.return-risk-row:target,
.shipment-row:target,
.anchor-return-highlight {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: -2px;
    box-shadow: inset 4px 0 0 #2563eb, 0 0 0 9999px rgba(37, 99, 235, 0.015);
}

.anchor-return-highlight {
    animation: anchorReturnPulse 2.2s ease-out 1;
}

@keyframes anchorReturnPulse {
    0% { background-color: #dbeafe; }
    60% { background-color: #eff6ff; }
    100% { background-color: transparent; }
}

/* Unified operation risk list template for shipment risk center and return follow-up. */
.ops-risk-head {
    min-height: 48px;
    align-items: center;
    margin-bottom: 10px;
}

.ops-risk-head h1 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.15;
}

.ops-risk-head p {
    max-width: 760px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.ops-risk-head .head-actions,
.ops-risk-head .page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ops-risk-overview,
.ops-risk-filter-card,
.ops-risk-advanced-filter,
.ops-risk-table-card {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

.ops-risk-overview {
    margin-bottom: 10px;
    padding: 10px 12px;
}

.ops-risk-overview.risk-overview-card,
.ops-risk-overview.return-compact-overview {
    min-height: 72px;
}

.ops-risk-overview .section-title-lite h2,
.ops-risk-overview .return-compact-copy h2,
.ops-risk-filter-card .section-title-lite h2,
.ops-risk-filter-card .return-filter-title h2,
.ops-risk-table-title h2 {
    margin: 0;
    color: #102033;
    font-size: 16px;
    line-height: 1.25;
}

.ops-risk-overview .section-title-lite p,
.ops-risk-overview .return-compact-copy p,
.ops-risk-filter-card .section-title-lite p,
.ops-risk-filter-card .return-filter-title p,
.ops-risk-table-title p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.42;
}

.ops-risk-overview .risk-metric-strip,
.ops-risk-overview .return-stat-pills {
    gap: 7px;
}

.ops-risk-overview .risk-metric-box,
.ops-risk-overview .return-stat-pill {
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 8px;
}

.ops-risk-overview .risk-metric-box span,
.ops-risk-overview .return-stat-pill span {
    color: #64748b;
    font-size: 11.5px;
    font-weight: 800;
}

.ops-risk-overview .risk-metric-box strong,
.ops-risk-overview .return-stat-pill strong {
    margin-top: 4px;
    font-size: 18px;
    line-height: 1;
}

.compact-sop-path {
    align-self: stretch;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.compact-sop-path h3 {
    margin: 0 0 5px;
    font-size: 13px;
}

.compact-sop-path p,
.compact-sop-path small {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.ops-risk-filter-card {
    margin-bottom: 10px;
    padding: 10px 12px;
}

.shipment-scope-card.ops-risk-filter-card {
    grid-template-columns: minmax(150px, 220px) minmax(340px, 1fr) minmax(520px, auto);
    gap: 8px 12px;
}

.shipment-scope-card .shipment-scope-copy h2 {
    margin: 0 0 3px;
    font-size: 15px;
}

.shipment-scope-card .shipment-scope-copy p,
.period-current-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.source-context-note {
    grid-column: 1 / -1;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
}

.source-context-note span {
    margin-left: 8px;
    color: #475569;
}

.shipment-scope-form {
    gap: 8px;
}

.shipment-scope-form label span {
    font-size: 11.5px;
}

.shipment-scope-form input,
.shipment-scope-form select {
    min-height: 32px;
}

.shipment-scope-form .primary-button {
    min-height: 32px;
}

.ops-risk-quick-filter {
    display: block;
}

.ops-risk-quick-filter .risk-filter-pills,
.ops-risk-quick-filter .return-scope-pills {
    gap: 7px;
    margin: 0;
}

.ops-risk-quick-filter .risk-filter-pills a,
.ops-risk-quick-filter .return-scope-pills a {
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 13px;
}

.ops-risk-advanced-filter {
    margin-bottom: 10px;
    overflow: hidden;
}

.ops-risk-advanced-filter summary {
    min-height: 36px;
}

.ops-risk-table-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    overflow: hidden;
}

.ops-risk-table-title {
    min-height: 54px;
    padding: 10px 14px;
}

.ops-risk-table-wrap {
    flex: 1 1 auto;
    max-height: calc(100vh - 330px);
    min-height: 430px;
    overflow: auto;
}

.ops-risk-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.ops-risk-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 38px;
    padding: 8px 12px;
    border-bottom: 1px solid #dbe4ef;
    background: #f8fafc;
    color: #334155;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.ops-risk-table tbody td {
    min-height: 88px;
    padding: 10px 12px;
    border-bottom: 1px solid #e8eef6;
    vertical-align: top;
    background: #fff;
}

.ops-risk-row td:first-child {
    box-shadow: inset 4px 0 0 #cbd5e1;
}

.ops-risk-row.tone-critical td:first-child,
.ops-risk-row.tone-danger td:first-child,
.return-risk-row.row-danger td:first-child {
    box-shadow: inset 4px 0 0 #dc2626;
}

.ops-risk-row.tone-warn td:first-child,
.ops-risk-row.tone-offwork td:first-child,
.return-risk-row.row-warn td:first-child {
    box-shadow: inset 4px 0 0 #d97706;
}

.ops-risk-row.tone-info td:first-child,
.return-risk-row.row-focus td:first-child {
    box-shadow: inset 4px 0 0 #2563eb;
}

.return-risk-row.row-ok td:first-child,
.ops-risk-row.tone-good td:first-child {
    box-shadow: inset 4px 0 0 #059669;
}

.shipment-row.shipment-critical td,
.shipment-row.shipment-danger td,
.shipment-row.shipment-warn td,
.shipment-row.shipment-offwork td,
.shipment-row.shipment-info td,
.return-risk-row.row-danger,
.return-risk-row.row-warn,
.return-risk-row.row-ok,
.return-risk-row.row-focus {
    background: transparent;
}

.shipment-row.shipment-critical td:first-child,
.shipment-row.shipment-danger td:first-child,
.return-risk-row.row-danger td:first-child {
    background: #fff1f2;
}

.shipment-row.shipment-warn td:first-child,
.shipment-row.shipment-offwork td:first-child,
.return-risk-row.row-warn td:first-child {
    background: #fff7ed;
}

.shipment-row.shipment-info td:first-child,
.return-risk-row.row-focus td:first-child {
    background: #eff6ff;
}

.return-risk-row.row-ok td:first-child {
    background: #ecfdf5;
}

.ops-risk-table .risk-level,
.ops-risk-table .risk-reason-tag,
.ops-risk-table .risk-status-chip,
.ops-risk-table .pill {
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 900;
}

.ops-risk-table .muted-block,
.ops-risk-table .table-subtext {
    color: #64748b;
    font-size: 12px;
    line-height: 1.38;
}

.ops-risk-table .risk-action-cell strong,
.ops-risk-table td > strong {
    color: #102033;
}

.ops-risk-table .risk-money-cell strong,
.ops-risk-table .loss-amount.loss-danger,
.ops-risk-table .loss-amount.loss-warn {
    color: #dc2626;
}

.ops-risk-table .risk-money-cell span,
.ops-risk-table .loss-amount.loss-ok {
    color: #059669;
}

.ops-risk-table .risk-money-cell small {
    color: #92400e;
    font-weight: 900;
}

.shipment-risk-center-table.ops-risk-table {
    min-width: 1280px;
}

.shipment-risk-center-table.ops-risk-table th:nth-child(1),
.shipment-risk-center-table.ops-risk-table td:nth-child(1) { width: 230px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(2),
.shipment-risk-center-table.ops-risk-table td:nth-child(2) { width: 95px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(3),
.shipment-risk-center-table.ops-risk-table td:nth-child(3) { width: 145px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(4),
.shipment-risk-center-table.ops-risk-table td:nth-child(4) { width: 170px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(5),
.shipment-risk-center-table.ops-risk-table td:nth-child(5) { width: 175px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(6),
.shipment-risk-center-table.ops-risk-table td:nth-child(6) { width: 145px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(7),
.shipment-risk-center-table.ops-risk-table td:nth-child(7) { width: 105px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(8),
.shipment-risk-center-table.ops-risk-table td:nth-child(8) { width: 205px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(9),
.shipment-risk-center-table.ops-risk-table td:nth-child(9) { width: 124px; }

.return-risk-table.ops-risk-table {
    min-width: 1180px;
}

.return-risk-table.ops-risk-table th:nth-child(1),
.return-risk-table.ops-risk-table td:nth-child(1) { width: 220px; }
.return-risk-table.ops-risk-table th:nth-child(2),
.return-risk-table.ops-risk-table td:nth-child(2) { width: 170px; }
.return-risk-table.ops-risk-table th:nth-child(3),
.return-risk-table.ops-risk-table td:nth-child(3) { width: 180px; }
.return-risk-table.ops-risk-table th:nth-child(4),
.return-risk-table.ops-risk-table td:nth-child(4) { width: 140px; }
.return-risk-table.ops-risk-table th:nth-child(5),
.return-risk-table.ops-risk-table td:nth-child(5) { width: 160px; }
.return-risk-table.ops-risk-table th:nth-child(6),
.return-risk-table.ops-risk-table td:nth-child(6) { width: 145px; }
.return-risk-table.ops-risk-table th:nth-child(7),
.return-risk-table.ops-risk-table td:nth-child(7) { width: 185px; }
.return-risk-table.ops-risk-table th:nth-child(8),
.return-risk-table.ops-risk-table td:nth-child(8) { width: 118px; }

.ops-main-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start;
    gap: 7px !important;
    min-width: 110px;
}

.ops-main-actions .primary-button,
.ops-main-actions .secondary-button,
.ops-main-actions .quick-toggle,
.ops-main-actions a {
    width: 100%;
    min-height: 30px;
    justify-content: center;
    border-radius: 7px;
    text-align: center;
}

.ops-main-actions .quick-toggle,
.ops-main-actions .primary-button {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .16);
}

.ops-main-actions a:not(.primary-button) {
    border: 1px solid #cbd7e6;
    background: #fff;
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.ops-risk-table th:last-child,
.ops-risk-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 6;
    background: linear-gradient(90deg, rgba(255,255,255,.92), #fff 18%);
    box-shadow: -10px 0 18px rgba(15, 23, 42, .07);
}

.ops-risk-table th:last-child {
    z-index: 9;
    background: #f8fafc;
}

.shipment-risk-center-table.ops-risk-table {
    min-width: 1540px;
}

.shipment-risk-center-table.ops-risk-table th:nth-child(1),
.shipment-risk-center-table.ops-risk-table td:nth-child(1) { width: 210px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(2),
.shipment-risk-center-table.ops-risk-table td:nth-child(2) { width: 125px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(3),
.shipment-risk-center-table.ops-risk-table td:nth-child(3) { width: 130px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(4),
.shipment-risk-center-table.ops-risk-table td:nth-child(4) { width: 150px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(5),
.shipment-risk-center-table.ops-risk-table td:nth-child(5) { width: 125px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(6),
.shipment-risk-center-table.ops-risk-table td:nth-child(6) { width: 130px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(7),
.shipment-risk-center-table.ops-risk-table td:nth-child(7) { width: 175px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(8),
.shipment-risk-center-table.ops-risk-table td:nth-child(8) { width: 125px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(9),
.shipment-risk-center-table.ops-risk-table td:nth-child(9) { width: 100px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(10),
.shipment-risk-center-table.ops-risk-table td:nth-child(10) { width: 175px; }
.shipment-risk-center-table.ops-risk-table th:nth-child(11),
.shipment-risk-center-table.ops-risk-table td:nth-child(11) { width: 120px; }

.cell-required-missing {
    color: #b45309;
    font-weight: 900;
}

@media (max-width: 1320px) {
    .shipment-scope-card.ops-risk-filter-card {
        grid-template-columns: 1fr;
    }

    .shipment-period-pills,
    .shipment-scope-form {
        justify-content: flex-start;
    }

    .return-compact-overview {
        grid-template-columns: 1fr;
    }

    .return-deadline-inline {
        grid-column: auto;
    }
}

.upload-status-not_started {
    color: #64748b;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.upload-status-uploading {
    color: #047857;
    background: #d1fae5;
    border-color: #86efac;
}

.upload-status-paused {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

.limit11-status-normal {
    color: #047857;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.limit11-status-limited_11 {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}

.limit11-status-unknown {
    color: #92400e;
    background: #fff7ed;
    border-color: #fed7aa;
}

.upload-note-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

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

.modal-help {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
}

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

/* Unified order action drawer. */
.floating-row-actions[hidden] {
    display: none !important;
}

.order-action-drawer .quick-drawer-panel {
    width: min(460px, calc(100vw - 16px));
    transition: width .18s ease;
}

.order-action-drawer[data-action-mode="edit"] .quick-drawer-panel {
    width: min(720px, calc(100vw - 16px));
}

.order-action-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.order-action-tabs button {
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid #d4dfeb;
    border-radius: 7px;
    background: #fff;
    color: #445164;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.order-action-tabs button.active {
    border-color: #79a8f4;
    background: #eaf3ff;
    color: #0f5ed7;
}

.order-action-tabs .danger-tab.active {
    border-color: #f4a6a6;
    background: #fff1f1;
    color: #b42318;
}

.order-action-panel[hidden] {
    display: none !important;
}

.order-action-panel {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
}

.order-action-panel[data-order-action-panel="quick"] {
    display: flex;
    flex-direction: column;
}

.order-action-panel[data-order-action-panel="quick"] .quick-drawer-form {
    flex: 1 1 auto;
}

.drawer-panel-loading {
    margin: 16px;
    padding: 14px;
    border: 1px solid #d9e5f1;
    border-radius: 8px;
    background: #f8fbff;
    color: #526176;
}

.order-edit-drawer-panel {
    padding: 10px 12px 18px;
}

.drawer-edit-form .order-form-workbench {
    display: block;
}

.drawer-edit-form .order-form-main {
    display: grid;
    gap: 7px;
}

.drawer-edit-form .order-form-aside {
    display: none;
}

.drawer-edit-form .order-submit-card {
    position: sticky;
    top: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    margin: 0 0 3px;
    padding: 9px 10px;
    border-color: #bcd2ee;
    background: rgba(248, 251, 255, .97);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.drawer-edit-form .order-submit-card .assist-card-head,
.drawer-edit-form .order-submit-card .assist-hints,
.drawer-edit-form .order-submit-card .assist-metrics {
    display: none;
}

.drawer-edit-form .order-submit-card .form-actions {
    grid-column: 2;
    display: flex;
    gap: 6px;
    padding: 0;
    background: none;
}

.drawer-edit-form .form-section {
    margin: 0;
    padding: 9px 10px;
}

.drawer-edit-form .form-section-head {
    align-items: center;
    cursor: default;
}

.drawer-edit-form .form-section-head h2 {
    font-size: 14px;
}

.drawer-edit-form .form-section-head [data-section-help-trigger],
.drawer-edit-form .form-section-head [data-section-help-text] {
    display: none;
}

.drawer-edit-form .form-section:not(.is-open) > :not(.form-section-head) {
    display: none !important;
}

.drawer-section-toggle {
    margin-left: auto;
    padding: 3px 7px;
    border: 1px solid #cfe0f5;
    border-radius: 6px;
    background: #fff;
    color: #0f5ed7;
    font-size: 11px;
    cursor: pointer;
}

.drawer-edit-form .order-form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px 8px;
}

.drawer-edit-form .field {
    min-width: 0;
}

.drawer-edit-form input,
.drawer-edit-form select,
.drawer-edit-form textarea {
    min-height: 32px;
    font-size: 12px;
}

.drawer-edit-form textarea {
    min-height: 54px;
}

.order-delete-drawer-panel {
    padding: 18px;
}

.delete-order-summary {
    padding: 14px;
    border: 1px solid #f0c6c6;
    border-radius: 8px;
    background: #fffafa;
}

.danger-kicker {
    color: #b42318;
    font-size: 12px;
    font-weight: 900;
}

.delete-order-summary h3 {
    margin: 6px 0 10px;
    font-size: 18px;
    overflow-wrap: anywhere;
}

.delete-order-summary p {
    color: #526176;
    line-height: 1.55;
}

.drawer-delete-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    background: #fff;
}

/* Half-window list priorities: keep the action chain and current task readable. */
@media (max-width: 1100px) {
    .table-wrap.wide table.order-processing-table,
    .order-processing-table {
        min-width: 720px;
    }

    .order-processing-table .col-order-summary { width: 142px; }
    .order-processing-table .col-processing-flow { width: 280px; }
    .order-processing-table .col-purchase-stack { width: 110px; }
    .order-processing-table .col-refund-stack { width: 86px; }
    .order-processing-table .col-original-link { width: 100px; }
    .order-processing-table .col-actions { width: 44px; }

    .order-processing-table .head-money-stack,
    .order-processing-table .cell-money-stack,
    .order-processing-table .head-product-stack,
    .order-processing-table .cell-product-stack,
    .order-processing-table .head-quality,
    .order-processing-table .cell-quality,
    .order-processing-table .col-money-stack,
    .order-processing-table .col-product-stack,
    .order-processing-table .col-quality {
        display: none;
    }
}

@media (max-width: 760px) {
    .order-action-drawer .quick-drawer-panel,
    .order-action-drawer[data-action-mode="edit"] .quick-drawer-panel {
        width: 100vw;
    }

    .order-processing-table .head-refund-stack,
    .order-processing-table .cell-refund-stack,
    .order-processing-table .head-original-link,
    .order-processing-table .cell-original-link,
    .order-processing-table .col-refund-stack,
    .order-processing-table .col-original-link {
        display: none;
    }

    .table-wrap.wide table.order-processing-table,
    .order-processing-table {
        min-width: 560px;
    }
}

/* Online orders: the row action chooser is separate from the task drawer. */
.row-operation-drawer[hidden] {
    display: none !important;
}

.row-operation-drawer {
    position: fixed;
    inset: 0;
    z-index: 990;
    display: flex;
    justify-content: flex-end;
}

.row-operation-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, .16);
}

.row-operation-panel {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(286px, calc(100vw - 16px));
    height: 100vh;
    flex-direction: column;
    border-left: 1px solid #d7e2ee;
    background: #fff;
    box-shadow: -18px 0 42px rgba(15, 23, 42, .16);
}

.row-operation-head {
    display: flex;
    min-height: 84px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid #e4ebf3;
}

.row-operation-head p,
.row-operation-head h2,
.row-operation-head small {
    margin: 0;
}

.row-operation-head p {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.row-operation-head h2 {
    max-width: 210px;
    margin-top: 4px;
    overflow: hidden;
    color: #152238;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-operation-head small {
    display: block;
    max-width: 210px;
    margin-top: 3px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-operation-close {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid #d5e0ec;
    border-radius: 7px;
    background: #fff;
    color: #526176;
    font-size: 20px;
    cursor: pointer;
}

.row-operation-stack {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.row-operation-stack button {
    display: grid;
    width: 100%;
    min-height: 50px;
    gap: 3px;
    justify-items: start;
    padding: 10px 12px;
    border: 1px solid #d6e2ef;
    border-radius: 8px;
    background: #fff;
    color: #213650;
    text-align: left;
    cursor: pointer;
}

.row-operation-stack button span {
    font-size: 13px;
    font-weight: 900;
}

.row-operation-stack button small {
    color: #6b7b8f;
    font-size: 10.5px;
    line-height: 1.3;
}

.row-operation-stack .row-operation-primary {
    min-height: 64px;
    border-color: #3478e5;
    background: #edf5ff;
    color: #0f55c8;
}

.row-operation-stack .row-operation-primary span {
    font-size: 15px;
}

.row-operation-secondary-group {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5ecf4;
}

.row-operation-stack button:hover,
.row-operation-stack button:focus-visible {
    border-color: #6e9eea;
    background: #f3f7ff;
    outline: 2px solid rgba(47, 115, 232, .14);
    outline-offset: 1px;
}

.row-operation-stack button.danger {
    border-color: #f0d2d2;
    background: #fffafa;
}

.row-operation-stack button.danger span {
    color: #b42318;
}

.row-operation-stack button.danger:hover,
.row-operation-stack button.danger:focus-visible {
    border-color: #efaaaa;
    background: #fff1f1;
    outline-color: rgba(220, 38, 38, .12);
}

.order-processing-table tbody tr.row-operation-active td {
    background-color: #f4f8ff;
}

.order-processing-table .cell-actions .floating-row-actions {
    display: none !important;
}

.quick-purchase-summary {
    max-width: 190px;
    overflow: hidden;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef4fb;
    color: #42566f;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-purchase-summary.is-missing {
    background: #fff4df;
    color: #a45b08;
}

/* Keep the task drawer compact and action-first after the operation choice. */
.order-action-drawer .quick-drawer-head {
    padding: 14px 16px 10px;
}

.order-action-drawer .quick-drawer-meta {
    gap: 6px;
    padding: 8px 16px;
}

.order-action-drawer .quick-scenario-card {
    gap: 7px;
    margin: 0 16px 8px;
}

.order-action-drawer .quick-scenario-card > div {
    gap: 2px;
    padding: 8px;
}

.order-action-drawer .quick-drawer-form {
    gap: 8px;
    padding: 10px 16px 14px;
}

.order-action-drawer .quick-field-section {
    gap: 8px;
    padding: 10px;
}

.order-action-drawer .quick-optional-section {
    display: block;
    padding: 0;
}

.order-action-drawer .quick-optional-section > summary {
    min-height: 38px;
}

.order-action-drawer .quick-optional-section:not([open]) {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
}

.order-action-drawer .quick-drawer-actions {
    bottom: -14px;
    grid-template-columns: .8fr 1.25fr .8fr;
    gap: 6px;
    padding-top: 10px;
}

.order-action-drawer .quick-drawer-actions button {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .row-operation-panel {
        width: min(286px, 88vw);
    }

    .order-action-drawer .quick-scenario-card {
        grid-template-columns: 1fr;
    }

    .order-action-drawer .quick-drawer-actions {
        grid-template-columns: .8fr 1.25fr .8fr;
    }
}

/* Order list actions: direct row controls, arranged as one primary row and two secondary actions. */
.order-processing-table .col-actions {
    width: 94px !important;
}

.order-processing-table .cell-actions-head,
.order-processing-table .cell-actions {
    width: 94px !important;
    min-width: 94px !important;
    max-width: 94px !important;
    padding: 3px 5px !important;
}

.order-processing-table .cell-actions .floating-row-actions {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 84px;
    margin: 0 auto;
    padding: 4px;
    border: 1px solid #d7e2ef;
    border-radius: 7px;
    background: #fff;
    box-shadow: -5px 2px 14px rgba(15, 23, 42, .08);
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

.order-processing-table tbody tr:hover .cell-actions .floating-row-actions,
.order-processing-table tbody tr:focus-within .cell-actions .floating-row-actions {
    border-color: #9bbcf0;
    box-shadow: -7px 3px 18px rgba(37, 99, 235, .12);
}

.order-processing-table .cell-actions .floating-row-actions .quick-toggle {
    grid-column: 1 / -1;
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border: 1px solid #2563eb;
    border-radius: 5px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.order-processing-table .cell-actions .floating-row-actions .row-edit-action,
.order-processing-table .cell-actions .floating-row-actions .row-delete-action {
    display: inline-flex;
    min-height: 21px;
    align-items: center;
    justify-content: center;
    padding: 1px 3px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.order-processing-table .cell-actions .floating-row-actions .row-edit-action {
    color: #2563eb;
}

.order-processing-table .cell-actions .floating-row-actions .row-delete-action {
    color: #dc2626;
}

.order-processing-table .cell-actions .floating-row-actions button:hover,
.order-processing-table .cell-actions .floating-row-actions button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .18);
    outline-offset: 1px;
}

.order-processing-table .cell-actions .floating-row-actions .row-edit-action:hover,
.order-processing-table .cell-actions .floating-row-actions .row-edit-action:focus-visible {
    background: #eff6ff;
}

.order-processing-table .cell-actions .floating-row-actions .row-delete-action:hover,
.order-processing-table .cell-actions .floating-row-actions .row-delete-action:focus-visible {
    background: #fff1f1;
    outline-color: rgba(220, 38, 38, .16);
}

@media (max-width: 760px) {
    .order-processing-table .col-actions,
    .order-processing-table .cell-actions-head,
    .order-processing-table .cell-actions {
        width: 86px !important;
        min-width: 86px !important;
        max-width: 86px !important;
    }

    .order-processing-table .cell-actions .floating-row-actions {
        width: 78px;
        padding: 3px;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

button,
input,
select,
textarea {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topnav form {
    margin: 0;
}

.layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    min-height: calc(100vh - 56px);
}

.sidebar {
    padding: 18px 14px;
    background: #f0f4f8;
    border-right: 1px solid var(--line);
}

.side-link {
    display: block;
    padding: 10px 12px;
    color: #263445;
    border-radius: 6px;
    margin-bottom: 4px;
}

.side-link:hover {
    background: #e3ebf4;
}

.content {
    min-width: 0;
    padding: 22px;
}

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

.head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.head-actions form {
    margin: 0;
}

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

.page-head p {
    margin: 0;
    color: var(--muted);
}

.primary-button,
.secondary-button,
.link-button {
    border: 1px solid transparent;
    border-radius: 6px;
    min-height: 36px;
    padding: 7px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.small-button {
    min-height: 30px;
    padding: 4px 10px;
}

.primary-button {
    background: var(--primary);
    color: #fff;
}

.primary-button:hover {
    background: var(--primary-dark);
    color: #fff;
}

.secondary-button {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text);
}

.secondary-button:hover {
    border-color: #b5c3d4;
    color: var(--text);
}

.is-debouncing {
    pointer-events: none;
    opacity: .72;
}

.danger-button {
    border-color: #efb0aa;
    color: var(--red);
}

.success-button {
    border-color: #a3d9a5;
    color: var(--green);
}

.link-button {
    background: transparent;
    color: var(--primary);
    padding: 0;
    min-height: auto;
}

.full-width {
    width: 100%;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.metric {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    box-shadow: var(--shadow);
    color: var(--text);
}

.metric span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

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

.metric.warn strong {
    color: var(--amber);
}

.metric.accent strong {
    color: var(--green);
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.table-section,
.form-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.table-section {
    margin-top: 14px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.section-title form {
    margin: 0;
}

.section-title h2,
.form-section h2 {
    margin: 0;
    font-size: 16px;
}

.table-wrap {
    overflow: auto;
}

.table-wrap.wide {
    max-height: calc(100vh - 320px);
}

.table-wrap.wide table {
    min-width: 1500px;
}

.select-col {
    width: 44px;
    min-width: 44px;
    text-align: center;
}

.select-col input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.table-scroll-proxy {
    display: none;
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.table-scroll-proxy-inner {
    height: 1px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #3b4655;
    font-weight: 700;
    z-index: 1;
}

td {
    color: #263445;
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

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

.inline-notice {
    margin: 8px 0 12px;
    padding: 9px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.5;
}

.pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: #304154;
    white-space: nowrap;
}

.status-blocked {
    background: #fff2f0;
    color: var(--red);
}

.status-needs_review {
    background: #fff8e6;
    color: var(--amber);
}

.status-ready,
.status-imported {
    background: #effaf5;
    color: var(--green);
}

.status-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef4fb;
    color: #304154;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill.success {
    background: #effaf5;
    color: var(--green);
}

.status-pill.warning {
    background: #fff8e6;
    color: var(--amber);
}

.status-pill.danger {
    background: #fff2f0;
    color: var(--red);
}

.status-pill.neutral {
    background: #edf3fa;
    color: #43566d;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.row-actions form {
    margin: 0;
}

.inline-loss-action {
    display: grid;
    grid-template-columns: 86px minmax(120px, 1fr);
    gap: 6px;
    min-width: 260px;
    margin: 4px 0;
}

.inline-loss-action input {
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}

.inline-loss-action button {
    justify-self: start;
    padding: 0;
}

.danger-link {
    color: #dc2626;
}

.danger-link {
    color: var(--red);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tabs a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    color: #263445;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 6px;
}

.tabs a.active {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef5ff;
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.filter-bar input,
.filter-bar select {
    height: 36px;
    min-width: 180px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    padding: 7px 10px;
}

.combo-select {
    position: relative;
}

.native-select-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.combo-menu {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.combo-menu.open {
    display: block;
}

.combo-option {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    color: var(--text);
    padding: 9px 10px;
    text-align: left;
    cursor: pointer;
}

.combo-option:hover {
    background: #eef5ff;
}

.combo-empty-warning {
    color: #92400e;
    background: #fffbeb;
}

.combo-option.active {
    background: #eaf2ff;
    color: var(--primary-dark);
    font-weight: 700;
}

.combo-empty {
    padding: 10px;
    color: var(--muted);
}

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

.form-section {
    padding: 16px;
}

.form-section h2 {
    margin-bottom: 12px;
}

.form-section > h2 {
    padding: 16px 18px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
}

.field {
    min-width: 0;
}

.field label {
    display: block;
    margin-bottom: 6px;
    color: #3b4655;
    font-weight: 600;
}

.field small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.form-control,
.login-panel input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 8px 10px;
}

textarea.form-control {
    min-height: 76px;
    resize: vertical;
}

.has-error .form-control {
    border-color: var(--red);
    background: #fff8f7;
}

.field-error {
    margin-top: 6px;
    color: var(--red);
    font-size: 13px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    padding: 12px 0;
    background: linear-gradient(to top, var(--bg) 70%, rgba(246, 247, 249, 0));
}

.messages {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.message {
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.message.success {
    border-color: #a7d8c8;
    background: #effaf5;
    color: var(--green);
}

.message.error {
    border-color: #f0b1ab;
    background: #fff2f0;
    color: var(--red);
}

.notice {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #c7d7ea;
    background: #f2f7fd;
    color: #304154;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f6f7f9 0%, #e9f1f7 48%, #f8f6ef 100%);
}

.login-panel {
    width: min(420px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.login-panel h1 {
    margin: 0 0 18px;
    font-size: 22px;
}

.login-panel label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

.login-panel button {
    margin-top: 18px;
}

/* 1.6.3 UI refresh: compact operational workspace */
:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f3f7f6;
    --surface-tint: #eef5fb;
    --text: #17202b;
    --muted: #657184;
    --line: #d7e0ea;
    --line-strong: #becbd8;
    --primary: #1f6feb;
    --primary-dark: #1558c0;
    --teal: #0f8b7e;
    --green: #157a55;
    --amber: #a8660b;
    --red: #bd3b32;
    --violet: #6b5fb5;
    --shadow: 0 12px 28px rgba(23, 32, 43, .07);
    --shadow-soft: 0 6px 18px rgba(23, 32, 43, .05);
}

html,
body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    font-weight: 500;
}

.topbar {
    height: 64px;
    padding: 0 24px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
    backdrop-filter: blur(10px);
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #18314f;
    color: #fff;
    font-weight: 800;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 15px;
    line-height: 1.2;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.brand-text .build-sha {
    color: #8a97a8;
    font-size: 11px;
}

.topnav {
    gap: 12px;
}

.topnav a,
.link-button {
    color: #304154;
}

.topnav a:hover,
.link-button:hover {
    color: var(--primary);
}

.topnav .nav-action {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.user-badge {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: #445164;
    font-size: 13px;
}

.layout {
    grid-template-columns: 196px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    padding: 18px 12px;
    background: #edf3f1;
    border-right: 1px solid var(--line);
}

.sidebar-title {
    padding: 0 10px 10px;
    color: #718093;
    font-size: 12px;
    font-weight: 700;
}

.side-section-label {
    margin: 14px 10px 6px;
    color: #8a97a8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.sidebar-title + .side-section-label {
    margin-top: 2px;
}

.side-link {
    position: relative;
    padding: 10px 12px 10px 14px;
    color: #314154;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 600;
}

.side-link:hover {
    background: rgba(255, 255, 255, .72);
}

.side-link.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
}

.side-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.content {
    padding: 24px;
}

.page-head {
    align-items: center;
    margin-bottom: 18px;
}

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

.page-head p {
    color: #526176;
}

.primary-button,
.secondary-button,
.link-button {
    border-radius: 7px;
    min-height: 38px;
    padding: 8px 15px;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.primary-button {
    background: var(--primary);
    box-shadow: 0 8px 18px rgba(31, 111, 235, .18);
}

.primary-button:hover {
    box-shadow: 0 10px 24px rgba(31, 111, 235, .24);
}

.secondary-button {
    background: #fff;
    border-color: #ccd8e5;
}

.danger-button {
    background: #fff8f7;
    border-color: #efb4ae;
}

.metric {
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.metric[data-tooltip] {
    position: relative;
}

.metric[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 12px;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: min(280px, calc(100vw - 48px));
    padding: 9px 11px;
    border-radius: 7px;
    background: #182635;
    color: #fff;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 500;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(23, 32, 43, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.metric[data-tooltip]::before {
    content: "";
    position: absolute;
    left: 24px;
    bottom: calc(100% + 2px);
    z-index: 31;
    border: 6px solid transparent;
    border-top-color: #182635;
    opacity: 0;
    visibility: hidden;
    transition: opacity .14s ease, visibility .14s ease;
}

.metric[data-tooltip]:hover::after,
.metric[data-tooltip]:focus-visible::after,
.metric[data-tooltip]:hover::before,
.metric[data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.table-section,
.form-section,
.list-controls {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.table-section {
    overflow: hidden;
}

.table-section-flush {
    margin-top: 0;
}

.section-title {
    background: #fbfcfd;
}

.list-controls {
    padding: 14px;
    margin-bottom: 14px;
    overflow: visible;
}

.scope-entry-group {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
}

.scope-entry-title {
    color: #43566d;
    font-size: 12px;
    font-weight: 900;
}

.list-controls .tabs {
    margin-bottom: 0;
}

.tabs {
    gap: 7px;
}

.tabs a {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 7px;
    background: #f9fbfd;
    font-weight: 600;
}

.tabs a.active {
    background: #eaf2ff;
    box-shadow: inset 0 0 0 1px rgba(31, 111, 235, .08);
}

.operation-tabs a {
    position: relative;
    border-color: #bfdbfe;
    background: #eef6ff;
    color: #174ea6;
}

.operation-tabs a.active {
    color: #fff;
    background: var(--primary);
}

.query-entry-group {
    padding-top: 2px;
}

.query-tabs a {
    min-height: 32px;
    background: #fbfcfd;
    color: #526176;
    font-size: 13px;
}

.operation-tabs a[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 120;
    width: max-content;
    min-width: 220px;
    max-width: min(360px, 70vw);
    padding: 8px 10px;
    border-radius: 7px;
    background: #18202a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: normal;
    transform: translateY(-4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(20, 36, 56, .18);
    transition: opacity .14s ease, visibility .14s ease, transform .14s ease;
}

.operation-tabs a[data-tooltip]:hover::after,
.operation-tabs a[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 12px;
}

.sub-tabs-label {
    color: #66758a;
    font-size: 12px;
    font-weight: 800;
}

.sub-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #d7e2ef;
    border-radius: 999px;
    background: #f6f9fc;
    color: #526176;
    font-size: 12px;
    font-weight: 700;
}

.sub-tabs a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef5ff;
}

.sub-tabs a.active {
    border-color: var(--primary);
    background: #eaf2ff;
    color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(31, 111, 235, .08);
}

.filter-bar {
    margin-bottom: 0;
}

.filter-bar input,
.filter-bar select {
    height: 38px;
    border-color: #ccd8e5;
}

.structured-filter-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(132px, 1fr)) auto auto auto;
    align-items: end;
    gap: 10px;
}

.order-filter-bar {
    grid-template-columns: minmax(220px, 1.5fr) repeat(8, minmax(118px, 1fr)) auto auto auto;
}

.account-shop-filter {
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) minmax(130px, .8fr) auto auto;
    padding: 14px 16px 0;
}

.structured-filter-bar label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.structured-filter-bar label span {
    color: #526176;
    font-size: 12px;
    font-weight: 700;
}

.structured-filter-bar input,
.structured-filter-bar select {
    width: 100%;
    min-width: 0;
}

.account-admin-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.account-list-panel,
.account-editor-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.account-list {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    padding: 8px;
}

.account-list-item {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border-radius: 7px;
    color: var(--text);
}

.account-list-item:hover {
    background: #f5f8fb;
    color: var(--text);
}

.account-list-item.active {
    background: #eaf2ff;
    color: var(--primary-dark);
}

.new-account-item {
    border: 1px dashed #9cb8dd;
    margin-bottom: 8px;
}

.new-account-item .account-name {
    color: var(--primary-dark);
}

.account-editor-panel.focus-pulse {
    animation: accountFocusPulse 0.9s ease;
}

@keyframes accountFocusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.22), var(--shadow-soft);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0), var(--shadow-soft);
    }
}

.account-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
}

.account-name em {
    font-style: normal;
    color: var(--red);
    font-size: 12px;
}

.account-meta,
.muted-text {
    color: var(--muted);
    font-size: 12px;
}

.field-inline-help,
.action-hint {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.action-hint {
    color: #b45309;
    font-weight: 800;
}

.account-permission-form {
    padding-top: 14px;
}

.account-form-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.field-note {
    grid-column: span 3;
}

.goods-link-config-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    max-width: 1180px;
}

.goods-link-config-card,
.goods-link-account-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.goods-link-login-form {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
}

.goods-link-login-form .form-section {
    padding: 0;
}

.goods-link-login-grid {
    grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1.15fr) minmax(160px, .7fr);
    align-items: end;
    gap: 12px;
}

.goods-link-login-grid .field label {
    margin-bottom: 5px;
    color: #243246;
    font-size: 13px;
    font-weight: 800;
}

.goods-link-login-grid .form-control {
    min-height: 38px;
    font-size: 14px;
}

.goods-link-form-actions {
    position: static;
    justify-content: flex-start;
    padding: 0;
    background: transparent;
}

.goods-link-account-panel .section-title {
    padding-bottom: 10px;
}

.goods-link-account-panel .compact-table-wrap {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
}

.goods-link-account-panel table {
    min-width: 920px;
}

.goods-link-account-panel th,
.goods-link-account-panel td {
    padding: 10px 12px;
    font-size: 13px;
}

.goods-link-route-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.goods-link-route-form input {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
}

.tag-admin-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.tag-editor-panel,
.tag-list-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.tag-editor-form {
    padding: 10px 12px 12px;
}

.tag-editor-panel .section-title {
    padding: 10px 12px;
}

.tag-editor-panel .section-title h2 {
    font-size: 15px;
}

.tag-editor-panel .section-title p {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.45;
}

.tag-editor-form .field {
    margin-bottom: 9px;
}

.tag-editor-form label {
    font-size: 12px;
    margin-bottom: 4px;
}

.tag-editor-form .form-control {
    min-height: 34px;
    padding: 6px 9px;
}

.tag-editor-form textarea.form-control {
    min-height: 58px;
}

.tag-editor-form .check-row {
    min-height: 28px;
}

.tag-editor-form .form-actions {
    position: static;
    padding: 8px 0 0;
    gap: 8px;
}

.tag-filter-bar {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr) minmax(120px, 0.8fr) 96px 56px;
    gap: 8px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
    padding: 9px 10px;
    margin: 0;
}

.tag-filter-bar label {
    gap: 3px;
}

.tag-filter-bar .form-control,
.tag-filter-bar input,
.tag-filter-bar select,
.tag-filter-bar button,
.tag-filter-bar .reset-filter-link {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.return-filter-bar {
    grid-template-columns: minmax(190px, 1.4fr) repeat(7, minmax(118px, 1fr)) 82px 70px;
}

.shop-analysis-filter {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.shop-analysis-grid {
    align-items: start;
}

.shop-analysis-table {
    max-height: calc(100vh - 380px);
}

.shop-analysis-table table {
    font-size: 12px;
}

.shop-analysis-table th,
.shop-analysis-table td {
    padding: 7px 9px;
}

.analysis-stage {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.analysis-stage span {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.analysis-stage strong {
    font-size: 14px;
    color: #17324d;
}

.muted-stage {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.muted-stage span {
    background: #475569;
}

.data-stage {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.data-stage span {
    background: #047857;
}

.compact-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--line);
}

.compact-metrics div {
    padding: 12px;
    background: #fbfdff;
}

.compact-metrics span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
    font-size: 12px;
}

.compact-metrics strong {
    font-size: 20px;
}

.clamp-cell {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Workbench and weekly meeting surfaces */
.workbench-head,
.meeting-head {
    align-items: flex-start;
}

.workbench-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #cbd9e8;
    border-radius: 8px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 58%, #f8fafc 100%);
    box-shadow: var(--shadow-soft);
}

.workbench-hero-copy h2,
.meeting-summary h2 {
    margin: 6px 0 8px;
    font-size: 22px;
    line-height: 1.35;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 700;
}

.workbench-hero-copy p,
.meeting-summary p {
    color: var(--muted);
    margin: 0;
}

.workbench-hero-stat {
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
}

.workbench-hero-stat span,
.workbench-hero-stat small,
.meeting-change-grid span {
    color: var(--muted);
}

.workbench-hero-stat strong {
    color: #047857;
    font-size: 32px;
}

.task-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.task-card {
    display: grid;
    gap: 8px;
    min-height: 128px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

.task-card:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.task-card span {
    color: var(--muted);
    font-size: 13px;
}

.task-card strong {
    font-size: 30px;
    line-height: 1;
}

.task-card small {
    color: var(--muted);
    line-height: 1.45;
}

.task-warn strong {
    color: #b45309;
}

.task-accent strong {
    color: #047857;
}

.task-info strong {
    color: #1d4ed8;
}

.compact-analysis-panel {
    margin-top: 6px;
}

.workbench-metrics {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.workbench-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.priority-table {
    display: flex;
    flex-direction: column;
    height: 720px;
}

.priority-table .section-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.meeting-filter {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.meeting-period-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

.meeting-period-banner span {
    color: #475569;
}

.period-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.meeting-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid #cbd9e8;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: var(--shadow-soft);
}

.meeting-change-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.meeting-change-grid div {
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 12px;
    background: #fff;
}

.meeting-change-grid strong {
    font-size: 20px;
}

.meeting-metrics {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.meeting-grid {
    align-items: start;
}

.issue-stack,
.highlight-stack {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.issue-card,
.highlight-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 14px;
    background: #fff;
}

.issue-card span,
.highlight-card span {
    display: inline-flex;
    margin-bottom: 7px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.issue-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.issue-card p,
.highlight-card p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}

.issue-card dl {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px 10px;
    margin: 10px 0 0;
    color: #334155;
}

.issue-card dt {
    color: var(--muted);
}

.issue-card dd {
    margin: 0;
}

.issue-P0 {
    border-color: #fecaca;
    background: #fff7f7;
}

.issue-P0 span {
    background: #fee2e2;
    color: #b91c1c;
}

.issue-P1 {
    border-color: #fed7aa;
    background: #fffaf3;
}

.issue-P1 span {
    background: #ffedd5;
    color: #c2410c;
}

.issue-card:not(.issue-P0):not(.issue-P1) span,
.highlight-card span {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (max-width: 1180px) {
    .task-board,
    .workbench-metrics,
    .meeting-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .meeting-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .workbench-hero,
    .meeting-change-grid,
    .meeting-filter {
        grid-template-columns: 1fr;
    }

    .task-board,
    .workbench-metrics,
    .meeting-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .summary-wide {
        grid-column: auto;
    }
}

/* Table readability overrides: keep columns usable and scroll instead of crushing text. */
.table-section {
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior-x: contain;
}

.table-wrap table {
    width: max-content;
    min-width: 100%;
}

.table-wrap th {
    white-space: nowrap;
    word-break: keep-all;
}

.table-wrap td {
    word-break: normal;
    overflow-wrap: anywhere;
}

.table-wrap .num,
.actions-cell {
    white-space: nowrap;
}

.return-table {
    min-width: 2280px;
    table-layout: fixed;
}

.return-table th:nth-child(1),
.return-table td:nth-child(1) { width: 190px; }
.return-table th:nth-child(2),
.return-table td:nth-child(2) { width: 190px; }
.return-table th:nth-child(3),
.return-table td:nth-child(3) { width: 150px; }
.return-table th:nth-child(4),
.return-table td:nth-child(4) { width: 280px; }
.return-table th:nth-child(5),
.return-table td:nth-child(5) { width: 96px; }
.return-table th:nth-child(6),
.return-table td:nth-child(6) { width: 118px; }
.return-table th:nth-child(7),
.return-table td:nth-child(7) { width: 96px; }
.return-table th:nth-child(8),
.return-table td:nth-child(8) { width: 150px; }
.return-table th:nth-child(9),
.return-table td:nth-child(9) { width: 96px; }
.return-table th:nth-child(10),
.return-table td:nth-child(10) { width: 96px; }
.return-table th:nth-child(11),
.return-table td:nth-child(11) { width: 96px; }
.return-table th:nth-child(12),
.return-table td:nth-child(12) { width: 118px; }
.return-table th:nth-child(13),
.return-table td:nth-child(13),
.return-table th:nth-child(14),
.return-table td:nth-child(14),
.return-table th:nth-child(15),
.return-table td:nth-child(15) { width: 92px; }
.return-table th:nth-child(16),
.return-table td:nth-child(16) { width: 160px; }
.return-table th:nth-child(17),
.return-table td:nth-child(17) { width: 160px; }

.return-table td:nth-child(1),
.return-table td:nth-child(2),
.return-table td:nth-child(8),
.return-table td:nth-child(13),
.return-table td:nth-child(14),
.return-table td:nth-child(15),
.return-table td:nth-child(17) {
    white-space: nowrap;
}

.return-table th:last-child,
.return-table td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -10px 0 18px rgba(23, 32, 43, .06);
    z-index: 2;
}

.return-table th:last-child {
    background: #f8fafc;
    z-index: 4;
}

.compact-scroll-table {
    min-width: 760px;
    table-layout: fixed;
}

.shipment-risk-table {
    min-width: 1080px;
}

.shipment-risk-center-table {
    min-width: 1510px;
    table-layout: fixed;
}

.shipment-risk-center-table th {
    color: #51647c;
    background: #f8fbff;
    font-size: 12px;
}

.shipment-risk-center-table th:nth-child(1),
.shipment-risk-center-table td:nth-child(1) { width: 235px; }
.shipment-risk-center-table th:nth-child(2),
.shipment-risk-center-table td:nth-child(2) { width: 82px; }
.shipment-risk-center-table th:nth-child(3),
.shipment-risk-center-table td:nth-child(3) { width: 140px; }
.shipment-risk-center-table th:nth-child(4),
.shipment-risk-center-table td:nth-child(4) { width: 170px; }
.shipment-risk-center-table th:nth-child(5),
.shipment-risk-center-table td:nth-child(5) { width: 190px; }
.shipment-risk-center-table th:nth-child(6),
.shipment-risk-center-table td:nth-child(6) { width: 150px; }
.shipment-risk-center-table th:nth-child(7),
.shipment-risk-center-table td:nth-child(7) { width: 105px; }
.shipment-risk-center-table th:nth-child(8),
.shipment-risk-center-table td:nth-child(8) { width: 225px; }
.shipment-risk-center-table th:nth-child(9),
.shipment-risk-center-table td:nth-child(9) { width: 120px; }

.shipment-risk-center-table td {
    padding: 8px 12px;
    vertical-align: top;
    line-height: 1.34;
}

.shipment-risk-center-table tbody tr {
    border-left: 4px solid transparent;
}

.daily-report-table {
    min-width: 1280px;
}

.daily-report-metrics {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.daily-report-exchange-metrics {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.daily-report-filter {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
}

.daily-report-filter.exchange-filter {
    grid-template-columns: repeat(5, minmax(140px, 1fr)) minmax(220px, 1.2fr) auto auto;
}

.daily-report-alert {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
}

.daily-report-alert.soft {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}

.daily-report-alert.soft span {
    background: #e0e7ff;
}

.daily-report-alert span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffedd5;
    font-weight: 700;
}

.inline-warning {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.45;
}

.daily-report-text {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-report-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.daily-report-date-grid {
    grid-template-columns: minmax(220px, 320px);
}

.daily-report-form .field-key_work,
.daily-report-form .field-problems,
.daily-report-form .field-learning,
.daily-report-form .field-observations,
.daily-report-form .field-tomorrow_plan,
.daily-report-form .field-collaboration_note {
    grid-column: span 2;
}

.daily-report-form .field-needs_collaboration {
    grid-column: span 2;
}

.switch-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #f8fafc;
    font-weight: 800;
}

.switch-field input {
    width: 18px;
    height: 18px;
}

.highlight-field textarea,
.highlight-field input,
.highlight-field select {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.daily-report-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.daily-report-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.daily-report-card.needs-collaboration {
    border-color: #fed7aa;
    background: linear-gradient(180deg, #fff7ed 0%, #fff 35%);
}

.daily-report-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.daily-report-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    color: #0f172a;
}

.daily-report-card-title strong {
    font-size: 18px;
}

.daily-report-card-title span,
.daily-report-card-meta {
    color: #64748b;
}

.daily-report-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
}

.daily-report-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 800;
}

.daily-report-card.needs-collaboration .daily-report-status {
    background: #ffedd5;
    color: #9a3412;
}

.daily-report-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.daily-report-chip-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
}

.daily-report-chip-row strong {
    color: #0f172a;
}

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

.daily-report-block {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.daily-report-block.collaboration {
    border-color: #fed7aa;
    background: #fff7ed;
}

.daily-report-block span {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.daily-report-block p {
    margin: 0;
    color: #0f172a;
    line-height: 1.65;
    word-break: break-word;
}

.daily-report-empty-note,
.empty-card {
    margin: 0;
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
}

.secondary-button.compact {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 13px;
}

@media (max-width: 1200px) {
    .daily-report-feed,
    .daily-report-content-grid {
        grid-template-columns: 1fr;
    }

    .daily-report-filter.exchange-filter {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

.checkbox-grid ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 8px 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid #d8e2ee;
    border-radius: 7px;
    background: #f8fafc;
    font-weight: 700;
}

.checkbox-grid input {
    width: 16px;
    height: 16px;
}

.risk-overview-card,
.risk-filter-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px 22px;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.risk-filter-card {
    display: block;
}

.shipment-period-card {
    display: grid;
    grid-template-columns: minmax(210px, .9fr) auto auto;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.shipment-scope-card {
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    padding: 8px 12px;
}

.shipment-scope-copy {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.shipment-scope-copy p {
    display: none;
    font-size: 12px;
}

.shipment-period-card h2 {
    margin: 0 0 3px;
    color: #10243d;
    font-size: 17px;
}

.shipment-period-card p {
    margin: 0;
    color: #566b85;
    font-size: 13px;
}

.shipment-period-pills,
.shipment-period-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shipment-scope-card .shipment-period-pills {
    flex-wrap: wrap;
    gap: 6px;
}

.shipment-scope-form {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.shipment-scope-form label {
    display: block;
}

.shipment-scope-form label span {
    display: none;
}

.shipment-period-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #bfd2ec;
    border-radius: 8px;
    color: #0f2f55;
    background: #f8fbff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.shipment-period-pills a.active {
    color: #075be8;
    border-color: #2563eb;
    background: #eaf3ff;
}

.shipment-period-custom label {
    display: grid;
    gap: 4px;
    color: #52657e;
    font-size: 11px;
    font-weight: 700;
}

.shipment-period-custom input,
.shipment-period-custom select {
    width: 126px;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #cbd9ea;
    border-radius: 7px;
    background: #fff;
}

.shipment-period-custom select {
    width: 142px;
}

.shipment-period-custom .primary-button {
    min-height: 28px;
    padding: 0 14px;
}

.period-current-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 0;
    color: #dc2626 !important;
    font-size: 12px !important;
}

.period-current-note strong {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
}

.period-current-note span {
    display: none;
    color: #64748b;
}

.sop-risk-overview-card {
    grid-template-columns: minmax(0, 1fr) 490px;
}

.sop-risk-overview-card .risk-metric-strip {
    grid-template-columns: repeat(6, minmax(118px, 1fr));
}

.compact-sop-risk-overview {
    margin-bottom: 10px;
    padding: 8px 12px;
    gap: 10px;
}

.compact-sop-risk-overview .section-title-lite {
    margin-bottom: 8px;
}

.compact-sop-risk-overview .risk-overview-main {
    min-width: 0;
}

.compact-sop-path {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #d7e4f2;
    border-radius: 9px;
    background: #f8fbff;
}

.compact-sop-path h3 {
    margin: 0;
    color: #10243d;
    font-size: 14px;
    white-space: nowrap;
}

.compact-sop-path p {
    margin: 0;
    color: #24364b;
    font-size: 12px;
    font-weight: 800;
}

.compact-sop-path small {
    display: none;
    color: #64748b;
    font-size: 12px;
}

.sop-path-card {
    margin-bottom: 16px;
    padding: 20px 22px;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.sop-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.sop-steps::before {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    top: 28px;
    border-top: 2px dashed #cbd5e1;
}

.sop-step {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: #f8fbff;
}

.sop-step span {
    grid-row: span 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 900;
}

.sop-step strong {
    color: #10243d;
    font-size: 14px;
}

.sop-step small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.step-red span { color: #dc2626; background: #ffe4e6; }
.step-orange span { color: #d97706; background: #ffedd5; }
.step-blue span { color: #2563eb; background: #dbeafe; }
.step-green span { color: #059669; background: #dcfce7; }
.step-violet span { color: #6d28d9; background: #ede9fe; }

.sop-filter-card {
    margin-bottom: 10px;
    padding: 10px 14px;
}

.section-title-lite {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.section-title-lite h2 {
    margin: 0;
    color: #10243d;
    font-size: 18px;
}

.section-title-lite p {
    margin: 0;
    color: #566b85;
    font-size: 13px;
}

.risk-metric-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(118px, 1fr));
    gap: 10px;
}

.risk-metric-box {
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #d9e6f4;
    border-radius: 9px;
    background: #f8fbff;
}

.risk-metric-box span {
    display: block;
    margin-bottom: 2px;
    color: #667991;
    font-size: 12px;
    font-weight: 700;
}

.risk-metric-box strong {
    color: #10243d;
    font-size: 16px;
    font-weight: 900;
}

.metric-red {
    border-color: #fecaca;
    background: #fff1f2;
}

.metric-red strong,
.metric-rose strong {
    color: #dc2626;
}

.metric-orange {
    border-color: #fed7aa;
    background: #fff7ed;
}

.metric-orange strong,
.metric-amber strong {
    color: #d97706;
}

.metric-pink,
.metric-rose {
    border-color: #fecdd3;
    background: #fff1f2;
}

.metric-amber {
    border-color: #fdba74;
    background: #fff7ed;
}

.metric-green {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.metric-green strong {
    color: #059669;
}

.metric-blue {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.metric-blue strong {
    color: #2563eb;
}

.metric-muted {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.metric-muted strong {
    color: #475569;
}

.return-followup-head {
    margin-bottom: 12px;
}

.return-followup-head h1 {
    margin-bottom: 4px;
}

.return-compact-overview,
.return-filter-card {
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.return-compact-overview {
    display: grid;
    grid-template-columns: minmax(190px, 260px) 1fr;
    gap: 8px 16px;
    align-items: center;
}

.return-compact-copy h2,
.return-filter-title h2,
.return-table-title h2 {
    margin: 0;
    color: #102033;
    font-size: 17px;
}

.return-compact-copy p,
.return-filter-title p,
.return-table-title p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.return-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.return-stat-pill {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    white-space: nowrap;
}

.return-stat-pill span {
    color: #667991;
    font-size: 12px;
    font-weight: 800;
}

.return-stat-pill strong {
    font-size: 14px;
    font-weight: 900;
}

.return-stat-pills a[data-tooltip],
.return-scope-pills a[data-tooltip] {
    position: relative;
}

.return-stat-pills a[data-tooltip]::after,
.return-scope-pills a[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 300;
    width: max-content;
    min-width: 240px;
    max-width: min(380px, 72vw);
    padding: 9px 11px;
    border-radius: 7px;
    background: #18202a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    white-space: normal;
    transform: translateY(-4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 12px 28px rgba(20, 36, 56, .22);
    transition: opacity .14s ease, visibility .14s ease, transform .14s ease;
}

.return-stat-pills a[data-tooltip]::before,
.return-scope-pills a[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 16px;
    top: calc(100% + 3px);
    z-index: 301;
    width: 10px;
    height: 10px;
    background: #18202a;
    transform: rotate(45deg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .14s ease, visibility .14s ease;
}

.return-stat-pills a[data-tooltip]:hover::after,
.return-stat-pills a[data-tooltip]:focus-visible::after,
.return-scope-pills a[data-tooltip]:hover::after,
.return-scope-pills a[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.return-stat-pills a[data-tooltip]:hover::before,
.return-stat-pills a[data-tooltip]:focus-visible::before,
.return-scope-pills a[data-tooltip]:hover::before,
.return-scope-pills a[data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

.return-deadline-inline {
    grid-column: 2;
    margin: 0;
    color: #7c2d12;
    font-size: 12px;
    line-height: 1.4;
}

.return-deadline-note {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 13px;
}

.return-deadline-note strong {
    flex: 0 0 auto;
    color: #9a3412;
}

.return-scope-pills a span {
    margin-left: 6px;
    color: #64748b;
    font-size: 12px;
}

.return-compact-filter-card {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 10px 16px;
    align-items: center;
}

.return-compact-filter-card .risk-filter-pills {
    margin: 0;
}

.return-filter-bar {
    margin: 10px 0 0;
    padding: 12px 14px;
    gap: 10px;
    border-top: 1px solid #dbe7f3;
    border-radius: 0;
    box-shadow: none;
}

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

.return-filter-bar label:first-child {
    min-width: 230px;
}

.return-filter-bar button,
.return-filter-bar .secondary-button {
    align-self: end;
}

.return-advanced-filter {
    margin-bottom: 12px;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.return-advanced-filter summary {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    cursor: pointer;
    color: #102033;
    font-size: 13px;
    font-weight: 900;
    list-style: none;
}

.return-advanced-filter summary::-webkit-details-marker {
    display: none;
}

.return-advanced-filter summary::before {
    content: "筛";
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
}

.return-advanced-filter summary::after {
    content: "展开";
    margin-left: auto;
    color: #2563eb;
    font-size: 12px;
}

.return-advanced-filter[open] summary::after {
    content: "收起";
}

.return-advanced-filter summary small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.return-workbench-table-section {
    padding-top: 0;
}

.return-table-title {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #dbe7f3;
}

.return-risk-table {
    min-width: 1385px;
    table-layout: fixed;
}

.return-risk-table th:nth-child(1),
.return-risk-table td:nth-child(1) { width: 250px; }
.return-risk-table th:nth-child(2),
.return-risk-table td:nth-child(2) { width: 160px; }
.return-risk-table th:nth-child(3),
.return-risk-table td:nth-child(3) { width: 175px; }
.return-risk-table th:nth-child(4),
.return-risk-table td:nth-child(4) { width: 150px; }
.return-risk-table th:nth-child(5),
.return-risk-table td:nth-child(5) { width: 160px; }
.return-risk-table th:nth-child(6),
.return-risk-table td:nth-child(6) { width: 150px; }
.return-risk-table th:nth-child(7),
.return-risk-table td:nth-child(7) { width: 220px; }
.return-risk-table th:nth-child(8),
.return-risk-table td:nth-child(8) { width: 120px; }

.return-risk-table td {
    vertical-align: top;
    padding-top: 10px;
    padding-bottom: 10px;
}

.return-risk-row.row-danger {
    background: #fff7f7;
}

.return-risk-row.row-warn {
    background: #fffaf0;
}

.return-risk-row.row-ok {
    background: #f8fffb;
}

.return-risk-row.row-focus {
    background: #fbfdff;
}

.order-link-strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
}

.table-subtext {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.risk-status-chip {
    display: inline-flex;
    width: fit-content;
    min-height: 24px;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.chip-danger {
    border-color: #fecaca;
    background: #fee2e2;
    color: #dc2626;
}

.chip-warn {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #d97706;
}

.chip-good {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.chip-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
}

.chip-muted {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #64748b;
}

.loss-amount {
    display: block;
    font-size: 15px;
}

.loss-danger {
    color: #dc2626;
}

.loss-warn {
    color: #d97706;
}

.loss-muted {
    color: #475569;
}

.return-main-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.compact-action-button {
    min-height: 28px;
    padding: 5px 10px;
    justify-content: center;
    text-align: center;
    font-size: 12px;
}

.logistics-picker {
    position: relative;
    width: 100%;
}

.logistics-picker-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #cbd9ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.logistics-picker-panel button {
    display: block;
    width: 100%;
    min-height: 30px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #102033;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
}

.logistics-picker-panel button:hover,
.logistics-picker-panel button:focus {
    background: #eff6ff;
    color: #2563eb;
}

.logistics-picker-panel .logistics-picker-other {
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
    color: #7c2d12;
}

.logistics-picker-status {
    display: block;
    margin-top: 4px;
    color: #52667d;
    font-size: 11px;
    line-height: 1.35;
}

.logistics-picker-status[hidden] {
    display: none;
}

.logistics-picker-status.is-info {
    color: #1d4ed8;
}

.logistics-picker-status.is-error {
    color: #b42318;
}

.logistics-select-search {
    margin-bottom: 6px;
}

.risk-overlap-visual {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
}

.risk-overlap-visual h3 {
    margin: 0;
    color: #10243d;
    font-size: 14px;
}

.risk-overlap-visual p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.venn-wrap {
    position: relative;
    width: 168px;
    height: 112px;
}

.venn-circle {
    position: absolute;
    top: 8px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
}

.venn-taobao {
    left: 18px;
    border: 1px solid #fb7185;
    background: rgba(254, 202, 202, .55);
    color: #b91c1c;
}

.venn-taobao span {
    transform: translateX(-20px);
}

.venn-1688 {
    right: 18px;
    border: 1px solid #fdba74;
    background: rgba(254, 215, 170, .55);
    color: #c2410c;
}

.venn-1688 span {
    transform: translateX(20px);
}

.venn-wrap strong {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: #dc2626;
    font-size: 20px;
}

.risk-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.risk-filter-pills a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #f8fbff;
    color: #174ea6;
    font-weight: 800;
}

.risk-filter-pills a span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    color: #475569;
    background: #eaf1fb;
    font-size: 12px;
    font-weight: 900;
}

.risk-filter-pills a.active,
.risk-filter-pills a:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}

.risk-filter-pills a.active span,
.risk-filter-pills a:hover span {
    color: #1d4ed8;
    background: #dbeafe;
}

.shipment-risk-head {
    align-items: center;
    margin-bottom: 10px;
}

.shipment-risk-head h1 {
    margin-bottom: 3px;
}

.shipment-risk-head p {
    font-size: 13px;
}

.shipment-risk-head .secondary-button {
    min-height: 32px;
    padding: 4px 12px;
}

.compact-sop-risk-overview .section-title-lite p,
.sop-filter-card .section-title-lite p {
    display: none;
}

.sop-filter-card .section-title-lite {
    margin-bottom: 8px;
}

.sop-filter-card .section-title-lite h2 {
    font-size: 16px;
}

.sop-filter-card .risk-filter-pills {
    gap: 8px;
}

.sop-filter-card .risk-filter-pills a {
    min-height: 30px;
    padding: 5px 12px;
}

.shipment-risk-head ~ .table-section {
    margin-top: 0;
}

.shipment-risk-head ~ .table-section .section-title {
    padding: 12px 16px;
}

.shipment-risk-head ~ .table-section .section-title p {
    font-size: 12px;
}

.refresh-button {
    border-color: #60a5fa;
    color: #2563eb;
    font-weight: 800;
}

.risk-summary-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.risk-summary-card header {
    display: grid;
    gap: 4px;
}

.summary-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.risk-summary-card h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
}

.risk-summary-card p {
    margin: 0;
    color: #526176;
    font-size: 13px;
    line-height: 1.55;
}

.summary-primary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.summary-primary span,
.summary-mini-grid span,
.net-formula span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.summary-primary strong {
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
}

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

.summary-mini-grid div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.summary-mini-grid strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
}

.summary-footnote {
    padding-top: 2px;
}

.risk-summary-taobao {
    border-top: 4px solid #ef4444;
}

.risk-summary-taobao .summary-kicker,
.risk-summary-taobao .summary-primary {
    color: #991b1b;
    border-color: #fecaca;
    background: #fff1f2;
}

.risk-summary-taobao .summary-primary strong {
    color: #b91c1c;
}

.risk-summary-1688 {
    border-top: 4px solid #2563eb;
}

.risk-summary-1688 .summary-kicker,
.risk-summary-1688 .summary-primary {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.risk-summary-1688 .summary-primary strong {
    color: #2563eb;
}

.risk-summary-net {
    border-top: 4px solid #f59e0b;
}

.risk-summary-net .summary-kicker,
.risk-summary-net .summary-primary {
    color: #92400e;
    border-color: #fed7aa;
    background: #fff7ed;
}

.risk-summary-net .summary-primary strong {
    color: #b45309;
}

.net-formula {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px;
    border: 1px dashed #fbbf24;
    border-radius: 8px;
    background: #fffbeb;
}

.net-formula strong {
    color: #0f172a;
    font-size: 16px;
    text-align: right;
}

.metric.critical {
    border-color: #fca5a5;
    background: #fff1f2;
}

.metric.offwork {
    border-color: #fdba74;
    background: #fff7ed;
}

.compact-scroll-table-small {
    min-width: 560px;
}

.priority-table .table-wrap {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: auto;
}

.priority-table th,
.priority-table td {
    padding: 8px 10px;
}

.shop-data-metrics {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    margin-bottom: 14px;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.time-danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fee2e2;
}

.time-warn {
    color: #92400e;
    border-color: #fed7aa;
    background: #ffedd5;
}

.time-info {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #dbeafe;
}

.time-critical {
    color: #7f1d1d;
    border-color: #fca5a5;
    background: #fecaca;
}

.time-offwork {
    color: #9a3412;
    border-color: #fdba74;
    background: #ffedd5;
}

.risk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.risk-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.legend-danger {
    background: #ef4444;
}

.legend-warn {
    background: #f59e0b;
}

.legend-info {
    background: #3b82f6;
}

.risk-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.risk-danger {
    color: #991b1b;
    background: #fee2e2;
}

.risk-warn {
    color: #92400e;
    background: #ffedd5;
}

.risk-info {
    color: #1d4ed8;
    background: #dbeafe;
}

.risk-critical {
    color: #7f1d1d;
    background: #fecaca;
}

.risk-offwork {
    color: #9a3412;
    background: #ffedd5;
}

.risk-neutral {
    color: #475569;
    background: #f1f5f9;
}

.risk-good {
    color: #047857;
    background: #d1fae5;
}

.risk-pending {
    color: #1d4ed8;
    background: #dbeafe;
}

.risk-muted {
    color: #64748b;
    background: #e2e8f0;
}

.risk-tag-stack,
.risk-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 180px;
}

.risk-reason-tag,
.risk-action-stack span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.risk-action-stack span {
    background: #ecfeff;
    color: #0e7490;
}

.risk-action-cell {
    min-width: 205px;
    color: #10243d;
}

.risk-action-cell strong {
    display: block;
    margin-bottom: 6px;
    color: #0f766e;
    font-size: 14px;
}

.shipment-row.shipment-danger td {
    background: #fff7f7;
}

.shipment-row.shipment-critical td {
    background: #fff1f2;
}

.shipment-row.shipment-danger {
    border-left-color: #ef4444;
}

.shipment-row.shipment-warn {
    border-left-color: #f59e0b;
}

.shipment-row.shipment-warn td {
    background: #fffbeb;
}

.shipment-row.shipment-info td {
    background: #f8fbff;
}

.shipment-row.shipment-neutral td {
    background: #fff;
}

.risk-order-cell a {
    display: block;
    max-width: 210px;
    overflow: hidden;
    color: #0b63ce;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.risk-order-cell .shop-name-main {
    display: block;
    margin-top: 8px;
    color: #10243d;
    font-weight: 800;
}

.shipment-risk-center-table .num {
    color: #10243d;
    font-weight: 800;
}

.risk-money-cell {
    display: grid;
    gap: 4px;
    font-weight: 800;
}

.risk-money-cell strong {
    color: #dc2626;
}

.risk-money-cell span {
    color: #059669;
}

.shipment-risk-center-table .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 7px;
    min-width: 110px;
}

.shipment-risk-center-table .row-actions a,
.shipment-risk-center-table .row-actions .quick-toggle {
    width: 100%;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #f8fbff;
    color: #174ea6;
    font-weight: 800;
    text-align: center;
}

.shipment-risk-center-table .row-actions .quick-toggle {
    border-color: #1d4ed8;
    background: #2563eb;
    color: #fff;
}

.shipment-risk-center-table .muted-block {
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.28;
}

.shipment-risk-center-table .risk-level,
.shipment-risk-center-table .risk-reason-tag {
    min-height: 20px;
    padding-top: 1px;
    padding-bottom: 1px;
    font-size: 11.5px;
}

.shipment-risk-center-table .row-actions a:nth-child(2) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.shipment-row.shipment-warn td {
    background: #fffaf0;
}

.shipment-row.shipment-offwork td {
    background: #fff7ed;
}

.shipment-row.shipment-info td {
    background: #f7fbff;
}

.shipment-row.shipment-critical td:first-child {
    box-shadow: inset 4px 0 0 #991b1b;
}

.shipment-row.shipment-danger td:first-child {
    box-shadow: inset 4px 0 0 #ef4444;
}

.shipment-row.shipment-warn td:first-child {
    box-shadow: inset 4px 0 0 #f59e0b;
}

.shipment-row.shipment-offwork td:first-child {
    box-shadow: inset 4px 0 0 #f97316;
}

.shipment-row.shipment-info td:first-child {
    box-shadow: inset 4px 0 0 #3b82f6;
}

.muted-block {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

/* Weekly meeting board: meeting-first reading order. */
.meeting-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid #cbd9e8;
    border-left-width: 5px;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: var(--shadow-soft);
}

.meeting-command h2 {
    margin: 8px 0;
    font-size: 22px;
    line-height: 1.4;
}

.meeting-command p {
    margin: 0;
    color: var(--muted);
}

.meeting-good {
    border-left-color: #059669;
    background: #f0fdf4;
}

.meeting-warn {
    border-left-color: #d97706;
    background: #fffbeb;
}

.meeting-info {
    border-left-color: #2563eb;
}

.meeting-agenda {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.meeting-agenda div {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 8px;
    align-items: center;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.meeting-agenda span {
    grid-row: span 2;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
}

.meeting-agenda strong {
    line-height: 1.2;
}

.meeting-agenda small {
    color: var(--muted);
}

.meeting-section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 22px 0 10px;
}

.meeting-section-title > span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #0f2742;
    color: #fff;
    font-weight: 800;
}

.meeting-section-title h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.meeting-section-title p {
    margin: 0;
    color: var(--muted);
}

.issue-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.meeting-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.meeting-topic-grid .shop-analysis-table,
.meeting-grid .shop-analysis-table {
    max-height: 420px;
}

.meeting-compare-table {
    min-width: 620px;
}

.meeting-action-table {
    min-width: 980px;
}

.muted-inline {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.row-soft-warn td {
    background: #fff7ed;
}

.weekly-action-create {
    margin: 0 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.weekly-action-create summary,
.weekly-action-edit summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 700;
}

.weekly-action-create summary {
    padding: 10px 12px;
}

.weekly-action-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(130px, 1fr));
    gap: 10px;
    padding: 0 12px 12px;
    align-items: end;
}

.weekly-action-form.compact {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    min-width: 520px;
    padding: 10px 0 0;
}

.weekly-action-form label span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.weekly-action-form input,
.weekly-action-form select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 9px;
    background: #fff;
}

.weekly-action-form .wide-field {
    grid-column: span 2;
}

.weekly-action-form .checkbox-line {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #334155;
}

.weekly-action-form .checkbox-line input {
    width: auto;
    min-height: 0;
}

.weekly-action-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.weekly-action-edit {
    position: relative;
}

.compact-meeting-metrics {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

@media (max-width: 1180px) {
    .meeting-command,
    .meeting-topic-grid,
    .issue-grid {
        grid-template-columns: 1fr;
    }

    .meeting-agenda {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .compact-meeting-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .meeting-agenda {
        grid-template-columns: 1fr;
    }
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell a + a {
    margin-left: 8px;
}

.tag-list-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border-bottom: 1px solid var(--line);
}

.tag-list-summary div {
    background: #fbfdff;
    padding: 9px 12px;
}

.tag-list-summary strong,
.tag-list-summary span {
    display: block;
}

.tag-list-summary strong {
    color: var(--text);
    font-size: 15px;
}

.tag-list-summary span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.tag-table {
    table-layout: fixed;
}

.tag-table-scroll {
    max-height: calc(100vh - 318px);
    min-height: 240px;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

.tag-table-scroll .tag-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.tag-table th,
.tag-table td {
    padding: 7px 10px;
    vertical-align: middle;
}

.tag-table th:nth-child(1) { width: 260px; }
.tag-table th:nth-child(2) { width: 92px; }
.tag-table th:nth-child(3) { width: 82px; }
.tag-table th:nth-child(4) { width: 92px; }
.tag-table th:nth-child(5) { width: 58px; }
.tag-table th:nth-child(6) { width: 70px; }
.tag-table th:nth-child(7) { width: 82px; }
.tag-table th:nth-child(8) { width: 190px; }

.tag-table tbody tr {
    height: 54px;
}

.tag-table td:first-child {
    min-width: 0;
}

.tag-table td:first-child strong,
.tag-table td:first-child small {
    display: block;
}

.tag-table td:first-child small {
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-pill,
.merchant-tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    border-radius: 999px;
    padding: 3px 8px;
    border: 1px solid #d7e0ec;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tag-actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tag-actions-cell .inline-form {
    display: inline-flex;
    margin: 0;
}

.inline-action-panel {
    position: relative;
    display: inline-block;
    margin-right: 8px;
    text-align: left;
}

.inline-action-panel > summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    list-style: none;
    white-space: nowrap;
}

.inline-action-panel > summary::-webkit-details-marker {
    display: none;
}

.inline-action-panel[open] {
    z-index: 80;
}

.inline-action-panel form {
    position: absolute;
    right: 0;
    top: 24px;
    width: 320px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

.inline-action-panel label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.inline-action-panel .form-control {
    min-height: 32px;
    font-size: 13px;
}

.quick-order-panel form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 430px;
}

.quick-order-panel button {
    grid-column: 1 / -1;
}

.tag-actions-cell a,
.tag-actions-cell .link-button {
    min-height: 0;
    padding: 0;
    font-size: 12px;
}

.tag-tone-positive {
    background: #ecfdf3;
    border-color: #b8e6c6;
    color: #087443;
}

.tag-tone-negative {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #b45309;
}

.tag-tone-risk {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.tag-tone-neutral {
    background: #f8fafc;
    border-color: #d7e0ec;
    color: #334155;
}

.merchant-tag-picker {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.merchant-tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.merchant-tag-chip {
    cursor: pointer;
}

.merchant-tag-chip:hover {
    border-color: var(--primary);
}

.merchant-tag-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.merchant-tag-chip.custom::after {
    content: "自定义";
    margin-left: 6px;
    opacity: 0.75;
    font-size: 11px;
}

.merchant-tag-custom-row {
    max-width: 360px;
}

.merchant-tag-picker small {
    color: var(--muted);
}

.check-row {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.check-row input {
    width: 16px;
    height: 16px;
}

.shop-assignment-toolbar {
    display: flex;
    gap: 8px;
    padding: 0 18px 10px;
}

.shop-assignment-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding: 0 18px 18px;
}

.shop-assignment-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfd;
}

.shop-assignment-item input[type="checkbox"] {
    margin-top: 3px;
}

.shop-assignment-item strong {
    display: block;
    color: #223044;
    line-height: 1.35;
}

.shop-assignment-item small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

.analysis-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
    overflow: hidden;
}

.compact-title {
    border-bottom: 0;
    padding-bottom: 6px;
}

.compact-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.analysis-filter {
    grid-template-columns: repeat(5, minmax(132px, 1fr)) auto;
    padding: 0 16px 16px;
}

.knowledge-metrics {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.knowledge-category-tabs a span {
    margin-left: 6px;
    color: var(--muted);
    font-weight: 700;
}

.knowledge-filter-bar {
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 1fr)) auto auto;
}

.knowledge-list-panel .data-table th,
.knowledge-list-panel .data-table td {
    vertical-align: top;
}

.knowledge-title-cell a {
    display: inline-block;
    font-weight: 800;
}

.knowledge-title-cell small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.45;
}

.compact-text {
    max-width: 260px;
    line-height: 1.45;
}

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

.muted-row {
    opacity: .58;
}

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

.knowledge-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: start;
}

.knowledge-article,
.knowledge-side-panel {
    padding: 18px;
}

.knowledge-meta-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.knowledge-body {
    line-height: 1.78;
    color: #172233;
    white-space: normal;
}

.knowledge-side-panel h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.detail-list {
    margin: 0;
}

.detail-list dt {
    margin-top: 14px;
    color: #526176;
    font-size: 12px;
    font-weight: 800;
}

.detail-list dd {
    margin: 5px 0 0;
    line-height: 1.55;
}

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

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.knowledge-form label {
    display: grid;
    gap: 6px;
}

.knowledge-form label > span {
    color: #344256;
    font-weight: 700;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.checkbox-row input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 16px 18px;
    background: #fff7f6;
    border: 1px solid #f1c1bd;
    border-radius: 8px;
}

.danger-zone p {
    margin: 4px 0 0;
    color: var(--muted);
}

.account-handover-panel {
    padding-bottom: 16px;
}

.account-handover-form {
    padding: 0 18px;
}

.account-handover-grid {
    grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(120px, .65fr) minmax(180px, 1fr) minmax(260px, 1.5fr);
    align-items: start;
}

.account-handover-grid .field-shops {
    grid-column: 1 / -1;
}

.account-handover-grid .field-shops > div,
.account-handover-grid .field-shops > ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 6px 12px;
    max-height: 190px;
    overflow-y: auto;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfd;
    list-style: none;
}

.account-handover-grid .field-shops label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.account-handover-grid .field-shops input {
    width: 15px;
    height: 15px;
}

.account-handover-actions {
    margin-top: 12px;
}

.handover-preview {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #b7cbea;
    border-radius: 8px;
    background: #f7faff;
}

.handover-preview-head,
.handover-preview-head > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.handover-preview-head span,
.handover-collaboration-note {
    color: var(--muted);
}

.handover-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.handover-metrics span,
.account-dependency-list span {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: #526176;
}

.handover-warning {
    color: #9a5a00;
}

.account-danger-zone {
    margin: 14px 18px 18px;
}

.account-analysis-token-section {
    margin: 14px 18px 0;
}

.account-token-list {
    display: grid;
    gap: 7px;
    margin: 10px 0;
}

.account-token-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
}

.account-token-item > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.account-token-item span,
.account-token-item small {
    color: var(--muted);
    font-size: 12px;
}

.account-analysis-token-section .inline-form,
.account-token-issued .inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.account-analysis-token-section .inline-form input,
.account-token-issued .inline-form input {
    min-width: 0;
    flex: 1;
}

.account-token-issued {
    max-width: 760px;
}

.account-danger-zone h2 {
    margin: 0;
    font-size: 15px;
}

.account-danger-zone small {
    display: block;
    margin-top: 4px;
    color: #9f3128;
}

.account-dependency-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.account-delete-form {
    display: flex;
    align-items: end;
    gap: 8px;
    flex: 0 0 auto;
}

.account-delete-form label {
    display: grid;
    gap: 5px;
    min-width: 220px;
}

.account-delete-form label span {
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 700;
}

.metric-grid-analysis {
    grid-template-columns: repeat(6, minmax(135px, 1fr));
    margin-bottom: 12px;
}

.task-metric-grid {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.reset-filter-link {
    min-height: 38px;
    align-items: center;
}

.table-wrap {
    background: #fff;
}

.table-wrap.wide {
    max-height: calc(100vh - 304px);
}

.table-scroll-proxy {
    height: 14px;
    border-bottom: 1px solid var(--line);
    background: #f7f9fb;
}

.table-scroll-proxy::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-scroll-proxy::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
    background: #9aa8b8;
    border-radius: 999px;
}

.table-scroll-proxy::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
    background: #eef2f6;
}

table {
    font-size: 13px;
}

th,
td {
    padding: 9px 12px;
    border-bottom: 1px solid #e1e7ef;
}

th {
    background: #f8fafc;
    color: #243142;
    line-height: 1.35;
}

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

.order-table {
    min-width: 2040px;
    table-layout: fixed;
}

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

.order-table .col-date { width: 72px; }
.order-table .col-status { width: 86px; }
.order-table .col-shop { width: 150px; }
.order-table .col-order-no { width: 188px; }
.order-table .col-flow { width: 230px; }
.order-table .col-money-stack { width: 126px; }
.order-table .col-money { width: 84px; }
.order-table .col-purchase-no { width: 190px; }
.order-table .col-logistics { width: 104px; }
.order-table .col-tracking { width: 148px; }
.order-table .col-no-ship { width: 110px; }
.order-table .col-refund { width: 110px; }
.order-table .col-product { width: 220px; }
.order-table .col-item { width: 138px; }
.order-table .col-original-link { width: 160px; }
.order-table .col-merchant { width: 116px; }
.order-table .col-quality { width: 210px; }
.order-table .col-actions { width: 150px; }

.cell-date,
.cell-status,
.cell-order-no,
.cell-code,
.cell-logistics,
.cell-refund,
.cell-original-link,
.cell-money,
.cell-money-stack {
    white-space: nowrap;
}

.cell-date {
    color: #4f6074;
    font-variant-numeric: tabular-nums;
}

.cell-shop {
    color: #1f2c3d;
    font-weight: 650;
}

.shop-name-main {
    display: block;
    line-height: 1.35;
}

.legal-entity-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 18px;
    margin-top: 4px;
    padding: 1px 6px;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: #f1f7ff;
    color: #2c5f9e;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-order-no a,
.cell-code {
    font-variant-numeric: tabular-nums;
}

.cell-order-no {
    position: relative;
    overflow: visible;
}

.cell-product,
.cell-quality,
.cell-no-ship {
    line-height: 1.45;
    word-break: break-word;
}

.cell-quality {
    color: #5f6d80;
    font-size: 12.5px;
}

.original-link-batch-panel .section-title {
    align-items: center;
    gap: 12px;
}

.original-link-batch-panel {
    position: relative;
    z-index: 20;
    margin-top: 0;
    margin-bottom: 10px;
    overflow: visible;
}

.original-link-batch-panel.compact-analysis-panel {
    padding: 10px 12px;
}

.original-link-batch-panel .compact-title {
    padding: 0;
}

.original-link-title-row {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
    overflow: hidden;
}

.original-link-title {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

.original-link-actions {
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    flex-wrap: nowrap;
}

.original-link-actions .primary-button,
.original-link-actions .secondary-button,
.original-link-actions .original-link-export-menu > summary {
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.original-link-export-menu {
    position: relative;
}

.original-link-export-menu[open] {
    z-index: 80;
}

.original-link-export-menu > summary {
    list-style: none;
}

.original-link-export-menu > summary::-webkit-details-marker {
    display: none;
}

.original-link-export-form {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 90;
    width: min(420px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid #d6e2f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 35, 65, 0.16);
}

.original-link-export-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.original-link-export-title {
    color: #10233f;
    font-weight: 700;
}

.original-link-export-check-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #34435a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.original-link-export-check-all input {
    width: 15px;
    height: 15px;
}

.original-link-export-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    max-height: 210px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #e1e9f3;
    border-radius: 6px;
    background: #f8fbff;
}

.original-link-export-fields label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #34435a;
    font-size: 13px;
    line-height: 1.25;
}

.original-link-export-fields input {
    flex: 0 0 auto;
}

.original-link-export-fields span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.original-link-export-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.original-link-export-row label {
    display: grid;
    gap: 5px;
    flex: 1;
    min-width: 0;
    color: #52627a;
    font-size: 13px;
}

.original-link-export-row select {
    width: 100%;
    min-height: 36px;
    border: 1px solid #c8d6e6;
    border-radius: 6px;
    padding: 6px 10px;
    background: #fff;
    color: #10233f;
}

.original-link-parse-summary {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.original-link-parse-summary::-webkit-scrollbar {
    display: none;
}

.original-link-parse-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.original-link-parse-badge.neutral {
    border-color: #d5e0ee;
    background: #f5f8fc;
    color: #52627a;
}

.original-link-parse-badge.success {
    border-color: #bde7d0;
    background: #effbf4;
    color: #08703c;
}

.original-link-parse-badge.info {
    border-color: #c7ddfb;
    background: #f3f8ff;
    color: #225ea8;
}

.original-link-parse-badge.warn {
    border-color: #f0d39b;
    background: #fff8ea;
    color: #9a5f00;
}

.original-link-parse-badge.danger {
    border-color: #f0b6b6;
    background: #fff2f1;
    color: #a51d1d;
}

.original-link-parse-badge.muted {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.original-link-title-help {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid #c8d7eb;
    border-radius: 999px;
    background: #f8fbff;
    color: #386fb5;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
}

.original-link-title-help:focus-visible {
    outline: 2px solid #8bb8f8;
    outline-offset: 2px;
}

.goods-link-query-panel {
    padding: 16px;
}

.goods-link-query-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 680px;
}

.goods-link-query-input {
    display: grid;
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
    color: #34435a;
    font-size: 13px;
    font-weight: 700;
}

.goods-link-query-input input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #c8d6e6;
    border-radius: 7px;
    padding: 8px 10px;
    color: #10233f;
    font: inherit;
}

.goods-link-query-help {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.goods-link-query-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    margin: 10px 0 0;
    color: #1d5b9f;
    font-size: 13px;
    font-weight: 700;
}

.goods-link-query-status[hidden] {
    display: none;
}

.goods-link-query-status.is-loading::before {
    width: 13px;
    height: 13px;
    border: 2px solid #c8def8;
    border-top-color: #2474d8;
    border-radius: 50%;
    content: '';
    animation: goods-link-query-spin .75s linear infinite;
}

@keyframes goods-link-query-spin {
    to { transform: rotate(360deg); }
}

.goods-link-result-panel {
    padding: 16px;
}

.goods-link-result-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.goods-link-lookup-diagnostic {
    margin-top: 14px;
    border-top: 1px solid #e5edf5;
    padding-top: 10px;
}

.goods-link-lookup-diagnostic summary {
    color: #52627a;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.goods-link-lookup-diagnostic-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.goods-link-lookup-diagnostic-list > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.goods-link-lookup-diagnostic-list strong {
    color: #223044;
    font-size: 13px;
}

.goods-link-lookup-diagnostic-list small {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .goods-link-query-form {
        align-items: stretch;
        flex-direction: column;
    }

    .goods-link-query-form .primary-button {
        width: 100%;
    }

    .goods-link-result-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .goods-link-lookup-diagnostic-list > div {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .goods-link-lookup-diagnostic-list small {
        flex-basis: 100%;
        white-space: normal;
    }
}

@media (min-width: 1280px) {
    .original-link-title-row,
    .original-link-parse-summary {
        flex-wrap: nowrap;
    }
}

.original-link-progress {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #d6e2f0;
    border-radius: 8px;
    background: #f8fbff;
}

.original-link-progress.success {
    border-color: #a9dfbd;
    background: #f2fbf5;
}

.original-link-progress.error {
    border-color: #f2beb7;
    background: #fff7f5;
}

.original-link-progress-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.original-link-progress-head strong {
    color: #10233f;
    white-space: nowrap;
}

.original-link-progress-head span {
    min-width: 0;
    color: #52627a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.original-link-progress-head button {
    margin-left: auto;
}

.original-link-progress-bar {
    height: 7px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.original-link-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2c73e8;
    transition: width 160ms ease;
}

.original-link-progress.success .original-link-progress-bar span {
    background: #25a65a;
}

.original-link-progress.error .original-link-progress-bar span {
    background: #d93f2d;
}

.original-link-progress small {
    display: block;
    margin-top: 6px;
    color: #617084;
}

.original-link-cell {
    display: grid;
    gap: 4px;
    min-width: 0;
    line-height: 1.35;
    overflow: visible;
}

.original-link-cell.is-querying {
    opacity: 0.82;
}

.original-link-pill {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.2;
}

.original-link-primary-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.original-link-main-action,
.original-link-main-muted,
.original-link-more > summary {
    flex: 0 0 auto;
    min-height: 20px;
    padding: 0 5px;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: #f8fbff;
    color: #1f6feb;
    font-size: 11px;
    font-weight: 900;
    line-height: 18px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.original-link-main-muted {
    color: #6b7788;
    background: #f6f8fb;
    cursor: default;
}

.original-link-good {
    background: #e9f8ef;
    color: #13723d;
}

.original-link-warn {
    background: #fff3d8;
    color: #9a5700;
}

.original-link-danger {
    background: #ffe6e2;
    color: #a82818;
}

.original-link-muted {
    background: #eef3f8;
    color: #617084;
}

.small-inline-button {
    padding: 0;
    min-height: 0;
    font-size: 12px;
}

.original-link-query-action {
    color: #1f6feb;
}

.original-link-query-action:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.original-link-state-failed .original-link-query-action,
.original-link-state-not_found .original-link-query-action {
    color: #52627a;
}

.original-link-candidates {
    width: 100%;
}

.original-link-candidates summary {
    cursor: pointer;
    color: #1f6feb;
    font-size: 12px;
}

.original-link-candidate {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-top: 1px solid #e6edf5;
}

.original-link-more {
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.original-link-more > summary {
    display: inline-flex;
    align-items: center;
    list-style: none;
}

.original-link-more > summary::-webkit-details-marker {
    display: none;
}

.original-link-more[open] {
    z-index: 20;
}

.original-link-more-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    display: grid;
    gap: 6px;
    width: max-content;
    max-width: 320px;
    padding: 8px;
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .18);
}

.original-link-review-action .original-link-more-menu {
    right: auto;
    left: 0;
}

.original-link-more-menu .inline-form {
    display: inline-flex;
}

.original-link-candidate-list {
    display: grid;
    gap: 5px;
}

.original-link-candidate-list > strong {
    color: #52627a;
    font-size: 11px;
}

.original-link-candidate span {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.original-link-detail,
.original-link-inline-message {
    width: 100%;
    color: #78869a;
    font-size: 11px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.original-link-detail-block {
    display: grid;
    gap: 3px;
    max-width: 290px;
    color: #52627a;
    font-size: 11px;
    line-height: 1.45;
}

.original-link-detail {
    padding: 3px 6px;
    border-radius: 6px;
    background: #f6f8fb;
}

.original-link-detail[open] {
    display: block;
    -webkit-line-clamp: unset;
}

.original-link-detail summary {
    cursor: pointer;
    list-style: none;
}

.original-link-detail summary::-webkit-details-marker {
    display: none;
}

.original-link-detail summary::after {
    content: '详情';
    margin-left: 5px;
    color: #1f6feb;
    font-size: 10.5px;
    font-weight: 700;
}

.original-link-detail[open] summary::after {
    content: '收起';
}

.original-link-detail-label {
    margin-right: 4px;
    color: #617084;
    font-weight: 700;
}

.original-link-detail-danger,
.original-link-inline-message.error {
    color: #8b3a2f;
}

.original-link-detail-danger {
    background: #fff5f3;
}

.original-link-detail-muted {
    color: #5f6d80;
}

.original-link-detail-list {
    display: grid;
    gap: 3px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #e3e9f2;
}

.original-link-detail-row {
    display: grid;
    grid-template-columns: minmax(42px, .8fr) 42px minmax(0, 1.4fr);
    gap: 5px;
    align-items: center;
    min-width: 0;
}

.original-link-detail-tool,
.original-link-detail-reason {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.original-link-detail-tool {
    color: #52627a;
    font-weight: 700;
}

.original-link-detail-status {
    color: #617084;
    font-weight: 800;
    white-space: nowrap;
}

.original-link-detail-row-failed .original-link-detail-status {
    color: #a82818;
}

.original-link-detail-row-found .original-link-detail-status {
    color: #13723d;
}

.original-link-detail-row-not_found .original-link-detail-status {
    color: #617084;
}

.original-link-inline-message.success {
    color: #13723d;
}

.original-link-drawer-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cell-margin {
    color: var(--teal);
    font-weight: 700;
}

.cell-flow {
    white-space: normal;
}

.order-flow-cell {
    display: grid;
    gap: 4px;
    align-content: start;
    min-width: 0;
    padding-left: 9px;
    border-left: 3px solid #cbd5e1;
    color: #26384d;
}

.order-flow-stage {
    width: fit-content;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef5ff;
    color: #1f5fbf;
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-flow-blocker {
    font-weight: 800;
    line-height: 1.35;
}

.order-flow-next {
    color: #526176;
    font-size: 12px;
    line-height: 1.4;
}

.order-flow-secondary {
    width: fit-content;
    padding: 1px 7px;
    border-radius: 999px;
    background: #fff7ed;
    color: #a84f00;
    font-size: 12px;
    font-weight: 800;
}

.order-flow-done {
    position: relative;
    width: fit-content;
    color: #1f6feb;
    font-size: 12px;
    font-weight: 800;
    cursor: help;
}

.order-flow-done[data-tooltip]::after,
.profit-help[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: calc(100% + 7px);
    z-index: 220;
    width: max-content;
    min-width: 220px;
    max-width: min(360px, 70vw);
    padding: 8px 10px;
    border-radius: 7px;
    background: #18202a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(20, 36, 56, .18);
    transition: opacity .14s ease, visibility .14s ease, transform .14s ease;
}

.order-flow-done[data-tooltip]:hover::after,
.order-flow-done[data-tooltip]:focus-visible::after,
.profit-help[data-tooltip]:hover::after,
.profit-help[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.order-flow-good { border-left-color: #22c55e; }
.order-flow-good .order-flow-stage { background: #ecfdf5; color: #047857; }
.order-flow-info { border-left-color: #3b82f6; }
.order-flow-warn { border-left-color: #f59e0b; }
.order-flow-warn .order-flow-stage { background: #fff7ed; color: #b45309; }
.order-flow-danger { border-left-color: #ef4444; }
.order-flow-danger .order-flow-stage { background: #fff1f2; color: #be123c; }
.order-flow-muted { border-left-color: #94a3b8; }
.order-flow-muted .order-flow-stage { background: #f1f5f9; color: #475569; }

.money-stack {
    position: relative;
    display: grid;
    justify-items: end;
    gap: 3px;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.money-stack span {
    font-size: 12px;
    line-height: 1.25;
}

.money-stack strong {
    font-size: 13px;
    line-height: 1.25;
}

.money-profit-line {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.profit-help {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid #c7d7ee;
    border-radius: 999px;
    background: #f8fbff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
}

.profit-help[data-tooltip]::after {
    right: 0;
    left: auto;
    min-width: 180px;
    max-width: 240px;
}

.profit-text {
    color: var(--teal);
    font-weight: 900;
}

.loss-text {
    color: #dc2626;
    font-weight: 900;
}

.profit-na {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 900;
}

.purchase-cost-trace-card .assist-card-head p {
    margin: 2px 0 0;
}

.cost-trace-list {
    display: grid;
    gap: 8px;
}

.cost-trace-item {
    padding: 8px 9px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #fbfdff;
}

.cost-trace-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: #516176;
    font-size: 12px;
}

.cost-trace-meta strong {
    color: #1f2c3d;
}

.cost-trace-grid {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 4px 8px;
    font-size: 12px;
}

.cost-trace-grid span {
    color: #66758a;
}

.cost-trace-grid strong {
    color: #17233a;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.order-row.has-marker .cell-quality {
    color: var(--amber);
}

.order-inline-note.is-hidden {
    display: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.order-fallback-card,
.quick-fallback-box {
    margin: 0 16px 14px;
    border: 1px solid #bdd3f5;
    background: #f8fbff;
    border-radius: 8px;
}

.order-fallback-card summary,
.quick-fallback-box summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    cursor: pointer;
    font-weight: 800;
    color: #102b4c;
}

.order-fallback-card summary small,
.quick-fallback-box summary span {
    display: block;
    color: #66758a;
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

.order-fallback-card summary em {
    font-style: normal;
    color: #246fe5;
    white-space: nowrap;
}

.fallback-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 11px 0;
    border-top: 1px solid #d8e3ef;
}

.fallback-dependent-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.fallback-dependent-fields[hidden] {
    display: none;
}

.fallback-check,
.quick-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.fallback-check input,
.quick-check input {
    width: auto;
    height: auto;
}

.fallback-note-field {
    grid-column: span 2;
}

.fallback-inline-tip {
    margin: 9px 11px 11px;
    padding: 8px 10px;
    border: 1px solid #ffd9a4;
    border-radius: 7px;
    background: #fff8ec;
    color: #6f4309;
    font-size: 12px;
    font-weight: 700;
}

.fallback-badge,
.fallback-temp-no {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.fallback-gray {
    color: #4e5d70;
    background: #eef2f7;
    border-color: #dde6ef;
}

.fallback-blue,
.fallback-temp-no {
    color: #246fe5;
    background: #eaf2ff;
    border-color: #cce0ff;
}

.fallback-orange {
    color: #b86708;
    background: #fff5e6;
    border-color: #ffd9a4;
}

.fallback-red {
    color: #c7352c;
    background: #fff0ef;
    border-color: #ffc9c5;
}

.fallback-green {
    color: #16845b;
    background: #e8f7ef;
    border-color: #bfe9d2;
}

.quick-fallback-box {
    margin: 4px 0 0;
    grid-column: 1 / -1;
}

.quick-fallback-box label {
    margin: 8px 10px;
}

.quick-fallback-box .field-inline-help {
    margin: 8px 10px 10px;
}

@media (max-width: 1280px) {
    .fallback-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fallback-dependent-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fallback-note-field {
        grid-column: span 2;
    }
}

.order-note-label {
    display: inline-flex;
    align-items: center;
    height: 18px;
    margin-right: 6px;
    padding: 0 6px;
    border: 1px solid #d6e3f3;
    border-radius: 999px;
    background: #f3f8ff;
    color: #2d5f9c;
    font-size: 10.5px;
    font-weight: 800;
    vertical-align: middle;
}

.order-inline-note {
    position: absolute;
    left: 0;
    top: 24px;
    z-index: 4;
    display: block;
    width: min(720px, 58vw);
    max-width: 720px;
    overflow: hidden;
    color: #33465d;
    font-size: 12.5px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: auto;
}

.field-needs-attention label {
    color: var(--amber);
}

.field-needs-attention input,
.field-needs-attention select,
.field-needs-attention textarea {
    border-color: rgba(180, 100, 0, .55);
    background: #fffaf0;
}

[data-required-progress].warn {
    color: var(--amber);
}

.order-table th:last-child,
.order-table td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -10px 0 18px rgba(23, 32, 43, .06);
    z-index: 2;
}

.order-table th:last-child {
    background: #f8fafc;
    z-index: 4;
}

.table-wrap.wide table th:last-child,
.table-wrap.wide table td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -10px 0 18px rgba(23, 32, 43, .06);
    z-index: 6;
    min-width: 132px;
    max-width: 180px;
}

.table-wrap.wide table th:last-child {
    background: #f8fafc;
    z-index: 8;
}

.compact-data-table th,
.compact-data-table td,
.loss-detail-table th,
.loss-detail-table td {
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.28;
    vertical-align: top;
}

.loss-detail-table {
    font-size: 13px;
}

.loss-detail-table td {
    max-height: 48px;
}

.loss-detail-table td:nth-last-child(2) {
    max-width: 260px;
    color: var(--muted);
}

.loss-detail-table td:nth-last-child(2) .muted-text,
.loss-detail-table td:nth-last-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.loss-detail-table td:last-child,
.shipment-risk-center-table td:last-child,
.return-collaboration-table td:last-child,
.order-table td:last-child {
    background: linear-gradient(90deg, rgba(255,255,255,.94), #fff 18%);
}

.loss-detail-table .row-actions,
.shipment-risk-center-table .row-actions,
.order-table .row-actions {
    gap: 8px;
    justify-content: flex-start;
}

.legacy-inline-loss-action {
    display: none !important;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.row-actions a,
.row-actions .link-button {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0;
    font-size: 12px;
}

.row-actions .quick-toggle.active {
    color: #0f5132;
    font-weight: 900;
}

.danger-link {
    color: var(--red);
}

.quick-drawer[hidden] {
    display: none;
}

.quick-drawer {
    --quick-task-drawer-width: 400px;
    --quick-task-drawer-top: 306px;
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    justify-items: end;
}

.quick-drawer-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, .18);
    cursor: default;
}

.quick-drawer-panel {
    position: relative;
    width: min(440px, calc(100vw - 24px));
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 45px rgba(15, 23, 42, .16);
}

.quick-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 12px;
    border-bottom: 1px solid var(--line);
}

.quick-drawer-head p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.quick-drawer-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    word-break: break-all;
}

.quick-drawer-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.quick-drawer-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    color: #253246;
    font-weight: 700;
}

.quick-status-badge {
    background: #eff6ff;
    color: #174ea6;
}

.quick-drawer-purchase {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.quick-drawer-purchase strong {
    user-select: text;
    overflow-wrap: anywhere;
}

.quick-drawer-purchase small {
    color: #b45309;
    font-weight: 600;
}

.quick-drawer-form {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    overflow-y: auto;
}

.quick-field-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe7f3;
    border-radius: 10px;
    background: #fff;
}

.quick-required-section {
    border-left: 4px solid #2563eb;
    background: #f8fbff;
}

.quick-section-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 2px;
}

.quick-section-head strong,
.quick-optional-section > summary {
    color: #102033;
    font-size: 13px;
    font-weight: 900;
}

.quick-section-head small {
    max-width: 250px;
    color: #526176;
    font-size: 11.5px;
    line-height: 1.35;
    text-align: right;
}

.quick-optional-section {
    padding: 0;
    overflow: hidden;
}

.quick-optional-section > summary {
    display: flex;
    min-height: 36px;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
}

.quick-optional-section > summary::-webkit-details-marker {
    display: none;
}

.quick-optional-section > summary::after {
    content: "展开";
    margin-left: auto;
    color: #2563eb;
    font-size: 12px;
}

.quick-optional-section[open] > summary::after {
    content: "收起";
}

.quick-optional-section:not([open]) > .quick-optional-grid {
    display: none !important;
}

.quick-optional-grid {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.quick-drawer-form label {
    display: grid;
    gap: 5px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.quick-drawer-form [data-quick-scope][hidden] {
    display: none !important;
}

.quick-drawer-form [data-quick-section][hidden] {
    display: none !important;
}

.quick-drawer-note textarea {
    min-height: 90px;
}

.muted-field {
    opacity: .55;
}

.quick-drawer-message {
    min-height: 20px;
    color: var(--muted);
    font-size: 13px;
}

.quick-drawer-message.success {
    color: var(--green);
}

.quick-drawer-message.error {
    color: var(--red);
}

.quick-drawer-message .autofill-message-link,
.autofill-missing-links .autofill-message-link {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.autofill-missing-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-top: 6px;
    line-height: 1.45;
}

.quick-drawer-actions {
    position: sticky;
    bottom: -18px;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 8px;
    padding: 14px 0 2px;
    background: linear-gradient(to top, #fff 82%, rgba(255, 255, 255, 0));
}

body.drawer-open {
    overflow: hidden;
}

.pill {
    min-height: 24px;
    padding: 2px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-order-pending_shipment {
    background: #fff7e8;
    border-color: #f0d5a6;
    color: #83520b;
}

.status-order-shipped {
    background: #eaf8f1;
    border-color: #bfe7d2;
    color: #12623f;
}

.status-order-no_ship {
    background: #fff0ef;
    border-color: #efbbb6;
    color: #a7352e;
}

.status-order-returning {
    background: #f0effb;
    border-color: #cbc7ee;
    color: #574ba1;
}

.status-order-draft {
    background: #f1f4f8;
    border-color: #d8e1eb;
    color: #526176;
}

.record-form {
    gap: 16px;
}

.return-order-summary {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.return-order-summary .summary-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.return-order-summary p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.return-order-summary h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px 14px;
}

.summary-grid div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.summary-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.summary-grid strong {
    color: #17202b;
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

.summary-grid em {
    width: fit-content;
    padding: 1px 6px;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: #f1f7ff;
    color: #2c5f9e;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.summary-wide {
    grid-column: span 2;
}

.form-section {
    padding: 0;
    overflow: visible;
}

.form-section-step {
    border-left: 4px solid #c8d7e8;
}

.form-section-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px 8px;
}

.form-section-head h2 {
    margin: 0 0 3px;
    font-size: 16px;
}

.form-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.section-index {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #18314f;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.form-grid {
    padding: 10px 18px 18px;
}

.order-form-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px 16px;
}

.field-product_title,
.field-invoice_info {
    grid-column: span 2;
}

.field-merchant_tags {
    grid-column: span 2;
}

.field label {
    margin-bottom: 6px;
    color: #263445;
    font-size: 13px;
}

.form-control,
.login-panel input {
    min-height: 40px;
    border-color: #ccd8e5;
    border-radius: 7px;
    color: #17202b;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:focus,
.login-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .13);
}

textarea.form-control {
    min-height: 84px;
}

.field small {
    color: #718093;
}

.form-actions {
    z-index: 8;
    padding: 14px 0;
    background: linear-gradient(to top, var(--bg) 72%, rgba(244, 246, 248, 0));
}

.compact-order-form {
    gap: 8px;
}

.order-form-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 14px;
    align-items: start;
}

.order-form-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

/* ===== 订单列表：行操作按钮悬停显示 ===== */
.order-table .row-actions {
    opacity: 0;
    transition: opacity .15s ease;
}
.order-table tbody tr:hover .row-actions {
    opacity: 1;
}
.order-table tbody tr:focus-within .row-actions {
    opacity: 1;
}

/* ===== 订单列表：筛选结果摘要条 ===== */
.order-list-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--line);
    background: #f9fbfd;
    font-size: 13px;
    color: #526176;
}

.summary-title {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.summary-desc {
    display: none;
}

.order-list-summary strong {
    color: var(--text);
}

/* ===== 在线订单 P0：处理队列式列表 ===== */
.order-page-head {
    margin-bottom: 10px;
    padding: 0 2px 0;
}

.order-page-head h1 {
    margin-bottom: 3px;
    font-size: 22px;
    line-height: 1.22;
}

.order-page-head p {
    font-size: 13px;
    line-height: 1.35;
}

.order-page-head .head-actions {
    gap: 8px;
}

.order-page-head .head-actions .primary-button,
.order-page-head .head-actions .secondary-button {
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 12px;
}

.daily-action-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    color: #526176;
    font-size: 12px;
}

.daily-action-head strong {
    margin-right: 8px;
    color: var(--text);
    font-size: 14px;
}

.daily-action-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 6px;
    margin-bottom: 7px;
}

.daily-action-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "label count"
        "helper cta";
    column-gap: 7px;
    row-gap: 2px;
    min-height: 46px;
    padding: 6px 8px 6px 12px;
    border: 1px solid #d9e5f5;
    border-radius: 7px;
    background: #fff;
    color: #1f2c3d;
    text-decoration: none;
    overflow: hidden;
}

.daily-action-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #3b82f6;
}

.daily-action-card span {
    grid-area: label;
    min-width: 0;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-action-card strong {
    grid-area: count;
    color: #0f172a;
    font-size: 19px;
    line-height: 1;
}

.daily-action-card small {
    grid-area: helper;
    min-width: 0;
    color: #66768b;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-action-card em {
    grid-area: cta;
    align-self: end;
    color: #0f5ed7;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.daily-action-card.tone-danger::before { background: #ef4444; }
.daily-action-card.tone-warn::before { background: #f59e0b; }
.daily-action-card.tone-info::before { background: #2563eb; }
.daily-action-card.tone-muted::before { background: #94a3b8; }
.daily-action-card.is-empty {
    background: #fbfdff;
}

.daily-action-card.is-empty strong {
    color: #64748b;
}

.daily-action-card.is-empty em {
    color: #94a3b8;
    font-weight: 700;
}

.daily-action-card.is-empty::before {
    opacity: .55;
}

.daily-action-card.active,
.daily-action-card:hover {
    border-color: #9fc5ff;
    background: #f8fbff;
}

.order-list-controls [data-tooltip],
.original-link-batch-panel [data-tooltip] {
    position: relative;
}

.order-list-controls [data-tooltip]::after,
.original-link-batch-panel [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 60;
    width: max-content;
    max-width: 280px;
    padding: 7px 9px;
    border-radius: 7px;
    background: #162033;
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
    white-space: normal;
}

.order-list-controls [data-tooltip]:hover::after,
.order-list-controls [data-tooltip]:focus-visible::after,
.original-link-batch-panel [data-tooltip]:hover::after,
.original-link-batch-panel [data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.query-tabs-primary {
    align-items: center;
}

.order-list-controls {
    padding: 9px 11px 8px;
    margin-bottom: 9px;
}

.order-list-controls .scope-entry-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.order-list-controls .scope-entry-title {
    flex: 0 0 auto;
    color: #526176;
    font-size: 12px;
    font-weight: 900;
}

.order-list-controls .tabs {
    margin: 0;
}

.order-list-controls .tabs a,
.order-list-controls .sub-tabs a,
.more-scope-menu summary.secondary-button {
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 12px;
}

.order-quick-filter-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #edf2f7;
}

.order-quick-filter-line .query-entry-group {
    flex: 1 1 560px;
    min-width: 0;
}

.order-quick-filter-line .sub-tabs {
    display: flex;
    flex: 1 1 360px;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    min-width: 0;
}

.order-quick-filter-line .sub-tabs-label {
    flex: 0 0 auto;
    color: #526176;
    font-size: 12px;
    font-weight: 900;
}

.order-filter-bar {
    display: grid;
    grid-template-columns: minmax(210px, 1.45fr) repeat(2, minmax(118px, .68fr)) minmax(126px, .78fr) repeat(5, minmax(118px, .74fr)) auto auto auto;
    gap: 7px;
    align-items: end;
    padding-top: 0;
    border-top: 0;
}

.order-filter-bar label {
    gap: 3px;
}

.order-filter-bar label span {
    font-size: 11px;
    line-height: 1.1;
}

.order-filter-bar input,
.order-filter-bar select {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
}

.order-filter-bar button,
.order-filter-bar .secondary-button,
.order-filter-bar .reset-filter-link {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
}

.more-scope-menu {
    position: relative;
}

.more-scope-menu summary {
    cursor: pointer;
    list-style: none;
}

.more-scope-menu summary::-webkit-details-marker {
    display: none;
}

.more-scope-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 6px;
    min-width: 180px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
}

.more-scope-panel a {
    justify-content: flex-start;
}

.table-wrap.wide table.order-processing-table,
.order-processing-table {
    width: 100%;
    min-width: 1120px;
    table-layout: fixed;
    font-size: 12px;
}

.order-processing-wrap {
    max-height: calc(100vh - 300px);
}

.order-processing-table .col-order-summary { width: 144px; }
.order-processing-table .col-processing-flow { width: 300px; }
.order-processing-table .col-money-stack { width: 78px; }
.order-processing-table .col-purchase-stack { width: 112px; }
.order-processing-table .col-refund-stack { width: 76px; }
.order-processing-table .col-product-stack { width: 148px; }
.order-processing-table .col-original-link { width: 184px; }
.order-processing-table .col-quality { width: 78px; }

.table-wrap.wide table.order-processing-table th:last-child,
.table-wrap.wide table.order-processing-table td:last-child,
.order-processing-table th:last-child,
.order-processing-table td:last-child {
    position: relative;
    right: auto;
    min-width: 0;
    max-width: none;
    box-shadow: none;
    z-index: auto;
}

.order-processing-table tbody tr {
    position: relative;
}

.order-processing-table th,
.order-processing-table td {
    vertical-align: top;
    padding: 8px 6px;
    line-height: 1.35;
}

.order-processing-table thead th {
    padding-top: 8px;
    padding-bottom: 8px;
    background: #f8fafc;
    color: #102033;
    font-size: 12px;
    font-weight: 900;
}

.order-processing-table tbody td:first-child {
    border-left: 4px solid #3b82f6;
}

.order-processing-table tbody tr.order-status-no_ship td:first-child,
.order-processing-table tbody tr.order-status-unshipped_refund td:first-child {
    border-left-color: #ef4444;
}

.order-processing-table tbody tr.order-status-returning td:first-child {
    border-left-color: #8b5cf6;
}

.order-processing-table tbody tr.order-status-shipped td:first-child {
    border-left-color: #10b981;
}

.order-processing-table tbody tr:hover {
    background: #f8fbff;
}

.cell-order-summary,
.cell-purchase-stack,
.cell-refund-stack,
.cell-product-stack,
.cell-quality {
    white-space: normal;
}

.order-summary-stack,
.info-stack,
.product-stack,
.quality-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.summary-line,
.field-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.summary-order-no a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0969da;
    font-size: 13px;
    font-weight: 900;
}

.summary-line.strong {
    color: #1f2c3d;
    font-weight: 900;
    line-height: 1.25;
}

.summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    color: #526176;
    font-size: 11.5px;
}

.cs-badge {
    background: #eefdf4;
    border-color: #b9ebc9;
    color: #0f7a3f;
}

.copy-mini {
    flex: 0 0 auto;
    min-height: 20px;
    padding: 0 6px;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: #f8fbff;
    color: #1f6feb;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.field-line span {
    flex: 0 0 auto;
    color: #6b7788;
    font-size: 11px;
}

.field-line strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #172033;
}

.cell-original-link {
    white-space: normal;
    overflow: visible;
}

.info-stack small,
.product-stack small {
    color: #526176;
    line-height: 1.35;
}

.product-title-line {
    display: -webkit-box;
    max-height: 46px;
    overflow: hidden;
    color: #172033;
    font-weight: 900;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-stack > .copy-mini {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}

.flow-state-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 1px;
}

.flow-state-line strong {
    color: #172033;
}

.flow-current-node {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border: 1px solid #c7dcfb;
    border-radius: 999px;
    background: #f3f8ff;
    color: #1f5fbf;
    font-size: 12px;
    font-weight: 800;
}

.flow-current-node b {
    color: #526176;
    font-size: 11px;
}

.order-flow-warn .flow-current-node {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #b45309;
}

.order-flow-danger .flow-current-node {
    border-color: #fecaca;
    background: #fff1f2;
    color: #be123c;
}

.flow-node-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 3px;
    align-items: start;
    padding: 3px 0 2px;
}

.flow-node {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    color: #6b7788;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}

.flow-node::before {
    content: "";
    position: absolute;
    top: 6px;
    left: calc(-50% + 8px);
    width: calc(100% - 16px);
    height: 2px;
    background: #d7e1ee;
}

.flow-node:first-child::before {
    display: none;
}

.flow-node i {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
}

.flow-node-done {
    color: #13723d;
}

.flow-node-done i {
    background: #23a55a;
}

.flow-node-current {
    color: #1f5fbf;
    font-weight: 900;
}

.flow-node-current i {
    background: #1f6feb;
    box-shadow: none;
}

.order-flow-warn .flow-node-current,
.order-flow-warn .flow-node-current em {
    color: #b45309;
}

.order-flow-warn .flow-node-current i {
    background: #f59e0b;
    box-shadow: none;
}

.order-flow-danger .flow-node-current,
.order-flow-danger .flow-node-current em {
    color: #be123c;
}

.order-flow-danger .flow-node-current i {
    background: #ef4444;
    box-shadow: none;
}

.flow-detail-line {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    color: #334155;
    font-size: 12px;
    line-height: 1.28;
}

.flow-detail-line span {
    flex: 0 0 auto;
    padding: 1px 5px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #526176;
    font-weight: 800;
}

.flow-next-line {
    color: #0f4ea8;
    font-weight: 800;
}

.order-flow-done {
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #0f5ed7;
    font-size: 11px;
    font-weight: 900;
}

.quality-marker {
    display: -webkit-box;
    max-height: 38px;
    overflow: hidden;
    padding: 2px 5px;
    border: 1px solid #f5c2c7;
    border-radius: 7px;
    background: #fff5f5;
    color: #9f1239;
    font-size: 10.5px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cell-quality {
    position: relative;
    padding-right: 8px;
    overflow: visible;
}

.floating-row-actions {
    position: absolute;
    top: 50%;
    right: 6px;
    z-index: 12;
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 5px 7px;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .12s ease;
    white-space: nowrap;
}

.cell-quality:focus-within .floating-row-actions,
.order-processing-table tbody tr.row-actions-visible .floating-row-actions {
    opacity: 1;
    pointer-events: auto;
}

.floating-row-actions a,
.floating-row-actions .link-button {
    min-height: 22px;
    padding: 0 2px;
    font-size: 12px;
    font-weight: 900;
}

.floating-row-actions .danger-link {
    color: #dc2626;
}

.quick-scenario-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 20px 12px;
}

.quick-scenario-card > div {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    background: #f8fbff;
}

.quick-scenario-card span {
    color: #526176;
    font-size: 12px;
    font-weight: 800;
}

.quick-scenario-card strong {
    color: #172033;
}

.quick-scenario-card small {
    color: #526176;
    line-height: 1.35;
}

@media (max-width: 1280px) {
    .daily-action-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.summary-total {
    font-weight: 600;
    color: #263445;
    padding-right: 4px;
    border-right: 1px solid var(--line);
}

.summary-item {
    color: #526176;
}

.summary-warn strong {
    color: var(--amber);
}

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

.summary-cap {
    margin-left: auto;
    color: var(--amber);
    font-size: 11px;
    font-weight: 600;
    background: #fff8e8;
    border: 1px solid #f0d5a6;
    border-radius: 5px;
    padding: 2px 6px;
    white-space: nowrap;
}

.order-form-aside {
    position: sticky;
    top: 84px;
}

.order-assist-card {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.fulfillment-tip-card {
    border-color: #cfe0f5;
    background: #f8fbff;
}

.fulfillment-tip-danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.fulfillment-tip-warn {
    border-color: #fed7aa;
    background: #fffaf2;
}

.fulfillment-tip-good {
    border-color: #bbf7d0;
    background: #f5fff8;
}

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

.fulfillment-tip-grid div {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.fulfillment-tip-grid span,
.fulfillment-tip-grid strong {
    display: block;
}

.fulfillment-tip-grid span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11.5px;
}

.fulfillment-tip-grid strong {
    color: var(--ink);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.assist-card-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.assist-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

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

.assist-metrics div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.assist-metrics span,
.assist-metrics strong {
    display: block;
}

.assist-metrics span {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.assist-metrics strong {
    color: var(--teal);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.assist-metrics strong.warn {
    color: var(--red);
}

.assist-hints {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d8e6f7;
    border-radius: 8px;
    background: #f2f7ff;
    color: #2d4b72;
    line-height: 1.55;
}

.order-assist-card .form-actions {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
    background: transparent;
}

.order-autofill-card {
    border-color: #d8e6f7;
    background: #fff;
}

.order-autofill-card .assist-card-head p {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
}

.autofill-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.autofill-method {
    display: grid;
    gap: 4px;
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid #d8e6f7;
    border-radius: 8px;
    background: #f8fbff;
}

.autofill-method strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.25;
}

.autofill-method span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.autofill-textarea {
    resize: vertical;
    min-height: 96px;
    font-size: 13px;
    line-height: 1.55;
}

.autofill-image-picker {
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.autofill-image-picker:hover {
    border-color: var(--blue);
    background: #f2f7ff;
}

.autofill-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.autofill-image-status {
    border: 1px solid #c7eed7;
    border-radius: 8px;
    background: #f4fbf7;
    color: #167047;
    font-size: 12px;
    line-height: 1.45;
    padding: 7px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-autofill-card.is-receiving-image {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.autofill-actions {
    display: grid;
    grid-template-columns: minmax(88px, 0.42fr) 1fr;
    gap: 8px;
}

.autofill-preview {
    max-height: 252px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.autofill-result-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.autofill-result-summary strong {
    color: var(--ink);
    font-size: 13px;
}

.autofill-result-summary span {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.autofill-overwrite-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
}

.autofill-overwrite-toggle input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--blue);
}

.autofill-result-list {
    display: grid;
}

.autofill-result-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.autofill-result-risk {
    background: #fffdf5;
}

.autofill-result-trusted-overwrite {
    background: #fff7ed;
}

.autofill-field-check {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: var(--blue);
}

.autofill-result-item:last-child {
    border-bottom: 0;
}

.autofill-result-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.autofill-field-name {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.autofill-field-value {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.autofill-evidence {
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.35;
    word-break: break-word;
}

.autofill-skip-reason {
    color: #a16207;
    font-size: 12px;
    line-height: 1.35;
}

.autofill-trusted-reason {
    color: #92400e;
    font-size: 12px;
    line-height: 1.35;
}

.autofill-confidence {
    min-width: 42px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef6ff;
    color: #24558a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.autofill-actions button:disabled,
.order-autofill-card > button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.autofill-issues {
    margin: 0;
    padding: 10px 12px;
    color: #92400e;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    font-size: 12px;
    line-height: 1.55;
}

.autofill-issues strong {
    display: block;
    margin-bottom: 4px;
    color: #78350f;
}

.autofill-issues ul {
    margin: 0;
    padding-left: 18px;
}

.compact-order-form .form-section-step {
    border-left-width: 3px;
}

.compact-order-form .form-section-head {
    padding: 10px 14px 2px;
}

.compact-order-form .form-section-head p {
    display: none;
}

.compact-order-form .section-index {
    width: 22px;
    height: 22px;
    font-size: 12px;
}

.compact-order-form .form-section-head h2 {
    margin: 0;
    font-size: 15px;
}

.purchase-cost-guide {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 14px 0;
    padding: 7px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    line-height: 1.45;
}

.purchase-cost-guide strong {
    flex: 0 0 auto;
    color: #1d4ed8;
}

.compact-order-form .order-form-grid {
    grid-template-columns: repeat(8, minmax(112px, 1fr));
    gap: 7px 10px;
    padding: 7px 14px 10px;
}

.compact-order-form .field label {
    margin-bottom: 3px;
    font-size: 12px;
}

.compact-order-form .form-control {
    min-height: 34px;
    padding: 5px 8px;
}

.compact-order-form textarea.form-control {
    min-height: 54px;
}

.compact-order-form .field-shop,
.compact-order-form .field-order_no,
.compact-order-form .field-order_date,
.compact-order-form .field-product_title {
    grid-column: span 2;
}

.compact-order-form input[type="datetime-local"].form-control {
    min-width: 178px;
}

.compact-order-form .field-merchant_tags {
    grid-column: span 3;
}

.compact-order-form .field-product_title {
    grid-column: span 4;
}

.compact-order-form .field-invoice_info {
    grid-column: span 4;
}

.compact-order-form .field-supplier_refund_status {
    grid-column: span 2;
}

.compact-order-form .field-supplier_refund_note {
    grid-column: span 3;
}

.compact-order-form .field.conditional-hidden {
    display: none;
}

.compact-order-form .field-purchase_order_no,
.compact-order-form .field-merchant_name,
.compact-order-form .field-tracking_number {
    grid-column: span 2;
}

.compact-order-form .field-purchase_cost,
.compact-order-form .field-purchase_product_price,
.compact-order-form .field-purchase_freight {
    grid-column: span 2;
}

.compact-order-form .merchant-tag-picker {
    gap: 5px;
}

.compact-order-form .merchant-tag-options {
    max-height: 66px;
    overflow-y: auto;
    padding-right: 3px;
}

.compact-order-form .merchant-tag-chip {
    min-height: 21px;
    padding: 2px 7px;
    font-size: 11px;
}

.compact-order-form .merchant-tag-custom-row {
    margin-top: 4px;
}

.compact-order-form .merchant-tag-picker small {
    display: none;
}

.compact-order-form .combo-menu {
    max-height: 240px;
}

.compact-order-form .combo-select,
.form-section .combo-select {
    z-index: 30;
}

.combo-select:focus-within {
    z-index: 40;
}

.compact-order-form + .form-actions,
.compact-order-form .form-actions {
    padding: 8px 0;
}

.message,
.notice {
    border-radius: 8px;
}

/* ===== Order entry redesign ===== */
.order-form-page-head {
    min-height: 38px;
    margin-bottom: 6px;
    padding: 0 2px;
}

.order-form-page-head h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.order-form-page-head .head-actions {
    gap: 6px;
}

.order-form-page-head .head-actions .secondary-button {
    min-height: 30px;
    padding: 4px 10px;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.order-entry-redesign {
    --entry-line: #d9e4f0;
    --entry-line-strong: #c9d6e5;
    --entry-ink: #13243a;
    --entry-muted: #64748b;
    --entry-soft: #f7faff;
    --entry-focus: #2563eb;
    --entry-focus-ring: rgba(37, 99, 235, .12);
}

.order-entry-redesign .order-form-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 328px);
    gap: 10px;
}

.order-entry-redesign .order-form-main {
    gap: 7px;
    min-width: 0;
    container-type: inline-size;
    container-name: order-form-main;
}

.order-entry-section {
    min-width: 0;
    border: 1px solid var(--entry-line);
    border-left: 0;
    border-radius: 7px;
    background: #fff;
    box-shadow: none;
    overflow: visible;
}

.order-entry-section .form-section-head {
    position: relative;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 3px;
}

.order-entry-section .form-section-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #1f6feb;
}

.order-entry-section.section-purchase .form-section-head::before {
    background: #1f6feb;
}

.order-entry-section.section-fulfillment .form-section-head::before {
    background: #1f6feb;
}

.order-entry-section.section-invoice .form-section-head::before {
    background: #1f6feb;
}

.order-entry-section.section-cost-note .form-section-head::before {
    background: #64748b;
}

.order-entry-section .section-index {
    width: 21px;
    height: 21px;
    background: #20344d;
    font-size: 12px;
}

.order-entry-section .form-section-head h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    color: var(--entry-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.section-side-label {
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #718197;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-entry-section .form-section-head > div {
    flex: 1 1 auto;
    min-width: 0;
}

.order-entry-section .form-section-head p {
    display: none;
    margin-top: 3px;
    color: var(--entry-muted);
    font-size: 12px;
    line-height: 1.45;
}

.section-help-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 21px;
    padding: 1px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #3d6fae;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    cursor: pointer;
}

.section-help-link::before {
    content: "?";
    display: inline-grid;
    place-items: center;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: #e7f0fb;
    color: #356da8;
    font-size: 9px;
    font-weight: 900;
}

.section-help-link:hover,
.section-help-link:focus-visible {
    border-color: #9bbce3;
    background: #eef5fc;
    color: #1f5f9f;
    outline: 0;
}

.inline-rule-strip {
    display: grid;
    gap: 5px;
    margin: 5px 12px 2px;
    padding: 6px 9px;
    border: 1px solid #e0e7ef;
    border-left: 3px solid #7aa7df;
    border-radius: 6px;
    background: #fbfcfe;
    color: #405a77;
    font-size: 12px;
    line-height: 1.4;
}

.inline-rule-strip span {
    display: block;
}

.inline-rule-strip.warn {
    border-color: #e3e9f0;
    border-left-color: #d99635;
    background: #fff;
    color: #6b4e2d;
}

.order-entry-redesign .order-form-grid {
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 6px 9px;
    padding: 7px 12px 9px;
}

.order-entry-redesign .field {
    min-width: 0;
    grid-column: span 6;
}

.order-entry-redesign .field-label-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
    margin-bottom: 2px;
}

.order-entry-redesign .field-label-row label {
    margin: 0;
    color: #33465d;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.field-help-dot {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border: 1px solid #c8d7e8;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    cursor: help;
}

.field-help-dot:hover,
.field-help-dot:focus-visible {
    border-color: #1f6feb;
    background: #eaf2ff;
    color: #1d4ed8;
    outline: 0;
}

.product-type-suggestion {
    display: inline-flex;
    width: fit-content;
    margin-top: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.product-type-suggestion:hover,
.product-type-suggestion:focus-visible {
    color: #0f4db8;
    outline: 0;
}

.product-type-suggestion[hidden] {
    display: none;
}

.field-autofill-focus {
    animation: autofill-field-focus 1.4s ease;
}

@keyframes autofill-field-focus {
    0%, 100% {
        box-shadow: none;
    }
    20%, 70% {
        box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.22);
    }
}

.system-field-badge {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 1px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.order-entry-redesign .form-control,
.order-entry-redesign select,
.order-entry-redesign input,
.order-entry-redesign textarea {
    width: 100%;
}

.order-entry-redesign .form-control {
    min-height: 32px;
    padding: 5px 8px;
    border-color: #cbd8e6;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #21364e;
    transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.order-entry-redesign .form-control:hover:not(:disabled):not([readonly]) {
    border-color: #aebfd2;
}

.order-entry-redesign .form-control:focus:not(:disabled),
.order-entry-redesign select:focus:not(:disabled),
.order-entry-redesign textarea:focus:not(:disabled) {
    border-color: var(--entry-focus);
    box-shadow: 0 0 0 3px var(--entry-focus-ring);
    outline: 0;
}

.order-entry-redesign textarea.form-control {
    min-height: 48px;
    resize: vertical;
}

.order-entry-redesign input[readonly],
.order-entry-redesign input[disabled],
.order-entry-redesign select[disabled],
.order-entry-redesign textarea[disabled] {
    background: #f5f7fa;
    color: #64748b;
    cursor: not-allowed;
}

.order-entry-redesign .field-microcopy {
    display: none;
}

.order-entry-redesign .field:hover .field-microcopy,
.order-entry-redesign .field:focus-within .field-microcopy {
    display: block;
    margin-top: 4px;
    color: #526176;
    font-size: 11.5px;
    line-height: 1.4;
}

.order-entry-redesign .section-order .field-shop {
    grid-column: 1 / 6;
    grid-row: 1;
}

.order-entry-redesign .section-order .field-order_no {
    grid-column: 6 / 11;
    grid-row: 1;
}

.order-entry-redesign .section-order .field-order_date {
    grid-column: 11 / 15;
    grid-row: 1;
}

.order-entry-redesign .section-order .field-buyer_wangwang {
    grid-column: 15 / 18;
    grid-row: 1;
}

.order-entry-redesign .section-order .field-order_amount {
    grid-column: 18 / 22;
    grid-row: 1;
}

.order-entry-redesign .section-order .field-quantity {
    grid-column: 22 / 25;
    grid-row: 1;
}

.order-entry-redesign .section-order .field-product_title {
    grid-column: 1 / 14;
    grid-row: 2;
}

.order-entry-redesign .section-order .field-item_id {
    grid-column: 14 / 21;
    grid-row: 2;
}

.order-entry-redesign .section-order .field-product_type {
    grid-column: 21 / 25;
    grid-row: 2;
}

.order-entry-redesign .order-item-id-query-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: stretch;
}

.order-entry-redesign .order-item-id-query-control .form-control {
    min-width: 0;
}

.order-item-id-query-button {
    min-width: 62px;
    padding: 5px 9px;
    border: 1px solid #b9cef0;
    border-radius: 6px;
    background: #f8fbff;
    color: #175fc2;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.order-item-id-query-button:hover:not(:disabled),
.order-item-id-query-button:focus-visible:not(:disabled) {
    border-color: #1f6feb;
    background: #eaf2ff;
    color: #0f4db8;
    outline: 0;
}

.order-item-id-query-button:disabled {
    border-color: #d8e1ec;
    background: #f5f7fa;
    color: #9aa9ba;
    cursor: not-allowed;
}

.order-draft-link-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -1px 12px 9px;
    padding: 6px 9px;
    border: 1px solid #dfe7f0;
    border-left: 3px solid #7aa7df;
    border-radius: 6px;
    background: #fbfcfe;
    color: #38516e;
    font-size: 12px;
}

.order-draft-link-strip[hidden] {
    display: none;
}

.order-draft-link-strip.is-loading {
    border-color: #d7e2ef;
    border-left-color: #7aa7df;
    background: #fbfcfe;
}

.order-draft-link-strip.is-success {
    border-color: #dce9e2;
    border-left-color: #4da679;
    background: #fbfefc;
}

.order-draft-link-strip.is-empty,
.order-draft-link-strip.is-error {
    border-color: #eadfce;
    border-left-color: #d99635;
    background: #fffdfa;
}

.order-draft-link-main,
.order-draft-link-actions,
.order-draft-link-candidate-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.order-draft-link-main {
    flex: 1 1 auto;
    flex-wrap: nowrap;
}

.order-draft-link-state {
    color: #243a55;
    font-weight: 800;
    white-space: nowrap;
}

.order-draft-link-meta {
    min-width: 0;
    overflow: hidden;
    color: #72839a;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-draft-link-actions,
.order-draft-link-candidate-actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.order-draft-link-action,
.order-draft-link-actions a {
    padding: 0;
    border: 0;
    background: transparent;
    color: #1764cf;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.order-draft-link-action:hover,
.order-draft-link-action:focus-visible,
.order-draft-link-actions a:hover,
.order-draft-link-actions a:focus-visible {
    color: #0f4db8;
    text-decoration: underline;
    text-underline-offset: 2px;
    outline: 0;
}

.order-draft-link-details {
    flex: 1 0 100%;
    color: #63758e;
}

.order-draft-link-details summary {
    width: fit-content;
    cursor: pointer;
    font-weight: 700;
}

.order-draft-link-detail-list,
.order-draft-link-candidate-list {
    display: grid;
    gap: 5px;
    margin-top: 6px;
}

.order-draft-link-detail-row,
.order-draft-link-candidate-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-top: 5px;
    border-top: 1px solid #e2eaf3;
}

.order-draft-link-detail-row:first-child,
.order-draft-link-candidate-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.order-draft-link-detail-row strong,
.order-draft-link-candidate-row strong {
    color: #415873;
}

.order-draft-link-detail-row span,
.order-draft-link-candidate-row span {
    color: #71839b;
}

.order-draft-link-candidate-copy {
    min-width: 0;
}

.order-draft-link-candidate-copy strong,
.order-draft-link-candidate-copy span {
    display: block;
}

.order-draft-link-candidate-copy strong {
    color: #263d58;
}

.order-draft-link-candidate-copy span {
    margin-top: 2px;
}

.order-entry-redesign .section-purchase .order-form-grid,
.order-entry-redesign .section-fulfillment .order-form-grid,
.order-entry-redesign .section-invoice .order-form-grid,
.order-entry-redesign .section-cost-note .order-form-grid {
    grid-template-columns: repeat(24, minmax(0, 1fr));
}

.order-entry-redesign .section-purchase .field-purchase_product_price {
    grid-column: 1 / 4;
    grid-row: 1;
}

.order-entry-redesign .section-purchase .field-purchase_freight {
    grid-column: 4 / 7;
    grid-row: 1;
}

.order-entry-redesign .section-purchase .field-purchase_cost {
    grid-column: 7 / 10;
    grid-row: 1;
}

.order-entry-redesign .section-purchase .field-purchase_order_no {
    grid-column: 10 / 16;
    grid-row: 1;
}

.order-entry-redesign .section-purchase .field-merchant_name {
    grid-column: 16 / 21;
    grid-row: 1;
}

.order-entry-redesign .section-purchase .field-main_category {
    grid-column: 21 / 25;
    grid-row: 1;
}

.order-entry-redesign .section-purchase .field-merchant_tags {
    grid-column: 1 / -1;
}

.order-entry-redesign .section-fulfillment .field-negotiated_shipping_enabled {
    grid-column: 1 / 5;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .field-negotiated_shipping_time {
    grid-column: 5 / 10;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .field-negotiated_shipping_note {
    grid-column: 1 / 25;
    grid-row: 2;
}

.order-entry-redesign .section-fulfillment .field-tracking_number {
    grid-column: 10 / 15;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .field-logistics_company_choice {
    grid-column: 15 / 20;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .field-logistics_company_other {
    grid-column: 15 / 20;
    grid-row: 3;
}

.order-entry-redesign .section-fulfillment .field-supplier_shipped_at {
    grid-column: 20 / 25;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .order-form-grid:has(.field-negotiated_shipping_time.conditional-hidden) .field-tracking_number {
    grid-column: 5 / 11;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .order-form-grid:has(.field-negotiated_shipping_time.conditional-hidden) .field-logistics_company_choice {
    grid-column: 11 / 17;
    grid-row: 1;
}

.order-entry-redesign .section-fulfillment .order-form-grid:has(.field-negotiated_shipping_time.conditional-hidden) .field-logistics_company_other {
    grid-column: 11 / 17;
    grid-row: 2;
}

.order-entry-redesign .section-fulfillment .order-form-grid:has(.field-negotiated_shipping_time.conditional-hidden) .field-supplier_shipped_at {
    grid-column: 17 / 23;
    grid-row: 1;
}

.order-entry-redesign .section-invoice .field-invoice_required {
    grid-column: 1 / 3;
    grid-row: 1;
}

.order-entry-redesign .section-invoice .field-invoice_title {
    grid-column: 3 / 9;
    grid-row: 1;
}

.order-entry-redesign .section-invoice .field-invoice_tax_id {
    grid-column: 9 / 15;
    grid-row: 1;
}

.order-entry-redesign .section-invoice .field-invoice_promised_date {
    grid-column: 15 / 20;
    grid-row: 1;
}

.order-entry-redesign .section-invoice .field-invoice_no {
    grid-column: 20 / 25;
    grid-row: 1;
}

.order-entry-redesign .section-invoice .field-invoice_email {
    grid-column: 1 / 7;
    grid-row: 2;
}

.order-entry-redesign .section-invoice .field-invoice_phone {
    grid-column: 7 / 11;
    grid-row: 2;
}

.order-entry-redesign .section-invoice .field-normal_invoice_cost {
    grid-column: 11 / 14;
    grid-row: 2;
}

.order-entry-redesign .section-invoice .field-special_invoice_cost {
    grid-column: 14 / 17;
    grid-row: 2;
}

.order-entry-redesign .section-invoice .field-invoice_note {
    grid-column: 17 / 25;
    grid-row: 2;
}

.order-entry-redesign .section-invoice .order-form-grid:has(.field-special_invoice_cost.conditional-hidden) .field-invoice_note {
    grid-column: 14 / 25;
}

.order-entry-redesign .section-cost-note .field-other_cost {
    grid-column: 1 / 4;
}

.order-entry-redesign .section-cost-note .field-cost_type {
    grid-column: 4 / 8;
}

.order-entry-redesign .section-cost-note .field-order_note {
    grid-column: 8 / 25;
}

@container order-form-main (max-width: 760px) {
    .order-entry-redesign .section-purchase .order-form-grid,
    .order-entry-redesign .section-fulfillment .order-form-grid,
    .order-entry-redesign .section-invoice .order-form-grid,
    .order-entry-redesign .section-cost-note .order-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-entry-redesign .section-purchase .order-form-grid > .field,
    .order-entry-redesign .section-fulfillment .order-form-grid > .field,
    .order-entry-redesign .section-invoice .order-form-grid > .field,
    .order-entry-redesign .section-cost-note .order-form-grid > .field {
        grid-column: auto;
        grid-row: auto;
    }

    .order-entry-redesign .section-purchase .field-purchase_order_no,
    .order-entry-redesign .section-purchase .field-merchant_name,
    .order-entry-redesign .section-purchase .field-main_category,
    .order-entry-redesign .section-purchase .field-merchant_tags,
    .order-entry-redesign .section-fulfillment .field-negotiated_shipping_note,
    .order-entry-redesign .section-fulfillment .field-tracking_number,
    .order-entry-redesign .section-fulfillment .field-logistics_company_other,
    .order-entry-redesign .section-invoice .field-invoice_title,
    .order-entry-redesign .section-invoice .field-invoice_tax_id,
    .order-entry-redesign .section-invoice .field-invoice_email,
    .order-entry-redesign .section-invoice .field-invoice_note,
    .order-entry-redesign .section-cost-note .field-order_note {
        grid-column: 1 / -1;
    }
}

.order-entry-redesign .field-merchant_tags {
    grid-column: 1 / -1;
    padding: 6px 8px;
    border: 1px solid #e0e7ef;
    border-radius: 6px;
    background: #fafcff;
}

.order-entry-redesign .merchant-tag-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
    align-items: start;
    gap: 6px 10px;
    margin-top: 3px;
}

.order-entry-redesign .merchant-tag-options {
    align-content: flex-start;
    gap: 5px;
    max-height: 48px;
    overflow-y: auto;
    padding-right: 4px;
}

.order-entry-redesign .merchant-tag-custom-row {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
}

.order-entry-redesign .merchant-tag-picker small {
    grid-column: 2;
    grid-row: 2;
    font-size: 10.5px;
    line-height: 1.3;
}

.order-entry-redesign .merchant-tag-chip {
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.25;
}

.order-entry-redesign .logistics-select-search {
    margin-bottom: 0;
}

.order-entry-redesign select.logistics-select-source {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.order-entry-redesign .field.conditional-hidden {
    display: none;
}

.order-entry-redesign .order-form-aside {
    top: 68px;
    min-width: 0;
}

.order-entry-redesign .order-assist-card {
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px 11px;
    border-color: #dce5ef;
    border-radius: 7px;
    box-shadow: none;
}

.order-entry-redesign .assist-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.order-entry-redesign .assist-card-head > span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}

.order-submit-card {
    border-color: #cbdff7;
    background: #f8fbff;
}

.order-correction-card {
    background: #fbfcfe;
    box-shadow: none !important;
}

.order-correction-card .order-status-correction {
    margin: 0;
}

.order-correction-card .order-status-correction summary {
    color: #1d4ed8;
    font-weight: 800;
}

.order-correction-card .status-correction-grid,
.order-correction-card .business-correction-grid {
    grid-template-columns: 1fr;
}

.order-correction-card .business-correction-grid .field-supplier_refund_note {
    grid-column: auto;
}

.order-entry-redesign .assist-card-head h2 {
    color: #13243a;
    font-size: 15px;
    font-weight: 700;
}

.order-entry-redesign .assist-card-head p {
    font-size: 12px;
    line-height: 1.35;
}

.order-entry-redesign .autofill-methods {
    gap: 6px;
}

.order-entry-redesign .autofill-method {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 5px 8px;
    border-color: #dce5ef;
    background: #fbfcfe;
}

.order-entry-redesign .autofill-textarea {
    min-height: 80px;
    max-height: 160px;
    line-height: 1.4;
}

.order-entry-redesign .autofill-actions {
    grid-template-columns: minmax(64px, .55fr) minmax(90px, 1fr) minmax(90px, 1fr);
    gap: 6px;
}

.order-entry-redesign .autofill-actions > * {
    min-width: 0;
    padding-inline: 8px;
    white-space: nowrap;
}

.order-entry-redesign .assist-metrics {
    gap: 6px;
}

.order-entry-redesign .assist-metrics div {
    padding: 6px 8px;
    border-color: #e0e7ef;
    background: #fafcff;
}

.order-entry-redesign .assist-metrics span {
    margin-bottom: 2px;
    font-size: 11px;
}

.order-entry-redesign .assist-metrics strong {
    font-size: 17px;
}

.order-entry-redesign .assist-hints {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1.4;
}

.order-entry-redesign .assist-hints:not(.error):not(.success) {
    display: none;
}

.order-fulfillment-reminder {
    display: grid;
    grid-template-columns: 20px auto 1px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    background: #fffaf2;
    color: #8a5513;
    font-size: 11px;
    line-height: 1.35;
}

.order-fulfillment-reminder.tone-danger {
    border-color: #fecaca;
    background: #fff7f7;
    color: #b42318;
}

.order-fulfillment-reminder.tone-info {
    border-color: #d8e6f7;
    background: #f7faff;
    color: #31577f;
}

.fulfillment-reminder-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffedd5;
    color: #b45309;
    font-size: 10px;
    font-weight: 800;
}

.tone-danger .fulfillment-reminder-icon {
    background: #fee2e2;
    color: #dc2626;
}

.fulfillment-reminder-divider {
    align-self: stretch;
    width: 1px;
    background: currentColor;
    opacity: .18;
}

.order-fulfillment-reminder strong,
.order-fulfillment-reminder > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-progress-card {
    gap: 9px !important;
    border-color: #d7e2ef !important;
    background: #fff;
}

.order-progress-head,
.order-progress-current {
    display: flex;
    align-items: center;
    gap: 7px;
}

.order-progress-head {
    justify-content: space-between;
}

.order-progress-head > div {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.order-progress-head h2 {
    margin: 0;
    color: #13243a;
    font-size: 15px;
}

.order-progress-head > div > span {
    color: #64748b;
    font-size: 11px;
}

.order-progress-card .flow-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 7px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.order-progress-current {
    padding: 6px 8px;
    border-radius: 5px;
    background: #f7f9fc;
}

.order-progress-current > span {
    color: #64748b;
    font-size: 11px;
}

.order-progress-current > strong {
    color: #172033;
    font-size: 13px;
}

.order-progress-basis {
    display: inline-grid !important;
    margin-left: auto;
    opacity: .7 !important;
}

.order-progress-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow: hidden;
}

.order-progress-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 0;
}

.order-progress-step::before,
.order-progress-step::after {
    content: "";
    position: absolute;
    top: 5px;
    width: 50%;
    height: 1px;
    background: #d7e0ea;
}

.order-progress-step::before {
    left: 0;
}

.order-progress-step::after {
    right: 0;
}

.order-progress-step:first-child::before,
.order-progress-step:last-child::after {
    display: none;
}

.order-progress-step > span {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
}

.order-progress-step.state-done > span {
    border-color: #2ea76f;
    background: #2ea76f;
}

.order-progress-step.state-current > span {
    border-color: #f59e0b;
    background: #f59e0b;
}

.order-progress-step.state-done::before,
.order-progress-step.state-done::after,
.order-progress-step.state-current::before {
    background: #8fd1af;
}

.order-progress-step small {
    width: 100%;
    overflow: hidden;
    color: #8795a8;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-progress-step.state-done small {
    color: #397a5b;
}

.order-progress-step.state-current small {
    color: #a66008;
    font-weight: 700;
}

.order-progress-next,
.order-progress-closed {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #d8e6f7;
    border-radius: 6px;
    background: #f2f7ff;
}

.order-progress-next span {
    color: #64748b;
    font-size: 11px;
    white-space: nowrap;
}

.order-progress-next strong {
    overflow: hidden;
    color: #1764cf;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-progress-closed {
    justify-content: center;
    border-color: #c7ead6;
    background: #f3fbf6;
    color: #177245;
    font-size: 12px;
    font-weight: 800;
}

.order-correction-boundary {
    margin: -2px 0 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.order-correction-help {
    display: inline-grid !important;
    opacity: .7 !important;
}

.order-correction-card .order-status-correction summary {
    padding: 6px 8px;
    font-size: 11px;
}

.field-guide-content {
    min-height: 86px;
    padding: 11px 12px;
    border: 1px solid #d8e6f7;
    border-radius: 8px;
    background: #f2f7ff;
}

.field-guide-content strong {
    display: block;
    margin-bottom: 6px;
    color: #1d4ed8;
    font-size: 13px;
}

.field-guide-content p {
    margin: 0;
    color: #2d4b72;
    font-size: 12px;
    line-height: 1.6;
}

.compact-principles ul {
    margin: 0;
    padding-left: 16px;
    color: #526176;
    font-size: 12px;
    line-height: 1.65;
}

.compact-principles-lite {
    background: #f8fafc;
    box-shadow: none;
}

.compact-principles-lite .assist-card-head h2 {
    font-size: 14px;
}

.fold-toggle {
    display: inline-flex;
    align-items: center;
    margin: 0 12px 9px;
    padding: 5px 9px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #526176;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.fold-toggle:hover,
.fold-toggle:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    outline: 0;
}

.order-entry-redesign .field-is-low-frequency[hidden] {
    display: none !important;
}

.order-entry-redesign .field-is-low-frequency:not([hidden]) {
    padding-top: 0;
    border-top: 0;
}

.order-entry-redesign .field-is-workflow-conditional[hidden] {
    display: none !important;
}

.tracking-carrier-hint {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.3;
}

.tracking-carrier-hint[data-tone="success"] {
    color: #047857;
}

.tracking-carrier-hint[data-tone="warning"] {
    color: #b45309;
}

.order-entry-redesign .section-is-current {
    border-color: #bfd5ed;
    box-shadow: none;
}

.order-entry-redesign .section-is-current .form-section-head::before {
    width: 4px;
    background: #2563eb;
}

.order-entry-redesign .field {
    position: relative;
    padding-left: 7px;
}

.order-entry-redesign .field::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 0;
    width: 2px;
    border-radius: 999px;
    background: transparent;
}

.order-entry-redesign .field-help-dot {
    display: none;
}

.order-entry-redesign .field-has-help .field-help-dot {
    display: inline-grid;
    opacity: .38;
    transition: opacity .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
}

.order-entry-redesign .field-has-help:hover .field-help-dot,
.order-entry-redesign .field-has-help:focus-within .field-help-dot,
.order-entry-redesign .field-help-dot:hover,
.order-entry-redesign .field-help-dot:focus-visible {
    opacity: 1;
}

.order-entry-redesign .field-help-dot.active {
    border-color: #1d4ed8;
    background: #dbeafe;
    color: #1d4ed8;
}

.field-state-badge {
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.field-state-badge.field-is-required {
    border: 0;
    background: transparent;
    color: #9a6417;
}

.field-state-badge.field-is-current-required {
    border: 0;
    background: transparent;
    color: #1d4ed8;
}

.order-entry-redesign .field-is-required::before {
    background: #f0ad28;
}

.order-entry-redesign .field-is-required input:not([disabled]):not([readonly]):not(:focus),
.order-entry-redesign .field-is-required select:not([disabled]):not(:focus),
.order-entry-redesign .field-is-required textarea:not([disabled]):not([readonly]):not(:focus) {
    border-color: #cbd8e6;
    background: #fff;
}

.order-entry-redesign .field-is-current-required::before {
    background: #3b82f6;
}

.order-entry-redesign .field-is-current-required input:not([disabled]):not([readonly]):not(:focus),
.order-entry-redesign .field-is-current-required select:not([disabled]):not(:focus),
.order-entry-redesign .field-is-current-required textarea:not([disabled]):not([readonly]):not(:focus) {
    border-color: #b4cbe8;
    background: #fbfdff;
}

.order-entry-redesign .field-is-system::before {
    background: #94a3b8;
}

.order-entry-redesign .field-is-system input,
.order-entry-redesign .field-is-system select,
.order-entry-redesign .field-is-system textarea,
.order-entry-redesign input[readonly],
.order-entry-redesign input[disabled],
.order-entry-redesign select[disabled],
.order-entry-redesign textarea[disabled] {
    border-color: #d4dbe5;
    background: #f6f8fb;
    color: #64748b;
}

.order-entry-redesign .has-error::before {
    background: #dc2626;
}

.order-entry-redesign .has-error input,
.order-entry-redesign .has-error select,
.order-entry-redesign .has-error textarea {
    border-color: #f87171;
    background: #fff1f2;
}

.order-entry-redesign .field-microcopy {
    display: none !important;
}

.field-help-popover {
    position: absolute;
    z-index: 120;
    width: min(300px, calc(100vw - 32px));
    padding: 12px 14px 13px;
    border: 1px solid #cbd8e6;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.field-help-popover::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 22px;
    width: 12px;
    height: 12px;
    border-left: 1px solid #cbd8e6;
    border-top: 1px solid #cbd8e6;
    background: #fff;
    transform: rotate(45deg);
}

.field-help-popover strong {
    display: block;
    padding-right: 22px;
    margin-bottom: 6px;
    color: #13243a;
    font-size: 13px;
}

.field-help-popover p {
    margin: 0;
    color: #526176;
    font-size: 12px;
    line-height: 1.6;
}

.field-help-close {
    position: absolute;
    right: 8px;
    top: 7px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.field-help-close:hover,
.field-help-close:focus-visible {
    background: #eef2f7;
    color: #1d4ed8;
    outline: 0;
}

.order-entry-redesign .order-assist-card .form-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 8px;
    margin: 2px 0 0;
    padding: 0;
}

.order-entry-redesign .order-submit-card .order-submit-actions > * {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .order-entry-redesign .order-form-workbench {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .order-entry-redesign .section-order .order-form-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .order-entry-redesign .section-order .field,
    .order-entry-redesign .section-order .field-shop,
    .order-entry-redesign .section-order .field-order_no,
    .order-entry-redesign .section-order .field-order_date,
    .order-entry-redesign .section-order .field-order_status {
        grid-column: span 3;
    }

    .order-entry-redesign .section-order .field-product_title {
        grid-column: span 6;
    }

    .order-entry-redesign .merchant-tag-picker {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-entry-redesign .merchant-tag-custom-row,
    .order-entry-redesign .merchant-tag-picker small {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 1100px) {
    .shipment-risk-summary {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

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

    .structured-filter-bar {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .analysis-filter {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .account-admin-layout {
        grid-template-columns: 1fr;
    }

    .tag-admin-layout {
        grid-template-columns: 1fr;
    }

    .tag-filter-bar {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .return-filter-bar,
    .shop-analysis-filter {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .tag-table {
        min-width: 960px;
    }

    .tag-table-scroll {
        max-height: 58vh;
    }

    .account-list {
        max-height: 320px;
    }

    .account-form-grid,
    .shop-assignment-list {
        grid-template-columns: 1fr;
    }

    .goods-link-login-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid-analysis,
    .task-metric-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }

    .compact-order-form .order-form-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

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

    .order-form-aside {
        position: static;
    }

    .compact-order-form .field-shop,
    .compact-order-form .field-order_no,
    .compact-order-form .field-product_title,
    .compact-order-form .field-merchant_tags,
    .compact-order-form .field-invoice_info,
    .compact-order-form .field-purchase_order_no,
    .compact-order-form .field-merchant_name,
    .compact-order-form .field-tracking_number,
    .compact-order-form .field-supplier_refund_status,
    .compact-order-form .field-supplier_refund_note {
        grid-column: span 3;
    }
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        height: auto;
        min-height: 56px;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

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

    .sidebar {
        position: static;
        height: auto;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .side-link {
        white-space: nowrap;
        margin: 0;
    }

    .side-section-label {
        display: none;
    }

    .content {
        padding: 14px;
    }

    .order-draft-link-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .order-draft-link-actions,
    .order-draft-link-candidate-actions {
        width: 100%;
    }

    .order-draft-link-detail-row,
    .order-draft-link-candidate-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-head {
        flex-direction: column;
    }

    .metric-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .summary-wide {
        grid-column: auto;
    }

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

    .quick-drawer-panel {
        width: 100vw;
    }

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

    .analysis-filter,
    .account-shop-filter,
    .metric-grid-analysis,
    .task-metric-grid {
        grid-template-columns: 1fr;
    }

    .topnav {
        width: 100%;
        flex-wrap: wrap;
    }

    .brand-text small,
    .user-badge,
    .sidebar-title {
        display: none;
    }

    .field-product_title,
    .field-invoice_info,
    .field-merchant_tags,
    .field-note {
        grid-column: span 1;
    }
}

/* 退货记录：订单已恢复（非退货中状态）的灰色标记 */
.return-record-orphaned {
    opacity: 0.55;
    background: #f8f9fa;
}

.return-record-orphaned:hover {
    opacity: 0.85;
    background: #f0f2f5;
}

/* 警告标签（橙色） */
.pill-warn {
    background: #fff7e8;
    border-color: #f0d5a6;
    color: #83520b;
    margin-left: 6px;
    font-size: 11px;
    padding: 1px 7px;
}

/* === 状态徽章 === */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: transform .1s;
}
.status-badge:hover {
    transform: scale(1.03);
}
.status-active {
    background: #e6f4ea;
    border-color: #a3d9a5;
    color: #147d64;
}
.status-paused {
    background: #fff7e8;
    border-color: #f0d5a6;
    color: #b7791f;
}
.status-closed {
    background: #fdecea;
    border-color: #e8b4ae;
    color: #c24135;
    cursor: default !important;
}

/* === 原因单元格 === */
.reason-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 200px;
}
.reason-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.link-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.6;
    transition: opacity .2s;
}
.link-button:hover {
    opacity: 1;
}

/* === 弹窗 === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
}
.modal-content {
    background: var(--surface);
    border-radius: 10px;
    width: 92%;
    max-width: 480px;
    box-shadow: var(--shadow);
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.modal-header h3 {
    margin: 0;
    font-size: 16px;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text);
}
.modal-body {
    padding: 16px 20px;
}
.modal-body label {
    display: block;
    margin-bottom: 12px;
}
.modal-body label span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}
.modal-body .form-control {
    width: 100%;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--line);
}

.diagnosis-panel {
    margin: 12px 0 24px;
}

.diagnosis-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.diagnosis-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.diagnosis-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.diagnosis-kind {
    flex: 0 0 auto;
    min-width: 38px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-muted);
    border-radius: 999px;
    padding: 3px 8px;
}

.diagnosis-warn {
    border-color: #fecaca;
    background: #fff7f7;
}

.diagnosis-good {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.diagnosis-action {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.diagnosis-info {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.pill-good {
    color: #047857;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.pill-info {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

/* Business diagnosis: report-like list layout for uneven recommendation text. */
.diagnosis-panel {
    margin: 14px 0 28px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.diagnosis-title {
    margin-bottom: 12px;
}

.diagnosis-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.diagnosis-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diagnosis-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: start;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fafafa;
}

.diagnosis-item p {
    margin: 0;
    color: #102033;
    line-height: 1.6;
    word-break: break-word;
}

.diagnosis-kind {
    min-width: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    background: #eef2f7;
    border-radius: 999px;
    padding: 3px 8px;
}

.diagnosis-warn {
    border-color: #fecaca;
    border-left-color: #ef4444;
    background: #fffafa;
}

.diagnosis-good {
    border-color: #bbf7d0;
    border-left-color: #10b981;
    background: #f7fef9;
}

.diagnosis-action {
    border-color: #bfdbfe;
    border-left-color: #2563eb;
    background: #f8fbff;
}

.diagnosis-info {
    border-color: #dbe3ee;
    border-left-color: #64748b;
    background: #fbfdff;
}

@media (max-width: 720px) {
    .diagnosis-panel {
        padding: 12px;
    }

    .diagnosis-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .diagnosis-kind {
        justify-self: start;
    }
}

/* Collaboration workspace */
.collaboration-metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 14px;
}

.metric.warn strong {
    color: #b45309;
}

.metric.accent strong {
    color: #2563eb;
}

.collaboration-list-section {
    margin-top: 14px;
}

.collaboration-table th,
.collaboration-table td {
    vertical-align: middle;
}

.collaboration-title-cell {
    min-width: 260px;
}

.collaboration-title-cell strong {
    display: block;
    color: #102033;
}

.collaboration-title-cell small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.35;
}

.collaboration-table tr.is-overdue {
    background: #fff8f2;
}

.collaboration-editor {
    padding-bottom: 82px;
}

.workbench-source-filter {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 6px 10px;
    border: 1px solid #cfe0f5;
    border-left: 3px solid #1f6feb;
    border-radius: 5px;
    background: #f7fbff;
    color: #42566e;
}
.workbench-source-filter b { color: #165fbf; }
.workbench-source-filter span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workbench-source-filter a { flex: 0 0 auto; margin-left: auto; color: #1666d8; text-decoration: none; }

.system-issue-editor {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 14px 16px 76px;
    border: 1px solid #d5dfeb;
    border-radius: 7px;
    background: #fff;
}
.system-issue-guide { display: flex; gap: 10px; margin-bottom: 12px; padding: 8px 10px; border-left: 3px solid #2474df; background: #f6faff; }
.system-issue-guide span, .system-issue-auto-note { color: #6b7c91; }
.system-issue-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(140px, .62fr); gap: 10px; }
.system-issue-editor label > span, .system-issue-upload b, .system-issue-upload span { display: block; }
.system-issue-editor label > span { margin-bottom: 5px; font-weight: 700; }
.system-issue-editor label em, .system-issue-upload em { color: #7b8a9d; font-size: 11px; font-style: normal; font-weight: 400; }
.system-issue-editor label strong { color: #d83b31; }
.system-issue-editor input:not([type='file']), .system-issue-editor select, .system-issue-editor textarea { width: 100%; border: 1px solid #ccd8e6; border-radius: 6px; background: #fff; }
.system-issue-editor input:not([type='file']), .system-issue-editor select { height: 36px; padding: 0 9px; }
.system-issue-editor textarea { min-height: 78px; padding: 8px 9px; resize: vertical; }
.system-issue-full { display: block; margin-top: 12px; }
.system-issue-urgency-help { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 7px 0 0; color: #718096; font-size: 11px; }
.system-issue-urgency-help b { color: #42566e; }
.system-issue-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; margin-top: 12px; padding: 10px; border: 1px dashed #c8d6e7; border-radius: 6px; background: #fafcff; }
.system-issue-upload > div > span { margin-top: 2px; color: #7b8a9d; font-size: 11px; }
.system-issue-preview { grid-column: 1 / -1; display: grid; gap: 6px; }
.system-issue-preview:empty { display: none; }
.system-issue-preview article { min-height: 48px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px; border: 1px solid #e0e7f0; border-radius: 5px; background: #fff; }
.system-issue-preview img { width: 48px; height: 38px; object-fit: cover; border-radius: 4px; }
.system-issue-preview b, .system-issue-preview span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-issue-preview span { margin-top: 2px; color: #718096; font-size: 10px; }
.system-issue-preview button { border: 0; background: transparent; color: #c33; }
.system-issue-auto-note { margin: 9px 0 0; font-size: 11px; }
.system-issue-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 14px -16px -76px; padding: 11px 16px; border-top: 1px solid #dbe3ed; background: #fff; }
.system-issue-attachments { margin-top: 10px; }
.system-issue-attachments-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.system-issue-attachments-head h3 { margin: 0; color: #26364d; font-size: 13px; }
.system-issue-attachments-head span { color: #718096; font-size: 10px; }
.system-issue-attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.system-issue-attachments article { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 5px 6px; border: 1px solid #e1e8f0; border-radius: 5px; background: #fbfcfe; }
.system-issue-attachment-preview { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: #1666d8; text-align: left; cursor: pointer; }
.system-issue-attachment-preview span { min-width: 0; }
.system-issue-attachment-preview b, .system-issue-attachment-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-issue-attachment-preview small { margin-top: 2px; color: #718096; font-weight: 400; }
.system-issue-attachment-preview:hover b, .system-issue-attachment-preview:focus-visible b { text-decoration: underline; }
.system-issue-attachments img { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; }
.system-issue-attachments form { margin: 0; }
.system-issue-attachments form button { border: 0; background: transparent; color: #c33; white-space: nowrap; }
.system-issue-attachments .system-issue-attachment-download { color: #1666d8; text-decoration: none; white-space: nowrap; }
.system-issue-list-panel, .system-issue-table-wrap { border: 1px solid #d5dfeb; background: #fff; }
.system-issue-list-panel { margin-bottom: 8px; padding: 8px; border-radius: 7px; }
.system-issue-status-tabs { display: flex; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid #e0e7f0; }
.system-issue-status-tabs a { min-width: 112px; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #cad6e5; border-radius: 5px; color: #42566e; text-decoration: none; }
.system-issue-status-tabs a.active { border-color: #2876df; background: #eef5ff; color: #155fc4; }
.system-issue-status-tabs b { font-size: 12px; }
.system-issue-filters { display: flex; gap: 8px; padding-top: 8px; }
.system-issue-filters input, .system-issue-filters select { min-width: 0; height: 34px; border: 1px solid #ccd8e6; border-radius: 5px; padding: 0 9px; background: #fff; }
.system-issue-filters input { flex: 1 1 280px; }
.system-issue-filters select { flex: 0 1 190px; }
.system-issue-table-wrap { overflow: hidden; border-radius: 7px; }
.system-issue-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.system-issue-table th { padding: 8px 7px; border-bottom: 1px solid #d5dfeb; background: #f3f6fa; color: #52657b; text-align: left; }
.system-issue-table td { padding: 8px 7px; border-bottom: 1px solid #e2e8f0; vertical-align: top; color: #25364b; }
.system-issue-table th:nth-child(1) { width: 66px; }
.system-issue-table th:nth-child(2) { width: 112px; }
.system-issue-table th:nth-child(3) { width: 164px; }
.system-issue-table th:nth-child(4) { width: 20%; }
.system-issue-table th:nth-child(5) { width: 15%; }
.system-issue-table th:nth-child(6) { width: 64px; }
.system-issue-table th:nth-child(7) { width: 48px; }
.system-issue-table th:nth-child(8) { width: 17%; }
.system-issue-table th:nth-child(9) { width: 80px; }
.system-issue-table td b, .system-issue-table td span, .system-issue-table td small { display: block; }
.system-issue-table td small { margin-top: 3px; color: #738399; }
.system-issue-clamp { display: -webkit-box; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-height: 1.45; overflow-wrap: anywhere; }
.system-issue-status, .system-issue-urgency { display: inline-flex !important; width: fit-content; padding: 2px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.system-issue-status.pending { background: #fff3e8; color: #b45309; }
.system-issue-status.resolved { background: #eaf8f1; color: #087a55; }
.system-issue-urgency.urgent { background: #fff0f0; color: #c53030; }
.system-issue-urgency.important { background: #fff6e5; color: #b45f06; }
.system-issue-urgency.normal { background: #edf3fa; color: #52657b; }
.system-issue-empty { height: 72px; color: #78889c !important; text-align: center; vertical-align: middle !important; }
.system-issue-detail-head { margin-bottom: 10px; }
.system-issue-detail-head h1 { margin-bottom: 3px; font-size: 22px; }
.system-issue-detail-head p { font-size: 12px; line-height: 1.4; }
.system-issue-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 10px; align-items: start; }
.system-issue-detail-layout > main, .system-issue-detail-layout > aside { min-width: 0; }
.system-issue-detail-layout .system-issue-panel { margin-bottom: 10px; padding: 12px 14px; border: 1px solid #d5dfeb; border-radius: 7px; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .035); }
.system-issue-panel-head { min-height: 24px; display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1px solid #e1e8f0; }
.system-issue-panel-head h2 { margin: 0; color: #14233a; font-size: 15px; line-height: 1.3; }
.system-issue-panel-head > span { color: #718096; font-size: 11px; white-space: nowrap; }
.system-issue-fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; margin: 0; }
.system-issue-fact { min-width: 0; padding: 0 0 8px; border-bottom: 1px solid #edf1f5; }
.system-issue-fact:nth-last-child(-n+1) { border-bottom: 0; }
.system-issue-fact dt { margin: 0; color: #718096; font-size: 11px; font-weight: 700; line-height: 1.35; }
.system-issue-fact dd { min-width: 0; margin: 3px 0 0; color: #203047; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.system-issue-fact dd a { color: #1767d2; text-decoration: none; }
.system-issue-fact dd a:hover, .system-issue-fact dd a:focus-visible { text-decoration: underline; }
.system-issue-fact dd small { margin-left: 6px; color: #8290a2; font-size: 10px; }
.system-issue-fact-wide { grid-column: 1 / -1; padding-top: 8px; }
.system-issue-fact-wide dd { max-width: 100%; white-space: pre-wrap; }
.system-issue-detail-side { display: grid; gap: 10px; }
.system-issue-detail-side .system-issue-panel { margin-bottom: 0; }
.system-issue-edit-panel summary { color: #1767d2; cursor: pointer; font-weight: 700; }
.system-issue-edit-panel form { margin-top: 12px; }
.system-issue-edit-panel textarea, .system-issue-resolution textarea { width: 100%; min-height: 90px; margin-top: 5px; padding: 8px; border: 1px solid #ccd8e6; border-radius: 6px; resize: vertical; }
.system-issue-edit-panel .system-issue-full { display: block; }
.system-issue-edit-panel .system-issue-grid input, .system-issue-edit-panel .system-issue-grid select { width: 100%; height: 34px; border: 1px solid #ccd8e6; border-radius: 6px; padding: 0 8px; }
.system-issue-add-screenshot, .system-issue-card-upload { display: grid; gap: 5px; margin-top: 10px; }
.system-issue-resolution form > label > span { display: block; font-weight: 700; }
.system-issue-resolution form > button { width: 100%; margin-top: 12px; }
.system-issue-resolution-copy { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.system-issue-card-preview { width: 100%; display: grid; gap: 6px; margin-bottom: 8px; padding: 7px; border: 1px solid #d5dfeb; border-radius: 6px; background: #f8fafc; color: #1767d2; cursor: pointer; }
.system-issue-card-preview img { width: 100%; height: 148px; object-fit: contain; background: #fff; }
.system-issue-resolution-meta { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 8px; margin: 10px 0 0; font-size: 12px; }
.system-issue-source dl { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px minmax(0, 1fr); gap: 4px 8px; margin: 0; font-size: 11px; }
.system-issue-resolution-meta dt, .system-issue-source dt { color: #718096; }
.system-issue-resolution-meta dd, .system-issue-source dd { margin: 0; overflow-wrap: anywhere; }
.quiet-note { color: #718096; }
.system-issue-image-viewer { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .72); }
.system-issue-image-viewer[hidden] { display: none; }
.system-issue-image-viewer > section { width: min(1120px, calc(100vw - 48px)); height: min(820px, calc(100vh - 48px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 24px 64px rgba(15, 23, 42, .32); }
.system-issue-image-viewer header, .system-issue-image-viewer footer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-color: #dbe3ed; background: #fff; }
.system-issue-image-viewer header { justify-content: space-between; border-bottom: 1px solid #dbe3ed; }
.system-issue-image-viewer header div { min-width: 0; }
.system-issue-image-viewer h2, .system-issue-image-viewer p { margin: 0; }
.system-issue-image-viewer h2 { overflow: hidden; color: #14233a; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.system-issue-image-viewer header p { margin-top: 2px; color: #718096; font-size: 11px; }
.system-issue-image-viewer [data-preview-close][aria-label], .system-issue-image-viewer [data-card-close][aria-label] { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #ccd8e6; border-radius: 6px; background: #fff; color: #42566e; font-size: 20px; line-height: 1; cursor: pointer; }
.system-issue-image-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 20px 56px; background: #f3f6fa; }
.system-issue-image-stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 4px; object-fit: contain; box-shadow: 0 4px 18px rgba(15, 23, 42, .12); }
.system-issue-image-stage p { color: #52657b; }
.system-issue-image-nav { position: absolute; top: 50%; width: 36px; height: 48px; border: 1px solid #c8d4e3; border-radius: 6px; background: rgba(255, 255, 255, .94); color: #203650; font-size: 28px; line-height: 1; transform: translateY(-50%); cursor: pointer; }
.system-issue-image-nav.previous { left: 12px; }
.system-issue-image-nav.next { right: 12px; }
.system-issue-image-nav:disabled { visibility: hidden; }
.system-issue-image-viewer footer { justify-content: flex-end; border-top: 1px solid #dbe3ed; }
.system-issue-image-viewer footer > span { margin-right: auto; color: #718096; font-size: 12px; }
body.system-issue-preview-open { overflow: hidden; }
@media (max-width: 760px) {
    .system-issue-grid { grid-template-columns: 1fr; }
    .system-issue-filters { flex-wrap: wrap; }
    .system-issue-filters input, .system-issue-filters select { flex: 1 1 100%; }
    .system-issue-detail-layout { grid-template-columns: 1fr; }
    .system-issue-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .system-issue-attachment-grid { grid-template-columns: 1fr; }
    .system-issue-urgency-help { display: block; }
    .system-issue-urgency-help span { display: block; margin-top: 3px; }
    .system-issue-image-viewer { padding: 8px; }
    .system-issue-image-viewer > section { width: calc(100vw - 16px); height: calc(100vh - 16px); }
    .system-issue-image-stage { padding: 12px 42px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
    .system-issue-table { font-size: 11px; }
    .system-issue-table th, .system-issue-table td { padding-right: 5px; padding-left: 5px; }
    .system-issue-detail-layout { grid-template-columns: minmax(0, 1fr) 310px; }
    .system-issue-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.compact-card {
    padding: 16px 18px;
    margin-bottom: 14px;
}

.collaboration-form-grid {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(150px, 1fr));
    gap: 12px 14px;
}

.collaboration-form-grid label:first-child {
    grid-column: span 2;
}

.collaboration-text-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
}

.collaboration-text-grid textarea {
    min-height: 130px;
}

.assignee-check-grid ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    padding: 0;
    margin: 10px 0 0;
    list-style: none;
}

.assignee-check-grid li {
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.assignee-check-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.collaboration-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, .9fr);
    gap: 14px;
    align-items: start;
}

.standard-block {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.standard-block:first-of-type {
    border-top: 0;
}

.standard-block h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.standard-block p,
.feedback-text {
    margin: 0;
    color: #26364a;
    line-height: 1.65;
}

.scope-line,
.muted-copy {
    color: var(--muted);
    font-size: 13px;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-form label,
.collaboration-form-grid label,
.collaboration-text-grid label,
.review-inline-form label {
    display: grid;
    gap: 6px;
}

.participant-section {
    margin-top: 16px;
}

.participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 12px;
}

.participant-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

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

.review-inline-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.collaboration-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    max-width: 1520px;
    margin: 0 auto 16px;
    padding: 22px 24px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.collaboration-detail-main h1 {
    margin: 8px 0 8px;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.eyebrow-row,
.detail-meta-row,
.detail-action-stack,
.participant-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-meta-row {
    color: #64748b;
    font-size: 13px;
}

.detail-meta-row span {
    display: inline-flex;
    align-items: center;
}

.detail-meta-row span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.detail-action-stack {
    justify-content: flex-end;
    min-width: 340px;
}

.detail-action-stack form {
    margin: 0;
}

.detail-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 12px;
    max-width: 1520px;
    margin: 0 auto 16px;
}

.detail-kpi-card,
.detail-panel {
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.detail-kpi-card {
    padding: 14px 16px;
}

.detail-kpi-card span,
.detail-kpi-card small {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.detail-kpi-card strong {
    display: block;
    margin: 8px 0 4px;
    color: #0f172a;
    font-size: 26px;
    line-height: 1;
}

.detail-kpi-card:first-child strong,
.detail-kpi-card:nth-child(3) strong {
    color: #2563eb;
}

.detail-kpi-card:nth-child(4) strong,
.detail-kpi-card:nth-child(5) strong {
    color: #b45309;
}

.collaboration-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
    gap: 16px;
    max-width: 1520px;
    margin: 0 auto 16px;
    align-items: start;
}

.detail-panel {
    padding: 18px;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-title-row h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 18px;
}

.panel-title-row p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.standard-timeline {
    display: grid;
    gap: 12px;
}

.standard-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.standard-step > span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 900;
}

.standard-step h3 {
    margin: 2px 0 6px;
    color: #0f172a;
    font-size: 14px;
}

.standard-step p {
    margin: 0;
    color: #334155;
    line-height: 1.65;
}

.detail-feedback-form {
    display: grid;
    gap: 12px;
}

.detail-feedback-form label {
    display: grid;
    gap: 6px;
}

.detail-feedback-form textarea {
    min-height: 116px;
}

.participant-section-polished {
    max-width: 1520px;
    margin: 0 auto;
}

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

.participant-row-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, .8fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.participant-row-main {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
}

.participant-avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 900;
}

.participant-name-line {
    margin-bottom: 7px;
}

.participant-name-line strong {
    color: #0f172a;
    font-size: 15px;
}

.review-inline-form-polished {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr) auto;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.review-inline-form-polished textarea {
    min-height: 42px;
}

.review-inline-form-polished button {
    align-self: end;
}

.import-ledger-note {
    display: block;
    max-width: 280px;
    margin-top: 5px;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-ledger-alert {
    max-width: 1520px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #7c2d12;
}

.import-ledger-alert strong {
    display: block;
    margin-bottom: 5px;
}

.import-ledger-alert p {
    margin: 0;
    line-height: 1.6;
}

.collaboration-template-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.template-form-card {
    position: sticky;
    top: 78px;
}

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

.template-card {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.template-card > div:first-child,
.template-card-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.template-card p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.5;
}

.template-card-actions {
    justify-content: flex-start;
    font-size: 13px;
}

.pill-muted {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

@media (max-width: 1100px) {
    .collaboration-form-grid,
    .collaboration-text-grid,
    .collaboration-detail-grid,
    .collaboration-template-layout {
        grid-template-columns: 1fr;
    }

    .collaboration-form-grid label:first-child {
        grid-column: auto;
    }

    .template-form-card {
        position: static;
    }
}

.collaboration-work-section {
    margin-top: 14px;
}

.collaboration-work-wrap {
    max-height: calc(100vh - 310px);
    min-height: 420px;
    overflow: auto;
}

.collaboration-work-table {
    min-width: 1680px;
    border-collapse: separate;
    border-spacing: 0;
}

.collaboration-work-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    text-align: center;
    white-space: nowrap;
}

.collaboration-work-table thead tr:nth-child(2) th {
    top: 42px;
    z-index: 3;
}

.collaboration-work-table td {
    vertical-align: middle;
    background: #fff;
}

.collaboration-work-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 180px;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
}

.collaboration-work-table thead .sticky-col {
    z-index: 5;
    background: #f8fafc;
}

.collaboration-work-table .sticky-action-col {
    position: sticky;
    right: 0;
    z-index: 2;
    min-width: 86px;
    background: #fff;
    box-shadow: -1px 0 0 var(--line);
}

.collaboration-work-table thead .sticky-action-col {
    z-index: 5;
    background: #f8fafc;
}

.collaboration-work-table .sticky-col strong {
    display: block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collaboration-work-table .sticky-col small {
    color: var(--muted);
    font-size: 12px;
}

.compact-input {
    min-width: 112px;
    height: 34px;
    padding: 5px 8px;
    font-size: 13px;
}

.compact-save {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
}

.workboard-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
}

.workboard-hint strong {
    color: #1d4ed8;
}

.workboard-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.workboard-summary-table {
    width: 100%;
    table-layout: fixed;
}

.workboard-summary-table th,
.workboard-summary-table td {
    vertical-align: middle;
}

.workboard-summary-table th:nth-child(1),
.workboard-summary-table td:nth-child(1) {
    width: 28%;
}

.workboard-summary-table th:nth-child(2),
.workboard-summary-table td:nth-child(2),
.workboard-summary-table th:nth-child(3),
.workboard-summary-table td:nth-child(3),
.workboard-summary-table th:nth-child(4),
.workboard-summary-table td:nth-child(4),
.workboard-summary-table th:nth-child(5),
.workboard-summary-table td:nth-child(5) {
    width: 12%;
}

.workboard-summary-table th:nth-child(7),
.workboard-summary-table td:nth-child(7) {
    width: 96px;
    text-align: right;
}

.workboard-summary-table td strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workboard-note-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workboard-summary-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.workboard-summary-row.is-open td {
    background: #f8fbff;
}

.workboard-progress-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
}

.workboard-editor-row > td {
    padding: 0;
    background: #f8fbff;
}

.workboard-editor-form {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.workboard-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.workboard-editor-head h3 {
    margin: 0;
}

.workboard-editor-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.workboard-editor-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    min-width: 420px;
}

.workboard-editor-toolbar label,
.workboard-note-input {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.workboard-editor-toolbar label {
    min-width: 180px;
}

.save-state {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.save-state.is-clean {
    background: #ecfdf5;
    color: #047857;
}

.save-state.is-dirty {
    background: #fff7ed;
    color: #c2410c;
}

.save-state.is-saving {
    background: #eff6ff;
    color: #1d4ed8;
}

.workboard-field-groups {
    display: grid;
    gap: 12px;
}

.workboard-field-group {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.workboard-field-group h4 {
    margin: 0 0 10px;
    color: #0f172a;
}

.workboard-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px 12px;
}

.workboard-field-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-weight: 700;
}

.workboard-field-grid label span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.workboard-field-grid b {
    color: #dc2626;
    font-size: 12px;
}

.workboard-field-grid .wide-field {
    grid-column: span 3;
}

.workboard-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.inline-delete-form {
    display: inline-flex;
    margin: 0;
}

.danger-button,
.danger-link {
    color: #dc2626;
}

.danger-button {
    border-color: #fecaca;
    background: #fff7f7;
}

.danger-button:hover {
    border-color: #fca5a5;
    background: #fee2e2;
}

.template-field-definition {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    line-height: 1.55;
    min-height: 260px;
}

.template-format-example {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
}

.template-card.is-active-template {
    border-color: #93c5fd;
    background: #f8fbff;
}

.scope-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.scope-picker label {
    display: grid;
    gap: 6px;
}

.scope-shop-panel {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.scope-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-weight: 700;
}

.scoped-shop-select {
    display: none;
}

.scope-selector-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 12px;
    align-items: end;
}

.scope-selector-grid label {
    display: grid;
    gap: 6px;
}

.scope-summary {
    min-width: 190px;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    text-align: center;
}

.shop-picker-shell {
    margin-top: 12px;
}

.shop-picker-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.shop-picker-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.shop-picker-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.selection-count {
    color: #0f766e;
    font-weight: 700;
}

.selected-shop-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.shop-chip {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 8px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #f0f9ff;
    color: #075985;
    font-size: 12px;
}

.muted-chip {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: var(--muted);
}

.shop-picker-modal[hidden] {
    display: none;
}

.shop-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.shop-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
}

.shop-picker-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(1080px, calc(100vw - 40px));
    max-height: min(760px, calc(100vh - 48px));
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.shop-picker-header,
.shop-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.shop-picker-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    justify-content: flex-end;
}

.shop-picker-header h2 {
    margin: 0;
}

.shop-picker-header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.icon-close-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.shop-picker-filters {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.shop-picker-filters label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.shop-picker-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    min-height: 420px;
    overflow: hidden;
}

.shop-picker-list-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--line);
}

.shop-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.shop-picker-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px 18px;
    overflow: auto;
}

.shop-picker-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: flex-start;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.shop-picker-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.shop-picker-item strong,
.selected-shop-row {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-picker-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.shop-picker-selected-panel {
    padding: 14px;
    background: #fbfdff;
    overflow: auto;
}

.shop-picker-selected-panel p {
    margin: 4px 0 12px;
    color: #0f766e;
    font-size: 22px;
    font-weight: 800;
}

.shop-picker-selected-list {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.selected-shop-row {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    text-align: left;
    cursor: pointer;
}

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

.template-workspace {
    display: grid;
    grid-template-columns: minmax(680px, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

.template-editor-card,
.template-library-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.template-editor-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.template-editor-head,
.template-editor-footer,
.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.template-editor-head h2,
.template-panel h3 {
    margin: 0;
}

.template-editor-head p,
.panel-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}

.template-panel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.template-basic-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr);
    gap: 12px;
    margin-top: 12px;
    align-items: end;
}

.template-basic-grid label,
.template-copy-grid label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: var(--text);
}

.template-wide-field {
    grid-column: span 2;
}

.template-active-toggle {
    display: inline-flex !important;
    grid-column: span 2;
    align-items: center;
    justify-content: flex-start;
    gap: 8px !important;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.template-active-toggle input {
    width: 18px;
    height: 18px;
}

.template-copy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.template-import-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0 12px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
}

.template-import-strip p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.template-import-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 420px;
}

.template-library-card {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow: auto;
    padding: 14px;
}

.template-field-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.template-field-table {
    min-width: 860px;
}

.template-field-table th,
.template-field-table td {
    padding: 8px;
    vertical-align: middle;
}

.template-field-table input,
.template-field-table select {
    height: 34px;
    font-size: 13px;
}

.template-field-table th:nth-child(1),
.template-field-table td:nth-child(1) { width: 190px; }
.template-field-table th:nth-child(2),
.template-field-table td:nth-child(2) { width: 230px; }
.template-field-table th:nth-child(3),
.template-field-table td:nth-child(3) { width: 110px; }
.template-field-table th:nth-child(4),
.template-field-table td:nth-child(4) { width: 96px; }
.template-field-table th:nth-child(6),
.template-field-table td:nth-child(6) { width: 70px; }

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

.template-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.template-card p {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}

.template-card-top,
.template-meta-row,
.template-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.template-card-top strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-meta-row {
    color: var(--muted);
    font-size: 13px;
}

.template-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.template-card-actions form {
    margin: 0;
}

@media (max-width: 1100px) {
    .scope-picker,
    .scope-selector-grid,
    .template-workspace,
    .template-copy-grid,
    .template-basic-grid {
        grid-template-columns: 1fr;
    }

    .template-library-card {
        position: static;
        max-height: none;
    }

    .template-wide-field,
    .template-active-toggle {
        grid-column: auto;
    }

    .workboard-field-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .workboard-field-grid .wide-field {
        grid-column: span 2;
    }

    .workboard-editor-head {
        flex-direction: column;
    }

    .workboard-editor-toolbar {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        min-width: 0;
    }

    .workboard-editor-toolbar label {
        width: 100%;
    }

    .shop-picker-card,
    .shop-picker-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .shop-picker-filters,
    .shop-picker-body,
    .shop-picker-list,
    .template-import-strip,
    .template-import-controls {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .shop-picker-selected-panel,
    .shop-picker-list-panel {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .workboard-list {
        overflow-x: auto;
    }

    .workboard-summary-table {
        min-width: 760px;
    }

    .workboard-field-grid {
        grid-template-columns: 1fr;
    }

    .workboard-field-grid .wide-field {
        grid-column: auto;
    }
}

/* 1.6.41: operational page polish for workbench, analysis and collaboration workboards. */
.content {
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
    overflow-x: clip;
}

.layout {
    overflow-x: clip;
}

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

.page-head h1 {
    font-size: 24px;
    font-weight: 900;
    color: #101827;
}

.page-head p {
    max-width: 920px;
    line-height: 1.6;
}

.analysis-panel,
.table-section,
.form-section:not(.order-entry-section),
.workbench-hero {
    border-color: #dbe4ef;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
}

.analysis-panel {
    padding: 14px 16px;
}

.structured-filter-bar {
    gap: 12px;
}

.structured-filter-bar label span {
    margin-bottom: 2px;
    color: #475569;
}

.structured-filter-bar input,
.structured-filter-bar select,
.form-control:not(.order-entry-redesign .form-control) {
    border-color: #cbd8e6;
    border-radius: 7px;
}

.structured-filter-bar input:focus,
.structured-filter-bar select:focus,
.form-control:not(.order-entry-redesign .form-control):focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
    outline: none;
}

.primary-button,
.secondary-button {
    min-height: 38px;
    border-radius: 7px;
    font-weight: 700;
}

.primary-button {
    box-shadow: 0 8px 18px rgba(31, 111, 235, .16);
}

.metric-grid {
    gap: 12px;
}

.metric {
    min-height: 88px;
    padding: 14px 16px;
    border-color: #dbe4ef;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.metric span {
    font-size: 13px;
    line-height: 1.35;
}

.metric strong {
    font-size: 25px;
    letter-spacing: 0;
}

.table-section {
    border-radius: 8px;
}

.section-title {
    padding: 2px 2px 12px;
}

.section-title h2 {
    font-size: 16px;
    font-weight: 900;
    color: #111827;
}

.section-title p {
    line-height: 1.55;
}

.table-wrap,
.shop-analysis-table {
    border-color: #dbe4ef;
}

.compact-scroll-table th,
.compact-scroll-table td,
.shop-analysis-table th,
.shop-analysis-table td {
    border-bottom-color: #edf2f7;
}

.compact-scroll-table thead th,
.shop-analysis-table thead th,
.order-table thead th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 900;
}

.workbench-hero {
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(239, 246, 255, .95), rgba(255, 255, 255, .98));
}

.workbench-hero-stat {
    border-radius: 8px;
    border-color: #dbeafe;
    background: #ffffff;
}

.task-card {
    border-color: #dbe4ef;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.workbench-grid .table-section {
    min-width: 0;
    overflow: hidden;
}

.workbench-grid .table-wrap {
    min-width: 0;
    max-width: 100%;
    overflow: auto;
}

.workbench-grid .compact-scroll-table,
.workbench-grid .compact-scroll-table-small {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.workbench-grid .compact-scroll-table th,
.workbench-grid .compact-scroll-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-analysis-filter {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.shop-analysis-grid {
    gap: 16px;
}

.analysis-stage {
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.diagnosis-panel {
    border-radius: 8px;
}

.collaboration-metrics {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.collaboration-work-section {
    padding: 16px;
    background: #f8fafc;
}

.collaboration-work-section .workboard-hint {
    max-width: 900px;
    margin: 0 0 12px;
    border-color: #dbeafe;
    background: #ffffff;
}

.workboard-list {
    max-width: 900px;
    margin: 0;
    border-color: #dbe4ef;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.workboard-summary-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
}

.workboard-summary-table th,
.workboard-summary-table td {
    padding: 11px 12px;
}

.workboard-summary-table th:nth-child(1),
.workboard-summary-table td:nth-child(1) {
    width: 34%;
}

.workboard-summary-table th:nth-child(2),
.workboard-summary-table td:nth-child(2),
.workboard-summary-table th:nth-child(3),
.workboard-summary-table td:nth-child(3),
.workboard-summary-table th:nth-child(4),
.workboard-summary-table td:nth-child(4),
.workboard-summary-table th:nth-child(5),
.workboard-summary-table td:nth-child(5) {
    width: auto;
}

.workboard-summary-table th:nth-child(6),
.workboard-summary-table td:nth-child(6) {
    width: 17%;
    max-width: 210px;
}

.workboard-summary-table th:nth-child(7),
.workboard-summary-table td:nth-child(7) {
    width: 92px;
}

.workboard-summary-table th:last-child,
.workboard-summary-table td:last-child {
    position: static;
    right: auto;
    z-index: auto;
    box-shadow: none;
}

.workboard-summary-row.is-open td {
    background: #eef6ff;
}

.workboard-editor-row > td {
    background: #eef6ff;
}

.workboard-editor-backdrop {
    display: none;
}

.workboard-editor-form {
    position: fixed;
    top: 72px;
    right: 22px;
    bottom: 22px;
    z-index: 910;
    width: min(720px, calc(100vw - 260px));
    max-width: 720px;
    margin: 0;
    padding: 0;
    overflow: auto;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .14);
}

.workboard-editor-head {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
}

.workboard-editor-head h3 {
    font-size: 17px;
    font-weight: 900;
}

.workboard-editor-toolbar {
    display: flex;
    justify-content: flex-end;
    justify-self: end;
    flex: 0 1 auto;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
}

.workboard-editor-toolbar label {
    min-width: 136px;
}

.workboard-auto-status {
    justify-self: center;
    display: grid;
    gap: 3px;
    min-width: 86px;
    padding: 5px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.workboard-auto-status small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.workboard-auto-status strong {
    color: #1d4ed8;
    font-size: 13px;
}

.workboard-editor-toolbar .primary-button,
.workboard-editor-toolbar .secondary-button {
    min-height: 34px;
    padding: 6px 12px;
}

.workboard-drawer-open [data-open-workboard-row] {
    visibility: visible;
    pointer-events: auto;
}

.workboard-drawer-open .workboard-summary-table th:nth-child(7),
.workboard-drawer-open .workboard-summary-table td:nth-child(7) {
    display: table-cell;
    pointer-events: auto;
    box-shadow: none;
}

.workboard-field-groups {
    padding: 16px 18px 0;
    gap: 14px;
}

.workboard-field-group {
    padding: 14px;
    border-color: #e2e8f0;
    background: #fbfdff;
}

.workboard-field-group h4 {
    padding-bottom: 9px;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}

.workboard-field-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
}

.workboard-field-grid .wide-field {
    grid-column: span 3;
}

.workboard-field-grid input,
.workboard-field-grid select {
    height: 36px;
}

.workboard-note-input textarea {
    min-height: 74px;
}

.workboard-note-input {
    margin: 0 18px 16px;
}

.workboard-editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nav-action-with-badge {
    position: relative;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.side-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.collaboration-notice-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
    margin: 12px 0 16px;
}

.collaboration-notice-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #0f172a;
    text-decoration: none;
}

.collaboration-notice-card span {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
}

.collaboration-notice-card strong {
    grid-row: span 2;
    color: #1d4ed8;
    font-size: 28px;
    line-height: 1;
}

.collaboration-notice-card small {
    color: #475569;
    font-size: 12px;
}

.collaboration-notice-card.warn {
    border-color: #fed7aa;
    background: #fff7ed;
}

.collaboration-notice-card.warn span,
.collaboration-notice-card.warn strong {
    color: #c2410c;
}

.return-duty-panel {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1.8fr);
    gap: 14px;
    align-items: end;
    padding: 16px 18px;
    margin-bottom: 14px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.return-duty-panel strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    color: #102033;
}

.return-duty-panel small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.return-duty-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(140px, .7fr) minmax(140px, .7fr) auto;
    gap: 10px;
    align-items: end;
}

.return-duty-form label,
.return-collaboration-filter label {
    display: grid;
    gap: 6px;
}

.return-duty-form span,
.return-collaboration-filter span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.return-collaboration-metrics {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    margin-bottom: 14px;
}

.return-collaboration-metrics .metric {
    text-decoration: none;
}

.return-collaboration-metrics .metric.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.return-collaboration-filter {
    margin-bottom: 14px;
}

.return-collaboration-table {
    min-width: 1540px;
    width: 100%;
    border-collapse: collapse;
}

.return-collaboration-table th,
.return-collaboration-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.return-collaboration-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.return-collaboration-table td strong,
.return-collaboration-table td small {
    display: block;
}

.return-collaboration-table td small {
    margin-top: 4px;
    color: #64748b;
    line-height: 1.35;
}

.return-collaboration-product {
    max-width: 260px;
    line-height: 1.45;
}

.return-collaboration-actions {
    min-width: 260px;
}

.return-collaboration-actions form {
    margin: 0 0 8px;
}

.return-inline-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
}

.return-inline-form input,
.return-exception-box select,
.return-exception-box textarea,
.return-duty-form input,
.return-duty-form select,
.return-collaboration-filter input,
.return-collaboration-filter select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.return-exception-box {
    margin-top: 4px;
}

.return-exception-box summary {
    cursor: pointer;
    color: #dc2626;
    font-size: 13px;
    font-weight: 800;
}

.return-exception-box form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f7;
}

.return-exception-box textarea {
    min-height: 64px;
    resize: vertical;
}

.danger-soft-button {
    border-color: #fecaca;
    color: #b91c1c;
}

.sop-flow-panel {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.sop-flow-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.sop-flow-card {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 126px;
    padding: 13px;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: #f8fbff;
    color: #172336;
}

.sop-flow-card:hover {
    border-color: var(--primary);
    background: #f3f8ff;
}

.sop-flow-card span {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8f1ff;
    color: var(--primary-dark);
    font-weight: 900;
}

.sop-flow-card strong {
    font-size: 15px;
}

.sop-flow-card small {
    color: #5c6b7e;
    line-height: 1.5;
}

.sop-flow-card.warn {
    background: #fffaf1;
    border-color: #f4d49a;
}

.sop-flow-card.warn span {
    background: #fff0cf;
    color: #9a5b00;
}

.sop-flow-card.danger {
    background: #fff5f5;
    border-color: #f4b7b7;
}

.sop-flow-card.danger span {
    background: #ffe1e1;
    color: #b91c1c;
}

.close-check-section {
    border-color: #cfe0f5;
    background: #fbfdff;
}

.close-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.close-check-grid a {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: #fff;
    color: #1d2b3d;
}

.close-check-grid a.good {
    border-color: #cfeedd;
    background: #f7fffa;
}

.close-check-grid a.warn {
    border-color: #f6d8a8;
    background: #fffaf0;
}

.close-check-grid a:hover {
    border-color: var(--primary);
    background: #f6faff;
}

.close-check-grid strong {
    font-size: 22px;
    line-height: 1;
}

.close-check-grid span {
    color: #24364b;
    font-weight: 700;
    font-size: 13px;
}

.close-check-grid small {
    color: #5b6b80;
    font-size: 13px;
    line-height: 1.45;
}

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

@media (max-width: 1280px) {
    .content {
        padding: 18px;
    }

    .workbench-metrics,
    .task-metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .shop-analysis-filter {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .detail-kpi-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }

    .collaboration-detail-layout,
    .participant-row-card {
        grid-template-columns: 1fr;
    }

    .return-duty-panel {
        grid-template-columns: 1fr;
    }

    .return-duty-form {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .sop-flow-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-head,
    .workboard-editor-head {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .collaboration-metrics,
    .return-collaboration-metrics,
    .workbench-metrics,
    .task-metric-grid,
    .task-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workboard-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workboard-field-grid .wide-field {
        grid-column: span 2;
    }

    .collaboration-detail-hero {
        display: grid;
        padding: 18px;
    }

    .detail-action-stack {
        justify-content: flex-start;
        min-width: 0;
    }

    .detail-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-inline-form-polished {
        grid-template-columns: 1fr;
    }

    .workboard-editor-form {
        left: 14px;
        right: 14px;
        width: auto;
    }

    .collaboration-work-section .workboard-hint,
    .workboard-list {
        max-width: none;
    }

    .workboard-auto-status,
    .workboard-editor-toolbar {
        justify-self: stretch;
    }

    .sop-flow-grid,
    .close-check-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 在线订单 P0/P1 试运行收口：压缩首屏高度，稳定列宽与悬浮操作 ===== */
.order-list-controls {
    padding: 7px 10px 6px;
    margin-bottom: 7px;
}

.daily-action-head {
    margin-bottom: 3px;
}

.daily-action-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 5px;
}

.daily-action-card {
    min-height: 38px;
    padding: 5px 7px 5px 11px;
    row-gap: 0;
}

.daily-action-card strong {
    font-size: 17px;
}

.daily-action-card small {
    display: none;
}

.daily-action-card em {
    font-size: 10.5px;
}

.order-list-controls .tabs a,
.order-list-controls .sub-tabs a,
.more-scope-menu summary.secondary-button {
    min-height: 26px;
    padding: 3px 8px;
}

.order-quick-filter-line {
    gap: 5px 12px;
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.order-filter-bar {
    gap: 5px;
}

.order-filter-bar input,
.order-filter-bar select,
.order-filter-bar button,
.order-filter-bar .secondary-button,
.order-filter-bar .reset-filter-link {
    min-height: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.original-link-batch-panel.compact-analysis-panel {
    padding: 8px 10px;
    margin-bottom: 8px;
}

.original-link-actions .primary-button,
.original-link-actions .secondary-button,
.original-link-actions .original-link-export-menu > summary {
    min-height: 28px;
    padding: 4px 10px;
}

.order-list-summary {
    gap: 5px 8px;
    padding: 6px 10px;
    min-height: 36px;
}

.summary-title {
    font-size: 14px;
}

.summary-cap {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-processing-wrap {
    max-height: calc(100vh - 260px);
}

.order-processing-table th,
.order-processing-table td {
    padding: 6px 6px;
    line-height: 1.28;
}

.order-processing-table thead th {
    padding-top: 7px;
    padding-bottom: 7px;
}

.order-summary-stack,
.info-stack,
.product-stack,
.quality-stack {
    gap: 3px;
}

.summary-line,
.field-line {
    gap: 5px;
}

.flow-state-line {
    gap: 5px;
}

.flow-current-node {
    padding: 1px 6px;
    font-size: 11.5px;
}

.flow-node-track {
    gap: 2px;
    padding: 2px 0 1px;
}

.flow-node {
    gap: 1px;
    font-size: 9.5px;
}

.flow-detail-line {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11.5px;
}

.flow-detail-line span {
    padding: 0 5px;
}

.order-flow-done {
    display: none;
}

.product-title-line {
    max-height: 32px;
    line-height: 1.28;
}

.product-stack > .copy-mini {
    display: none;
}

.quality-marker {
    max-height: 32px;
    line-height: 1.28;
}

.floating-row-actions {
    right: 4px;
    gap: 5px;
    padding: 4px 6px;
}

.flow-node i {
    width: 10px;
    height: 10px;
}

.flow-node::before {
    top: 5px;
}

.flow-node-current i {
    box-shadow: none;
}

.order-flow-warn .flow-node-current i {
    box-shadow: none;
}

.order-flow-danger .flow-node-current i {
    box-shadow: none;
}

.order-page-head {
    margin-bottom: 7px;
}

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

.order-page-head p {
    margin-top: 0;
    font-size: 12px;
}

.daily-action-head {
    min-height: 16px;
    font-size: 11px;
    line-height: 1.2;
}

.daily-action-head strong {
    font-size: 13px;
}

.daily-action-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
}

.daily-action-card {
    flex: 1 1 0;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "label count cta";
    column-gap: 6px;
    min-width: 0;
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.daily-action-card span {
    align-self: center;
}

.daily-action-card strong {
    align-self: center;
    font-size: 16px;
}

.daily-action-card em {
    align-self: center;
}

.order-filter-bar {
    align-items: center;
}

.order-filter-bar label span {
    display: none;
}

.order-filter-bar input,
.order-filter-bar select,
.order-filter-bar button,
.order-filter-bar .secondary-button,
.order-filter-bar .reset-filter-link {
    min-height: 27px;
    font-size: 11.5px;
}

.original-link-batch-panel .compact-title {
    gap: 6px;
}

.original-link-title {
    font-size: 16px;
}

.order-list-summary {
    flex-wrap: nowrap;
    overflow: hidden;
    min-height: 34px;
}

.order-list-summary > * {
    flex: 0 0 auto;
}

.summary-cap {
    display: none;
}

/* ===== 在线订单小范围试运行修复：稳定操作入口与低高度处理队列 ===== */
.order-list-summary .summary-scope {
    display: inline-flex;
    align-items: center;
    max-width: 260px;
    min-height: 20px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #174ea6;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-list-summary .summary-total {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.order-processing-table .col-quality {
    width: 76px;
}

.cell-quality {
    padding-right: 34px !important;
}

.row-action-trigger {
    position: absolute;
    top: 50%;
    right: 4px;
    z-index: 11;
    display: inline-grid;
    place-items: center;
    width: 30px;
    min-width: 30px;
    min-height: 24px;
    padding: 0;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: #fff;
    color: #0f5ed7;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.row-action-trigger:hover,
.row-action-trigger:focus-visible {
    border-color: #2f73e8;
    outline: 2px solid rgba(47, 115, 232, .16);
    outline-offset: 1px;
}

.order-processing-table tbody tr.row-actions-pinned .row-action-trigger {
    opacity: 0;
    pointer-events: none;
}

.order-processing-table tbody tr.row-actions-pinned .floating-row-actions {
    opacity: 1;
    pointer-events: auto;
}

.floating-row-actions {
    right: 38px;
    z-index: 18;
}

.quick-drawer-form [data-quick-scope][hidden] {
    display: none !important;
}

@media (max-height: 820px) {
    .page-head.order-page-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 5px;
    }

    .order-page-head h1 {
        margin: 0;
        font-size: 18px;
    }

    .order-page-head p {
        display: none;
    }

    .order-page-head .head-actions .primary-button,
    .order-page-head .head-actions .secondary-button {
        min-height: 29px;
        padding: 4px 9px;
    }

    .order-list-controls {
        padding: 5px 8px 5px;
        margin-bottom: 5px;
    }

    .daily-action-head {
        display: none;
    }

    .daily-action-strip {
        gap: 4px;
        margin-bottom: 4px;
    }

    .daily-action-card {
        min-height: 25px;
        padding: 3px 6px 3px 9px;
    }

    .daily-action-card span {
        font-size: 11px;
    }

    .daily-action-card strong {
        font-size: 14px;
    }

    .daily-action-card em {
        display: none;
    }

    .order-quick-filter-line {
        gap: 4px 8px;
        margin-bottom: 3px;
        padding-bottom: 3px;
    }

    .scope-entry-title,
    .sub-tabs-label {
        display: none !important;
    }

    .order-list-controls .tabs a,
    .order-list-controls .sub-tabs a,
    .more-scope-menu summary.secondary-button {
        min-height: 23px;
        padding: 2px 6px;
        font-size: 11px;
    }

    .order-filter-bar {
        grid-template-columns: minmax(180px, 1.35fr) repeat(2, minmax(105px, .6fr)) minmax(118px, .7fr) repeat(3, minmax(112px, .65fr)) auto auto auto;
        gap: 4px;
    }

    .order-filter-bar label:nth-of-type(8),
    .order-filter-bar label:nth-of-type(9) {
        display: none;
    }

    .order-filter-bar input,
    .order-filter-bar select,
    .order-filter-bar button,
    .order-filter-bar .secondary-button,
    .order-filter-bar .reset-filter-link {
        min-height: 25px;
        padding: 3px 7px;
        font-size: 11px;
    }

    .original-link-batch-panel.compact-analysis-panel {
        padding: 5px 8px;
        margin-bottom: 5px;
    }

    .original-link-title {
        font-size: 14px;
    }

    .original-link-parse-badge:nth-of-type(n+5) {
        display: none;
    }

    .original-link-actions .primary-button,
    .original-link-actions .secondary-button,
    .original-link-actions .original-link-export-menu > summary {
        min-height: 25px;
        padding: 3px 8px;
        font-size: 11px;
    }

    .order-list-summary {
        min-height: 28px;
        padding: 4px 8px;
    }

    .summary-title {
        font-size: 13px;
    }

    .order-processing-wrap {
        max-height: calc(100vh - 190px);
    }

    .order-processing-table th,
    .order-processing-table td {
        padding: 4px 5px;
        line-height: 1.2;
    }

    .order-processing-table thead th {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .flow-current-node,
    .flow-state-line .status-pill {
        padding-top: 0;
        padding-bottom: 0;
        font-size: 10.5px;
    }

    .flow-node-track {
        padding: 1px 0;
    }

    .flow-node {
        font-size: 9px;
    }

    .flow-detail-line {
        font-size: 10.5px;
    }

    .flow-next-line {
        display: none;
    }

    .order-summary-stack,
    .info-stack,
    .product-stack,
    .quality-stack {
        gap: 2px;
    }

    .product-title-line {
        max-height: 26px;
        -webkit-line-clamp: 2;
    }

    .quality-marker {
        max-height: 26px;
        -webkit-line-clamp: 2;
    }
}

/* ===== 在线订单视觉收口：队列统计、经营链路解释、行内噪音控制 ===== */
.order-list-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
    padding: 6px 10px;
    overflow: visible;
}

.queue-count-strip,
.queue-context-strip {
    display: flex;
    align-items: center;
    min-width: 0;
}

.queue-count-strip {
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.queue-count-strip > span {
    flex: 0 0 auto;
    color: #526176;
    font-size: 12px;
    white-space: nowrap;
}

.queue-count-strip .summary-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.queue-count-strip strong {
    color: #0f172a;
    font-weight: 900;
}

.queue-count-strip span:nth-child(5) strong,
.queue-count-strip span:nth-child(6) strong,
.queue-count-strip span:nth-child(9) strong {
    color: #d97706;
}

.queue-context-strip {
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 11.5px;
}

.queue-context-strip .summary-scope {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    min-height: 20px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #174ea6;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-context-strip .summary-desc {
    display: inline;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-context-strip .summary-cap {
    flex: 0 1 auto;
    max-width: 620px;
    margin-left: auto;
    padding: 2px 8px;
    border: 1px solid #f8d48a;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a5a00;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-list-summary [data-tooltip],
.order-processing-table [data-tooltip] {
    position: relative;
}

.order-list-summary [data-tooltip]::after,
.order-processing-table [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 90;
    width: max-content;
    max-width: 260px;
    padding: 7px 9px;
    border-radius: 7px;
    background: #162033;
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
    white-space: normal;
}

.order-list-summary [data-tooltip]:hover::after,
.order-list-summary [data-tooltip]:focus-visible::after,
.order-processing-table [data-tooltip]:hover::after,
.order-processing-table [data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.order-processing-table tbody tr {
    --row-accent: #d8e4f2;
}

.order-processing-table tbody tr.order-status-pending_shipment {
    --row-accent: #f59e0b;
}

.order-processing-table tbody tr.order-status-shipped {
    --row-accent: #10b981;
}

.order-processing-table tbody tr.order-status-no_ship,
.order-processing-table tbody tr.order-status-unshipped_refund {
    --row-accent: #ef4444;
}

.order-processing-table tbody tr.order-status-returning {
    --row-accent: #8b5cf6;
}

.order-processing-table tbody td:first-child {
    border-left: 3px solid var(--row-accent);
}

.order-processing-table .copy-mini {
    visibility: hidden;
    opacity: 0;
    transition: opacity .12s ease;
}

.order-processing-table tbody tr:hover .copy-mini,
.order-processing-table tbody tr:focus-within .copy-mini {
    visibility: visible;
    opacity: 1;
}

.order-processing-table .summary-order-no .copy-mini,
.order-processing-table .field-line .copy-mini {
    padding: 0 5px;
    border-color: #d8e6f6;
    background: #f8fbff;
    color: #0f5ed7;
    font-size: 10.5px;
}

.order-flow-cell {
    gap: 4px;
}

.flow-state-line {
    align-items: center;
}

.flow-state-line strong {
    max-width: 118px;
    overflow: hidden;
    color: #1f2937;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-current-node {
    max-width: 130px;
    overflow: hidden;
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-node-track {
    max-width: 100%;
}

.flow-node em {
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flow-detail-line {
    color: #475569;
}

.flow-detail-line span {
    background: #eef4fb;
    color: #516275;
}

.flow-next-line {
    color: #0f5ed7;
    font-weight: 800;
}

.flow-next-line span {
    background: #eff6ff;
    color: #0f5ed7;
}

.product-title-line {
    font-size: 12px;
    line-height: 1.34;
}

.info-stack strong,
.money-stack strong {
    font-size: 12px;
}

.order-processing-table .col-money-stack {
    width: 104px;
}

.order-processing-table .col-purchase-stack {
    width: 132px;
}

.order-processing-table .col-refund-stack {
    width: 88px;
}

.order-processing-table .col-product-stack {
    width: 158px;
}

.order-processing-table .col-original-link {
    width: 122px;
}

.order-processing-table .col-quality {
    width: 86px;
}

.money-stack,
.info-stack,
.product-stack,
.quality-stack {
    min-width: 0;
}

.money-stack span,
.info-stack .field-line,
.product-stack .field-line {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-stack .field-line strong,
.product-stack .field-line strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quality-stack small[data-tooltip] {
    color: #b45309;
    cursor: help;
}

.order-processing-table tbody tr.row-actions-visible .floating-row-actions,
.order-processing-table tbody tr.row-actions-pinned .floating-row-actions {
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-height: 820px) {
    .order-list-summary {
        gap: 2px;
        padding: 4px 8px;
    }

    .queue-context-strip .summary-desc {
        display: none;
    }

    .queue-context-strip .summary-cap {
        display: none;
    }

    .queue-count-strip {
        gap: 8px;
    }

    .queue-count-strip > span {
        font-size: 11px;
    }

    .queue-count-strip .summary-title {
        font-size: 13px;
    }
}

/* ===== 在线订单试运行可用性修复：层级、行操作和队列密度收口 ===== */
.order-page-head {
    position: relative;
    z-index: 520;
}

.order-list-controls {
    position: relative;
    z-index: 500;
    overflow: visible;
}

.order-list-controls .tabs,
.order-quick-filter-line,
.query-entry-group,
.query-tabs-primary {
    overflow: visible;
}

.more-scope-menu {
    position: relative;
    z-index: 510;
}

.more-scope-menu[open] {
    z-index: 900;
}

.more-scope-panel {
    z-index: 901;
    top: calc(100% + 4px);
    right: auto;
    left: 0;
}

.original-link-batch-panel {
    z-index: 20;
}

.original-link-batch-panel.compact-analysis-panel {
    padding: 7px 10px;
    margin-bottom: 7px;
}

.original-link-title {
    font-size: 15px;
}

.original-link-parse-badge {
    min-height: 22px;
    padding: 2px 8px;
    font-size: 11.5px;
}

.original-link-actions .primary-button,
.original-link-actions .secondary-button,
.original-link-actions .original-link-export-menu > summary {
    min-height: 27px;
    padding: 3px 9px;
    font-size: 11.5px;
}

.order-processing-wrap {
    max-height: calc(100vh - 232px);
}

.table-wrap.wide table.order-processing-table,
.order-processing-table {
    min-width: 1090px;
}

.order-processing-table .col-order-summary {
    width: 148px;
}

.order-processing-table .col-processing-flow {
    width: 284px;
}

.order-processing-table .col-money-stack {
    width: 92px;
}

.order-processing-table .col-purchase-stack {
    width: 118px;
}

.order-processing-table .col-refund-stack {
    width: 82px;
}

.order-processing-table .col-product-stack {
    width: 166px;
}

.order-processing-table .col-original-link {
    width: 136px;
}

.order-processing-table .col-quality {
    width: 96px;
}

.order-processing-table th,
.order-processing-table td {
    padding: 5px 6px;
    line-height: 1.22;
}

.order-processing-table thead th {
    padding-top: 6px;
    padding-bottom: 6px;
}

.order-processing-table tbody tr {
    position: relative;
}

.order-processing-table tbody tr:hover,
.order-processing-table tbody tr:focus-within {
    z-index: 35;
}

.order-processing-table [data-tooltip]::after {
    content: none !important;
    display: none !important;
}

.order-processing-table .profit-help[data-tooltip]::after,
.order-processing-table .row-action-trigger[data-tooltip]::after {
    content: attr(data-tooltip) !important;
    display: block !important;
    position: absolute;
    left: auto;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 280;
    width: max-content;
    max-width: 220px;
    padding: 6px 8px;
    border-radius: 7px;
    background: #162033;
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
    white-space: normal;
}

.order-processing-table .profit-help[data-tooltip]:hover::after,
.order-processing-table .profit-help[data-tooltip]:focus-visible::after,
.order-processing-table .row-action-trigger[data-tooltip]:hover::after,
.order-processing-table .row-action-trigger[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.flow-state-line {
    gap: 4px;
    margin-bottom: 0;
}

.flow-state-line .pill {
    min-height: 18px;
    padding: 1px 6px;
    font-size: 11px;
}

.flow-state-line strong {
    max-width: 112px;
    font-size: 11.5px;
}

.flow-current-node {
    max-width: 122px;
    min-height: 18px;
    padding: 0 6px;
    font-size: 11px;
}

.flow-node-track {
    grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
    padding: 1px 0;
}

.flow-node {
    font-size: 9px;
}

.flow-node em {
    max-width: 48px;
}

.flow-detail-line {
    font-size: 11px;
    line-height: 1.22;
}

.flow-secondary {
    display: none;
}

.money-stack span,
.info-stack .field-line,
.product-stack .field-line {
    font-size: 11.5px;
}

.info-stack small,
.product-stack small {
    font-size: 11px;
}

.product-title-line {
    max-height: 34px;
    font-size: 11.8px;
    line-height: 1.32;
    -webkit-line-clamp: 2;
}

.cell-quality {
    padding-right: 38px !important;
}

.row-action-trigger {
    top: 6px;
    right: 5px;
    width: 30px;
    min-width: 30px;
    min-height: 22px;
    transform: none;
}

.floating-row-actions {
    top: 32px;
    right: 5px;
    z-index: 260;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    width: 86px;
    padding: 6px;
    border-radius: 10px;
    transform: none;
}

.floating-row-actions a,
.floating-row-actions .link-button {
    display: inline-flex;
    justify-content: center;
    min-height: 24px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11.5px;
    text-decoration: none;
}

.floating-row-actions .quick-toggle {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.floating-row-actions .danger-link {
    background: #fff5f5;
}

.original-link-more[open] {
    z-index: 320;
}

.original-link-more-menu {
    z-index: 330;
    max-width: min(300px, calc(100vw - 48px));
}

.cell-original-link {
    position: relative;
}

.original-link-primary-row {
    gap: 4px;
}

.original-link-pill {
    max-width: 64px;
    font-size: 11px;
}

.original-link-main-action,
.original-link-main-muted,
.original-link-more > summary {
    min-height: 19px;
    padding: 0 5px;
    font-size: 10.5px;
    line-height: 17px;
}

@media (max-height: 820px) {
    .order-processing-wrap {
        max-height: calc(100vh - 176px);
    }

    .daily-action-card {
        min-height: 23px;
    }

    .original-link-batch-panel.compact-analysis-panel {
        padding-top: 4px;
        padding-bottom: 4px;
    }
}

/* Final compact pass for the two operation risk workbenches. Keep this block last. */
.ops-risk-head {
    min-height: 42px;
    margin-bottom: 8px;
}

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

.ops-risk-head p {
    font-size: 12.5px;
}

.shipment-scope-card.ops-risk-filter-card,
.ops-risk-overview,
.ops-risk-filter-card {
    margin-bottom: 8px;
    padding: 8px 11px;
}

.shipment-scope-card.ops-risk-filter-card {
    grid-template-columns: 150px minmax(300px, 1fr) minmax(520px, auto);
}

.shipment-period-pills a {
    min-height: 28px;
    padding: 4px 10px;
}

.period-current-note {
    grid-column: 1 / -1;
    margin: 0;
}

.ops-risk-overview.risk-overview-card {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 10px;
    padding: 8px 11px;
}

.ops-risk-overview.return-compact-overview {
    gap: 6px 12px;
    padding: 8px 11px;
}

.compact-sop-path {
    padding: 8px 10px;
}

.compact-sop-path small {
    display: none;
}

.ops-risk-overview .risk-metric-box,
.ops-risk-overview .return-stat-pill {
    min-height: 44px;
    padding: 6px 9px;
}

.ops-risk-overview .risk-metric-box strong,
.ops-risk-overview .return-stat-pill strong {
    font-size: 17px;
}

.return-deadline-inline {
    font-size: 11.5px;
}

.ops-risk-quick-filter .section-title-lite,
.ops-risk-quick-filter .return-filter-title {
    margin-bottom: 6px;
}

.ops-risk-quick-filter .risk-filter-pills a,
.ops-risk-quick-filter .return-scope-pills a {
    min-height: 28px;
    padding: 4px 10px;
}

.ops-risk-advanced-filter summary {
    min-height: 32px;
}

.ops-risk-table-title {
    min-height: 46px;
    padding: 8px 12px;
}

.ops-risk-table-wrap {
    max-height: calc(100vh - 280px);
    min-height: 500px;
}

.ops-risk-table thead th {
    height: 34px;
    padding: 7px 10px;
}

.ops-risk-table tbody td {
    min-height: 78px;
    padding: 7px 10px;
    font-size: 12.5px;
    line-height: 1.3;
}

.ops-risk-table .muted-block,
.ops-risk-table .table-subtext {
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.25;
}

.ops-risk-table .risk-level,
.ops-risk-table .risk-reason-tag,
.ops-risk-table .risk-status-chip,
.ops-risk-table .pill {
    min-height: 20px;
    padding: 1px 7px;
    font-size: 11px;
}

.risk-tag-stack {
    gap: 4px;
    min-width: 140px;
}

.risk-money-cell {
    gap: 2px;
}

.risk-action-cell strong {
    margin-bottom: 3px;
    font-size: 13px;
}

.ops-main-actions {
    gap: 6px !important;
}

.ops-main-actions .primary-button,
.ops-main-actions .secondary-button,
.ops-main-actions .quick-toggle,
.ops-main-actions a {
    min-height: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.return-risk-table.ops-risk-table td:nth-child(7),
.shipment-risk-center-table.ops-risk-table td:nth-child(8) {
    font-size: 12px;
}

.ops-risk-table .risk-tag-stack {
    display: table-cell;
    min-width: 0;
}

.ops-risk-table .risk-reason-tag {
    display: inline-flex;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 20px;
    align-items: center;
    justify-content: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.3;
    white-space: nowrap;
    margin: 0 4px 4px 0;
}

.ops-risk-table td.risk-money-cell,
.ops-risk-table td.ops-main-actions {
    display: table-cell !important;
}

.ops-risk-table td.risk-money-cell strong,
.ops-risk-table td.risk-money-cell span,
.ops-risk-table td.risk-money-cell small {
    display: block;
    margin-bottom: 2px;
}

.ops-risk-table td.ops-main-actions .quick-toggle,
.ops-risk-table td.ops-main-actions .primary-button,
.ops-risk-table td.ops-main-actions .secondary-button,
.ops-risk-table td.ops-main-actions a {
    display: flex;
    margin-bottom: 6px;
}

.shipment-scope-card.ops-risk-filter-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.shipment-scope-card.ops-risk-filter-card .shipment-scope-copy {
    flex: 0 0 auto;
}

.shipment-scope-card.ops-risk-filter-card .shipment-scope-copy h2 {
    font-size: 14px;
}

.shipment-scope-card.ops-risk-filter-card .shipment-period-pills {
    flex: 0 1 auto;
    flex-wrap: wrap;
}

.shipment-scope-card.ops-risk-filter-card .shipment-scope-form {
    flex: 1 1 520px;
    grid-column: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.shipment-scope-card.ops-risk-filter-card .period-current-note {
    flex: 1 0 100%;
    grid-column: auto;
    min-height: 20px;
}

.shipment-scope-card.ops-risk-filter-card .period-current-note span {
    display: none;
}

.compact-sop-risk-overview.ops-risk-overview {
    grid-template-columns: 1fr;
}

.compact-sop-risk-overview.ops-risk-overview .compact-sop-path {
    display: none;
}

/* 1.6.83: high-fidelity operation risk list polish.
   Align shipment risk center and return follow-up with docs/UI_经营风险列表模板_高保真原型.html. */
.ops-risk-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 50px;
    margin-bottom: 12px;
}

.ops-risk-head h1 {
    color: #0f1f33;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0;
}

.ops-risk-head p {
    color: #5f7088;
    font-size: 13px;
}

.ops-risk-overview,
.ops-risk-filter-card,
.ops-risk-advanced-filter,
.ops-risk-table-card {
    border: 1px solid #d8e3f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

.ops-risk-overview {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.compact-sop-risk-overview.ops-risk-overview {
    grid-template-columns: 1fr;
}

.ops-risk-overview .risk-metric-strip,
.ops-risk-overview .return-stat-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px;
}

.ops-risk-overview .risk-metric-box,
.ops-risk-overview .return-stat-pill {
    min-height: 62px;
    padding: 10px 11px;
    border: 1px solid #dbe4ef;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
}

.ops-risk-overview .metric-red,
.ops-risk-overview .metric-rose {
    border-left-color: #dc2626;
    background: linear-gradient(180deg, #fff, #fff7f7);
}

.ops-risk-overview .metric-orange,
.ops-risk-overview .metric-amber,
.ops-risk-overview .metric-pink {
    border-left-color: #d97706;
    background: linear-gradient(180deg, #fff, #fffaf2);
}

.ops-risk-overview .metric-blue {
    border-left-color: #2563eb;
    background: linear-gradient(180deg, #fff, #f4f8ff);
}

.ops-risk-overview .metric-green {
    border-left-color: #059669;
    background: linear-gradient(180deg, #fff, #f1fff8);
}

.ops-risk-overview .metric-muted {
    border-left-color: #94a3b8;
}

.ops-risk-overview .risk-metric-box strong,
.ops-risk-overview .return-stat-pill strong {
    margin-top: 6px;
    font-size: 21px;
    font-weight: 900;
}

.ops-risk-filter-card {
    margin-bottom: 10px;
    padding: 10px 12px;
}

.shipment-scope-card.ops-risk-filter-card {
    display: grid;
    grid-template-columns: auto minmax(360px, 1fr) minmax(520px, auto);
    align-items: end;
    gap: 8px 12px;
}

.shipment-scope-card.ops-risk-filter-card .shipment-scope-copy p {
    display: none;
}

.shipment-scope-card.ops-risk-filter-card .shipment-scope-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: end;
}

.shipment-scope-card.ops-risk-filter-card .period-current-note {
    grid-column: 1 / -1;
    min-height: 20px;
    margin: 0;
}

.ops-risk-quick-filter .risk-filter-pills,
.ops-risk-quick-filter .return-scope-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ops-risk-quick-filter .risk-filter-pills a,
.ops-risk-quick-filter .return-scope-pills a {
    min-height: 30px;
    border-radius: 7px;
    background: #f8fbff;
}

.ops-risk-table-card {
    min-height: 560px;
    overflow: hidden;
}

.ops-risk-table-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 10px 14px;
    border-bottom: 1px solid #e8eef6;
}

.ops-risk-table-wrap {
    max-height: calc(100vh - 315px);
    min-height: 520px;
    overflow: auto;
}

.ops-risk-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.ops-risk-table tbody tr {
    height: 96px;
}

.ops-risk-table thead th {
    position: sticky;
    top: 0;
    z-index: 7;
    height: 38px;
    border-bottom: 1px solid #dbe4ef;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.ops-risk-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8eef6;
    background: #fff !important;
    vertical-align: top;
}

.ops-risk-table tr.ops-risk-row td:first-child {
    box-shadow: inset 4px 0 0 #cbd5e1;
}

.shipment-risk-center-table.ops-risk-table tr.tone-critical td:first-child,
.shipment-risk-center-table.ops-risk-table tr.tone-critical td:nth-child(3),
.shipment-risk-center-table.ops-risk-table tr.tone-danger td:first-child,
.shipment-risk-center-table.ops-risk-table tr.tone-danger td:nth-child(3),
.return-risk-table.ops-risk-table tr.row-danger td:first-child,
.return-risk-table.ops-risk-table tr.row-danger td:nth-child(5) {
    background: #fff1f2 !important;
}

.shipment-risk-center-table.ops-risk-table tr.tone-warn td:first-child,
.shipment-risk-center-table.ops-risk-table tr.tone-warn td:nth-child(3),
.shipment-risk-center-table.ops-risk-table tr.tone-offwork td:first-child,
.shipment-risk-center-table.ops-risk-table tr.tone-offwork td:nth-child(3),
.return-risk-table.ops-risk-table tr.row-warn td:first-child,
.return-risk-table.ops-risk-table tr.row-warn td:nth-child(5) {
    background: #fff7ed !important;
}

.shipment-risk-center-table.ops-risk-table tr.tone-info td:first-child,
.shipment-risk-center-table.ops-risk-table tr.tone-info td:nth-child(5),
.return-risk-table.ops-risk-table tr.row-focus td:first-child,
.return-risk-table.ops-risk-table tr.row-focus td:nth-child(5) {
    background: #eff6ff !important;
}

.shipment-risk-center-table.ops-risk-table tr.tone-good td:first-child,
.return-risk-table.ops-risk-table tr.row-ok td:first-child {
    background: #ecfdf5 !important;
}

.ops-risk-table .cell-order-no a,
.ops-risk-table .order-link-strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #0b63ce;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ops-risk-table .shop-name-main,
.ops-risk-table .table-subtext:first-of-type {
    margin-top: 5px;
}

.ops-risk-table .return-product-title {
    display: -webkit-box;
    width: 100%;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 100%;
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    word-break: break-all;
    cursor: pointer;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ops-risk-table button.return-product-title:hover,
.ops-risk-table button.return-product-title:focus-visible {
    color: #0b63ce;
    outline: none;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ops-risk-table .return-product-title.muted {
    color: #94a3b8;
    font-weight: 600;
}

.ops-risk-table .risk-level,
.ops-risk-table .risk-reason-tag,
.ops-risk-table .risk-status-chip,
.ops-risk-table .pill {
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.35;
}

.ops-risk-table .risk-money-cell strong,
.ops-risk-table .loss-amount {
    font-size: 16px;
    font-weight: 900;
}

.ops-risk-table .risk-money-cell span {
    font-weight: 900;
}

.ops-risk-table td.ops-main-actions {
    position: sticky;
    right: 0;
    z-index: 6;
    min-width: 118px;
    background: linear-gradient(90deg, rgba(255,255,255,.94), #fff 20%) !important;
    box-shadow: -10px 0 18px rgba(15, 23, 42, .07);
}

.ops-risk-table th:last-child {
    position: sticky;
    right: 0;
    z-index: 9;
    background: #f8fafc;
    box-shadow: -10px 0 18px rgba(15, 23, 42, .07);
}

.ops-main-actions .quick-toggle,
.ops-main-actions .primary-button {
    min-height: 32px;
    border-radius: 7px;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
}

.ops-main-actions a:not(.primary-button) {
    min-height: 30px;
    border-radius: 7px;
}

/* Return SOP table: keep columns predictable and make the product title useful without crowding actions. */
.return-workbench-table-section .inline-notice {
    margin: 8px 12px 10px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.return-risk-table.ops-risk-table {
    width: 1490px;
    min-width: 1490px;
    table-layout: fixed;
}

.return-risk-table.ops-risk-table th:nth-child(1),
.return-risk-table.ops-risk-table td:nth-child(1) { width: 315px; }
.return-risk-table.ops-risk-table th:nth-child(2),
.return-risk-table.ops-risk-table td:nth-child(2) { width: 170px; }
.return-risk-table.ops-risk-table th:nth-child(3),
.return-risk-table.ops-risk-table td:nth-child(3) { width: 230px; }
.return-risk-table.ops-risk-table th:nth-child(4),
.return-risk-table.ops-risk-table td:nth-child(4) { width: 135px; }
.return-risk-table.ops-risk-table th:nth-child(5),
.return-risk-table.ops-risk-table td:nth-child(5) { width: 165px; }
.return-risk-table.ops-risk-table th:nth-child(6),
.return-risk-table.ops-risk-table td:nth-child(6) { width: 135px; }
.return-risk-table.ops-risk-table th:nth-child(7),
.return-risk-table.ops-risk-table td:nth-child(7) { width: 220px; }
.return-risk-table.ops-risk-table th:nth-child(8),
.return-risk-table.ops-risk-table td:nth-child(8) { width: 120px; }

.return-risk-table.ops-risk-table tr.row-danger td:first-child,
.return-risk-table.ops-risk-table tr.row-warn td:first-child,
.return-risk-table.ops-risk-table tr.row-focus td:first-child,
.return-risk-table.ops-risk-table tr.row-ok td:first-child {
    background: #fff !important;
}

.return-risk-table.ops-risk-table tr.row-danger td:first-child {
    box-shadow: inset 4px 0 0 #ef4444;
}

.return-risk-table.ops-risk-table tr.row-warn td:first-child {
    box-shadow: inset 4px 0 0 #f59e0b;
}

.return-risk-table.ops-risk-table tr.row-focus td:first-child {
    box-shadow: inset 4px 0 0 #3b82f6;
}

.return-risk-table.ops-risk-table tr.row-ok td:first-child {
    box-shadow: inset 4px 0 0 #10b981;
}

.return-risk-table.ops-risk-table .return-product-title {
    margin-top: 7px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.return-product-title-popover {
    position: fixed;
    z-index: 9999;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .22);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
    word-break: break-all;
    pointer-events: none;
}

.return-product-title-popover .copy-hint {
    display: block;
    margin-top: 6px;
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 600;
}

.return-product-copy-toast {
    position: fixed;
    z-index: 10000;
    padding: 7px 10px;
    border-radius: 999px;
    background: #065f46;
    color: #fff;
    box-shadow: 0 12px 30px rgba(6, 95, 70, .24);
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}

@media (max-width: 1320px) {
    .shipment-scope-card.ops-risk-filter-card {
        grid-template-columns: 1fr;
    }

    .shipment-scope-card.ops-risk-filter-card .shipment-scope-form {
        flex-wrap: wrap;
    }
}

/* 店铺数据：限制11与上货决策增强 */
.shop-decision-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shop-decision-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.shop-decision-card {
    display: block;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #dbe6f3;
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.shop-decision-card span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.shop-decision-card strong {
    display: block;
    margin-top: 5px;
    font-size: 23px;
    font-weight: 900;
}

.shop-decision-card small {
    display: block;
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-decision-card.green { border-left-color: #10b981; }
.shop-decision-card.green strong { color: #047857; }
.shop-decision-card.blue { border-left-color: #3b82f6; }
.shop-decision-card.blue strong { color: #1d4ed8; }
.shop-decision-card.orange { border-left-color: #f59e0b; }
.shop-decision-card.orange strong { color: #b45309; }
.shop-decision-card.red { border-left-color: #ef4444; }
.shop-decision-card.red strong { color: #dc2626; }
.shop-decision-card.purple { border-left-color: #8b5cf6; }
.shop-decision-card.purple strong { color: #6d28d9; }
.shop-decision-card.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .14), 0 10px 20px rgba(15, 23, 42, .06);
}

.shop-group-overview {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.shop-group-switch {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #fff;
}

.shop-group-switch a {
    padding: 5px 10px;
    border-radius: 6px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.shop-group-switch a.active {
    background: #2563eb;
    color: #fff;
}

.shop-group-wrap {
    max-height: 260px;
    overflow: auto;
}

.shop-group-table {
    width: 100%;
    min-width: 860px;
    table-layout: fixed;
}

.shop-group-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
}

.shop-group-table th,
.shop-group-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5edf6;
    text-align: left;
}

.info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.shop-basic-stats {
    margin-bottom: 10px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #fff;
}

.shop-basic-stats summary {
    cursor: pointer;
    padding: 9px 12px;
    color: #334155;
    font-weight: 900;
}

.shop-basic-stats .metric-grid {
    padding: 0 12px 12px;
}

.shop-filter-panel {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #fff;
}

.shop-decision-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.shop-decision-tabs a {
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #f8fbff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.shop-decision-tabs a.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.shop-filter-row {
    align-items: end;
}

.shop-filter-row label {
    min-width: 150px;
}

.shop-decision-table-card {
    overflow: hidden;
}

.shop-table-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 10px 14px;
    border-bottom: 1px solid #e5edf6;
}

.shop-decision-table-wrap {
    max-height: calc(100vh - 430px);
    min-height: 500px;
    overflow: auto;
}

.shop-decision-table {
    min-width: 1760px;
    table-layout: fixed;
}

.shop-decision-table th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f8fafc;
}

.shop-decision-table th:nth-child(1) { width: 90px; }
.shop-decision-table th:nth-child(2) { width: 110px; }
.shop-decision-table th:nth-child(3) { width: 230px; }
.shop-decision-table th:nth-child(4) { width: 120px; }
.shop-decision-table th:nth-child(5) { width: 105px; }
.shop-decision-table th:nth-child(6) { width: 105px; }
.shop-decision-table th:nth-child(7) { width: 95px; }
.shop-decision-table th:nth-child(8) { width: 110px; }
.shop-decision-table th:nth-child(9) { width: 105px; }
.shop-decision-table th:nth-child(10) { width: 105px; }
.shop-decision-table th:nth-child(11) { width: 95px; }
.shop-decision-table th:nth-child(12) { width: 120px; }
.shop-decision-table th:nth-child(13) { width: 220px; }
.shop-decision-table th:nth-child(14) { width: 210px; }
.shop-decision-table th:nth-child(15) { width: 130px; }

.shop-decision-table td {
    vertical-align: top;
}

.shop-name-main {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.decision-badge,
.upload-status-not_started,
.upload-status-uploading,
.upload-status-paused,
.limit11-status-normal,
.limit11-status-limited_11,
.limit11-status-unknown {
    border-radius: 999px;
    font-weight: 900;
}

.decision-green,
.decision-success { background: #dcfce7; color: #047857; }
.decision-blue,
.decision-info { background: #dbeafe; color: #1d4ed8; }
.decision-orange,
.decision-warn { background: #ffedd5; color: #b45309; }
.decision-red,
.decision-danger { background: #fee2e2; color: #dc2626; }
.decision-purple { background: #ede9fe; color: #6d28d9; }
.decision-muted { background: #f1f5f9; color: #475569; }
.upload-status-not_started { background: #f1f5f9; color: #334155; }
.upload-status-uploading { background: #dbeafe; color: #1d4ed8; }
.upload-status-paused { background: #ffedd5; color: #b45309; }
.limit11-status-normal { background: #dcfce7; color: #047857; }
.limit11-status-limited_11 { background: #fee2e2; color: #dc2626; }
.limit11-status-unknown { background: #e0f2fe; color: #0369a1; }

.shop-note-cell .upload-note-cell {
    max-width: 190px;
    overflow: hidden;
    color: #475569;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-action-cell {
    position: sticky;
    right: 0;
    z-index: 3;
    background: linear-gradient(90deg, rgba(255,255,255,.92), #fff 22%);
    box-shadow: -10px 0 18px rgba(15, 23, 42, .05);
}

.shop-decision-table th:last-child {
    position: sticky;
    right: 0;
    z-index: 5;
    background: #f8fafc;
}

.compact-action-button {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    white-space: nowrap;
}

.shop-batch-content {
    width: min(980px, calc(100vw - 32px));
    max-width: min(980px, calc(100vw - 32px));
    max-height: min(86vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.shop-batch-content .modal-header,
.shop-batch-content .modal-footer {
    flex: 0 0 auto;
}

.shop-batch-content .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 12px;
}

.shop-batch-content .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 0 -10px 18px rgba(15, 23, 42, .06);
}

.shop-batch-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(280px, 320px);
    gap: 14px;
}

.shop-batch-shops textarea {
    min-height: 210px;
    resize: vertical;
}

.shop-batch-controls {
    display: grid;
    gap: 10px;
}

.shop-batch-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.shop-batch-summary span {
    padding: 5px 10px;
    border: 1px solid #dbe6f3;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.shop-batch-preview-wrap {
    max-height: min(32vh, 280px);
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.shop-batch-preview-table {
    min-width: 860px;
}

.batch-status {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.batch-executable { background: #dcfce7; color: #047857; }
.batch-not_found,
.batch-duplicate { background: #fee2e2; color: #dc2626; }
.batch-blocked { background: #fef3c7; color: #b45309; }
.batch-already_target { background: #f1f5f9; color: #475569; }

@media (max-width: 1280px) {
    .shop-decision-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .shop-batch-grid {
        grid-template-columns: 1fr;
    }
}

.compact-page-header {
    align-items: flex-start;
    gap: 16px;
}

.corporate-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.corporate-stat {
    display: flex;
    min-height: 66px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #d8e3f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
}

.corporate-stat span {
    color: #52627a;
    font-size: 12px;
}

.corporate-stat strong {
    color: #0f172a;
    font-size: 22px;
}

.corporate-stat.orange { border-left-color: #f59e0b; }
.corporate-stat.red { border-left-color: #ef4444; }
.corporate-stat.green { border-left-color: #10b981; }
.corporate-stat.blue { border-left-color: #2563eb; }

.corporate-finance-strip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #f8fbff;
}

.corporate-finance-strip h2,
.corporate-list-card h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.corporate-finance-strip p,
.corporate-list-card p {
    margin: 0;
    color: #52627a;
    font-size: 13px;
}

.corporate-batch-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.corporate-batch-metrics span {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid #d3dfed;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 12px;
}

.corporate-chain {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.corporate-chain-step {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
}

.corporate-chain-step.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.corporate-chain-step span {
    font-weight: 700;
}

.corporate-chain-step small {
    color: #64748b;
    font-size: 12px;
}

.corporate-chain-step b {
    color: #2563eb;
}

.corporate-filter-grid {
    grid-template-columns: minmax(240px, 1.4fr) minmax(180px, .8fr) auto auto;
}

.corporate-list-card {
    margin-top: 12px;
}

.corporate-table-scroll {
    max-height: calc(100vh - 340px);
    min-height: 420px;
}

.corporate-table {
    min-width: 1450px;
}

.corporate-table th,
.corporate-table td {
    vertical-align: top;
}

.corporate-row {
    border-left: 4px solid transparent;
}

.corporate-row.tone-red { border-left-color: #ef4444; background: #fff7f7; }
.corporate-row.tone-orange { border-left-color: #f59e0b; }
.corporate-row.tone-blue { border-left-color: #2563eb; }
.corporate-row.tone-green { border-left-color: #10b981; }

.identity-cell {
    display: grid;
    gap: 4px;
    min-width: 210px;
}

.identity-cell small,
.corporate-table td small {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.sticky-action-col {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -8px 0 14px rgba(15, 23, 42, 0.06);
}

.corporate-row.tone-red .sticky-action-col {
    background: #fff7f7;
}

.action-stack {
    min-width: 116px;
}

.btn.success {
    border-color: #059669;
    background: #059669;
    color: #fff;
}

.corporate-create-form,
.corporate-detail-grid {
    display: grid;
    gap: 12px;
}

.corporate-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.summary-tile {
    padding: 12px 14px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #fff;
}

.summary-tile span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 5px;
}

.summary-tile strong {
    color: #0f172a;
    font-size: 18px;
}

.inline-warning {
    margin-bottom: 10px;
    padding: 9px 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
}

.grid-full {
    grid-column: 1 / -1;
}

.attachment-upload-form {
    display: grid;
    grid-template-columns: minmax(200px, .8fr) minmax(260px, 1.2fr) minmax(160px, .6fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

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

.attachment-box {
    min-height: 90px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.attachment-box h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.attachment-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e2e8f0;
}

.attachment-row:first-of-type {
    border-top: 0;
}

.attachment-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .corporate-finance-strip,
    .compact-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .corporate-detail-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attachment-upload-form,
    .corporate-filter-grid {
        grid-template-columns: 1fr;
    }
}

.corporate-shell {
    display: grid;
    gap: 10px;
}

.corporate-hero {
    margin-bottom: 0;
}

.corporate-principle {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    font-weight: 700;
}

.compact-metric-row {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    margin: 0;
}

.compact-metric-row .corporate-stat {
    min-height: 58px;
    padding: 9px 11px;
}

.compact-metric-row .corporate-stat strong {
    font-size: 20px;
}

.corporate-node-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 8px;
}

.corporate-node-card {
    display: grid;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
}

.corporate-node-card.active {
    border-color: #2563eb;
    box-shadow: inset 3px 0 0 #2563eb;
    background: #f8fbff;
}

.node-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.node-head b {
    color: #0f172a;
}

.corporate-node-card p {
    margin: 0;
    min-height: 28px;
    color: #52627a;
    font-size: 12px;
}

.node-role {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 800;
}

.node-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.mini-badge.blue { background: #dbeafe; color: #1d4ed8; }
.mini-badge.orange { background: #ffedd5; color: #c2410c; }
.mini-badge.red { background: #fee2e2; color: #dc2626; }
.mini-badge.green { background: #dcfce7; color: #047857; }

.corporate-filter-card {
    margin-top: 0;
}

.corporate-execution-table {
    min-width: 1320px;
}

.corporate-id-cell strong {
    font-size: 14px;
}

.corporate-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(50px, 1fr));
    gap: 8px 10px;
    min-width: 250px;
}

.corporate-progress span {
    position: relative;
    padding-top: 16px;
    color: #64748b;
    font-size: 11px;
    text-align: center;
}

.corporate-progress span::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 10px;
    height: 10px;
    transform: translateX(-50%);
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
}

.corporate-progress span.done::before {
    border-color: #10b981;
    background: #10b981;
}

.corporate-progress span.active::before {
    border-color: #2563eb;
    background: #2563eb;
}

.corporate-finance-groups {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #fff;
}

.finance-group-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.finance-group-card {
    min-height: 130px;
    padding: 12px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #f8fafc;
}

.finance-task-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e2e8f0;
}

.finance-task-row:first-of-type {
    border-top: 0;
}

.finance-task-row small {
    display: block;
    color: #64748b;
}

.finance-view-all {
    margin-top: 8px;
}

.corporate-create-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, 520px);
    gap: 18px;
    align-items: start;
    max-width: 1360px;
    margin: 0 auto;
}

.corporate-create-guide {
    padding: 12px 0;
}

.corporate-create-guide h1 {
    margin-bottom: 6px;
}

.draft-outcome-card {
    margin-top: 22px;
    padding: 18px;
    border: 1px dashed #93c5fd;
    border-radius: 8px;
    background: #f8fbff;
}

.draft-outcome-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.corporate-create-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overflow-x: hidden;
}

.corporate-create-panel label,
.corporate-detail-section label {
    min-width: 0;
}

.corporate-create-panel input,
.corporate-create-panel select,
.corporate-create-panel textarea,
.corporate-detail-section input,
.corporate-detail-section select,
.corporate-detail-section textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.corporate-detail-section input:disabled,
.corporate-detail-section select:disabled,
.corporate-detail-section textarea:disabled,
.corporate-detail-section button:disabled {
    cursor: not-allowed;
    border-color: #d7dee8;
    background: #f3f6fa;
    color: #7b8794;
}

.is-readonly-field {
    background: #f8fafc;
}

.corporate-create-panel .form-grid,
.corporate-detail-section .form-grid {
    padding: 0;
    gap: 10px 12px;
}

.corporate-create-panel .form-grid.two-cols,
.corporate-detail-section .form-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.corporate-detail-section .form-grid.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.corporate-detail-section .form-grid.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-form-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d8e3f0;
    border-left: 3px solid #2563eb;
    border-radius: 8px;
    background: #f8fbff;
}

.mini-form-section h3 {
    margin: 0;
}

.drawer-style-actions {
    position: sticky;
    bottom: -16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 0 0;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(255,255,255,0.84), #fff 28%);
    z-index: 5;
}

.corporate-detail-page {
    display: grid;
    gap: 12px;
}

.detail-sticky-head {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: rgba(248, 251, 255, 0.96);
    backdrop-filter: blur(8px);
}

.detail-sticky-head h1 {
    margin: 8px 0 4px;
}

.detail-sticky-head p {
    margin: 0;
    color: #52627a;
}

.corporate-detail-stack {
    display: grid;
    gap: 12px;
}

.corporate-detail-section {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #fff;
}

.corporate-detail-section.primary-section {
    border-left: 4px solid #2563eb;
}

.corporate-detail-section.finance-gate-section {
    border-left: 4px solid #ef4444;
}

.section-side h2 {
    margin: 0 0 8px;
    font-size: 17px;
}

.section-side p {
    margin: 0;
    color: #52627a;
    font-size: 13px;
    line-height: 1.6;
}

.node-guidance {
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
    font-size: 12px;
    line-height: 1.7;
}

.node-guidance strong {
    color: #1e40af;
}

.section-main {
    display: grid;
    gap: 10px;
}

.attachment-inline-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.attachment-chip-group {
    display: grid;
    gap: 5px;
    padding: 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.attachment-chip {
    display: inline-flex;
    width: fit-content;
    color: #2563eb;
    font-size: 12px;
    text-decoration: none;
}

.quick-upload-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
}

.quick-upload-row > span {
    color: #1e40af;
    font-weight: 800;
}

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

.inline-upload-form select {
    min-width: 180px;
}

.attachment-owner {
    display: block;
    margin: -2px 0 8px;
    color: #64748b;
    font-size: 12px;
}

.hidden-upload-form {
    display: none;
}

@media (max-width: 1280px) {
    .finance-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .corporate-create-shell,
    .corporate-detail-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 880px) {
    .finance-group-grid,
    .corporate-detail-summary {
        grid-template-columns: 1fr;
    }

    .quick-upload-row,
    .detail-sticky-head {
        flex-direction: column;
        align-items: stretch;
    }
}
/* Corporate order: order-registration style workflow */
.corporate-v3,
.corporate-detail-v3 {
    --corp-blue: #2563eb;
    --corp-blue-soft: #eff6ff;
    --corp-orange: #d97706;
    --corp-orange-soft: #fff7ed;
    --corp-red: #dc2626;
    --corp-red-soft: #fef2f2;
    --corp-green: #059669;
    --corp-green-soft: #ecfdf5;
    --corp-border: #d7e2f2;
    color: #102033;
}

.corporate-v3 .compact-page-header,
.corporate-detail-v3 .compact-page-header {
    align-items: flex-start;
    margin-bottom: 10px;
}

.corporate-prototype-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #174ea6;
    font-size: 12px;
    font-weight: 900;
}

.corporate-prototype-kicker b {
    color: var(--corp-blue);
}

.corporate-v3 .page-actions,
.corporate-detail-v3 .page-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.corporate-v3 .btn,
.corporate-detail-v3 .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid #cbd8e6;
    border-radius: 7px;
    padding: 7px 12px;
    background: #fff;
    color: #17324d;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
}

.corporate-v3 .btn.primary,
.corporate-detail-v3 .btn.primary {
    border-color: var(--corp-blue);
    background: var(--corp-blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.corporate-v3 .btn.secondary,
.corporate-detail-v3 .btn.secondary {
    background: #fff;
}

.corporate-v3 .btn.danger,
.corporate-detail-v3 .btn.danger {
    border-color: #fecaca;
    color: var(--corp-red);
    background: #fff7f7;
}

.corporate-v3 .btn.small,
.corporate-detail-v3 .btn.small {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
}

.corporate-view-strip,
.corporate-action-board,
.corporate-filter-card,
.corporate-table-card,
.corporate-workbench {
    background: #fff;
    border: 1px solid var(--corp-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.corporate-view-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    margin: 10px 0;
}

.corporate-view-tabs,
.corporate-view-summary,
.action-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.corporate-view-tabs a,
.action-chip,
.corporate-filter-card select,
.corporate-filter-card input {
    border: 1px solid #c9d8ec;
    border-radius: 7px;
    background: #fff;
}

.corporate-view-tabs a,
.action-chip {
    padding: 7px 10px;
    color: #16314f;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.corporate-view-tabs a.active,
.action-chip.active {
    border-color: var(--corp-blue);
    background: var(--corp-blue-soft);
    color: var(--corp-blue);
}

.corporate-view-summary span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f5f8fc;
    font-size: 12px;
}

.corporate-view-summary span.blue b,
.action-chip.blue b { color: var(--corp-blue); }
.corporate-view-summary span.orange b,
.action-chip.orange b { color: var(--corp-orange); }
.corporate-view-summary span.red b,
.action-chip.red b { color: var(--corp-red); }
.corporate-view-summary span.green b,
.action-chip.green b { color: var(--corp-green); }
.corporate-view-summary em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.corporate-action-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.corporate-board-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.corporate-board-title strong {
    font-size: 16px;
}

.corporate-board-title span {
    color: #64748b;
    font-size: 13px;
}

.corporate-action-card {
    min-width: 0;
    position: relative;
    padding: 11px 12px 12px 48px;
    border: 1px solid #e1e9f5;
    border-radius: 8px;
    background: #fbfdff;
    border-left: 4px solid var(--corp-blue);
    min-height: 96px;
}

.corporate-action-card::before {
    content: "客";
    position: absolute;
    left: 14px;
    top: 18px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--corp-blue-soft);
    color: var(--corp-blue);
    font-weight: 900;
    font-size: 13px;
}

.corporate-action-card:nth-of-type(3) {
    border-left-color: #8b5cf6;
}

.corporate-action-card:nth-of-type(3)::before {
    content: "财";
    background: #f1efff;
    color: #6d5bd0;
}

.corporate-action-card:nth-of-type(4) {
    border-left-color: var(--corp-orange);
}

.corporate-action-card:nth-of-type(4)::before {
    content: "外";
    background: var(--corp-orange-soft);
    color: var(--corp-orange);
}

.corporate-action-card:nth-of-type(5) {
    border-left-color: var(--corp-red);
}

.corporate-action-card:nth-of-type(5)::before {
    content: "险";
    background: var(--corp-red-soft);
    color: var(--corp-red);
}

.action-card-head strong {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
}

.action-card-head small {
    display: block;
    min-height: 32px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.action-chip-row {
    margin-top: 8px;
}

.action-chip {
    padding: 5px 8px;
    font-size: 12px;
}

.corporate-filter-card {
    padding: 10px;
    margin-bottom: 10px;
}

.corporate-filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.corporate-filter-title strong {
    margin-right: 8px;
    font-size: 15px;
}

.corporate-filter-title span,
.corporate-filter-title em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.corporate-filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 110px 140px 140px 130px 150px 130px auto auto;
    gap: 8px;
    align-items: end;
}

.corporate-filter-grid.advanced {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    margin-top: 10px;
}

.corporate-filter-grid label {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.corporate-filter-card input,
.corporate-filter-card select {
    min-height: 36px;
    padding: 0 10px;
    color: #0f172a;
}

.corporate-advanced-filter {
    margin-top: 8px;
    border-top: 1px dashed #d6e1ef;
    padding-top: 8px;
}

.corporate-advanced-filter summary {
    color: var(--corp-blue);
    cursor: pointer;
    font-weight: 700;
}

.corporate-table-card {
    overflow: hidden;
}

.table-card-head {
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e1e9f5;
}

.table-card-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.table-card-head p {
    margin: 0;
    color: #64748b;
}

.corporate-table-scroll {
    overflow: auto;
    max-height: calc(100vh - 360px);
}

.corporate-v3-table {
    width: 100%;
    min-width: 1240px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.corporate-v3-table .col-order { width: 220px; }
.corporate-v3-table .col-money { width: 125px; }
.corporate-v3-table .col-blocker { width: 150px; }
.corporate-v3-table .col-role { width: 90px; }
.corporate-v3-table .col-chain { width: 395px; }
.corporate-v3-table .col-next { width: 160px; }
.corporate-v3-table .col-action { width: 100px; }

.corporate-v3-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #dbe6f4;
    text-align: left;
    font-size: 13px;
}

.corporate-v3-table td {
    vertical-align: top;
    padding: 12px;
    border-bottom: 1px solid #e4edf8;
    background: #fff;
    overflow-wrap: anywhere;
}

.corporate-v3-table tr.tone-red td:first-child,
.corporate-v3-table tr.tone-orange td:first-child,
.corporate-v3-table tr.tone-blue td:first-child,
.corporate-v3-table tr.tone-green td:first-child {
    border-left: 4px solid var(--corp-blue);
}
.corporate-v3-table tr.tone-red td:first-child { border-left-color: var(--corp-red); }
.corporate-v3-table tr.tone-orange td:first-child { border-left-color: var(--corp-orange); }
.corporate-v3-table tr.tone-green td:first-child { border-left-color: var(--corp-green); }

.corp-main-cell {
    min-width: 0;
    width: auto;
}

.corp-main-cell strong,
.corp-main-cell span,
.corporate-v3-table td > span,
.corporate-v3-table td > strong,
.corporate-v3-table td > p {
    display: block;
}

.corp-main-cell .order-link {
    color: var(--corp-blue);
    font-weight: 800;
}

.corp-money-cell {
    width: 130px;
}

.corp-money-cell strong {
    font-size: 17px;
    color: #0f172a;
}

.corp-money-cell span {
    color: #475569;
    font-size: 12px;
}

.corp-blocker-cell {
    width: 150px;
}

.corp-role-cell {
    width: 92px;
}

.role-badge {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--corp-blue-soft);
    color: var(--corp-blue);
    font-size: 12px;
    font-weight: 900;
}

.role-badge.orange {
    background: var(--corp-orange-soft);
    color: var(--corp-orange);
}

.role-badge.red {
    background: var(--corp-red-soft);
    color: var(--corp-red);
}

.role-badge.green {
    background: var(--corp-green-soft);
    color: var(--corp-green);
}

.corp-role-cell small {
    display: block;
    margin-top: 5px;
    color: #64748b;
}

.status-pill {
    display: inline-flex !important;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--corp-blue);
    font-size: 12px;
    font-weight: 800;
}
.status-pill.orange { background: var(--corp-orange-soft); color: var(--corp-orange); }
.status-pill.red { background: var(--corp-red-soft); color: var(--corp-red); }
.status-pill.green { background: var(--corp-green-soft); color: var(--corp-green); }

.corporate-chain {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.corporate-chain span {
    position: relative;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
}
.corporate-chain span.done { background: var(--corp-green-soft); color: var(--corp-green); }
.corporate-chain span.current { background: var(--corp-blue-soft); color: var(--corp-blue); font-weight: 800; }

.chain-diagnosis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.chain-diagnosis div {
    min-height: 42px;
    padding: 6px 8px;
    border: 1px solid #e2eaf5;
    border-radius: 7px;
    background: #fbfdff;
}

.chain-diagnosis span {
    display: block !important;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
}

.chain-diagnosis b {
    display: block;
    color: #102033;
    font-size: 12px;
    line-height: 1.35;
}

.corp-next-cell {
    width: 170px;
}

.corp-next-cell strong {
    font-size: 14px;
}

.corp-next-cell span,
.corp-next-cell .gate-note {
    display: block;
    margin-top: 3px;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
}

.corp-next-cell .gate-note {
    color: var(--corp-red);
}

.row-actions {
    position: sticky;
    right: 0;
    z-index: 1;
    width: 100px;
    min-width: 100px;
    background: linear-gradient(90deg, rgba(255,255,255,.9), #fff 18%) !important;
}

.corporate-v3-table .row-actions {
    display: grid;
    gap: 6px;
    align-content: start;
    white-space: normal;
}

.corporate-v3-table .row-actions .btn,
.corporate-v3-table .row-actions form {
    width: 100%;
    margin: 0;
}

.corporate-v3-table .row-actions form button {
    width: 100%;
}

.corporate-detail-v3 input[type="checkbox"],
.corporate-detail-v3 .corporate-detail-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: var(--corp-blue);
}

.corporate-detail-v3 label:has(input[type="checkbox"]) {
    align-content: start;
    justify-items: start;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, .35);
}

.corporate-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    width: min(520px, 94vw);
    height: 100vh;
    transform: translateX(105%);
    transition: transform .22s ease;
    background: #fff;
    box-shadow: -20px 0 50px rgba(15, 23, 42, .16);
}

.corporate-drawer.open {
    transform: translateX(0);
}

.corporate-drawer .btn,
.corporate-drawer .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid #cbd8e6;
    border-radius: 7px;
    padding: 7px 12px;
    background: #fff;
    color: #17324d;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
}

.corporate-drawer .btn.primary {
    border-color: var(--corp-blue);
    background: var(--corp-blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.corporate-drawer .icon-btn {
    width: 32px;
    min-height: 32px;
    padding: 0;
    font-size: 18px;
}

.corporate-drawer input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: var(--corp-blue);
}

.drawer-panel {
    height: 100%;
    overflow: auto;
    padding: 20px;
}

.drawer-head,
.drawer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.drawer-actions {
    position: sticky;
    bottom: 0;
    margin: 16px -20px -20px;
    padding: 14px 20px;
    border-top: 1px solid #e1e9f5;
    background: #fff;
}

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

.drawer-form-grid label {
    display: grid;
    gap: 5px;
    font-weight: 700;
    color: #334155;
}

.drawer-form-grid .full {
    grid-column: 1 / -1;
}

.drawer-note {
    display: grid;
    gap: 4px;
    margin: 10px 0 14px;
    padding: 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.corporate-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}

.corporate-form-main {
    min-width: 0;
}

.order-form-section {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--corp-border);
    border-radius: 8px;
    background: #fff;
}

.section-title-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.section-title-line h2 {
    margin: 0 0 2px;
    font-size: 18px;
}

.section-title-line p {
    margin: 0;
    color: #64748b;
}

.step-dot {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f2a4a;
    color: #fff;
    font-weight: 800;
}

.node-guidance.compact,
.soft-warning {
    margin-bottom: 12px;
    padding: 9px 10px;
    border-radius: 7px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.soft-warning {
    background: var(--corp-orange-soft);
    border-color: #fed7aa;
    color: #92400e;
}

.corporate-assist {
    position: sticky;
    top: 78px;
    display: grid;
    gap: 10px;
}

.assist-card {
    padding: 12px;
    border: 1px solid var(--corp-border);
    border-radius: 8px;
    background: #fff;
}

.assist-card.highlight {
    background: #f8fbff;
}

.assist-card span {
    display: block;
    color: #64748b;
}

.assist-card strong {
    display: block;
    margin: 4px 0;
    color: var(--corp-green);
    font-size: 24px;
}

.assist-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.assist-card p {
    margin: 0 0 6px;
    color: #334155;
}

.assist-card.action-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.progress-line {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.progress-line i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--corp-blue);
}

.warning-text {
    color: var(--corp-orange) !important;
    font-weight: 700;
}

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

.attachment-box {
    padding: 10px;
    border: 1px solid #e1e9f5;
    border-radius: 8px;
    background: #fbfdff;
}

.attachment-head,
.attachment-row,
.attachment-upload-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.attachment-head span,
.attachment-row small,
.muted {
    color: #64748b;
}

.attachment-row {
    margin: 8px 0;
    padding: 8px;
    border-radius: 7px;
    background: #fff;
}

.attachment-upload-line input[type="file"] {
    min-width: 0;
    flex: 1;
}

.full-width {
    width: 100%;
}

@media (max-width: 1300px) {
    .corporate-action-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .corporate-filter-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
    .corporate-workbench {
        grid-template-columns: 1fr;
    }
    .corporate-assist {
        position: static;
    }
}

@media (max-width: 800px) {
    .corporate-view-strip,
    .corporate-workbench {
        display: block;
    }
    .corporate-action-board,
    .corporate-filter-grid,
    .corporate-attachment-grid {
        grid-template-columns: 1fr;
    }
}

/* Corporate order final polish: keep the list page compact and make drawers feel like the same product. */
.corporate-v3 {
    padding-top: 8px;
}

.corporate-v3 .compact-page-header {
    padding-top: 4px;
}

.corporate-drawer .drawer-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    overflow: auto;
    padding: 22px 24px 0;
}

.corporate-drawer .drawer-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.corporate-drawer h2 {
    margin: 0;
    color: #172033;
    font-size: 24px;
    line-height: 1.2;
}

.corporate-drawer .drawer-note {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

.corporate-drawer .drawer-note strong {
    color: #172033;
}

.corporate-drawer .drawer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.corporate-drawer .drawer-form-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.corporate-drawer .drawer-form-grid .full {
    grid-column: 1 / -1;
}

.corporate-drawer .drawer-form-grid label[hidden],
.corporate-drawer .quick-field.is-hidden {
    display: none !important;
}

.corporate-drawer input:not([type="checkbox"]):not([type="file"]),
.corporate-drawer select,
.corporate-drawer textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd8e6 !important;
    border-radius: 7px;
    background: #fff;
    color: #102033;
    box-shadow: none;
    font: inherit;
    outline: none;
}

.corporate-drawer input:not([type="checkbox"]):not([type="file"]):focus,
.corporate-drawer select:focus,
.corporate-drawer textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.corporate-drawer textarea {
    min-height: 92px;
    resize: vertical;
}

.corporate-drawer input[type="file"] {
    width: 100%;
    min-height: 38px;
    padding: 8px;
    border: 1px dashed #cbd8e6;
    border-radius: 7px;
    background: #f8fafc;
    color: #334155;
}

.corporate-drawer .drawer-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 10px -24px 0;
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.corporate-drawer .drawer-actions .btn {
    min-width: 76px;
}

.corporate-drawer .drawer-actions .btn.primary {
    min-width: 140px;
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.corporate-drawer .drawer-actions .btn.secondary {
    background: #fff !important;
    color: #17324d !important;
}

/* Corporate order reference-alignment pass: match the list hierarchy. */
.corporate-v3 .compact-page-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px;
    margin-bottom: 12px;
}

.corporate-v3 .compact-page-header > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.corporate-v3 .page-actions {
    flex: 0 0 auto;
    margin-left: auto;
    padding-top: 2px;
    white-space: nowrap;
}

.corporate-v3 .compact-page-header h1 {
    margin: 2px 0 4px;
    font-size: 26px;
    line-height: 1.18;
}

.corporate-v3 .compact-page-header p {
    max-width: 780px;
    margin: 0;
    color: #526378;
    font-size: 13px;
}

.corporate-v3 .corporate-view-strip {
    padding: 9px 12px;
    margin-bottom: 10px;
}

.corporate-v3 .corporate-action-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-items: start;
    gap: 10px;
    padding: 10px;
}

.corporate-v3 .corporate-action-card {
    align-self: start;
    min-height: 86px;
    height: auto !important;
    max-height: none;
    overflow: visible;
    padding: 10px 10px 11px 44px;
}

.corporate-v3 .action-card-head {
    display: grid;
    gap: 2px;
}

.corporate-v3 .action-card-head small {
    min-height: 16px;
    max-height: 17px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.corporate-v3 .action-chip-row {
    margin-top: 7px;
    gap: 5px;
}

.corporate-v3 .action-chip {
    min-height: 23px;
    padding: 3px 5px;
    font-size: 10px;
    letter-spacing: 0;
}

.corporate-v3 .table-card-head {
    padding: 9px 12px;
}

.corporate-v3 .table-card-head h2 {
    margin-bottom: 2px;
    font-size: 17px;
}

.corporate-v3 .table-card-head p {
    font-size: 12px;
}

.corporate-v3 .corporate-filter-card {
    padding: 8px 10px;
}

.corporate-v3 .corporate-filter-grid {
    grid-template-columns:
        minmax(280px, 1.6fr)
        minmax(120px, .7fr)
        minmax(130px, .75fr)
        minmax(130px, .75fr)
        minmax(130px, .75fr)
        minmax(150px, .9fr)
        minmax(130px, .75fr)
        78px
        70px;
    gap: 8px;
    align-items: end;
}

.corporate-v3 .corporate-filter-grid label {
    gap: 3px;
    font-size: 11px;
}

.corporate-v3 .corporate-filter-card input,
.corporate-v3 .corporate-filter-card select {
    min-height: 32px;
}

.corporate-v3 .corporate-filter-title {
    margin-bottom: 5px;
}

.corporate-v3 .corporate-filter-title strong {
    font-size: 14px;
}

.corporate-v3 .corporate-filter-title span,
.corporate-v3 .corporate-filter-title em {
    font-size: 11px;
}

.corporate-v3 .corporate-advanced-filter {
    margin-top: 5px;
    padding-top: 5px;
}

.corporate-v3 .corporate-advanced-filter summary {
    font-size: 12px;
}

.corporate-v3 .corporate-table-scroll {
    max-height: calc(100vh - 340px);
}

.corporate-v3 .corporate-v3-table {
    min-width: 1360px;
}

.corporate-v3 .corporate-v3-table .col-order { width: 230px; }
.corporate-v3 .corporate-v3-table .col-money { width: 132px; }
.corporate-v3 .corporate-v3-table .col-blocker { width: 160px; }
.corporate-v3 .corporate-v3-table .col-role { width: 98px; }
.corporate-v3 .corporate-v3-table .col-chain { width: 510px; }
.corporate-v3 .corporate-v3-table .col-next { width: 170px; }
.corporate-v3 .corporate-v3-table .col-action { width: 96px; }

.corporate-v3 .corporate-v3-table th {
    padding: 9px 12px;
    font-size: 13px;
}

.corporate-v3 .corporate-v3-table td {
    padding: 10px 12px;
    line-height: 1.42;
}

.corporate-v3 .corporate-chain {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin-bottom: 7px;
}

.corporate-v3 .corporate-chain span {
    display: grid;
    place-items: center;
    min-width: 0;
    height: 23px;
    padding: 0 6px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    background: #eef2f7;
    color: #67758a;
    font-size: 11px;
    font-weight: 760;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corporate-v3 .corporate-chain span.done {
    border-color: #b9ebd0;
    background: var(--corp-green-soft);
    color: var(--corp-green);
}

.corporate-v3 .corporate-chain span.current {
    border-color: #c4dcff;
    background: var(--corp-blue-soft);
    color: var(--corp-blue);
}

.corporate-v3 .corporate-chain span.blocked,
.corporate-v3 .corporate-chain span.block {
    border-color: #ffc6c6;
    background: var(--corp-red-soft);
    color: var(--corp-red);
}

.corporate-v3 .corporate-chain span.warning,
.corporate-v3 .corporate-chain span.warn {
    border-color: #ffd8a8;
    background: var(--corp-orange-soft);
    color: var(--corp-orange);
}

.corporate-v3 .chain-diagnosis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 0;
}

.corporate-v3 .chain-diagnosis div {
    min-height: 44px;
    padding: 6px 7px;
    border-color: #edf2f7;
    background: #fbfdff;
}

.corporate-v3 .chain-diagnosis b {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.corporate-v3 .row-actions {
    position: sticky;
    right: 0;
    z-index: 1;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    width: 96px;
    min-width: 96px;
    padding-left: 12px !important;
    background: linear-gradient(90deg, rgba(255,255,255,.92), #fff 22%) !important;
    white-space: nowrap;
}

.corporate-v3 .row-actions .action-link,
.corporate-v3 .row-actions .link-button.action-link {
    display: inline-flex;
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--corp-blue);
    box-shadow: none;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
    text-decoration: none;
}

.corporate-v3 .row-actions .primary-link {
    color: var(--corp-blue);
}

.corporate-v3 .row-actions .danger-link {
    color: var(--corp-red) !important;
}

.corporate-v3 .row-actions form {
    width: auto;
    margin: 0;
}

.corporate-v3 .row-actions form button {
    width: auto;
}

/* Corporate order detail compaction: editing is the full fallback surface, not a long report page. */
.corporate-detail-v3 .compact-page-header {
    padding-top: 2px;
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.corporate-detail-v3 .compact-page-header h1 {
    margin: 6px 0 3px;
    font-size: 22px;
    line-height: 1.2;
}

.corporate-detail-v3 .compact-page-header p {
    margin: 0;
    color: #526378;
    font-size: 12px;
}

.corporate-detail-v3 .corporate-workbench {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 10px;
}

.corporate-detail-v3 .order-form-section {
    margin-bottom: 8px;
    padding: 10px 12px;
}

.corporate-detail-v3 .section-title-line {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.corporate-detail-v3 .section-title-line h2 {
    font-size: 16px;
}

.corporate-detail-v3 .section-title-line p {
    font-size: 12px;
    line-height: 1.35;
}

.corporate-detail-v3 .step-dot {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.corporate-detail-v3 .node-guidance.compact,
.corporate-detail-v3 .soft-warning {
    margin-bottom: 8px;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.35;
}

.corporate-detail-v3 .form-grid {
    display: grid;
    align-items: start;
}

.corporate-detail-v3 .form-grid.two-cols,
.corporate-detail-v3 .form-grid.three-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.corporate-detail-v3 .form-grid label {
    gap: 4px;
    font-size: 12px;
}

.corporate-detail-v3 .form-grid .span-two {
    grid-column: span 2;
}

.corporate-detail-v3 .order-form-section input,
.corporate-detail-v3 .order-form-section select,
.corporate-detail-v3 .order-form-section textarea {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 13px;
}

.corporate-detail-v3 .order-form-section textarea {
    min-height: 42px;
    max-height: 72px;
    resize: vertical;
}

.corporate-detail-v3 .corporate-assist {
    top: 68px;
    gap: 8px;
}

.corporate-detail-v3 .assist-card {
    padding: 9px 10px;
}

.corporate-detail-v3 .assist-card strong {
    margin: 2px 0;
    font-size: 20px;
}

.corporate-detail-v3 .assist-card h3 {
    margin-bottom: 5px;
    font-size: 14px;
}

.corporate-detail-v3 .assist-card p,
.corporate-detail-v3 .assist-card small,
.corporate-detail-v3 .assist-card span {
    font-size: 12px;
    line-height: 1.35;
}

.corporate-detail-v3 .assist-card.action-card {
    gap: 6px;
}

.corporate-detail-v3 .corporate-attachment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.corporate-detail-v3 .attachment-box {
    padding: 8px;
}

.corporate-detail-v3 .attachment-row {
    margin: 6px 0;
    padding: 6px 7px;
}

@media (max-width: 1050px) {
    .corporate-detail-v3 .form-grid.two-cols,
    .corporate-detail-v3 .form-grid.three-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .corporate-detail-v3 .corporate-attachment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .corporate-detail-v3 .form-grid.two-cols,
    .corporate-detail-v3 .form-grid.three-cols,
    .corporate-detail-v3 .corporate-attachment-grid {
        grid-template-columns: 1fr;
    }

    .corporate-detail-v3 .form-grid .span-two {
        grid-column: 1 / -1;
    }
}

/* Corporate order detail: stage-focused layout and semantic field widths. */
.corporate-detail-v3 .corporate-detail-summary-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 1fr));
    gap: 8px;
    margin: 0 0 10px;
}

.corporate-detail-v3 .corporate-detail-summary-bar > div {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .045);
}

.corporate-detail-v3 .corporate-detail-summary-bar span {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.corporate-detail-v3 .corporate-detail-summary-bar strong {
    display: block;
    overflow: hidden;
    color: #102033;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corporate-detail-v3 .corporate-stage-section {
    padding: 0;
    overflow: hidden;
}

.corporate-detail-v3 .corporate-stage-section + .corporate-stage-section {
    margin-top: 8px;
}

.corporate-detail-v3 .corporate-stage-section summary {
    list-style: none;
}

.corporate-detail-v3 .corporate-stage-section summary::-webkit-details-marker {
    display: none;
}

.corporate-detail-v3 .stage-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 10px 12px;
    cursor: pointer;
    background: #fff;
}

.corporate-detail-v3 .stage-summary::after {
    content: "展开";
    grid-column: 3;
    justify-self: end;
    margin-left: 10px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
}

.corporate-detail-v3 .corporate-stage-section[open] .stage-summary::after {
    content: "收起";
}

.corporate-detail-v3 .stage-summary h2 {
    margin: 0 0 3px;
    color: #102033;
    font-size: 15px;
}

.corporate-detail-v3 .stage-summary p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.corporate-detail-v3 .stage-state-badge {
    justify-self: end;
    min-width: 72px;
    padding: 3px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.corporate-detail-v3 .corporate-stage-section.stage-current {
    border-color: #93c5fd;
    box-shadow: inset 4px 0 0 #2563eb, 0 8px 22px rgba(37, 99, 235, .08);
}

.corporate-detail-v3 .corporate-stage-section.stage-current .stage-state-badge {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.corporate-detail-v3 .corporate-stage-section.stage-done .stage-state-badge {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #047857;
}

.corporate-detail-v3 .corporate-stage-section.stage-future .stage-summary {
    background: #fbfdff;
}

.corporate-detail-v3 .corporate-stage-section.stage-future .stage-state-badge {
    color: #64748b;
}

.corporate-detail-v3 .corporate-stage-section.stage-blocked {
    border-color: #fed7aa;
    box-shadow: inset 4px 0 0 #d97706, 0 8px 22px rgba(217, 119, 6, .08);
}

.corporate-detail-v3 .corporate-stage-section.stage-blocked .stage-state-badge {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.corporate-detail-v3 .stage-body {
    padding: 0 12px 12px;
    border-top: 1px solid #edf2f7;
}

.corporate-detail-v3 .stage-focus-hint {
    margin: 10px 0 8px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.corporate-detail-v3 .form-grid.semantic-grid,
.corporate-detail-v3 .form-grid.two-cols.semantic-grid,
.corporate-detail-v3 .form-grid.three-cols.semantic-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

.corporate-detail-v3 .semantic-grid label {
    min-width: 0;
}

.corporate-detail-v3 .semantic-grid .field-tiny {
    grid-column: span 1;
}

.corporate-detail-v3 .semantic-grid .field-short {
    grid-column: span 2;
}

.corporate-detail-v3 .semantic-grid .field-standard,
.corporate-detail-v3 .semantic-grid .field-money {
    grid-column: span 3;
}

.corporate-detail-v3 .semantic-grid .field-wide {
    grid-column: span 4;
}

.corporate-detail-v3 .semantic-grid .field-long {
    grid-column: span 6;
}

.corporate-detail-v3 .semantic-grid .field-full {
    grid-column: 1 / -1;
}

.corporate-detail-v3 .semantic-grid .field-money input {
    text-align: right;
}

.corporate-detail-v3 .semantic-grid .checkbox-line {
    min-height: 34px;
    align-content: end;
}

.corporate-detail-v3 .semantic-grid textarea {
    min-height: 46px;
}

.corporate-detail-v3 .attachments-stage .stage-body {
    padding-top: 10px;
}

.corporate-detail-v3 .page-actions [data-stage-expand-all].is-expanded {
    border-color: #2563eb;
    color: #1d4ed8;
    background: #eff6ff;
}

@media (max-width: 1280px) {
    .corporate-detail-v3 .corporate-detail-summary-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .corporate-detail-v3 .semantic-grid .field-tiny {
        grid-column: span 2;
    }

    .corporate-detail-v3 .semantic-grid .field-short {
        grid-column: span 2;
    }

    .corporate-detail-v3 .semantic-grid .field-standard,
    .corporate-detail-v3 .semantic-grid .field-money {
        grid-column: span 3;
    }

    .corporate-detail-v3 .semantic-grid .field-wide {
        grid-column: span 4;
    }
}

@media (max-width: 900px) {
    .corporate-detail-v3 .corporate-detail-summary-bar {
        grid-template-columns: 1fr;
    }

    .corporate-detail-v3 .stage-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .corporate-detail-v3 .stage-summary::after,
    .corporate-detail-v3 .stage-state-badge {
        grid-column: 2;
        justify-self: start;
    }

    .corporate-detail-v3 .form-grid.semantic-grid,
    .corporate-detail-v3 .form-grid.two-cols.semantic-grid,
    .corporate-detail-v3 .form-grid.three-cols.semantic-grid {
        grid-template-columns: 1fr;
    }

    .corporate-detail-v3 .semantic-grid .field-tiny,
    .corporate-detail-v3 .semantic-grid .field-short,
    .corporate-detail-v3 .semantic-grid .field-standard,
    .corporate-detail-v3 .semantic-grid .field-money,
    .corporate-detail-v3 .semantic-grid .field-wide,
    .corporate-detail-v3 .semantic-grid .field-long,
    .corporate-detail-v3 .semantic-grid .field-full {
        grid-column: 1 / -1;
    }
}

/* Online orders P0 acceptance pass: keep blocker/next visible and make low screens usable. */
.order-page-head {
    padding-top: 8px;
    padding-bottom: 6px;
    margin-bottom: 5px;
}

.order-page-head h1 {
    margin-bottom: 1px;
}

.order-list-controls {
    padding: 5px 8px;
    margin-bottom: 5px;
}

.daily-action-head {
    margin-bottom: 2px;
}

.daily-action-head small {
    display: none;
}

.daily-action-strip {
    gap: 4px;
    margin-bottom: 4px;
}

.daily-action-card {
    min-height: 26px;
    padding: 3px 6px 3px 9px;
}

.daily-action-card span {
    font-size: 11px;
}

.daily-action-card strong {
    font-size: 14px;
}

.daily-action-card em {
    font-size: 10px;
}

.order-quick-filter-line {
    gap: 4px 8px;
    margin-bottom: 3px;
    padding-bottom: 3px;
}

.order-filter-bar {
    gap: 4px;
}

.order-filter-bar input,
.order-filter-bar select,
.order-filter-bar button,
.order-filter-bar .secondary-button,
.order-filter-bar .reset-filter-link {
    min-height: 25px;
    padding: 3px 7px;
    font-size: 11px;
}

.original-link-batch-panel.compact-analysis-panel {
    padding: 5px 8px;
    margin-bottom: 5px;
}

.original-link-batch-panel .compact-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.original-link-title-row {
    min-width: 0;
}

.original-link-title {
    font-size: 14px;
}

.original-link-parse-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 5px;
    max-height: 45px;
    overflow: auto;
    scrollbar-width: thin;
}

.original-link-parse-badge,
.original-link-parse-badge:nth-of-type(n+5) {
    display: inline-flex !important;
    min-height: 20px;
    padding: 1px 6px;
    font-size: 10.5px;
}

.original-link-actions .primary-button,
.original-link-actions .secondary-button,
.original-link-actions .original-link-export-menu > summary {
    min-height: 25px;
    padding: 3px 8px;
    font-size: 11px;
}

.order-list-summary {
    padding: 4px 8px;
    margin-bottom: 0;
}

.queue-context-strip {
    display: none;
}

.queue-count-strip {
    gap: 8px;
}

.queue-count-strip > span {
    font-size: 11px;
}

.order-processing-wrap {
    max-height: calc(100vh - 176px);
}

.order-processing-table th,
.order-processing-table td {
    padding: 3px 5px;
    line-height: 1.16;
}

.order-processing-table thead th {
    padding-top: 4px;
    padding-bottom: 4px;
}

.flow-state-line {
    gap: 3px;
}

.flow-state-line .pill,
.flow-current-node {
    min-height: 17px;
    padding: 0 5px;
    font-size: 10.5px;
}

.flow-state-line strong {
    font-size: 11px;
}

.flow-node-track {
    grid-template-columns: repeat(5, minmax(26px, 1fr));
    gap: 1px;
    padding: 0;
}

.flow-node {
    font-size: 8.5px;
    gap: 0;
}

.flow-node i {
    width: 8px;
    height: 8px;
}

.flow-node::before {
    top: 4px;
}

.flow-node em {
    max-width: 42px;
}

.flow-detail-line,
.flow-next-line {
    display: flex !important;
    min-width: 0;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    line-height: 1.2;
}

.flow-detail-line span,
.flow-next-line span {
    flex: 0 0 auto;
    padding: 0 4px;
}

.order-summary-stack,
.money-stack,
.info-stack,
.product-stack,
.quality-stack {
    gap: 2px;
}

.summary-line,
.field-line {
    gap: 4px;
}

.summary-order-no,
.field-line strong,
.field-line span,
.money-stack span,
.info-stack .field-line,
.product-stack .field-line {
    font-size: 11px;
}

.summary-order-no a {
    font-size: 12px;
}

.summary-line.strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
}

.summary-meta {
    flex-wrap: nowrap;
    gap: 3px;
    font-size: 10.5px;
    line-height: 1.15;
}

.legal-entity-badge {
    min-height: 15px;
    margin-top: 0;
    padding: 0 4px;
    font-size: 10px;
}

.flow-node em {
    max-width: 34px;
    font-size: 7.8px;
    line-height: 1.05;
}

.flow-state-line strong,
.flow-current-node {
    line-height: 1.1;
}

.product-title-line {
    max-height: 28px;
    font-size: 11px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
}

.quality-marker {
    max-height: 24px;
    font-size: 10.5px;
    line-height: 1.2;
    -webkit-line-clamp: 2;
}

.row-quick-updated {
    background: #ecfdf5 !important;
    transition: background .25s ease, opacity .25s ease;
}

.row-fade-out {
    opacity: 0;
}

@media (max-height: 760px) {
    .order-page-head {
        padding-top: 5px;
        padding-bottom: 4px;
    }

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

    .order-page-head p,
    .daily-action-head {
        display: none;
    }

    .daily-action-card {
        min-height: 22px;
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .daily-action-card em {
        display: none;
    }

    .original-link-parse-summary {
        flex-wrap: nowrap;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 1px;
    }

    .order-processing-wrap {
        max-height: calc(100vh - 158px);
    }

    .order-processing-table th,
    .order-processing-table td {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .flow-node em {
        display: none;
    }

    .flow-node-track {
        margin: 1px 0;
    }

    .product-title-line {
        max-height: 24px;
    }
}

@media (max-height: 820px) {
    .flow-node em {
        display: none;
    }
}

/* Online orders: stable, sticky row operation entry. */
.order-processing-table .col-actions {
    width: 44px;
}

.order-processing-table .cell-actions-head,
.order-processing-table .cell-actions {
    position: sticky !important;
    right: 0 !important;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0 5px !important;
    overflow: visible !important;
    text-align: center;
}

.order-processing-table .cell-actions-head {
    z-index: 72 !important;
    background: #f6f9fc;
    color: #526176;
    font-size: 11px;
}

.order-processing-table .cell-actions {
    z-index: 52 !important;
    background: #fff;
    box-shadow: -8px 0 14px -14px rgba(15, 23, 42, .55);
}

.order-processing-table tbody tr:hover .cell-actions,
.order-processing-table tbody tr:focus-within .cell-actions {
    background: #f8fbff;
}

.order-processing-table .cell-quality {
    padding-right: 6px !important;
}

.order-processing-table .cell-actions .row-action-trigger {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: 54;
    width: 34px;
    min-width: 34px;
    min-height: 24px;
    padding: 0 4px;
    border-radius: 6px;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.order-processing-table .cell-actions .floating-row-actions {
    position: absolute;
    top: 4px;
    right: 43px;
    z-index: 360;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    width: 86px;
    padding: 5px;
    border-radius: 8px;
    transform: none;
}

.order-processing-table .cell-actions:hover .floating-row-actions,
.order-processing-table .cell-actions:focus-within .floating-row-actions,
.order-processing-table tbody tr.row-actions-visible .cell-actions .floating-row-actions,
.order-processing-table tbody tr.row-actions-pinned .cell-actions .floating-row-actions {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.order-processing-table .cell-actions .floating-row-actions a,
.order-processing-table .cell-actions .floating-row-actions .link-button {
    min-height: 26px;
    padding: 3px 8px;
    white-space: nowrap;
}

.order-processing-table .cell-actions .floating-row-actions .quick-toggle {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.order-processing-table .cell-actions .floating-row-actions .danger-link {
    border: 1px solid #fecaca;
    background: #fff;
    color: #dc2626;
}

/* Keep the stable action entry inside common 1280/1366 desktop viewports. */
.table-wrap.wide table.order-processing-table,
.order-processing-table {
    width: 100%;
    min-width: 1000px;
    table-layout: fixed;
}

.order-processing-table .col-order-summary { width: 132px; }
.order-processing-table .col-processing-flow { width: 250px; }
.order-processing-table .col-money-stack { width: 78px; }
.order-processing-table .col-purchase-stack { width: 102px; }
.order-processing-table .col-refund-stack { width: 76px; }
.order-processing-table .col-product-stack { width: 140px; }
.order-processing-table .col-original-link { width: 108px; }
.order-processing-table .col-quality { width: 78px; }
.order-processing-table .col-actions { width: 44px; }

/* Half-window workbench: collapsible navigation and compact topbar menus. */
.topbar-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-toggle {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #cdd9e7;
    border-radius: 7px;
    background: #fff;
    color: #26415f;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    border-color: #2f73e8;
    color: #0f5ed7;
    outline: 2px solid rgba(47, 115, 232, .14);
    outline-offset: 1px;
}

.layout,
.sidebar {
    transition: grid-template-columns .18s ease, transform .18s ease, opacity .18s ease, padding .18s ease;
}

body.sidebar-collapsed .layout {
    grid-template-columns: 0 minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
    padding-right: 0;
    padding-left: 0;
    overflow: hidden;
    border-right: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
}

.sidebar-scrim[hidden] {
    display: none;
}

.topnav-menu {
    position: relative;
}

.topnav-menu > summary {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: #314154;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.topnav-menu > summary::-webkit-details-marker {
    display: none;
}

.topnav-menu > summary::after {
    content: "⌄";
    margin-left: 6px;
    color: #718093;
}

.topnav-menu[open] > summary {
    border-color: #9fc3f4;
    color: #0f5ed7;
}

.topnav-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 800;
    display: grid;
    gap: 3px;
    width: max-content;
    min-width: 150px;
    padding: 7px;
    border: 1px solid #d5e0ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
}

.topnav-menu-panel a,
.topnav-menu-panel .link-button {
    display: flex;
    width: 100%;
    min-height: 32px;
    align-items: center;
    padding: 5px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #314154;
    text-align: left;
}

.topnav-menu-panel a:hover,
.topnav-menu-panel .link-button:hover {
    background: #eef5ff;
    color: #0f5ed7;
}

.account-menu-label {
    padding: 4px 9px;
    color: #718093;
    font-size: 11px;
}

@media (max-width: 1180px) {
    .content {
        padding: 14px;
    }

    .brand-text small {
        display: none;
    }

    .topnav {
        gap: 6px;
    }
}

@media (max-width: 760px) {
    .topbar {
        position: sticky;
        align-items: center;
        min-height: 54px;
        flex-direction: row;
        gap: 8px;
        padding: 8px 10px;
    }

    .topbar-primary {
        flex: 1 1 auto;
    }

    .brand-text strong {
        display: none;
    }

    .topnav {
        width: auto;
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }

    .topnav > .nav-action:not(:first-child),
    .topnav > .nav-action-with-badge {
        display: none;
    }

    .layout,
    body.sidebar-collapsed .layout {
        display: block;
        min-height: calc(100vh - 54px);
    }

    .sidebar {
        position: fixed;
        top: 54px;
        bottom: 0;
        left: 0;
        z-index: 920;
        display: block;
        width: min(270px, 84vw);
        height: calc(100vh - 54px);
        padding: 14px 12px;
        overflow-y: auto;
        border-right: 1px solid var(--line);
        opacity: 1;
        transform: translateX(0);
    }

    body.sidebar-collapsed .sidebar {
        padding: 14px 12px;
        border-right: 1px solid var(--line);
        opacity: 1;
        pointer-events: none;
        transform: translateX(-105%);
    }

    .sidebar-scrim {
        position: fixed;
        inset: 54px 0 0;
        z-index: 910;
        display: block;
        border: 0;
        background: rgba(15, 23, 42, .24);
    }
}

/* Final cascade overrides for the half-window order workbench. */
.order-action-drawer {
    z-index: 980;
}

.order-action-drawer .quick-drawer-panel {
    width: min(460px, calc(100vw - 16px));
}

.order-action-drawer[data-action-mode="edit"] .quick-drawer-panel {
    width: min(720px, calc(100vw - 16px));
}

.order-action-drawer .order-action-panel {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
}

.order-action-drawer .order-action-panel[hidden],
.order-processing-table .floating-row-actions[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .table-wrap.wide table.order-processing-table,
    .order-processing-table {
        min-width: 720px;
    }

    .order-processing-table .col-order-summary { width: 142px; }
    .order-processing-table .col-processing-flow { width: 280px; }
    .order-processing-table .col-purchase-stack { width: 110px; }
    .order-processing-table .col-refund-stack { width: 86px; }
    .order-processing-table .col-original-link { width: 100px; }
    .order-processing-table .col-actions { width: 44px; }

    .order-processing-table .head-money-stack,
    .order-processing-table .cell-money-stack,
    .order-processing-table .head-product-stack,
    .order-processing-table .cell-product-stack,
    .order-processing-table .head-quality,
    .order-processing-table .cell-quality,
    .order-processing-table .col-money-stack,
    .order-processing-table .col-product-stack,
    .order-processing-table .col-quality {
        display: none;
    }
}

@media (max-width: 760px) {
    .order-action-drawer .quick-drawer-panel,
    .order-action-drawer[data-action-mode="edit"] .quick-drawer-panel {
        width: 100vw;
    }

    .order-processing-table .head-refund-stack,
    .order-processing-table .cell-refund-stack,
    .order-processing-table .head-original-link,
    .order-processing-table .cell-original-link,
    .order-processing-table .col-refund-stack,
    .order-processing-table .col-original-link {
        display: none;
    }

    .table-wrap.wide table.order-processing-table,
    .order-processing-table {
        min-width: 560px;
    }
}

/* Quick processing remains a focused task drawer after choosing a row action. */
.order-action-drawer .quick-drawer-head {
    padding: 14px 16px 10px;
}

.order-action-drawer .quick-drawer-meta {
    gap: 6px;
    padding: 8px 16px;
}

.order-action-drawer .quick-scenario-card {
    gap: 7px;
    margin: 0 16px 8px;
}

.order-action-drawer .quick-scenario-card > div {
    gap: 2px;
    padding: 8px;
}

.order-action-drawer .quick-drawer-form {
    gap: 8px;
    padding: 10px 16px 14px;
}

.order-action-drawer .quick-field-section {
    gap: 8px;
    padding: 10px;
}

.order-action-drawer .quick-optional-section {
    display: block;
    padding: 0;
}

.order-action-drawer .quick-optional-section > summary {
    min-height: 38px;
}

.order-action-drawer .quick-optional-section:not([open]) {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
}

.order-action-drawer .quick-drawer-actions {
    bottom: -14px;
    grid-template-columns: .8fr 1.25fr .8fr;
    gap: 6px;
    padding-top: 10px;
}

.order-action-drawer .quick-drawer-actions button {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .order-action-drawer .quick-scenario-card {
        grid-template-columns: 1fr;
    }

    .order-action-drawer .quick-drawer-actions {
        grid-template-columns: .8fr 1.25fr .8fr;
    }
}

/* Direct order-row actions are the final cascade for the sticky operation column. */
.order-processing-table .col-actions {
    width: 108px !important;
}

.order-processing-table .cell-actions-head,
.order-processing-table .cell-actions {
    position: sticky;
    right: 0;
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    padding: 3px 7px !important;
    overflow: hidden !important;
    border-left: 1px solid #edf1f6;
    background: #fff;
    background-clip: padding-box;
    text-align: center;
}

.order-processing-table .cell-actions-head {
    z-index: 72;
    background: #f6f9fc;
}

.order-processing-table .cell-actions {
    z-index: 52;
    box-shadow: none;
}

.order-processing-table .cell-actions .floating-row-actions {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 94px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

.order-processing-table tbody tr:hover .cell-actions,
.order-processing-table tbody tr:focus-within .cell-actions {
    background: #f8fbff;
}

.order-processing-table .cell-actions .floating-row-actions .quick-toggle {
    grid-column: 1 / -1;
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border: 1px solid #8bb1ee;
    border-radius: 5px;
    background: #eef5ff;
    color: #155bd7;
    font-size: 11.5px;
    font-weight: 900;
    white-space: nowrap;
}

.order-processing-table .cell-actions .floating-row-actions .row-edit-action,
.order-processing-table .cell-actions .floating-row-actions .row-delete-action {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    justify-content: center;
    padding: 1px 3px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.order-processing-table .cell-actions .floating-row-actions .row-edit-action {
    color: #2563eb;
}

.order-processing-table .cell-actions .floating-row-actions .row-delete-action {
    color: #dc2626;
}

.order-processing-table .cell-actions .floating-row-actions button:hover,
.order-processing-table .cell-actions .floating-row-actions button:focus-visible {
    outline: 0;
}

.order-processing-table .cell-actions .floating-row-actions .quick-toggle:hover,
.order-processing-table .cell-actions .floating-row-actions .quick-toggle:focus-visible {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 3px 9px rgba(37, 99, 235, .16);
}

.order-processing-table .cell-actions .floating-row-actions .row-edit-action:hover,
.order-processing-table .cell-actions .floating-row-actions .row-edit-action:focus-visible {
    background: #eff6ff;
}

.order-processing-table .cell-actions .floating-row-actions .row-delete-action:hover,
.order-processing-table .cell-actions .floating-row-actions .row-delete-action:focus-visible {
    background: #fff1f1;
    outline-color: rgba(220, 38, 38, .16);
}

@media (max-width: 760px) {
    .order-processing-table .col-actions,
    .order-processing-table .cell-actions-head,
    .order-processing-table .cell-actions {
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
        padding-right: 5px !important;
        padding-left: 5px !important;
    }

    .order-processing-table .cell-actions .floating-row-actions {
        width: 94px;
    }
}

@media (max-width: 1100px) {
    .order-processing-table .cell-actions-head,
    .order-processing-table .cell-actions {
        box-shadow: -7px 0 12px -12px rgba(15, 23, 42, .65);
    }
}

/* Online orders: calm, high-density operating table. */
.order-page-head {
    margin-bottom: 8px;
}

.order-page-head h1 {
    margin-bottom: 3px;
    font-size: 22px;
}

.order-page-head p {
    color: #657489;
    font-size: 12px;
}

.order-list-controls {
    margin-bottom: 8px;
    border-color: #dce5ef;
    border-radius: 7px;
    background: #fff;
    box-shadow: none;
}

.order-list-controls input,
.order-list-controls select,
.order-list-controls button,
.order-list-controls .secondary-button,
.order-list-controls .primary-button,
.order-list-controls .tabs a,
.order-list-controls .sub-tabs a {
    min-height: 30px;
}

.daily-action-strip {
    gap: 6px;
}

.daily-action-card {
    border-color: #dce5ef;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}

.daily-action-card:hover,
.daily-action-card:focus-visible {
    border-color: #b9cbe0;
    background: #fbfdff;
    box-shadow: none;
}

.original-link-batch-panel.compact-analysis-panel {
    margin-bottom: 8px;
    border-color: #dce5ef;
    border-radius: 7px;
    background: #fff;
    box-shadow: none;
}

.order-processing-section {
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.order-processing-section .order-list-summary {
    border-bottom: 1px solid #e9eef5;
    background: #fff;
}

.order-processing-section .order-processing-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.order-processing-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
}

.order-processing-table thead th {
    position: sticky;
    top: 0;
    z-index: 45;
    height: 38px;
    padding: 0 8px;
    border-bottom: 1px solid #dce5ef;
    background: #f7f9fc;
    color: #415168;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.order-processing-table thead th.num {
    text-align: right;
}

.order-processing-table tbody td {
    height: 82px;
    padding: 6px 8px;
    border-bottom: 1px solid #e9eef5;
    background: #fff;
    color: #263445;
    vertical-align: top;
}

.order-processing-table tbody tr:last-child td {
    border-bottom: 0;
}

.order-processing-table tbody tr:hover td,
.order-processing-table tbody tr:focus-within td,
.order-processing-table tbody tr:hover .cell-actions,
.order-processing-table tbody tr:focus-within .cell-actions {
    background: #fbfdff;
}

.order-processing-table tbody td:first-child {
    border-left-width: 2px;
}

.order-processing-table .col-order-summary { width: 152px; }
.order-processing-table .col-processing-flow { width: 292px; }
.order-processing-table .col-money-stack { width: 94px; }
.order-processing-table .col-purchase-stack { width: 128px; }
.order-processing-table .col-refund-stack { width: 86px; }
.order-processing-table .col-product-stack { width: 164px; }
.order-processing-table .col-original-link { width: 118px; }
.order-processing-table .col-quality { width: 82px; }

.order-summary-stack,
.order-flow-cell,
.money-stack,
.info-stack,
.product-stack,
.quality-stack {
    gap: 3px;
}

.summary-order-no {
    min-width: 0;
}

.summary-order-no a {
    max-width: calc(100% - 28px);
    overflow: hidden;
    color: #155bd7;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-line.strong {
    color: #1f2d3d;
    font-size: 11.5px;
    font-weight: 800;
}

.summary-meta {
    gap: 4px;
    overflow: hidden;
    color: #738196;
    font-size: 10.5px;
    white-space: nowrap;
}

.summary-person-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-inline-note {
    max-width: 100%;
    overflow: hidden;
    color: #657489;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-note-label {
    border: 0;
    background: transparent;
    color: #657489;
}

.flow-state-line {
    gap: 4px;
    min-height: 18px;
    overflow: hidden;
    white-space: nowrap;
}

.flow-state-line .pill,
.flow-current-node {
    min-height: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10.5px;
    line-height: 16px;
}

.flow-state-line strong {
    color: #34455a;
    font-size: 11px;
    font-weight: 800;
}

.flow-current-node {
    border-color: #f1d19b;
    background: #fff7e8;
    color: #96530a;
}

.flow-current-node b {
    color: #8a6944;
    font-weight: 700;
}

.flow-node-track {
    grid-template-columns: repeat(5, minmax(34px, 1fr));
    gap: 2px;
    padding: 2px 0 1px;
}

.flow-node {
    gap: 1px;
    color: #7c899a;
    font-size: 8.5px;
    font-weight: 600;
}

.flow-node em {
    display: block !important;
    max-width: 48px;
    overflow: hidden;
    font-size: 8.5px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-node-done,
.flow-node-done em {
    color: #39765a;
}

.flow-node-current,
.flow-node-current em {
    color: #9a5a00;
}

.flow-detail-line,
.flow-next-line {
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
    color: #526176;
    font-size: 10.5px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-detail-line span,
.flow-next-line span {
    margin-right: 4px;
    padding: 0;
    background: transparent;
    color: #718096;
    font-weight: 700;
}

.flow-next-line {
    color: #155bd7;
    font-weight: 800;
}

.flow-next-line span {
    color: #155bd7;
}

.order-flow-done {
    align-self: flex-start;
    min-height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8793a4;
    font-size: 9.5px;
    font-weight: 600;
}

.money-stack {
    display: grid;
    align-content: start;
    gap: 4px;
}

.money-stack > span {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 3px;
    color: #738196;
    font-size: 10.5px;
}

.money-stack small {
    color: #738196;
    font-size: 10.5px;
}

.money-stack strong {
    justify-self: end;
    color: #263445;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.money-stack .profit-text {
    color: #087a59;
}

.money-stack .loss-text {
    color: #c93434;
}

.money-stack .profit-na {
    color: #718096;
    font-size: 10.5px;
}

.money-profit-line .profit-help {
    width: 15px;
    min-width: 15px;
    height: 15px;
    min-height: 15px;
    padding: 0;
    font-size: 9px;
}

.info-stack .field-line,
.product-stack .field-line {
    min-width: 0;
    gap: 4px;
    font-size: 10.5px;
    line-height: 1.2;
}

.info-stack .field-line > span,
.product-stack .field-line > span {
    flex: 0 0 auto;
    color: #7a8798;
    font-size: 10px;
}

.info-stack .field-line strong,
.product-stack .field-line strong {
    min-width: 0;
    overflow: hidden;
    color: #34455a;
    font-size: 10.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-stack .field-line .field-missing {
    color: #a75a08;
    font-weight: 800;
}

.info-stack .field-state-waiting,
.product-stack .field-state-waiting {
    color: #66758a;
    font-weight: 650;
}

.info-stack .field-state-optional,
.product-stack .field-state-optional,
.info-stack .field-state-not_applicable,
.product-stack .field-state-not_applicable {
    color: #8a96a6;
    font-weight: 600;
}

.info-stack small,
.product-stack small {
    overflow: hidden;
    color: #7a8798;
    font-size: 9.8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-title-line {
    display: -webkit-box;
    max-height: 30px;
    overflow: hidden;
    color: #263445;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.quality-stack {
    align-content: start;
}

.quality-marker {
    display: -webkit-box;
    max-height: 30px;
    overflow: hidden;
    padding: 3px 5px;
    border: 1px solid #f3d4a3;
    border-radius: 5px;
    background: #fff9ef;
    color: #9a5a00;
    font-size: 10px;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.quality-empty {
    color: #a0aaba;
    font-size: 12px;
}

.order-processing-table .product-stack[data-tooltip]::after,
.order-processing-table .quality-stack[data-tooltip]::after {
    content: attr(data-tooltip) !important;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    bottom: auto;
    left: auto;
    z-index: 260;
    display: block !important;
    width: max-content;
    max-width: 280px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #162033;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    white-space: normal;
}

.order-processing-table .product-stack[data-tooltip]:hover::after,
.order-processing-table .product-stack[data-tooltip]:focus-visible::after,
.order-processing-table .quality-stack[data-tooltip]:hover::after,
.order-processing-table .quality-stack[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.order-processing-table .cell-actions-head {
    z-index: 75 !important;
    border-left-color: #e3e9f1;
    background: #f7f9fc;
}

.order-processing-table .cell-actions {
    border-left-color: #edf1f6;
    background: #fff;
}

@media (max-width: 1100px) {
    .order-processing-table .col-order-summary { width: 146px; }
    .order-processing-table .col-processing-flow { width: 286px; }
    .order-processing-table .col-purchase-stack { width: 122px; }
    .order-processing-table .col-refund-stack { width: 82px; }
    .order-processing-table .col-original-link { width: 112px; }

    .order-processing-table .cell-actions-head,
    .order-processing-table .cell-actions {
        box-shadow: -7px 0 12px -12px rgba(15, 23, 42, .55);
    }
}

@media (max-height: 820px) {
    .order-processing-table tbody td {
        height: 76px;
        padding-top: 3px;
        padding-bottom: 3px;
    }

    .flow-state-line strong {
        display: none;
    }

    .flow-state-line,
    .flow-state-line .pill,
    .flow-current-node {
        min-height: 16px;
    }

    .flow-node-track {
        padding-top: 0;
        padding-bottom: 0;
    }

    .flow-node em {
        display: block !important;
        font-size: 7.8px;
    }

    .order-flow-done {
        display: none;
    }
}

/* Online orders P1: viewport-safe help, calmer semantics and clearer data gaps. */
[data-tooltip]::before,
[data-tooltip]::after {
    content: none !important;
    display: none !important;
}

.global-tooltip-layer {
    position: fixed;
    z-index: 5000;
    width: max-content;
    max-width: min(320px, calc(100vw - 20px));
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 5px;
    background: #172235;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
    pointer-events: none;
    white-space: normal;
}

.global-tooltip-layer[hidden],
.drawer-panel-loading[hidden] {
    display: none !important;
}

.summary-distribution-label {
    padding-left: 8px;
    border-left: 1px solid #dce5ef;
    color: #7a8798 !important;
    font-weight: 700;
}

.order-processing-table .head-quality {
    cursor: help;
}

.quality-stack {
    display: grid;
    align-content: start;
    gap: 2px;
    min-width: 0;
    outline: none;
}

.quality-priority {
    justify-self: start;
    padding: 1px 4px;
    border-radius: 3px;
    background: #eef4ff;
    color: #37689b;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.3;
}

.quality-stack .quality-marker {
    display: block;
    max-height: none;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3d4d61;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quality-impact {
    display: -webkit-box;
    max-height: 24px;
    overflow: hidden;
    color: #7a8798;
    font-size: 9px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.quality-today .quality-priority {
    background: #fff3df;
    color: #9a5a00;
}

.quality-today .quality-marker {
    color: #8a4f08;
}

.quality-history .quality-priority {
    background: #f0f2f5;
    color: #7a8798;
}

.quality-history .quality-marker,
.quality-history .quality-impact {
    color: #7a8798;
}

.quality-empty {
    color: #8793a4;
    font-size: 9.5px;
    white-space: nowrap;
}

.original-link-primary-row {
    flex-wrap: nowrap;
    gap: 4px;
}

.original-link-pill {
    max-width: 58px;
    overflow: hidden;
    padding: 2px 5px;
    border-color: #dbe4ee !important;
    background: #f3f6fa !important;
    color: #53657a !important;
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.original-link-state-failed .original-link-pill,
.original-link-state-not_found .original-link-pill {
    border-color: #f2c7c7 !important;
    background: #fff2f2 !important;
    color: #b73535 !important;
}

.original-link-state-needs_review .original-link-pill,
.original-link-state-pending .original-link-pill,
.original-link-state-queued .original-link-pill,
.original-link-state-running .original-link-pill {
    border-color: #c9d9ed !important;
    background: #eef5ff !important;
    color: #37689b !important;
}

.original-link-main-action,
.original-link-main-muted,
.original-link-more > summary,
.original-link-query-action {
    font-size: 9.5px !important;
    white-space: nowrap;
}

.original-link-more[open] {
    z-index: 150;
}

.original-link-more-menu {
    z-index: 160;
    top: -4px;
    right: calc(100% + 4px);
    max-height: min(260px, calc(100vh - 24px));
    overflow: auto;
}

.original-link-review-action .original-link-more-menu {
    right: calc(100% + 4px);
    left: auto;
}

.order-processing-table .flow-node-current i,
.order-processing-table .flow-node-blocked i,
.order-processing-table .flow-node-risk i {
    border-color: #d98718;
    background: #f5a623;
}

.order-processing-table .flow-node-current em,
.order-processing-table .flow-node-blocked em,
.order-processing-table .flow-node-risk em {
    color: #8b570e;
}

.order-processing-table .flow-node-done i {
    border-color: #6ea58d;
    background: #6ea58d;
}

@media (max-height: 820px) {
    .order-page-head {
        padding-top: 3px;
        padding-bottom: 3px;
        margin-bottom: 3px;
    }

    .order-page-head p,
    .daily-action-head,
    .queue-context-strip {
        display: none;
    }

    .order-list-controls {
        padding-top: 4px;
        padding-bottom: 4px;
        margin-bottom: 4px;
    }

    .daily-action-strip,
    .order-quick-filter-line {
        margin-bottom: 2px;
    }

    .daily-action-card {
        min-height: 24px;
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .original-link-batch-panel.compact-analysis-panel {
        padding-top: 3px;
        padding-bottom: 3px;
        margin-bottom: 4px;
    }

    .original-link-parse-summary {
        max-height: 24px;
        flex-wrap: nowrap;
    }

    .order-list-summary {
        padding-top: 3px;
        padding-bottom: 3px;
    }

    .order-processing-table tbody td {
        height: 72px;
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .quality-impact {
        -webkit-line-clamp: 1;
    }
}

@media (max-width: 1500px) {
    .order-processing-table .col-order-summary { width: 140px; }
    .order-processing-table .col-processing-flow { width: 280px; }
    .order-processing-table .col-money-stack { width: 82px; }
    .order-processing-table .col-purchase-stack { width: 110px; }
    .order-processing-table .col-refund-stack { width: 70px; }
    .order-processing-table .col-product-stack { width: 136px; }
    .order-processing-table .col-original-link { width: 92px; }
    .order-processing-table .col-quality { width: 100px; }

    .order-processing-table thead th,
    .order-processing-table tbody td {
        padding-right: 5px;
        padding-left: 5px;
    }
}

/* Shared task-drawer frame. Page-specific rules only own the inner content. */
.order-action-drawer[data-action-mode="quick"] .quick-drawer-panel,
.return-flow-drawer .quick-drawer-panel {
    position: absolute;
    top: min(var(--quick-task-drawer-top), calc(100vh - 96px));
    right: 0;
    bottom: 8px;
    width: min(var(--quick-task-drawer-width), calc(100vw - 24px));
    height: auto;
    min-height: 0;
}

@media (min-width: 1680px) {
    .quick-drawer {
        --quick-task-drawer-top: 304px;
    }
}

@media (min-width: 1782px) {
    .quick-drawer {
        --quick-task-drawer-top: 264px;
    }
}

/* Quick processing task card: branch-first, current-action-only. */
.order-action-drawer[data-action-mode="quick"] .quick-drawer-panel {
    border-radius: 7px 0 0 7px;
}

.order-action-drawer .quick-drawer-meta {
    padding: 7px 12px;
    border-bottom: 1px solid #edf2f8;
    background: #f8fafc;
}

.order-action-drawer .quick-scenario-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 8px 12px 0;
    padding: 0;
    border: 1px solid #d7e4f2;
    border-radius: 7px;
    background: #f6f9fd;
}

.order-action-drawer .quick-scenario-card > div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 2px 8px;
    min-height: 0;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid #e4ebf4;
    background: transparent;
}

.order-action-drawer .quick-scenario-card > div:last-child {
    border-bottom: 0;
}

.order-action-drawer .quick-scenario-card span {
    grid-row: 1 / span 2;
    color: #718096;
    font-size: 10.5px;
    font-weight: 800;
}

.order-action-drawer .quick-scenario-card strong {
    color: #20344e;
    font-size: 12px;
    line-height: 1.35;
}

.order-action-drawer .quick-scenario-card small {
    color: #66778c;
    font-size: 10.5px;
    line-height: 1.35;
}

.order-action-drawer .quick-drawer-form {
    gap: 8px;
    padding: 8px 12px 70px;
}

.order-action-drawer .quick-field-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
    margin: 0;
    padding: 9px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #fff;
}

.order-action-drawer .quick-section-head,
.order-action-drawer .quick-branch-box,
.order-action-drawer .quick-fallback-box,
.order-action-drawer .quick-optional-grid,
.order-action-drawer .quick-assist-grid {
    grid-column: 1 / -1;
}

.order-action-drawer .quick-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.order-action-drawer .quick-section-head strong {
    color: #26394f;
    font-size: 12px;
}

.order-action-drawer .quick-section-head small {
    color: #7b899a;
    font-size: 10px;
}

.order-action-drawer .quick-required-section {
    border-color: #efd49b;
    background: #fff9ea;
}

.quick-branch-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.quick-branch-box[hidden] {
    display: none !important;
}

.quick-branch-option {
    display: grid;
    gap: 2px;
    min-height: 48px;
    padding: 7px 8px;
    border: 1px solid #d6e0eb;
    border-radius: 6px;
    background: #fff;
    color: #405268;
    text-align: left;
}

.quick-branch-option strong {
    font-size: 11px;
}

.quick-branch-option small {
    color: #7a8798;
    font-size: 9.5px;
    line-height: 1.3;
}

.quick-branch-option.active {
    border-color: #6fa2ee;
    background: #edf5ff;
    color: #155bd7;
    box-shadow: inset 3px 0 #246fe5;
}

.quick-branch-option:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.order-action-drawer .quick-field-required,
.order-action-drawer .quick-field-optional {
    min-width: 0;
    margin: 0;
}

.order-action-drawer .quick-field-required > span,
.order-action-drawer .quick-field-optional > span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-action-drawer .quick-field-required > span::after,
.order-action-drawer .quick-field-optional > span::after {
    padding: 0 4px;
    border-radius: 3px;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.55;
}

.order-action-drawer .quick-field-required > span::after {
    content: "必填";
    background: #ffe6b0;
    color: #9a5a00;
}

.order-action-drawer .quick-field-optional > span::after {
    content: "选填";
    background: #edf1f5;
    color: #728094;
}

.order-action-drawer .quick-readonly-notice {
    grid-column: 1 / -1;
    margin: 0;
    padding: 9px 10px;
    border-left: 2px solid #6f8eae;
    border-radius: 4px;
    background: #f4f7fa;
    color: #435a72;
    font-size: 11px;
    line-height: 1.55;
}

.order-action-drawer .quick-readonly-notice[hidden] {
    display: none;
}

.order-action-drawer .quick-taobao-sync-summary,
.order-action-drawer .quick-supplier-refund-basis,
.order-action-drawer .quick-logistics-autofill {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 9px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #fff;
}

.order-action-drawer .quick-taobao-sync-summary[hidden],
.order-action-drawer .quick-supplier-refund-basis[hidden],
.order-action-drawer .quick-logistics-autofill[hidden] {
    display: none;
}

.order-action-drawer .quick-taobao-sync-summary dl {
    display: grid;
    gap: 5px;
    margin: 0;
}

.order-action-drawer .quick-supplier-refund-basis dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 0;
}

.order-action-drawer .quick-supplier-refund-basis dl > div {
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #dce5f0;
    border-radius: 6px;
    background: #f8fafc;
}

.order-action-drawer .quick-supplier-refund-basis dt {
    color: #64748b;
    font-size: 12px;
}

.order-action-drawer .quick-supplier-refund-basis dd {
    margin: 2px 0 0;
    color: #0f172a;
    font-weight: 700;
}

.order-action-drawer .quick-supplier-refund-basis p {
    margin: 7px 0 0;
    color: #526274;
    font-size: 12px;
    line-height: 1.45;
}

.order-action-drawer .quick-taobao-sync-summary dl > div {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
}

.order-action-drawer .quick-taobao-sync-summary dt {
    color: #728094;
    font-size: 10.5px;
}

.order-action-drawer .quick-taobao-sync-summary dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #24384f;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-action-drawer .quick-logistics-autofill {
    border-color: #d7e3ef;
    background: #f8fbfe;
}

.order-action-drawer .quick-logistics-autofill > p {
    margin: 0;
    color: #68798d;
    font-size: 10.5px;
    line-height: 1.45;
}

.order-action-drawer .quick-logistics-autofill textarea {
    min-height: 64px;
    resize: vertical;
}

.quick-logistics-autofill-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.quick-logistics-autofill-actions button {
    min-height: 28px;
    padding: 3px 9px;
}

.quick-logistics-autofill-actions [data-quick-autofill-result] {
    min-width: 0;
    color: #65758a;
    font-size: 10px;
    line-height: 1.4;
}

.quick-logistics-autofill-actions [data-tone="success"] {
    color: #087443;
}

.quick-logistics-autofill-actions [data-tone="warning"] {
    color: #9a5a00;
}

.quick-logistics-autofill-actions [data-tone="error"] {
    color: #b42318;
}

.order-action-drawer .quick-drawer-note,
.order-action-drawer .quick-fallback-box .field-inline-help {
    grid-column: 1 / -1;
}

.order-action-drawer .quick-fallback-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.quick-fallback-summary {
    grid-column: 1 / -1;
    color: #32475f;
    font-size: 11px;
    font-weight: 800;
}

.order-action-drawer .quick-assist-section {
    background: #f8fafc;
}

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

.quick-assist-grid > div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
    padding: 3px 0;
}

.quick-assist-grid span {
    color: #7a8798;
    font-size: 10px;
}

.quick-assist-grid strong {
    overflow: hidden;
    color: #405268;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-action-drawer .quick-optional-section {
    display: grid;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 9px;
    overflow: visible;
    border-color: #e4eaf1;
    background: #fbfcfe;
}

.order-action-drawer .quick-optional-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
}

.order-action-drawer .quick-optional-section:not([open]) > .quick-optional-grid {
    display: grid !important;
}

.order-action-drawer .quick-drawer-actions {
    position: sticky;
    z-index: 12;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr;
    gap: 7px;
    margin: 0 -12px -70px;
    padding: 9px 12px;
    border-top: 1px solid #dce5ef;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
}

.order-action-drawer .quick-drawer-actions button {
    min-height: 34px;
    white-space: nowrap;
}

/* Keep optional fields clickable: only the content area scrolls, the footer owns its space. */
.order-action-drawer .quick-drawer-form {
    display: flex;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    flex: 1 1 auto;
    flex-direction: column;
}

.order-action-drawer .quick-drawer-scroll-content {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    min-height: 0;
    padding: 8px 12px 12px;
    overflow-x: hidden;
    overflow-y: auto;
}

.order-action-drawer .quick-drawer-actions {
    position: static;
    z-index: 1;
    flex: 0 0 auto;
    margin: 0;
    padding: 9px 12px;
}

@media (max-width: 560px) {
    .order-action-drawer .quick-field-section,
    .quick-branch-box,
    .quick-assist-grid,
    .order-action-drawer .quick-optional-grid,
    .order-action-drawer .quick-fallback-box {
        grid-template-columns: 1fr;
    }
}

/* Compact quick task card: summary, action, required fields, action buttons. */
.order-action-drawer .quick-order-summary {
    display: grid;
    gap: 3px;
    padding: 8px 12px;
    border-bottom: 1px solid #e7edf4;
    background: #f8fafc;
}

.order-action-drawer .quick-order-summary > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-action-drawer .quick-order-summary strong,
.order-action-drawer .quick-order-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-action-drawer .quick-order-summary strong {
    color: #25384f;
    font-size: 12px;
}

.order-action-drawer .quick-order-summary span {
    color: #718096;
    font-size: 11px;
}

.order-action-drawer .quick-action-summary {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 6px;
    margin: 8px 12px 0;
    padding: 8px 10px;
    border-left: 3px solid #4d83d1;
    border-radius: 5px;
    background: #f3f7fc;
}

.order-action-drawer .quick-action-summary > span:first-child {
    color: #6f7f92;
    font-size: 11px;
    font-weight: 700;
}

.order-action-drawer .quick-action-summary strong {
    color: #203a5a;
    font-size: 12px;
    line-height: 1.45;
}

.order-action-drawer .quick-optional-section {
    display: block;
    padding: 0;
    border-color: #e4eaf1;
    background: #fbfcfe;
}

.order-action-drawer .quick-optional-section > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 7px 9px;
    color: #52657a;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.order-action-drawer .quick-optional-section > summary small {
    color: #8a96a5;
    font-size: 9.5px;
    font-weight: 400;
}

.order-action-drawer .quick-optional-section > .quick-optional-grid {
    display: grid !important;
    padding: 0 9px 9px;
}

.order-action-drawer .quick-optional-section:not([open]) > .quick-optional-grid {
    display: none !important;
}

.order-action-drawer .quick-drawer-actions {
    grid-template-columns: auto auto minmax(118px, 1fr) minmax(118px, 1fr);
}

.order-action-drawer .quick-full-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .order-action-drawer .quick-drawer-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* Online orders: keep data rows below the sticky header while scrolling. */
.order-processing-wrap {
    isolation: isolate;
}

.order-processing-table thead {
    position: relative;
    z-index: 80;
}

.order-processing-table thead th,
.order-processing-table .head-quality {
    z-index: 82 !important;
    background: #f7f9fc;
}

.order-processing-table tbody td,
.order-processing-table .cell-quality,
.order-processing-table .quality-stack {
    z-index: auto !important;
}

.order-processing-table .cell-quality,
.order-processing-table .quality-stack {
    position: static !important;
}

/* Standalone V4 lookup: single-item queries and Excel batch jobs share one page. */
.goods-link-tabs {
    display: inline-flex;
    gap: 2px;
    margin: 0 0 14px;
    padding: 3px;
    border: 1px solid #d6e2f0;
    border-radius: 8px;
    background: #f7faff;
}

.goods-link-tabs a {
    min-height: 32px;
    padding: 7px 13px;
    border-radius: 6px;
    color: #52627a;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.goods-link-tabs a:hover {
    background: #edf5ff;
    color: #1f5fae;
}

.goods-link-tabs a.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 35, 65, 0.16);
    color: #10233f;
}

.goods-link-batch-upload-panel,
.goods-link-batch-job-panel {
    padding: 16px;
}

.goods-link-batch-upload-title,
.goods-link-batch-job-title {
    align-items: flex-start;
    gap: 16px;
}

.goods-link-batch-upload-title {
    justify-content: space-between;
}

.goods-link-batch-upload-title h2,
.goods-link-batch-job-title h2 {
    margin: 0;
}

.goods-link-batch-upload-title p,
.goods-link-batch-job-title p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.goods-link-batch-form-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(300px, 0.85fr);
    align-items: stretch;
    gap: 18px;
    margin-top: 16px;
}

.goods-link-batch-file-zone {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 138px;
    min-width: 0;
    gap: 7px;
    padding: 18px;
    border: 1px dashed #9cbce1;
    border-radius: 8px;
    background: #f8fbff;
    color: #34435a;
    cursor: pointer;
    outline: none;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.goods-link-batch-file-zone:hover,
.goods-link-batch-file-zone:focus-visible,
.goods-link-batch-file-zone.is-dragging {
    border-color: #2474d8;
    background: #f1f7ff;
    box-shadow: 0 0 0 3px rgba(36, 116, 216, 0.12);
}

.goods-link-batch-file-zone.has-file {
    border-color: #8fd6af;
    background: #f4fcf7;
}

.goods-link-batch-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.goods-link-batch-file-zone-label {
    color: #52627a;
    font-size: 12px;
    font-weight: 800;
}

.goods-link-batch-file-zone strong {
    max-width: 100%;
    overflow: hidden;
    color: #10233f;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.goods-link-batch-file-zone small {
    color: #718096;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.goods-link-batch-file-zone-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.goods-link-batch-file-action {
    min-width: 102px;
}

.goods-link-batch-file-paste {
    border-color: #91b8eb;
    background: #edf5ff;
    color: #1559ab;
}

.goods-link-batch-file-paste:hover {
    border-color: #4c8edf;
    background: #e3efff;
    color: #104d96;
}

.goods-link-batch-file-clear {
    border-color: #efc6c4;
    background: #fff8f7;
    color: #a23a35;
}

.goods-link-batch-file-clear:hover {
    border-color: #de9994;
    background: #fff1ef;
    color: #8b2d29;
}

.goods-link-batch-file-clear:disabled {
    border-color: #d8e1ea;
    background: #f7f9fb;
    color: #9aa8b9;
    cursor: not-allowed;
    opacity: 1;
}

.goods-link-batch-file-zone small.is-error {
    color: #b13e37;
}

.goods-link-batch-file-zone small.is-success {
    color: #137a4b;
}

.goods-link-batch-file-zone [hidden] {
    display: none !important;
}

.goods-link-batch-settings {
    display: grid;
    align-content: center;
    gap: 13px;
    min-width: 0;
}

.goods-link-batch-settings .field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #34435a;
    font-size: 13px;
    font-weight: 700;
}

.goods-link-batch-settings .field > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.goods-link-batch-settings em {
    padding: 2px 6px;
    border: 1px solid #c7ddfb;
    border-radius: 999px;
    background: #f3f8ff;
    color: #225ea8;
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
}

.goods-link-batch-settings input[type="text"],
.goods-link-batch-settings select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #c8d6e6;
    border-radius: 7px;
    padding: 7px 10px;
    background: #fff;
    color: #10233f;
    font: inherit;
}

.goods-link-batch-settings select {
    cursor: pointer;
}

.goods-link-batch-settings small {
    color: #718096;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.goods-link-batch-force-refresh {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid #d8e4f1;
    border-radius: 7px;
    background: #fbfdff;
    color: #46566d;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.goods-link-batch-force-refresh input {
    width: 16px;
    height: 16px;
}

.goods-link-batch-upload-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e9f1;
}

.goods-link-batch-upload-actions p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.goods-link-batch-job-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.goods-link-batch-job-actions form {
    margin: 0;
}

.goods-link-batch-progress {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #d6e2f0;
    border-radius: 8px;
    background: #f9fbfe;
}

.goods-link-batch-progress-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.goods-link-batch-progress-head strong {
    flex: 0 0 auto;
    color: #10233f;
    font-size: 14px;
}

.goods-link-batch-progress-head span {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Return execution desk: compact overview, one operating filter layer, dense node queue. */
.return-flow-head {
    margin-bottom: 5px;
    padding-top: 0;
}

.return-flow-head h1 {
    margin-bottom: 1px;
    font-size: 21px;
}

.return-flow-head p {
    font-size: 11px;
    line-height: 1.35;
}

.return-flow-head .primary-button,
.return-flow-head .secondary-button {
    min-height: 30px;
    padding: 4px 10px;
}

.return-flow-overview {
    display: grid;
    grid-template-columns: repeat(7, minmax(112px, 1fr));
    overflow-x: auto;
    border: 1px solid #dbe5ef;
    border-radius: 6px;
    background: #fff;
}

.return-flow-overview > div {
    display: flex;
    min-width: 112px;
    min-height: 39px;
    padding: 4px 8px;
    border-left: 3px solid #6d98d2;
    flex-direction: column;
    justify-content: center;
}

.return-flow-overview > div + div {
    border-top: 0;
}

.return-flow-overview span {
    overflow: hidden;
    color: #5e6f82;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.goods-link-batch-progress-bar {
    height: 7px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf5;
}

.goods-link-batch-progress-bar span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: #2474d8;
    transition: width 180ms ease;
}

.goods-link-batch-progress.is-cancelled .goods-link-batch-progress-bar span {
    background: #94a3b8;
}

.goods-link-batch-progress.is-running {
    border-color: #b8d7ff;
    background: #f7fbff;
}

.goods-link-batch-progress.is-running .goods-link-batch-progress-bar span {
    animation: goods-link-batch-progress-pulse 1.1s ease-in-out infinite;
}

.pill-running {
    border-color: #b8d7ff;
    background: #eaf3ff;
    color: #1d5fab;
}

.pill-running::before {
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: currentColor;
    content: '';
    animation: goods-link-batch-dot-pulse 1.1s ease-in-out infinite;
}

.goods-link-batch-active-query {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    margin-top: 10px;
    color: #1d5fab;
    font-size: 12px;
    font-weight: 800;
}

.goods-link-batch-active-query[hidden] {
    display: none;
}

.goods-link-batch-active-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #2474d8;
    animation: goods-link-batch-dot-pulse 1.1s ease-in-out infinite;
}

@keyframes goods-link-batch-progress-pulse {
    0%, 100% {
        opacity: 0.76;
        box-shadow: 0 0 0 0 rgba(36, 116, 216, 0);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 4px rgba(36, 116, 216, 0.18);
    }
}

@keyframes goods-link-batch-dot-pulse {
    0%, 100% {
        opacity: 0.56;
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

.goods-link-batch-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.goods-link-batch-metrics span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #fff;
    color: #5f6f84;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.goods-link-batch-metrics .success { border-color: #bde7d0; color: #08703c; }
.goods-link-batch-metrics .warn { border-color: #f0d39b; color: #9a5f00; }
.goods-link-batch-metrics .danger { border-color: #f0b6b6; color: #a51d1d; }
.goods-link-batch-metrics .muted { color: #718096; }

.goods-link-batch-error {
    margin: 10px 0 0;
    color: #a51d1d;
    font-size: 12px;
    line-height: 1.4;
}

.goods-link-batch-error[hidden] {
    display: none;
}

.goods-link-batch-job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.goods-link-batch-job-footer .original-link-export-form {
    left: 0;
    right: auto;
}

.goods-link-batch-export-note {
    color: #718096;
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
}

.goods-link-batch-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.goods-link-batch-table-summary {
    color: #52627a;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.goods-link-batch-pagination {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
}

.compact-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 6px 10px;
    border-top: 1px solid #d9e3ef;
    color: #5f6f82;
    font-size: 13px;
}

.compact-pagination > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-pagination .secondary-button {
    min-height: 30px;
    padding: 4px 12px;
}

/* P1 workbench canary: real route preview only, enabled by ?p1_canary=1. */
.workbench-p1-canary .workbench-head {
    margin-bottom: 8px;
}

.workbench-canary-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    margin-bottom: 8px;
    padding: 8px 12px;
    border: 1px solid #d8e2ee;
    border-radius: 6px;
    background: #fff;
}

.workbench-canary-status > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.workbench-canary-status strong {
    color: #15263d;
    font-size: 16px;
}

.workbench-canary-status span,
.workbench-canary-status p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.sop-flow-panel-canary {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 46px;
    padding: 6px 10px;
}

.sop-flow-panel-canary .section-title {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.sop-flow-panel-canary .section-title h2 {
    font-size: 14px;
    white-space: nowrap;
}

.sop-flow-panel-canary .sop-flow-grid {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.sop-flow-panel-canary .sop-flow-card {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 30px;
    padding: 4px 6px;
    border-radius: 4px;
    box-shadow: none;
}

.sop-flow-panel-canary .sop-flow-card span {
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.sop-flow-panel-canary .sop-flow-card strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workbench-p1-canary .canary-task-heading {
    margin-top: 8px;
}

.workbench-p1-canary .task-board:not(.auxiliary-task-board) {
    margin-bottom: 8px;
}

.canary-auxiliary-links {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    margin-bottom: 10px;
    padding: 6px 10px;
    overflow-x: auto;
    border: 1px solid #d8e2ee;
    border-radius: 6px;
    background: #fff;
    white-space: nowrap;
}

.canary-auxiliary-links strong {
    color: #475569;
    font-size: 13px;
}

.canary-auxiliary-links a {
    color: #315a8c;
    font-size: 12px;
}

.canary-auxiliary-links a span {
    color: #64748b;
}

.goods-link-batch-pagination label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.goods-link-batch-pagination select,
.goods-link-batch-pagination input {
    min-height: 30px;
    border: 1px solid #c8d8ea;
    border-radius: 5px;
    background: #fff;
    color: #26384f;
    font: inherit;
}

.goods-link-batch-pagination select {
    min-width: 58px;
    padding: 3px 6px;
}

.goods-link-batch-pagination input {
    width: 54px;
    padding: 3px 6px;
    text-align: center;
}

.goods-link-batch-pagination .secondary-button,
.goods-link-batch-pagination .small-inline-button {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 12px;
}

.goods-link-batch-results-wrap {
    margin-top: 12px;
}

.goods-link-batch-history {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: 12px;
    overflow-x: auto;
    color: #64748b;
    font-size: 12px;
    scrollbar-width: none;
}

.goods-link-batch-history::-webkit-scrollbar {
    display: none;
}

.goods-link-batch-history > span {
    flex: 0 0 auto;
    font-weight: 800;
}

.goods-link-batch-history a {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #fff;
    color: #52627a;
    text-decoration: none;
}

.goods-link-batch-history a.active,
.goods-link-batch-history a:hover {
    border-color: #c7ddfb;
    background: #f3f8ff;
    color: #225ea8;
}

@media (max-width: 900px) {
    .goods-link-batch-form-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .goods-link-tabs {
        display: flex;
    }

    .goods-link-tabs a {
        flex: 1 1 0;
        text-align: center;
    }

    .goods-link-batch-upload-title,
    .goods-link-batch-job-title,
    .goods-link-batch-job-footer,
    .goods-link-batch-upload-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .goods-link-batch-file-zone {
        min-height: 128px;
    }

    .goods-link-batch-upload-actions .primary-button {
        width: 100%;
    }

    .goods-link-batch-progress-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .goods-link-batch-progress-head span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .goods-link-batch-export-note {
        text-align: left;
    }

    .goods-link-batch-table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .goods-link-batch-pagination {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .goods-link-batch-progress.is-running .goods-link-batch-progress-bar span,
    .goods-link-batch-active-dot,
    .pill-running::before {
        animation: none;
    }
}

.return-flow-overview strong {
    color: #183b63;
    font-size: 15px;
    line-height: 1.15;
}

.return-flow-overview .tone-danger {
    border-left-color: #e65b64;
}

.return-flow-overview .tone-danger strong {
    color: #c83a44;
}

.return-flow-overview .is-muted {
    border-left-color: #9badbd;
}

.return-deadline-note {
    margin: 4px 2px 7px;
    color: #64768a;
    font-size: 10.5px;
}

.return-flow-filters {
    display: grid;
    gap: 4px;
    margin: 5px 0;
    padding: 5px 7px;
    border: 1px solid #dbe5ef;
    border-radius: 6px;
    background: #fff;
}

.return-path-tabs,
.return-node-pills {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.return-filter-primary {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.return-filter-primary .return-path-tabs {
    flex: 1 1 auto;
}

.return-path-tabs a,
.return-node-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid #d5e0eb;
    border-radius: 5px;
    color: #40566f;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.return-path-tabs a.active,
.return-node-pills a.active {
    border-color: #3f7ed2;
    color: #155fc0;
    background: #eef5ff;
}

.return-path-tabs b,
.return-node-pills span {
    margin-left: 4px;
    color: #71859a;
    font-size: 10px;
}

.return-advanced-filter {
    position: relative;
    z-index: 18;
    flex: 0 0 auto;
    margin: 0;
    border: 1px solid #dbe5ef;
    border-radius: 6px;
    background: #fff;
}

.return-advanced-filter > summary {
    display: flex;
    min-height: 27px;
    padding: 4px 8px;
    align-items: center;
    gap: 8px;
    color: #2d465f;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.return-advanced-filter:not([open]) > summary small {
    display: none;
}

.return-advanced-filter[open] .return-filter-bar {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 30;
    width: min(1080px, calc(100vw - 250px));
    padding: 8px;
    border: 1px solid #cad8e7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.return-advanced-filter > summary small {
    color: #7b8a9a;
    font-weight: 400;
}

.return-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) repeat(2, 128px) repeat(3, minmax(118px, .8fr)) auto auto;
    gap: 6px;
    padding: 0 8px 8px;
    align-items: end;
}

.return-flow-table-card {
    overflow: hidden;
    border: 1px solid #d9e3ed;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .04);
}

.return-flow-table-head {
    display: flex;
    min-height: 35px;
    padding: 4px 9px;
    border-bottom: 1px solid #dfe7ef;
    align-items: center;
    justify-content: space-between;
}

.return-flow-table-head h2,
.return-flow-table-head p {
    margin: 0;
}

.return-flow-table-head h2 {
    color: #172b43;
    font-size: 14px;
}

.return-flow-table-head p,
.return-flow-table-head > span {
    color: #6f8193;
    font-size: 10.5px;
}

.return-flow-table-wrap {
    max-height: calc(100vh - 300px);
    min-height: 300px;
    overflow: auto;
    isolation: isolate;
}

.return-flow-table-wrap .return-flow-table {
    width: 100%;
    min-width: 1065px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.return-flow-table th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 34px;
    padding: 6px 8px;
    border-bottom: 1px solid #dce5ee;
    color: #40546a;
    background: #f6f8fb;
    font-size: 10.5px;
    text-align: left;
}

.return-flow-table th:nth-child(1), .return-flow-table td:nth-child(1) { width: 145px; }
.return-flow-table th:nth-child(2), .return-flow-table td:nth-child(2) { width: 75px; }
.return-flow-table th:nth-child(3), .return-flow-table td:nth-child(3) { width: 140px; }
.return-flow-table th:nth-child(4), .return-flow-table td:nth-child(4) { width: 125px; }
.return-flow-table th:nth-child(5), .return-flow-table td:nth-child(5) { width: 90px; }
.return-flow-table th:nth-child(6), .return-flow-table td:nth-child(6) { width: 85px; }
.return-flow-table th:nth-child(7), .return-flow-table td:nth-child(7) { width: 100px; }
.return-flow-table th:nth-child(8), .return-flow-table td:nth-child(8) { width: 90px; }
.return-flow-table th:nth-child(9), .return-flow-table td:nth-child(9) { width: 145px; }
.return-flow-table th:nth-child(10), .return-flow-table td:nth-child(10) { width: 70px; }

.return-flow-table td {
    height: 64px;
    padding: 4px 7px;
    border-bottom: 1px solid #e4eaf1;
    color: #334b63;
    background: #fff;
    font-size: 11px;
    line-height: 1.28;
    vertical-align: top;
}

.return-flow-table tbody tr:hover td {
    background: #fbfdff;
}

.return-flow-table td > strong,
.return-flow-table td > small,
.return-flow-table td > a {
    display: block;
    margin-bottom: 2px;
}

.return-flow-table td:nth-child(4) > small,
.return-flow-table td:nth-child(7) > small,
.return-flow-table td:nth-child(8) > small,
.return-flow-table td:nth-child(9) > strong,
.return-flow-table td:nth-child(9) > small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.return-flow-table td:nth-child(7) > small:last-child,
.return-flow-table td:nth-child(9) > small {
    -webkit-line-clamp: 1;
}

.return-flow-table td > small {
    overflow: hidden;
    color: #74869a;
    font-size: 9.5px;
    text-overflow: ellipsis;
}

.return-flow-table .order-link-strong {
    overflow: hidden;
    color: #0969d8;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-product-title {
    display: -webkit-box !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.flow-path-badge,
.flow-node-badge,
.flow-role-badge,
.deadline-badge {
    display: inline-flex;
    max-width: 100%;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 4px;
    align-items: center;
    color: #275b94;
    background: #edf5ff;
    font-size: 10px;
    font-weight: 700;
}

.flow-node-badge {
    color: #975308;
    background: #fff4df;
}

.flow-role-badge {
    color: #465b70;
    background: #eef2f5;
}

.deadline-badge.tone-danger,
.flow-conflict {
    color: #bd303b;
    background: #fff0f1;
}

.deadline-badge.tone-warning {
    color: #9b5b0a;
    background: #fff4df;
}

.return-flow-table .copy-inline {
    max-width: 100%;
    overflow: hidden;
    border: 0;
    color: #176bc2;
    background: transparent;
    font: 10.5px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.return-flow-table th:last-child,
.return-flow-action-cell {
    position: sticky;
    right: 0;
    z-index: 4;
    box-shadow: -5px 0 10px rgba(26, 49, 76, .04);
}

.return-flow-table th:last-child {
    z-index: 7;
}

.return-flow-action-cell .compact-action-button {
    width: 62px;
    min-height: 29px;
    padding: 4px 7px;
    white-space: nowrap;
}

.return-filter-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.return-filter-label {
    flex: 0 0 58px;
    color: #5c6f82;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.return-flow-filters .return-path-tabs,
.return-flow-filters .return-node-pills {
    flex: 1 1 auto;
}

.return-flow-filters .return-filter-bar {
    grid-template-columns: minmax(220px, 1.45fr) repeat(5, minmax(108px, .75fr)) auto auto;
    padding: 0;
    align-items: center;
    gap: 7px;
}

.return-flow-filters .return-filter-bar.is-manager {
    grid-template-columns: minmax(190px, 1.4fr) repeat(6, minmax(88px, .72fr)) auto auto;
}

.return-flow-filters .return-filter-bar label {
    display: block;
    min-width: 0;
}

.return-flow-filters .return-filter-bar label span {
    display: none;
}

.return-flow-filters .return-filter-bar input,
.return-flow-filters .return-filter-bar select {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid #d8e2ee;
    border-radius: 6px;
    font-size: 13px;
}

.return-flow-filters .return-filter-bar button,
.return-flow-filters .return-filter-bar .secondary-button {
    min-height: 32px;
    align-self: center;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 13px;
}

.return-flow-filters .return-filter-actions {
    display: flex;
    min-width: max-content;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.return-flow-table-wrap {
    max-height: calc(100vh - 216px);
    min-height: 350px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f7f9fc;
}

.return-flow-grid {
    display: grid;
    grid-template-columns:
        minmax(190px, 1.04fr)
        minmax(155px, .86fr)
        minmax(278px, 1.5fr)
        minmax(168px, .9fr)
        minmax(138px, .76fr)
        104px;
}

.return-flow-grid-head {
    position: sticky;
    top: 0;
    z-index: 8;
    border-bottom: 1px solid #dce5ee;
    color: #40546a;
    background: #f3f6fa;
    font-size: 10.5px;
    font-weight: 800;
}

.return-flow-grid-head > div {
    min-width: 0;
    padding: 8px 9px;
    border-right: 1px solid #e2e9f1;
}

.return-flow-grid-head > div:last-child {
    position: sticky;
    right: 0;
    z-index: 9;
    background: #f3f6fa;
    box-shadow: -6px 0 12px rgba(26, 49, 76, .05);
}

.return-flow-row {
    position: relative;
    height: 102px;
    min-height: 102px;
    overflow: hidden;
    border-bottom: 1px solid #e0e8f1;
    background: #fff;
    font-size: 13px;
}

.return-flow-row:hover {
    background: #fbfdff;
}

.return-flow-row.tone-danger {
    box-shadow: inset 3px 0 0 #e55863;
}

.return-flow-row.tone-warn {
    box-shadow: inset 3px 0 0 #f0a020;
}

.return-flow-row.tone-ok {
    box-shadow: inset 3px 0 0 #2da66d;
}

.return-flow-row.tone-focus {
    box-shadow: inset 3px 0 0 #3f7ed2;
}

.return-flow-cell {
    min-width: 0;
    height: 101px;
    overflow: hidden;
    padding: 8px 10px;
    border-right: 1px solid #edf2f7;
    color: #283c51;
    font-size: 13px;
    line-height: 1.35;
}

.return-flow-cell strong,
.return-flow-cell b,
.return-flow-cell span,
.return-flow-cell small {
    min-width: 0;
}

.return-flow-action-cell {
    position: sticky;
    right: 0;
    z-index: 4;
    display: flex;
    background: inherit;
    box-shadow: -8px 0 14px rgba(26, 49, 76, .06);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.return-flow-action-cell .compact-action-button {
    width: auto;
    min-width: 92px;
    max-width: 104px;
    min-height: 30px;
    padding: 4px 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
}

.return-flow-action-cell .detail {
    border: 0;
    color: #718399;
    background: transparent;
    font-size: 10px;
    text-decoration: none;
}

.return-flow-action-cell .detail:hover {
    color: #1769e8;
}

.primary-id,
.orderline,
.pathline,
.next-action {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
}

.primary-id {
    margin-bottom: 4px;
}

.primary-id .id-label {
    display: none;
}

.fund-stage {
    display: inline-flex;
    min-height: 18px;
    padding: 1px 5px;
    border-radius: 4px;
    color: #526980;
    background: #edf2f7;
    font-size: 9.5px;
    font-weight: 800;
    white-space: nowrap;
}

.primary-id a {
    overflow: hidden;
    color: #0969d8;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.freight-mark {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #b45309;
    background: #fff3d6;
    font-size: 10px;
    font-weight: 900;
}

.missing-text {
    color: #8a98a8;
    font-size: 11px;
}

.product-title {
    display: block;
    overflow: hidden;
    margin: 4px 0 3px;
    color: #203852;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopline,
.orderline {
    overflow: hidden;
    color: #65788d;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.return-flow-row .copy-inline {
    opacity: 0;
    height: 18px;
    padding: 0 6px;
    border: 1px solid #cfe0f5;
    border-radius: 10px;
    color: #176bc2;
    background: #f5f9ff;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;
    pointer-events: none;
}

.return-flow-row:hover .copy-inline,
.return-flow-row:focus-within .copy-inline {
    opacity: 1;
    pointer-events: auto;
}

.location-cell .loc-main {
    display: block;
    color: #263f5d;
    font-size: 13px;
    font-weight: 700;
    line-height: 18.85px;
}

.location-cell .loc-route {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: #526b84;
    font-size: 13px;
    font-weight: 400;
    line-height: 18.85px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fact-line,
.fund-row {
    display: grid;
    min-width: 0;
    align-items: start;
    text-align: left;
}

.fact-line {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 5px;
    margin-top: 4px;
}

.fund-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px;
    margin-top: 3px;
    font-size: 10px;
    line-height: 13px;
}

.fact-line span,
.fund-row span {
    flex: 0 0 auto;
    color: #7b8da0;
    font-size: 10px;
    font-weight: 400;
    line-height: 14.5px;
}

.fact-line b {
    overflow: hidden;
    color: #344d67;
    font-size: 11px;
    font-weight: 500;
    line-height: 14.85px;
    text-align: left;
    overflow-wrap: anywhere;
}

.fact-line.is-gap b {
    color: #b45e0b;
}

.deadline-line {
    display: inline-flex;
    max-width: 100%;
    margin-top: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    color: #c56a08;
    background: #fff6e8;
    font-size: 11px;
    font-weight: 400;
    line-height: 15.95px;
}

.deadline-line.tone-danger {
    color: #cc3e45;
    background: #fff0f1;
}

.deadline-line.tone-warning {
    color: #c56a08;
    background: #fff4df;
}

.deadline-line.tone-good {
    color: #6c7d90;
    background: #f0f3f6;
}

.pathline {
    margin-bottom: 5px;
    align-items: center;
}

.path-tag {
    flex: 0 0 auto;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
}

.path-tag.is-return {
    color: #0f5f46;
    background: #e9f8f1;
}

.path-tag.is-transit {
    color: #155fc0;
    background: #edf5ff;
}

.path-tag.is-closed {
    color: #56687c;
    background: #eef2f6;
}

.current-node {
    overflow: hidden;
    color: #344b62;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-node i {
    color: #6c7f93;
    font-style: normal;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: 25px;
    min-width: 0;
    margin: 4px 0 5px;
    overflow: hidden;
    align-items: flex-start;
    gap: 0;
}

.flow-step {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 2px;
    align-content: start;
    justify-items: center;
    color: #8997a8;
    font-size: 10px;
    line-height: 1.08;
    text-align: center;
}

.flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 4px;
    left: calc(50% + 7px);
    right: calc(-50% + 7px);
    height: 1px;
    background: #d8e0ea;
}

.flow-step i {
    position: relative;
    z-index: 1;
    width: 8px;
    height: 8px;
    border: 1px solid #c8d3df;
    border-radius: 50%;
    background: #fff;
}

.flow-step b {
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    height: 20px;
    color: #7f8b9a;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.08;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.flow-step.is-done,
.flow-step.is-done::after {
    color: #18835f;
}

.flow-step.is-done i,
.flow-step.is-done::after {
    border-color: #24a36e;
    background: #24a36e;
}

.flow-step.is-current {
    color: #b86b00;
}

.flow-step.is-current i {
    border-color: #f59e0b;
    background: #f59e0b;
}

.next-action {
    justify-content: flex-start;
    color: #63778b;
    font-size: 12px;
}

.next-action b {
    color: #1e3a58;
    font-size: 11px;
}

.basis-warning {
    margin-bottom: 5px;
    padding: 3px 6px;
    border-radius: 4px;
    color: #bd303b;
    background: #fff0f1;
    font-size: 10px;
    font-weight: 800;
}

.funds-cell {
    display: grid;
    align-content: center;
    gap: 3px;
}

.funds-cell .fund-row b {
    color: #314b66;
    font-size: 10px;
    font-weight: 600;
    line-height: 13px;
    text-align: left;
}

.funds-cell .fund-row.is-loss {
    padding-top: 3px;
    margin-top: 1px;
    border-top: 1px solid #e7edf3;
}

.funds-cell .fund-row b.tone-good,
.funds-cell .fund-row b.tone-warn,
.funds-cell .fund-row b.tone-danger,
.funds-cell .fund-row b.tone-base {
    color: #314b66;
}

.funds-cell .fund-row b.tone-loss,
.funds-cell .fund-row.is-loss b {
    color: #b45e0b;
}

.funds-cell small {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: #74869a;
    font-size: 9.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.return-flow-empty {
    padding: 42px 16px;
    color: #6f8193;
    background: #fff;
    font-size: 12px;
    text-align: center;
}

[data-return-flow-save-next][hidden] {
    display: none !important;
}

.return-flow-drawer .quick-drawer-panel {
    max-width: none;
    max-height: none;
    border: 1px solid #d7e3f0;
    border-right: 0;
    border-radius: 7px 0 0 7px;
    color: #1d2939;
    font-size: 12px;
    line-height: normal;
    box-shadow: -20px 0 45px rgba(15, 23, 42, .16);
    outline: none;
    overflow: hidden;
}

.return-flow-drawer {
    align-items: stretch;
    justify-items: end;
    box-sizing: border-box;
    padding: 0;
}

.return-flow-drawer .quick-drawer-scrim {
    background: rgba(15, 23, 42, .18);
}

.return-flow-drawer .quick-drawer-head {
    gap: normal;
    padding: 11px 13px 10px;
    border-bottom-color: #e6edf5;
    background: #fff;
}

.return-flow-drawer .quick-drawer-head p {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.return-flow-drawer .quick-drawer-head h2 {
    color: #102033;
    font-size: 16px;
    line-height: 1.25;
}

.return-flow-drawer .quick-drawer-head small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.return-flow-drawer .quick-drawer-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 18px;
}

.return-flow-form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.return-flow-drawer .quick-drawer-scroll-content {
    display: grid;
    flex: 1 1 auto;
    gap: 7px;
    min-height: 0;
    padding: 10px 12px;
    background: #f8fafc;
    overflow-x: hidden;
    overflow-y: auto;
}

.return-flow-drawer .quick-field-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: normal;
    margin: 0;
    padding: 8px 9px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #fff;
}

.return-flow-drawer .quick-order-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 7px 10px;
    border-color: #e2eaf4;
    background: #fff;
}

.return-flow-drawer .quick-order-summary > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.return-flow-drawer .quick-order-summary strong,
.return-flow-drawer .quick-order-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.return-flow-drawer .quick-order-summary strong {
    color: #1769d8;
    font-size: 12.5px;
    font-weight: 800;
}

.return-flow-drawer .quick-order-summary span {
    color: #667085;
    font-size: 11.5px;
}

.return-flow-drawer .quick-summary-meta span + span::before {
    margin-right: 8px;
    color: #d0d5dd;
    content: "|";
}

.return-flow-drawer .quick-summary-purchase::before {
    margin-right: 4px;
    color: #d0d5dd;
    content: "|";
}

.return-flow-drawer .quick-summary-meta .quick-summary-purchase > span::before {
    content: none;
}

.return-flow-drawer .quick-drawer-sub {
    color: #667085;
    font-size: 11px;
}

.return-flow-drawer .quick-task-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #f1d9a8;
    border-left: 3px solid #f2a744;
    border-radius: 7px;
    background: #fffbf2;
}

.return-flow-drawer .quick-task-card > div {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    padding: 0;
    align-items: baseline;
}

.return-flow-drawer .quick-task-card .quick-task-done {
    padding-top: 4px;
    border-top: 1px dashed #ead7b5;
}

.return-flow-drawer .quick-task-card span {
    color: #8a5a12;
    font-size: 10.5px;
    font-weight: 700;
}

.return-flow-drawer .quick-task-card strong {
    color: #344054;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
}

.return-flow-drawer .quick-task-card .quick-task-done span,
.return-flow-drawer .quick-task-card .quick-task-done strong {
    color: #667085;
    font-size: 10.5px;
    font-weight: 500;
}

.return-flow-drawer .quick-section-head,
.return-flow-drawer .quick-required-hint,
.return-flow-drawer .flow-fields-grid,
.return-flow-drawer .return-next-section p {
    grid-column: 1 / -1;
}

.return-flow-drawer .quick-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.return-flow-drawer .quick-section-head strong {
    color: #26394f;
    font-size: 12px;
}

.return-flow-drawer .quick-section-head small {
    color: #7b899a;
    font-size: 10px;
}

.return-flow-drawer .quick-required-section {
    border-color: #e2eaf4;
    background: #fff;
}

.return-flow-drawer .quick-required-hint {
    margin: 0;
    color: #6b5b3a;
    font-size: 11px;
    line-height: 1.45;
}

.flow-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.return-dispatch-proof {
    grid-column: 1 / -1;
    min-width: 0;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #fbfcfe;
}

.return-dispatch-proof[hidden] {
    display: none;
}

.return-dispatch-proof > summary {
    padding: 8px 10px;
    color: #31506f;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
    list-style-position: inside;
}

.return-dispatch-proof > summary span {
    margin-left: 5px;
    color: #7b899a;
    font-size: 10.5px;
    font-weight: 500;
}

.return-dispatch-proof[data-optional="false"] > summary {
    display: none;
}

.return-dispatch-proof[data-optional="false"] {
    border: 0;
    background: transparent;
}

.return-dispatch-proof > .flow-fields-grid {
    padding: 0 9px 9px;
}

.return-dispatch-proof[data-optional="false"] > .flow-fields-grid {
    padding: 0;
}

.flow-fields-grid label[hidden] {
    display: none !important;
}

.flow-fields-grid label {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: #344b62;
    font-size: 10.5px;
}

.flow-fields-grid label:has(textarea) {
    grid-column: 1 / -1;
}

.flow-fields-grid input,
.flow-fields-grid select,
.flow-fields-grid textarea {
    width: 100%;
}

.return-flow-drawer .flow-action-fields {
    border-color: #e2eaf4;
    background: #fff;
}

.return-flow-drawer .flow-fields-grid input,
.return-flow-drawer .flow-fields-grid select,
.return-flow-drawer .flow-fields-grid textarea {
    min-height: 34px;
    border-color: #c8d8ea;
    border-radius: 7px;
    font-size: 12px;
}

.return-flow-drawer .flow-fields-grid textarea {
    min-height: 58px;
}

.return-flow-drawer .tracking-carrier-hint {
    display: block;
    grid-column: 1 / -1;
    margin-top: 3px;
    color: #667085;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.35;
}

.return-flow-drawer .tracking-carrier-hint[hidden] {
    display: none;
}

.return-flow-drawer .tracking-carrier-hint[data-tone="success"] {
    color: #1f7a4d;
}

.return-flow-drawer .tracking-carrier-hint[data-tone="warning"] {
    color: #b54708;
}

.return-flow-drawer .tracking-carrier-hint[data-tone="info"] {
    color: #175cd3;
}

.return-flow-drawer .quick-optional-section {
    border-color: #e4eaf1;
    background: #fbfcfe;
}

.return-flow-drawer .return-next-section p {
    margin: 0;
    color: #405268;
    font-size: 11.5px;
    line-height: 1.45;
}

.return-flow-drawer .quick-drawer-message {
    min-height: 18px;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

.return-flow-drawer .quick-drawer-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    min-height: 61px;
    padding: 8px 12px;
    border-top: 1px solid #e1e9f2;
    background: #fff;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
}

.return-flow-drawer .quick-drawer-result {
    display: block;
    overflow: hidden;
    min-width: 0;
    max-width: 86px;
    margin-right: auto;
    color: #078761;
    font-size: 11.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.return-flow-drawer .quick-drawer-result b {
    display: inline;
    color: inherit;
    font-size: inherit;
    line-height: normal;
}

.return-flow-drawer .quick-drawer-result span {
    display: none;
}

.return-flow-drawer .quick-drawer-message {
    flex: 1 1 auto;
    min-width: 0;
}

.return-flow-drawer .quick-drawer-message:empty {
    display: none;
}

.return-flow-drawer .quick-full-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.return-flow-drawer .quick-drawer-actions button {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.return-flow-drawer .quick-drawer-actions button[hidden] {
    display: none;
}

.flow-action-fields.has-no-fields .flow-fields-grid::after {
    content: "本动作无需补字段，确认后系统将按事实推进。";
    grid-column: 1 / -1;
    color: #62778d;
    font-size: 11px;
}

.return-flow-drawer .quick-drawer-message.error {
    color: #bd303b;
}

@media (max-width: 1100px) {
    .return-flow-overview {
        grid-template-columns: repeat(7, 126px);
    }

    .return-filter-bar {
        grid-template-columns: minmax(210px, 1.5fr) repeat(2, 124px) repeat(2, minmax(112px, 1fr)) auto auto;
    }

    .return-filter-bar label:nth-of-type(6) {
        display: none;
    }

    .return-flow-grid {
        grid-template-columns:
            minmax(180px, 1fr)
            minmax(148px, .82fr)
            minmax(255px, 1.35fr)
            minmax(150px, .85fr)
            minmax(130px, .7fr)
            96px;
    }

    .flow-step b {
        max-width: 42px;
    }
}

@media (max-width: 560px) {
    .return-flow-drawer {
        align-items: end;
        padding: 0;
    }

    .return-flow-drawer .quick-drawer-panel {
        width: min(var(--quick-task-drawer-width), calc(100vw - 24px));
        max-height: none;
        border-radius: 7px 0 0 7px;
    }

    .return-flow-head .page-actions {
        flex-wrap: nowrap;
    }

    .return-filter-bar,
    .flow-fields-grid {
        grid-template-columns: 1fr;
    }

    .return-flow-drawer .quick-drawer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .return-flow-drawer .quick-drawer-result,
    .return-flow-drawer .quick-drawer-message {
        grid-column: 1 / -1;
        max-width: none;
    }

    .flow-fields-grid label:has(textarea) {
        grid-column: auto;
    }
}
/* Plain invoice collaboration emergency page */
.plain-invoice-page {
    display: grid;
    min-height: calc(100vh - 110px);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 6px;
}

.plain-invoice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 0;
}

.plain-invoice-header h1 {
    margin: 0 0 3px;
    color: #102033;
    font-size: 21px;
    line-height: 1.1;
    font-weight: 700;
}

.plain-invoice-header p {
    margin: 0;
    color: #52677d;
    font-size: 13px;
    line-height: 1.35;
}

.plain-invoice-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.plain-invoice-role-strip {
    display: flex;
    gap: 4px;
    width: fit-content;
    min-height: 32px;
    align-items: center;
    padding: 3px;
    border: 1px solid #d7e2f2;
    border-radius: 9px;
    background: #fff;
}

.plain-invoice-role-strip a {
    min-height: 24px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #4b6075;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
}

.plain-invoice-role-strip a.active {
    border-color: #1f6feb;
    background: #eff6ff;
    color: #1558c0;
}

.plain-invoice-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.plain-invoice-metric {
    min-height: 42px;
    padding: 5px 12px;
    border: 1px solid #d7e2f2;
    border-radius: 8px;
    background: #fff;
}

.plain-invoice-metric span {
    display: block;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 800;
}

.plain-invoice-metric strong {
    display: inline-block;
    margin-top: 2px;
    color: #102033;
    font-size: 17px;
    line-height: 1;
}

.plain-invoice-metric small {
    margin-left: 6px;
    color: #64748b;
    font-size: 11px;
}

.plain-invoice-metric.warn strong { color: #b45309; }
.plain-invoice-metric.danger strong { color: #c24135; }

.plain-invoice-filter {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 154px 154px 138px auto auto;
    align-items: end;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid #d7e2f2;
    border-radius: 8px;
    background: #fff;
}

.plain-invoice-filter label {
    display: grid;
    gap: 3px;
    color: #344b62;
    font-size: 11px;
    font-weight: 700;
}

.plain-invoice-filter input,
.plain-invoice-filter select {
    width: 100%;
    height: 29px;
    padding: 0 9px;
    border: 1px solid #d8e2ee;
    border-radius: 6px;
    background: #fff;
    color: #203852;
    font-size: 13px;
}

.plain-invoice-result-summary {
    display: flex;
    min-height: 24px;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border: 1px solid #d7e2f2;
    border-radius: 6px;
    background: #f8fafc;
    color: #65788d;
    font-size: 11px;
}

.plain-invoice-result-summary strong {
    color: #203852;
    font-size: 12px;
}

.plain-invoice-table-card {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d7e2f2;
    border-radius: 8px;
    background: #fff;
}

.plain-invoice-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.plain-invoice-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: #1d2939;
    font-size: 12px;
}

.plain-invoice-table th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 32px;
    padding: 0 10px;
    border-bottom: 1px solid #d8e1ec;
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.plain-invoice-table td {
    height: 76px;
    padding: 4px 10px;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    vertical-align: top;
}

.plain-invoice-table tr:hover td { background: #fbfdff; }
.plain-invoice-table .col-order { width: 20%; }
.plain-invoice-table .col-need { width: 17%; }
.plain-invoice-table .col-documents { width: 22%; }
.plain-invoice-table .col-flow { width: auto; }
.plain-invoice-table .col-action { width: 104px; }

.plain-invoice-row { box-shadow: inset 3px 0 0 #cbd5e1; }
.plain-invoice-row.wait { box-shadow: inset 3px 0 0 #f0a020; }
.plain-invoice-row.overdue { box-shadow: inset 3px 0 0 #e55863; }
.plain-invoice-row.ready { box-shadow: inset 3px 0 0 #3f7ed2; }
.plain-invoice-row.done { box-shadow: inset 3px 0 0 #2da66d; }

.plain-cell-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.plain-primary-id {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 4px;
}

.plain-primary-id a {
    min-width: 0;
    overflow: hidden;
    color: #0969d8;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.plain-primary-id .plain-purchase-copy {
    visibility: hidden;
    min-height: 18px;
    padding: 0 5px;
    opacity: 0;
    font-size: 10.5px;
    line-height: 16px;
    pointer-events: none;
    transition: opacity .12s ease;
}

.plain-invoice-row:hover .plain-purchase-copy,
.plain-primary-id:focus-within .plain-purchase-copy {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.plain-primary-id.missing a {
    color: #b45309;
    font-weight: 600;
}

.plain-product-title {
    display: block;
    overflow: hidden;
    color: #203852;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-shopline,
.plain-subline {
    overflow: hidden;
    color: #65788d;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-amount {
    color: #102033;
    font-size: 13px;
    font-weight: 800;
}

.plain-need-head {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.plain-invoice-info {
    display: block;
    overflow: hidden;
    color: #344d67;
    font-size: 11.5px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-invoice-recipient {
    overflow: hidden;
    color: #65788d;
    font-size: 10.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-invoice-info:focus-visible,
.plain-invoice-recipient:focus-visible,
.plain-flow-facts span:focus-visible {
    border-radius: 3px;
    outline: 2px solid #94bdf2;
    outline-offset: 1px;
}

.plain-due {
    color: #65788d;
    font-size: 11px;
}

.plain-due.overdue {
    color: #c24135;
    font-weight: 800;
}

.plain-status-chip {
    display: inline-flex;
    width: max-content;
    min-height: 20px;
    align-items: center;
    padding: 1px 7px;
    border: 1px solid #d8e2ee;
    border-radius: 999px;
    background: #f1f5f9;
    color: #526980;
    font-size: 11px;
    font-weight: 800;
}

.plain-status-chip.blue { border-color: #bfdbfe; background: #eff6ff; color: #1558c0; }
.plain-status-chip.green { border-color: #bbf7d0; background: #ecfdf5; color: #0f766e; }
.plain-status-chip.orange { border-color: #fed7aa; background: #fff7ed; color: #b45309; }
.plain-status-chip.red { border-color: #fecdd3; background: #fff1f2; color: #b42318; }

.plain-file-line {
    overflow: hidden;
    color: #344d67;
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-file-meta {
    color: #7b8da0;
    font-size: 10.5px;
}

.plain-document-lines {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.plain-document-line {
    display: grid;
    grid-template-columns: 42px auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.plain-document-label {
    color: #475467;
    font-size: 11px;
    font-weight: 800;
}

.plain-inline-action {
    width: max-content;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid #bfd5f3;
    border-radius: 6px;
    background: #f7fbff;
    color: #1558c0;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.plain-inline-action:hover,
.plain-inline-action:focus-visible {
    border-color: #1f6feb;
    background: #eff6ff;
    outline: none;
}

.plain-inline-action.muted {
    border-color: #d7e2ee;
    background: #fff;
    color: #526980;
}

.plain-checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #344d67;
    font-size: 12px;
}

.plain-checkbox-line input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.plain-file-history {
    position: relative;
    width: max-content;
    color: #64748b;
    font-size: 10.5px;
}

.plain-file-history summary {
    color: #526980;
    cursor: pointer;
    list-style: none;
}

.plain-file-history summary::-webkit-details-marker { display: none; }

.plain-file-history-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    display: grid;
    width: 250px;
    max-height: 180px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #d7e2ee;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
}

.plain-file-history-panel a {
    display: grid;
    gap: 2px;
    padding: 5px 6px;
    color: #1558c0;
    text-decoration: none;
}

.plain-file-history-panel a + a { border-top: 1px solid #edf2f7; }
.plain-file-history-panel small { color: #7b8da0; font-size: 10px; }

.plain-next-main {
    display: block;
    color: #203852;
    font-size: 12px;
    font-weight: 800;
}

.plain-next-sub {
    display: block;
    margin-top: 4px;
    color: #65788d;
    font-size: 11px;
    line-height: 1.35;
}

.plain-next-sub.danger {
    color: #b42318;
}

.plain-flow-facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 2px 10px;
    margin-top: 5px;
    color: #344d67;
    font-size: 11px;
    line-height: 1.3;
}

.plain-flow-facts span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-flow-facts b {
    margin-right: 5px;
    color: #66788b;
    font-weight: 700;
}

.plain-flow-facts .plain-flow-completion {
    color: #65788d;
}

.plain-row-actions {
    display: grid;
    min-height: 68px;
    align-items: center;
    align-content: center;
    gap: 5px;
    justify-items: center;
}

.plain-quick-action {
    width: 78px;
    min-height: 25px;
    padding: 0;
    border: 1px solid #b9cee7;
    border-radius: 4px;
    background: #f5f9ff;
    color: #1769d8;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.plain-quick-action:hover,
.plain-quick-action:focus-visible {
    border-color: #1f6feb;
    background: #1f6feb;
    color: #fff;
    outline: none;
}

.plain-detail-action {
    color: #526980;
    font-size: 11px;
    text-decoration: none;
}

.plain-detail-action:hover,
.plain-detail-action:focus-visible {
    color: #1558c0;
    text-decoration: underline;
    outline: none;
}

.plain-action-note {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.plain-material-gap {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: #8a5a12;
    font-size: 11px;
    line-height: 1.35;
}

.plain-material-gap span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-material-gap a {
    flex: 0 0 auto;
    color: #1558c0;
    font-weight: 700;
    text-decoration: none;
}

.drawer-backdrop[data-plain-invoice-backdrop] {
    z-index: 1080;
}

.plain-invoice-drawer {
    position: fixed;
    top: var(--quick-drawer-top, 8px);
    right: 0;
    bottom: var(--quick-drawer-bottom, 8px);
    z-index: 1090;
    box-sizing: border-box;
    width: 400px;
    max-width: min(400px, calc(100vw - 24px));
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #d7e3f0;
    border-right: 0;
    border-radius: 7px 0 0 7px;
    background: #fff;
    box-shadow: -20px 0 45px rgba(15, 23, 42, .16);
    font-size: 12px;
    line-height: normal;
}

.plain-invoice-drawer[hidden],
.drawer-backdrop[data-plain-invoice-backdrop][hidden] {
    display: none !important;
}

.plain-invoice-drawer-panel {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.plain-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px 10px;
    border-bottom: 1px solid #e1e9f2;
    flex: 0 0 auto;
}

.plain-drawer-head p {
    margin: 0 0 3px;
    color: #64748b;
    font-size: 11px;
}

.plain-drawer-head h2 {
    margin: 0;
    color: #102033;
    font-size: 15px;
    line-height: 1.25;
}

.plain-drawer-close {
    width: 30px;
    height: 30px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 18px;
    cursor: pointer;
}

.plain-drawer-body {
    display: grid;
    gap: 7px;
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px 12px;
    background: #f8fafc;
    overflow-x: hidden;
    overflow-y: auto;
}

.plain-drawer-section {
    display: grid;
    gap: 7px;
    padding: 8px 9px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #fff;
    color: #344d67;
    font-size: 12px;
    line-height: 1.45;
}

.plain-drawer-section.soft {
    background: #fbfcfe;
}

.plain-drawer-section h3 {
    margin: 0;
    color: #26394f;
    font-size: 12px;
}

.plain-drawer-summary {
    color: #344d67;
    font-size: 12px;
    line-height: 1.45;
}

.plain-auto-fill-box {
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid #dbe7f3;
    border-radius: 7px;
    background: #f8fbff;
    color: #344d67;
    font-size: 11.5px;
    line-height: 1.45;
}

.plain-auto-fill-box strong {
    color: #203852;
    font-size: 12px;
}

.plain-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.plain-form-grid label,
.plain-form-grid .full {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: #344b62;
    font-size: 10.5px;
}

.plain-form-grid .full {
    grid-column: 1 / -1;
}

.plain-form-grid input,
.plain-form-grid textarea,
.plain-form-grid select {
    box-sizing: border-box;
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #c8d8ea;
    border-radius: 7px;
    font-size: 12px;
}

.plain-form-grid textarea {
    min-height: 72px;
    resize: vertical;
}

.plain-drawer-actions {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-height: 61px;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-top: 1px solid #e1e9f2;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 20px rgba(15,23,42,.06);
    flex: 0 0 auto;
}

.plain-drawer-actions span {
    max-width: 70px;
    margin-right: auto;
    overflow: hidden;
    color: #078761;
    font-size: 11.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-drawer-action-buttons,
.plain-unsaved-guard {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.plain-drawer-action-buttons button,
.plain-unsaved-guard button {
    min-height: 32px;
    padding-right: 8px;
    padding-left: 8px;
    white-space: nowrap;
}

.plain-drawer-action-buttons[hidden],
.plain-unsaved-guard[hidden],
.plain-form-grid [data-reason-field][hidden] {
    display: none;
}

.plain-unsaved-guard {
    width: 100%;
    justify-content: flex-end;
}

.plain-unsaved-guard span {
    max-width: 76px;
    margin-right: auto;
    color: #b45309;
}

.plain-task-summary-grid,
.plain-action-explain-grid {
    display: grid;
    gap: 5px 10px;
}

.plain-task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plain-action-explain-grid {
    grid-template-columns: 1fr;
}

.plain-task-summary-grid span,
.plain-action-explain-grid span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.plain-action-explain-grid span {
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
}

.plain-task-summary-grid b,
.plain-action-explain-grid b {
    color: #66788b;
    font-size: 10.5px;
}

.plain-task-summary-grid em,
.plain-action-explain-grid em {
    overflow: hidden;
    color: #203852;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-action-explain {
    border-left: 3px solid #1f6feb;
    background: #f8fbff;
}

.plain-required-action {
    border-color: #f5cf78;
    background: #fffaf0;
}

.plain-required-action h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plain-required-action h3 span {
    color: #b45309;
    font-size: 10px;
}

.plain-required-action > small {
    color: #7b6a48;
    font-size: 10.5px;
}

.plain-send-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border: 1px solid #ead8a8;
    border-radius: 6px;
    background: #fff;
}

.plain-send-file-card > div:first-child {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.plain-send-file-card b {
    overflow: hidden;
    color: #203852;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-send-file-card span {
    color: #7b6a48;
    font-size: 10.5px;
}

.plain-send-file-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.plain-send-info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #344d67;
}

.plain-send-info-head .secondary-button,
.plain-send-file-actions .secondary-button {
    min-height: 25px;
    padding: 3px 8px;
    font-size: 10.5px;
}

.plain-send-info-list {
    display: grid;
    gap: 4px;
}

.plain-send-info-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    border: 1px solid #eadfbe;
    border-radius: 5px;
    background: #fffdf8;
}

.plain-send-info-list span {
    overflow: hidden;
    color: #344d67;
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plain-copy-line {
    border: 0;
    background: transparent;
    color: #1558c0;
    font-size: 10.5px;
    cursor: pointer;
}

.plain-copy-line:hover,
.plain-copy-line:focus-visible {
    text-decoration: underline;
    outline: none;
}

.plain-invoice-drawer .plain-invoice-parse-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.plain-invoice-drawer .plain-invoice-parse-head {
    flex-wrap: wrap;
}

.plain-invoice-drawer .plain-invoice-document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plain-invoice-drawer .plain-invoice-document-grid label.wide {
    grid-column: 1 / -1;
}

.plain-invoice-drawer .plain-invoice-item-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    padding-bottom: 7px;
    border-bottom: 1px solid #e7edf4;
}

.plain-invoice-drawer .plain-invoice-item-remove {
    grid-column: 2;
    justify-self: end;
}

@media (max-width: 1180px) {
    .plain-invoice-filter {
        grid-template-columns: minmax(220px, 1fr) 130px 130px 120px auto auto;
    }
}
.return-work-view-row {
    border-bottom: 1px solid #e5edf6;
    padding-bottom: 6px;
}

.return-work-view-tabs a {
    min-width: 112px;
    justify-content: center;
}

.return-roster-warning {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    padding: 5px 9px;
    border-left: 3px solid #e69a24;
    color: #8a4b08;
    background: #fff8e8;
    font-size: 12px;
    line-height: 1.4;
}

.return-roster-warning a {
    flex: 0 0 auto;
    margin-left: 12px;
    color: #155fc0;
    font-weight: 600;
    text-decoration: none;
}

.return-node-pills a.is-risk-filter {
    border-color: #efc47e;
    color: #9a5b0a;
    background: #fffaf0;
}

.return-scope-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 29px;
    overflow: hidden;
    column-gap: 10px;
}

.return-scope-filter-row.has-node-scopes {
    grid-template-columns: max-content 1px minmax(0, 1fr);
}

.return-scope-group {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.return-path-filter-group {
    flex: 0 0 auto;
}

.return-scope-divider {
    align-self: stretch;
    width: 1px;
    min-height: 20px;
    margin: 2px 0;
    background: #e3eaf2;
}

.return-node-filter-row {
    min-width: 0;
}

.return-node-filter-label {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.return-node-filter-row .return-node-pills {
    flex: 1 1 auto;
    min-width: 0;
}

.return-waiting-label {
    color: #64748b;
    display: inline-flex;
    font-size: 12px;
    justify-content: center;
    line-height: 28px;
    min-width: 88px;
}

.field-optional {
    color: #64748b;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
}
.return-flow-filters > [data-return-queue-navigation] {
    display: contents;
}
.history-assignee-line {
    color: var(--text-muted, #64748b);
    font-size: 12px;
    line-height: 20px;
}

.history-assign-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
}

.history-assign-form select {
    min-width: 0;
}
