: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);
}

.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-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;
}

@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;
    }
}

* {
    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);
}

.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;
}

.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-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;
}

.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;
}

.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;
}

.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: 1320px;
    table-layout: fixed;
}

.return-risk-table th:nth-child(1),
.return-risk-table td:nth-child(1) { width: 210px; }
.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-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);
}

.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: 1880px;
    table-layout: fixed;
}

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

.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-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-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-money {
    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;
}

.cell-margin {
    color: var(--teal);
    font-weight: 700;
}

.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 {
    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-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: 12px;
    padding: 18px 20px;
    overflow-y: auto;
}

.quick-drawer-form label {
    display: grid;
    gap: 5px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.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-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: 12px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    background: #f9fbfd;
    font-size: 13px;
    color: #526176;
}

.order-list-summary strong {
    color: var(--text);
}

.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: 12px;
    font-weight: 600;
    background: #fff8e8;
    border: 1px solid #f0d5a6;
    border-radius: 5px;
    padding: 2px 8px;
}

.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;
}

.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 {
    margin-bottom: 14px;
}

.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-ink: #13243a;
    --entry-muted: #64748b;
    --entry-soft: #f7faff;
}

.order-entry-redesign .order-form-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(318px, 360px);
    gap: 14px;
}

.order-entry-redesign .order-form-main {
    gap: 10px;
}

.order-entry-section {
    border: 1px solid var(--entry-line);
    border-left: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
    overflow: visible;
}

.order-entry-section .form-section-head {
    position: relative;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 4px;
}

.order-entry-section .form-section-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #1f6feb;
}

.order-entry-section.section-3 .form-section-head::before {
    background: #0f766e;
}

.order-entry-section.section-4 .form-section-head::before {
    background: #d97706;
}

.order-entry-section.section-5 .form-section-head::before {
    background: #64748b;
}

.order-entry-section .section-index {
    width: 24px;
    height: 24px;
    background: #13243a;
    font-size: 12px;
}

.order-entry-section .form-section-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--entry-ink);
    font-size: 15px;
    letter-spacing: 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: 4px;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    background: #f8fbff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.section-help-link::before {
    content: "?";
    display: inline-grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 900;
}

.section-help-link:hover,
.section-help-link:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    outline: 0;
}

.inline-rule-strip {
    display: grid;
    gap: 5px;
    margin: 6px 14px 2px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    line-height: 1.45;
}

.inline-rule-strip span {
    display: block;
}

.inline-rule-strip.warn {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #92400e;
}

.order-entry-redesign .order-form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 9px 10px;
    padding: 10px 14px 14px;
}

.order-entry-redesign .field {
    min-width: 0;
    grid-column: span 3;
}

.order-entry-redesign .field-label-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 20px;
    margin-bottom: 3px;
}

.order-entry-redesign .field-label-row label {
    margin: 0;
    color: #25364b;
    font-size: 12px;
    font-weight: 800;
}

.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;
}

.system-field-badge {
    margin-left: auto;
    padding: 1px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.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: 34px;
    padding: 5px 8px;
    border-color: #cbd8e6;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
}

.order-entry-redesign textarea.form-control {
    min-height: 58px;
    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 .field-shop,
.order-entry-redesign .field-order_no,
.order-entry-redesign .field-order_date {
    grid-column: span 3;
}

.order-entry-redesign .field-order_status {
    grid-column: span 3;
}

.order-entry-redesign .field-order_amount,
.order-entry-redesign .field-quantity,
.order-entry-redesign .field-item_id,
.order-entry-redesign .field-product_type,
.order-entry-redesign .field-buyer_wangwang {
    grid-column: span 2;
}

.order-entry-redesign .field-product_title {
    grid-column: span 6;
}

.order-entry-redesign .field-purchase_product_price,
.order-entry-redesign .field-purchase_freight,
.order-entry-redesign .field-purchase_cost,
.order-entry-redesign .field-purchase_order_no,
.order-entry-redesign .field-purchase_order_filled_at,
.order-entry-redesign .field-logistics_company_choice,
.order-entry-redesign .field-logistics_company_other,
.order-entry-redesign .field-tracking_number {
    grid-column: span 3;
}

.order-entry-redesign .field-no_ship_type,
.order-entry-redesign .field-refund_contact_status,
.order-entry-redesign .field-refund_completed_at,
.order-entry-redesign .field-supplier_refund_status,
.order-entry-redesign .field-fulfillment_review_at,
.order-entry-redesign .field-invoice_required,
.order-entry-redesign .field-invoice_type,
.order-entry-redesign .field-other_cost,
.order-entry-redesign .field-cost_type {
    grid-column: span 3;
}

.order-entry-redesign .field-supplier_refund_note,
.order-entry-redesign .field-order_note,
.order-entry-redesign .field-invoice_info,
.order-entry-redesign .field-invoice_no {
    grid-column: span 6;
}

.order-entry-redesign .field-merchant_name,
.order-entry-redesign .field-main_category {
    grid-column: span 3;
}

.order-entry-redesign .field-supplier_product_url {
    grid-column: span 4;
}

.order-entry-redesign .field-merchant_tags {
    grid-column: span 8;
}

.order-entry-redesign .merchant-tag-picker {
    margin-top: 5px;
}

.order-entry-redesign .merchant-tag-options {
    max-height: 74px;
    overflow-y: auto;
}

.order-entry-redesign .merchant-tag-custom-row {
    max-width: 360px;
}

.order-entry-redesign .field.conditional-hidden {
    display: none;
}

.order-entry-redesign .order-form-aside {
    top: 76px;
}

.order-entry-redesign .order-assist-card {
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border-color: #d6e1ee;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
}

.order-submit-card {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.order-entry-redesign .assist-card-head h2 {
    color: #13243a;
    font-size: 15px;
}

.order-entry-redesign .assist-card-head p {
    font-size: 12px;
    line-height: 1.45;
}

.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 14px 12px;
    padding: 7px 10px;
    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: 8px;
    border-top: 1px dashed #e2e8f0;
}

.order-entry-redesign .section-is-current {
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .08);
}

.order-entry-redesign .section-is-current .form-section-head::before {
    width: 4px;
    background: #2563eb;
}

.status-trigger-note {
    display: none;
    margin: 0 14px 8px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.45;
}

.status-trigger-note.is-visible {
    display: block;
}

.status-trigger-note.note-info {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.status-trigger-note.note-warn {
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #9a3412;
}

.order-entry-redesign .field {
    position: relative;
    padding-left: 8px;
}

.order-entry-redesign .field::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 0;
    width: 3px;
    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;
}

.order-entry-redesign .field-help-dot.active {
    border-color: #1d4ed8;
    background: #dbeafe;
    color: #1d4ed8;
}

.field-state-badge {
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.5;
    white-space: nowrap;
}

.field-state-badge.field-is-required {
    border: 1px solid #f3c56b;
    background: #fff7dc;
    color: #9a5b00;
}

.field-state-badge.field-is-current-required {
    border: 1px solid #9cc5f8;
    background: #eaf4ff;
    color: #1d4ed8;
}

.order-entry-redesign .field-is-required::before {
    background: #f0ad28;
}

.order-entry-redesign .field-is-required input:not([disabled]):not([readonly]),
.order-entry-redesign .field-is-required select:not([disabled]),
.order-entry-redesign .field-is-required textarea:not([disabled]):not([readonly]) {
    border-color: #f3c56b;
    background: #fffaf0;
}

.order-entry-redesign .field-is-current-required::before {
    background: #3b82f6;
}

.order-entry-redesign .field-is-current-required input:not([disabled]):not([readonly]),
.order-entry-redesign .field-is-current-required select:not([disabled]),
.order-entry-redesign .field-is-current-required textarea:not([disabled]):not([readonly]) {
    border-color: #9cc5f8;
    background: #f1f7ff;
}

.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: #f5f7fa;
    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: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
}

.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: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 1280px) {
    .order-entry-redesign .order-form-workbench {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .order-entry-redesign .order-form-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .order-entry-redesign .field,
    .order-entry-redesign .field-shop,
    .order-entry-redesign .field-order_no,
    .order-entry-redesign .field-order_date,
    .order-entry-redesign .field-order_status,
    .order-entry-redesign .field-purchase_product_price,
    .order-entry-redesign .field-purchase_freight,
    .order-entry-redesign .field-purchase_cost,
    .order-entry-redesign .field-purchase_order_no,
    .order-entry-redesign .field-purchase_order_filled_at,
    .order-entry-redesign .field-logistics_company_choice,
    .order-entry-redesign .field-logistics_company_other,
    .order-entry-redesign .field-tracking_number {
        grid-column: span 3;
    }

    .order-entry-redesign .field-product_title,
    .order-entry-redesign .field-supplier_refund_note,
    .order-entry-redesign .field-order_note,
    .order-entry-redesign .field-invoice_info,
    .order-entry-redesign .field-invoice_no,
    .order-entry-redesign .field-merchant_tags,
    .order-entry-redesign .field-supplier_product_url {
        grid-column: span 6;
    }
}

@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;
    }

    .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;
    }

    .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;
}

.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,
.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 {
    border-color: #cbd8e6;
    border-radius: 7px;
}

.structured-filter-bar input:focus,
.structured-filter-bar select:focus,
.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;
    }
}

/* 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 .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;
}

@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);
}

.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 - 360px);
    min-height: 500px;
    overflow: auto;
}

.shop-decision-table {
    min-width: 1260px;
    table-layout: fixed;
}

.shop-decision-table th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f8fafc;
}

.shop-decision-table th:nth-child(1) { width: 230px; }
.shop-decision-table th:nth-child(2) { width: 110px; }
.shop-decision-table th:nth-child(3) { width: 100px; }
.shop-decision-table th:nth-child(4) { width: 120px; }
.shop-decision-table th:nth-child(5) { width: 120px; }
.shop-decision-table th:nth-child(6) { width: 110px; }
.shop-decision-table th:nth-child(7) { width: 145px; }
.shop-decision-table th:nth-child(8) { width: 110px; }
.shop-decision-table th:nth-child(9) { width: 140px; }
.shop-decision-table th:nth-child(10) { width: 210px; }
.shop-decision-table th:nth-child(11) { 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, 94vw);
    max-height: 86vh;
}

.shop-batch-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) 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: 260px;
    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-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;
    }
}
