/* =============================================================
   设计令牌
   方向：物流控制台。冷静、精确、耐看。
   一个中性灰阶（偏冷石墨）+ 一个强调色（信号蓝），语义色只表达状态；
   表面不用色，颜色留给数据与状态。
   ============================================================= */
:root {
    --bg: #f3f4f6;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --surface-3: #eef0f3;

    --sidebar: #1b1f24;
    --sidebar-2: #23282e;
    --sidebar-3: #2b3138;
    --sidebar-ink: #e6e8eb;
    --sidebar-ink-2: #9aa2ab;
    --sidebar-line: rgba(255, 255, 255, 0.08);

    --ink: #1f2328;
    --ink-2: #4b5563;
    --ink-3: #6b7280;
    --ink-4: #9ca3af;

    --line: rgba(31, 35, 40, 0.09);
    --line-strong: rgba(31, 35, 40, 0.16);

    --accent: #2563eb;
    --accent-ink: #1d4ed8;
    --accent-soft: #eff4ff;

    --success: #15803d;
    --success-soft: #edf7f0;
    --warn: #b45309;
    --warn-soft: #fdf6ec;
    --danger: #b91c1c;
    --danger-soft: #fdf0f0;
    --muted-soft: #f1f2f4;

    --radius-control: 8px;
    --radius-card: 12px;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);
    --font-ui: -apple-system, "Segoe UI", system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 500; }
a { color: var(--accent-ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 数字统一等宽对齐：单号、数量、金额在表格里能对齐 */
.num, .mono, td.num, .uo-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* 线性图标：统一 18px、1.5 描边，颜色跟随文字 */
.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ========== 左侧导航 ========== */
.sidebar {
    width: 248px;
    background: var(--sidebar);
    height: 100vh;
    color: var(--sidebar-ink);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--sidebar-line);
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-line);
}

.sidebar-header h1 {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--sidebar-ink);
}

.nav-list {
    list-style: none;
    padding: 0.5rem 0;
    flex: 1;
    /* 导航项超出侧边栏高度时自身滚动，底部的 footer 保持可见 */
    min-height: 0;
    overflow-y: auto;
}

.nav-list::-webkit-scrollbar {
    width: 6px;
}

.nav-list::-webkit-scrollbar-thumb {
    background: var(--sidebar-3);
    border-radius: 3px;
}

.nav-list::-webkit-scrollbar-thumb:hover {
    background: #3a4148;
}

/* 导航是后台密度最高的区域：行高统一 36，图标一列，文字一行 */
.nav-item {
    min-height: 36px;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-ink-2);
    font-size: 13px;
    transition: background-color 0.15s, color 0.15s;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: var(--sidebar-2);
    color: var(--sidebar-ink);
}

.nav-item.active {
    background: var(--sidebar-3);
    color: #fff;
    border-left-color: var(--accent);
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--sidebar-ink-2);
}

.nav-item.active .nav-icon { color: #fff; }

/* 折叠菜单：一级分组 + 二级页面 */
.nav-group-header {
    min-height: 36px;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-ink);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    border-left: 2px solid transparent;
    transition: background-color 0.15s;
}

.nav-group-header:hover {
    background: var(--sidebar-2);
}

.nav-group-header .nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--sidebar-ink-2);
}

.nav-group-title {
    flex: 1;
}

.nav-arrow {
    font-size: 10px;
    color: var(--sidebar-ink-2);
    transition: transform 0.15s;
}

.nav-group.open > .nav-group-header .nav-arrow {
    transform: rotate(90deg);
}

/* 分组内含当前页面时，标题高亮提示所在位置 */
.nav-group.has-active > .nav-group-header {
    color: #fff;
}

.nav-sub-list {
    list-style: none;
    display: none;
    background: transparent;
}

.nav-group.open > .nav-sub-list {
    display: block;
    padding-bottom: 4px;
}

.nav-sub-item {
    min-height: 34px;
    padding: 0 12px 0 40px;
    font-size: 13px;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--sidebar-line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex-shrink: 0;
}

/* superadmin 的代入租户切换器 */
.acting-tenant-wrap label {
    display: block;
    font-size: 11px;
    color: var(--sidebar-ink-2);
    margin-bottom: 4px;
}

.acting-tenant-select {
    width: 100%;
    min-height: 30px;
    padding: 0 8px;
    background: var(--sidebar-2);
    color: var(--sidebar-ink);
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius-control);
    font-size: 12px;
    cursor: pointer;
}

.acting-tenant-select:focus {
    outline: none;
    border-color: var(--accent);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sidebar-ink);
}

.user-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sidebar-ink-2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sidebar-ink-2);
}

.logout-btn {
    padding: 0 10px;
    height: 28px;
    background: transparent;
    color: var(--sidebar-ink-2);
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius-control);
    font-size: 12px;
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.logout-btn:hover {
    background: var(--sidebar-2);
    color: var(--sidebar-ink);
    border-color: var(--line-strong);
}

/* ========== 前端版本检测（一键更新到最新版文件） ========== */
.sidebar-version {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
    color: var(--sidebar-ink-2);
}

.sidebar-version-label {
    word-break: break-all;
}

.version-update-btn {
    padding: 0 8px;
    height: 24px;
    background: transparent;
    color: var(--sidebar-ink-2);
    border: 1px solid var(--sidebar-line);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    align-self: flex-start;
    transition: color 0.15s, border-color 0.15s;
}

.version-update-btn:hover {
    color: var(--sidebar-ink);
    border-color: var(--line-strong);
}

.version-update-btn:disabled {
    color: var(--sidebar-ink-2);
    opacity: 0.6;
    cursor: default;
}

/* 有新版时用静默的文字强调，不做呼吸动画 */
.version-update-btn.has-update {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ========== 管理后台容器 ========== */
.admin-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ========== 主内容区 ========== */
.main-content {
    margin-left: 248px;
    flex: 1;
    min-width: 0;
    padding: 24px 32px 40px;
    min-height: 100vh;
    max-width: 1680px;
}

.content-section {
    display: none;
    min-width: 0;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    line-height: 1.3;
    color: var(--ink);
    font-weight: 500;
}

.section-header p {
    font-size: 13px;
    color: var(--ink-3);
    margin-top: 4px;
}

/* 启动校验态：有本地会话时替代登录页，等 /verify 返回 */
.boot-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.boot-brand {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-3);
    letter-spacing: 0.02em;
}

.boot-bar {
    width: 120px;
    height: 2px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.boot-bar span {
    display: block;
    width: 40px;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    animation: boot-slide 1.1s ease-in-out infinite;
}

@keyframes boot-slide {
    0% { transform: translateX(-40px); }
    100% { transform: translateX(120px); }
}

@media (prefers-reduced-motion: reduce) {
    .boot-bar span { animation: none; width: 100%; }
}

/* ========== 登录页面 ========== */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg);
}

.login-box {
    background: var(--surface);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    width: 100%;
    max-width: 380px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--ink);
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

/* superadmin 代入租户的常驻提示 */
.acting-tenant-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    font-size: 12px;
    color: var(--ink-2);
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--ink-2);
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 40px;
    height: auto;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    font-size: 13px;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-btn {
    width: 100%;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
}

.login-btn:hover {
    background: var(--accent-ink);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

/* ========== 卡片容器 ========== */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

/* 库存管理页仓租卡片：单价读不到时的原因提示 */
.inv-sf-alert {
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(180, 83, 9, 0.25);
    border-radius: var(--radius-control);
    background: var(--warn-soft);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.6;
}
.inv-sf-alert-title { color: var(--warn); font-weight: 600; }
.inv-sf-alert-action { color: var(--ink-3); }
.inv-sf-alert-detail { margin-top: 4px; font-size: 12px; color: var(--ink-4); }
.inv-sf-alert-detail summary { cursor: pointer; }
.inv-sf-alert-detail code { display: block; margin-top: 4px; font-family: var(--font-mono); word-break: break-all; white-space: pre-wrap; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

/* ========== 按钮 ========== */
button {
    height: 32px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-3);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

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

button.primary:hover {
    background: var(--accent-ink);
}

button.secondary,
a.secondary {
    background: var(--surface);
    color: var(--ink-2);
    border-color: var(--line-strong);
}

button.secondary:hover,
a.secondary:hover {
    background: var(--surface-2);
    color: var(--ink);
}

button.danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(185, 28, 28, 0.18);
}

button.danger:hover {
    background: #fbe4e4;
}

button.small {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

/* ========== Tab栏 ========== */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.tab {
    height: 36px;
    padding: 0 14px;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}

.tab:hover {
    color: var(--ink);
}

.tab.active {
    color: var(--ink);
    font-weight: 500;
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== 表格 ========== */
table {
    width: 100%;
    border-collapse: collapse;
}

/* 列头不换行：中文列名被挤成竖排是布局 bug，不是密度 */
th {
    background: transparent;
    font-weight: 500;
    font-size: 12px;
    color: var(--ink-3);
    white-space: nowrap;
}

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

td { color: var(--ink-2); }
td.num, td .num { font-variant-numeric: tabular-nums; }

tbody tr:hover {
    background: var(--surface-2);
}

.expand-icon {
    cursor: pointer;
    color: var(--accent);
    font-size: 11px;
}

/* 订单查询 13 列：给表格一个最小宽度，列头保持一行 */
.oq-table-wrap > table { min-width: 1360px; }
/* 单号、日期、状态不折行，行高才能保持一致；客户/收货地址允许折行 */
.oq-table-wrap > table td { white-space: nowrap; }
.oq-table-wrap td.oq-col-customer,
.oq-table-wrap td.oq-col-shipping_to { white-space: normal; min-width: 140px; }
/* 操作列固定在右侧：13 列横向滚动时，操作始终可点 */
.oq-table-wrap > table th:last-child,
.oq-table-wrap > table td:last-child:not([colspan]) {
    position: sticky;
    right: 0;
    background: var(--surface);
    box-shadow: -1px 0 0 var(--line);
    z-index: 1;
}
.oq-table-wrap > table tbody tr:hover td:last-child { background: var(--surface-2); }

/* ========== 筛选栏 ========== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    color: var(--ink-3);
}

.filter-group input,
.filter-group select {
    min-height: 32px;
    height: auto;
    padding: 0 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    font-size: 13px;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* 勾选型筛选项：复选框与文字同行，与同排输入框底部对齐 */
.filter-group label.filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    font-size: 13px;
    color: var(--ink-2);
    cursor: pointer;
}

.filter-group label.filter-check input {
    padding: 0;
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* 订单查询：横向滚动 + 列设定 */
.oq-table-wrap {
    overflow-x: auto;
}

.oq-col-settings {
    position: relative;
}

.oq-col-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 30;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.10);
    padding: 12px 14px;
    min-width: 220px;
    max-height: 360px;
    overflow-y: auto;
}

.oq-col-panel-title {
    font-size: 12px;
    color: var(--ink-3);
    margin-bottom: 8px;
}

.oq-col-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-2);
    padding: 4px 0;
    cursor: pointer;
    user-select: none;
}

.oq-col-panel label:hover {
    color: var(--ink);
}

.oq-col-panel-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.oq-nowrap {
    white-space: nowrap;
}

/* 订单查询：多选筛选下拉（订单状态 / 数据来源 / 国家）
   部分选择器带 .filter-group 前缀，用来压过筛选栏对 input / label 的通用样式 */
.oq-ms {
    position: relative;
}

.oq-ms-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 140px;
    max-width: 240px;
    height: auto;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
}

.oq-ms-btn:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.oq-ms-btn.oq-ms-active {
    border-color: var(--accent);
}

.oq-ms-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oq-ms-caret {
    color: var(--ink-3);
    font-size: 11px;
}

.oq-ms-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 30;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.10);
    padding: 8px 12px;
    min-width: 220px;
    max-width: 360px;
}

.oq-ms-panel[hidden] {
    display: none;
}

.oq-ms-list {
    max-height: 280px;
    overflow-y: auto;
}

.filter-group .oq-ms-panel .oq-ms-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
}

.filter-group .oq-ms-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-2);
    padding: 4px 0;
    cursor: pointer;
    user-select: none;
}

.filter-group .oq-ms-panel label[hidden] {
    display: none;
}

.filter-group .oq-ms-panel label:hover {
    color: var(--ink);
}

.filter-group .oq-ms-panel label input[type="checkbox"] {
    min-height: 0;
    width: 14px;
    height: 14px;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.oq-ms-actions {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
}

.oq-ms-actions button {
    height: auto;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
}

/* 订单查询：常驻提示条（筛选栏上方）
   手工单没有对应的 Shopline 订单，后端 NO_SHOPLINE_ORDER_TYPES 判定后跳过出库单，
   运单号不会自动回传店铺 —— 这一条必须常驻可见，避免客服误以为回传失败。 */
.oq-hint-box {
    background: var(--accent-soft);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: var(--accent-ink);
    border-radius: var(--radius-control);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.5;
}

/* ========== 消息提示 ========== */
.message {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-control);
    border: 1px solid var(--line);
    font-size: 13px;
    display: none;
}

.message.error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(185, 28, 28, 0.18);
}

.message.success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(21, 128, 61, 0.18);
}

.message.show {
    display: block;
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-card);
    padding: 32px;
    text-align: center;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.upload-area:hover {
    border-color: var(--accent);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.upload-label:hover {
    background: var(--accent-ink);
}

/* ========== 阈值输入 ========== */
.threshold-input {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.threshold-save {
    padding: 0.25rem 0.5rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pagination .info {
    font-size: 0.875rem;
    color: #666;
}

/* ========== 弹窗 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

/* ========== 阻塞式处理中遮罩 ========== */
/* 覆盖全页（z-index 高于普通弹窗），长耗时操作期间禁止一切页面交互 */
#blockingOverlay {
    z-index: 2000;
    background: rgba(0,0,0,0.65);
}

.blocking-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border: 4px solid #e0e6ed;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: blocking-spin 0.9s linear infinite;
}

@keyframes blocking-spin {
    to { transform: rotate(360deg); }
}

/* ========== 订单详情弹窗 ========== */
.od-modal {
    max-width: 960px !important;
    width: 92% !important;
    max-height: 88vh !important;
}
.od-modal .modal-header {
    position: sticky;
    top: -1.5rem;
    margin: -1.5rem -1.5rem 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 10;
}
.od-tab-bar {
    position: relative;
    align-items: center;
}
.od-tab-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}
.od-tab-content {
    display: none;
}
.od-tab-content.active {
    display: block;
}
.od-body {
    font-size: 0.85rem;
    color: #333;
}
.od-section {
    margin-bottom: 1.2rem;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.od-section-title {
    background: #f7f7f9;
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
}
.od-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem 0.8rem;
    padding: 0.6rem 0.8rem;
}
.od-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}
.od-field {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0;
    min-width: 0;
}
.od-field-label {
    font-size: 0.72rem;
    color: #888;
    margin-bottom: 0.1rem;
}
.od-field-value {
    font-size: 0.85rem;
    color: #222;
    word-break: break-word;
}
/* 悬浮显示访问密码：行内展开（不用绝对定位，避免被卡片 overflow:hidden 裁掉） */
.od-pw-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
}
.od-pw-pop {
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding-left: 0.6rem; /* 用 padding 而非 margin：鼠标从链接移到密码区不会丢失 hover */
    white-space: nowrap;
}
.od-pw-wrap:hover .od-pw-pop,
.od-pw-wrap:focus-within .od-pw-pop {
    display: inline-flex;
}
.od-pw-pop > span { font-size: 0.8rem; color: #888; }
.od-pw-pop > code { background: #f4f4f4; border: 1px solid #e3e3e3; padding: 0.1rem 0.4rem; border-radius: 3px; user-select: all; }
.od-pw-pop > button { font-size: 0.75rem; padding: 0.1rem 0.5rem; cursor: pointer; }
.od-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.od-table th, .od-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}
.od-table th {
    background: #fafafa;
    color: #555;
    font-weight: 600;
}
.od-json {
    padding: 0.75rem;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.75rem;
    border-radius: 6px;
    max-height: 360px;
    overflow: auto;
    white-space: pre;
}
.od-empty {
    padding: 1rem;
    text-align: center;
    color: #999;
}
.oq-order-link {
    color: #2980b9;
    cursor: pointer;
    text-decoration: underline;
}
.oq-order-link:hover {
    color: #1a5276;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
}

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

.modal-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
}

.modal-close {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink-3);
    border-radius: 6px;
}

.modal-close:hover {
    color: var(--ink);
    background: var(--surface-2);
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 32px;
    color: var(--ink-3);
}

/* ========== 链接 ========== */
.section-link {
    font-size: 0.875rem;
    color: #3498db;
    text-decoration: none;
}

.section-link:hover {
    text-decoration: underline;
}

/* ========== 统计模块 ========== */
.empty {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.sku-link {
    color: #3498db;
    cursor: pointer;
    text-decoration: underline;
}

.sku-link:hover {
    color: #2980b9;
}

.chart-container {
    position: relative;
    height: 350px;
}

/* ========== 同步工具栏 ========== */
.sync-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.sync-toolbar-hint {
    font-size: 0.875rem;
    color: #666;
}

.sync-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sync-status-text {
    font-size: 0.8rem;
    color: #999;
}

/* ========== 异常订单拦截页面 ========== */
.mp-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
}

.mp-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #444;
}

.mp-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mp-hint {
    font-size: 0.8rem;
    color: #888;
}

.mp-divider {
    height: 1px;
    background: #eee;
    margin: 0.5rem 0 0.25rem;
}

.mp-hidden-input {
    display: none;
}

.mp-link-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.mp-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mp-badge-on {
    background: #e6f7ec;
    color: #27ae60;
    border: 1px solid #b6e5c5;
}

.mp-badge-off {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

.mp-toggle-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px dashed #eee;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.mp-toggle-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.mp-sub-tab-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.mp-sub-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: #777;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.mp-sub-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.mp-sub-tab-content {
    display: none;
}

.mp-sub-tab-content.active {
    display: block;
}

.mp-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
}

.mp-price-value {
    color: #c0392b;
    font-weight: 600;
}

/* ========== 禁止发货区域管理 ========== */
.sr-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.sr-tab-bar {
    flex: 1;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

.sr-table th {
    background: #fafafa;
    font-weight: 600;
    color: #4b5563;
}

.sr-status-active {
    color: #16a34a;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sr-status-active::before {
    content: "●";
    color: #22c55e;
}

.sr-status-inactive {
    color: #9ca3af;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sr-status-inactive::before {
    content: "●";
    color: #d1d5db;
}

.sr-state-all {
    color: #dc2626;
    font-weight: 600;
}

.sr-no-attachment {
    color: #f97316;
}

.sr-attachment-link {
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    word-break: break-all;
}

.sr-attachment-link:hover {
    text-decoration: underline;
}

.sr-attachment-link::before {
    content: "📎";
}

.sr-empty {
    text-align: center;
    color: #9ca3af;
    padding: 2rem 0;
}

.sr-deactivate-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.sr-deactivate-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 新增弹窗 */
.sr-modal {
    max-width: 460px;
}

.sr-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.sr-form-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: start;
    gap: 0.75rem;
}

.sr-form-label {
    font-size: 0.9rem;
    color: #374151;
    padding-top: 0.45rem;
    text-align: right;
}

.sr-required {
    color: #dc2626;
    margin-right: 0.2rem;
}

.sr-form-row select,
.sr-form-row textarea,
.sr-form-row input[type="text"],
.sr-form-row input[type="month"] {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}

.sr-form-row textarea {
    resize: vertical;
    min-height: 70px;
}

.sr-file-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sr-file-row input[type="file"] {
    font-size: 0.85rem;
}

.sr-file-hint {
    font-size: 0.8rem;
    color: #6b7280;
}

.sr-form-hint {
    grid-column: 2 / 3;
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

.sr-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

.mp-price-empty {
    color: #aaa;
}

.mp-component-list {
    color: #666;
    font-size: 0.8rem;
}

/* ===================================================== */
/* 手工单上传弹窗（mo- 前缀，避免与现有类冲突）                */
/* ===================================================== */
.mo-modal {
    max-width: 1080px !important;
    width: 96% !important;
    max-height: 90vh !important;
    padding: 0 !important;
}
.mo-modal .modal-header {
    padding: 14px 22px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 0;
}
.mo-body {
    padding: 22px 24px 12px;
    max-height: 72vh;
    overflow-y: auto;
}
.mo-footer {
    padding: 12px 22px;
    border-top: 1px solid #eef0f3;
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 步骤条 */
.mo-steps {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}
.mo-step {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #9ca3af;
}
.mo-step-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    margin-right: 8px;
}
.mo-step.active { color: #2563eb; font-weight: 600; }
.mo-step.active .mo-step-num { background: #2563eb; }
.mo-step.done .mo-step-num { background: #16a34a; }
.mo-step.done { color: #16a34a; }
.mo-step-line {
    flex: 1; height: 2px; background: #e5e7eb; margin: 0 14px;
}
.mo-step-line.done { background: #16a34a; }

.mo-pane { display: none; }
.mo-pane.show { display: block; }

/* 模式切换 */
.mo-mode-tabs {
    display: inline-flex;
    border: 1px solid #d5d9e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
}
.mo-mode-tab {
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
    color: #4b5563;
    border: none;
}
.mo-mode-tab.active { background: #2563eb; color: #fff; }

/* 上传区 */
.mo-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 36px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: .15s;
    margin-bottom: 18px;
}
.mo-upload-zone:hover { border-color: #2563eb; background: #f0f6ff; }
.mo-upload-icon { font-size: 38px; }
.mo-upload-hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.mo-upload-filename { color: #2563eb; font-weight: 600; margin-top: 8px; }

.mo-row-flex {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.mo-btn {
    border: none; border-radius: 4px; padding: 8px 18px; font-size: 14px; cursor: pointer;
}
.mo-btn-default { background: #fff; border: 1px solid #d5d9e0; color: #4b5563; }
.mo-btn-default:hover { background: #f3f4f6; }
.mo-btn-sm { padding: 6px 14px; font-size: 13px; }

/* 折叠面板 */
.mo-collapse {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}
.mo-collapse-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 16px; background: #f8fafc;
    cursor: pointer; user-select: none;
    font-size: 14px; font-weight: 600; color: #334155;
}
.mo-collapse-head:hover { background: #f1f5f9; }
.mo-arrow { transition: transform .2s; color: #94a3b8; }
.mo-collapse.open .mo-arrow { transform: rotate(90deg); }
.mo-collapse-body { display: none; }
.mo-collapse.open .mo-collapse-body { display: block; }

.mo-note-list { max-height: 240px; overflow-y: auto; }
.mo-note-line {
    padding: 8px 16px; font-size: 13px;
    border-bottom: 1px solid #eef3fa;
    color: #374151; line-height: 1.5;
}
.mo-note-line:nth-child(even) { background: #f7fafe; }

.mo-field-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.mo-field-tbl th, .mo-field-tbl td {
    border: 1px solid #e2e8f0; padding: 7px 10px; text-align: left;
}
.mo-field-tbl th { background: #dbeafe; font-weight: 600; }
.mo-field-tbl td:first-child {
    font-weight: 600; color: #1e40af; white-space: nowrap; background: #f0f6ff;
}
.mo-field-tbl-scroll { max-height: 300px; overflow-y: auto; }

/* 单笔表单 */
.mo-form-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 12px 16px; margin-bottom: 18px;
}
.mo-fg { display: flex; flex-direction: column; gap: 5px; }
.mo-fg-full { grid-column: 1 / -1; }
.mo-fg label { font-size: 12px; color: #5b6472; }
.mo-req { color: #dc2626; }
.mo-fg input, .mo-fg select, .mo-fg textarea {
    min-height: 34px; height: auto; border: 1px solid #d5d9e0; border-radius: 4px;
    padding: 0 10px; font-size: 13px; outline: none;
}
.mo-fg textarea { height: 56px; padding: 8px 10px; resize: vertical; }
.mo-fg input:focus, .mo-fg select:focus, .mo-fg textarea:focus { border-color: #2563eb; }
/* 锁定字段：自动填充且不可更改（如 Client_Name / Order Status） */
.mo-fg input[readonly], .mo-fg select[disabled] {
    background: #f1f5f9; color: #64748b; cursor: not-allowed;
}

/* SKU 段 */
.mo-sku-section {
    border: 1px solid #e2e8f0; border-radius: 6px; padding: 14px; margin-bottom: 18px;
}
.mo-sku-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mo-sku-head h4 { font-size: 14px; color: #334155; }
.mo-sku-row {
    display: grid; grid-template-columns: 40px 1fr 140px 40px; gap: 10px; align-items: center;
    margin-bottom: 8px;
}
.mo-idx { font-size: 13px; color: #94a3b8; text-align: center; }
.mo-sku-row input { height: 32px; border: 1px solid #d5d9e0; border-radius: 4px; padding: 0 10px; font-size: 13px; }
.mo-del {
    border: none; background: #fee2e2; color: #b91c1c;
    border-radius: 4px; cursor: pointer; height: 32px;
}
.mo-del:hover { background: #fecaca; }
.mo-add-sku-btn {
    border: 1px dashed #93c5fd; background: #eff6ff; color: #2563eb;
    border-radius: 4px; padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.mo-add-sku-btn:hover { background: #dbeafe; }
.mo-add-sku-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 第②步：统计卡 + 数据表 */
.mo-tip-box {
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
    padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px;
}
.mo-stat-cards { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.mo-stat-card {
    flex: 1; min-width: 150px; background: #f8fafc;
    border: 1px solid #eceef1; border-radius: 6px; padding: 14px 18px;
}
.mo-stat-card .mo-stat-v { font-size: 26px; font-weight: 700; }
.mo-stat-card .mo-stat-l { font-size: 13px; color: #6b7280; margin-top: 2px; }
.mo-stat-blue .mo-stat-v { color: #2563eb; }
.mo-stat-green .mo-stat-v { color: #16a34a; }
.mo-stat-red .mo-stat-v { color: #dc2626; }

.mo-table-wrap {
    border: 1px solid #eceef1; border-radius: 6px;
    overflow: auto; max-height: 360px;
}
table.mo-data {
    width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap;
}
table.mo-data th {
    position: sticky; top: 0; background: #f3f4f6; padding: 10px;
    text-align: left; font-weight: 600; color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}
table.mo-data td { padding: 9px 10px; border-bottom: 1px solid #f1f3f5; }
table.mo-data tr:hover td { background: #f8fafc; }

.mo-upload-cell { display: flex; align-items: center; gap: 8px; }
.mo-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.mo-badge-ok { background: #dcfce7; color: #15803d; }
.mo-badge-no { background: #fee2e2; color: #b91c1c; }
.mo-mini-up-btn {
    border: 1px solid #d5d9e0; background: #fff;
    border-radius: 4px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.mo-mini-up-btn:hover { background: #f0f6ff; border-color: #2563eb; color: #2563eb; }
.mo-create-shipping {
    min-height: 30px; height: auto; border: 1px solid #d5d9e0; border-radius: 4px; padding: 0 8px; font-size: 13px; background: #fff;
}

/* 第③步：结果 */
.mo-result-hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0; border-radius: 12px;
    padding: 28px; text-align: center; margin-bottom: 22px;
}
.mo-result-hero .mo-check-circle {
    width: 64px; height: 64px; margin: 0 auto 14px;
    background: #22c55e; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 34px;
    box-shadow: 0 4px 14px rgba(34,197,94,.4);
}
.mo-result-hero h3 { font-size: 22px; color: #166534; }
.mo-result-hero p { font-size: 13px; color: #15803d; margin-top: 4px; }

/* 进度条（第③步轮询期间显示） */
.mo-progress { height: 8px; width: 100%; background: #dcfce7; border-radius: 999px; overflow: hidden; }
.mo-progress-bar {
    height: 100%; width: 0%; background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 999px; transition: width 0.4s ease;
}

.mo-result-stats { display: flex; gap: 16px; margin-bottom: 22px; }
.mo-rs-card {
    flex: 1; border-radius: 10px; padding: 20px;
    display: flex; align-items: center; gap: 16px;
    border: 1px solid; position: relative; overflow: hidden;
}
.mo-rs-icon {
    width: 46px; height: 46px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.mo-rs-num { font-size: 30px; font-weight: 800; line-height: 1; }
.mo-rs-label { font-size: 13px; margin-top: 4px; }
.mo-rs-total { background: #eff6ff; border-color: #bfdbfe; }
.mo-rs-total .mo-rs-icon { background: #dbeafe; color: #2563eb; }
.mo-rs-total .mo-rs-num { color: #1d4ed8; }
.mo-rs-total .mo-rs-label { color: #3b6fc4; }
.mo-rs-ok { background: #f0fdf4; border-color: #bbf7d0; }
.mo-rs-ok .mo-rs-icon { background: #dcfce7; color: #16a34a; }
.mo-rs-ok .mo-rs-num { color: #15803d; }
.mo-rs-ok .mo-rs-label { color: #2f9e5a; }
.mo-rs-fail { background: #fef2f2; border-color: #fecaca; }
.mo-rs-fail .mo-rs-icon { background: #fee2e2; color: #dc2626; }
.mo-rs-fail .mo-rs-num { color: #b91c1c; }
.mo-rs-fail .mo-rs-label { color: #c4524f; }

.mo-fail-alert {
    background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px;
    padding: 14px 18px; margin-bottom: 20px;
}
.mo-fail-alert .mo-fa-title {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; color: #92400e; font-size: 14px; margin-bottom: 8px;
}
.mo-fail-alert ul { margin-left: 24px; }
.mo-fail-alert li { font-size: 13px; color: #92400e; margin-bottom: 4px; }

.mo-download-row { display: flex; gap: 16px; margin-bottom: 24px; }
.mo-dl-card {
    flex: 1; border-radius: 12px; padding: 18px 20px; cursor: pointer;
    display: flex; align-items: center; gap: 14px;
    border: 1.5px solid; transition: .18s; background: #fff;
}
.mo-dl-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.mo-dl-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.mo-dl-main { font-size: 15px; font-weight: 600; }
.mo-dl-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.mo-dl-arrow { margin-left: auto; font-size: 18px; color: #cbd5e1; }
.mo-dl-report { border-color: #bfdbfe; }
.mo-dl-report .mo-dl-icon { background: #dbeafe; color: #2563eb; }
.mo-dl-report .mo-dl-main { color: #1d4ed8; }
.mo-dl-report:hover { border-color: #2563eb; }
.mo-dl-error { border-color: #fecaca; }
.mo-dl-error .mo-dl-icon { background: #fee2e2; color: #dc2626; }
.mo-dl-error .mo-dl-main { color: #b91c1c; }
.mo-dl-error:hover { border-color: #dc2626; }

.mo-result-section {
    border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
}
.mo-result-section .mo-rs-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #f8fafc; border-bottom: 1px solid #eef0f3;
}
.mo-result-section .mo-rs-head h4 { font-size: 15px; color: #334155; display: flex; align-items: center; gap: 8px; }
.mo-rs-count { font-size: 12px; color: #94a3b8; }

.mo-status-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 500;
}
.mo-status-pill.ok { background: #dcfce7; color: #15803d; }
.mo-status-pill.fail { background: #fee2e2; color: #b91c1c; }

/* ========== 订单异常管理 ========== */
.oe-card { cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s; }
.oe-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.oe-card.active { border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25); }
.oe-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; white-space: nowrap; }
/* 收货地址列：服务端已脱敏（头尾 + 星号），单行不换行，超长省略 */
.oe-addr { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.oe-tag-issue { background: #fee2e2; color: #b91c1c; }
.oe-tag-processed { background: #dbeafe; color: #1d4ed8; }
.oe-tag-normal { background: #dcfce7; color: #15803d; }
.oe-btn-cell { white-space: nowrap; }

.oe-drawer-mask {
    display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 900;
}
.oe-drawer-mask.open { display: block; }
.oe-drawer {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(640px, 100vw);
    background: #f5f6f8; z-index: 901; display: flex; flex-direction: column;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.18);
    transform: translateX(100%); transition: transform 0.2s;
}
.oe-drawer.open { transform: translateX(0); }
.oe-drawer-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 1rem 1.25rem; background: #fff; border-bottom: 1px solid #e5e7eb;
}
.oe-drawer-head h3 { margin: 0; font-size: 1.05rem; }
.oe-drawer-head p { margin: 0.2rem 0 0; font-size: 0.78rem; color: #888; }
.oe-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem 2rem; }
.oe-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.oe-panel-title { font-weight: 600; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.oe-subtitle {
    font-weight: 600; font-size: 0.9rem; margin: 1.1rem 0 0.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.oe-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem 1rem; }
.oe-info-item .k { font-size: 0.72rem; color: #888; }
.oe-info-item .v { font-size: 0.85rem; word-break: break-word; margin-top: 2px; }
.oe-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.oe-form-grid .oe-span2 { grid-column: 1 / -1; }
.oe-form-grid input, .oe-form-grid select, .oe-form-grid textarea {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.875rem; font-family: inherit;
}
.oe-req { color: #e74c3c; }
.oe-form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.9rem; }
.oe-muted { font-size: 0.75rem; color: #888; }
.oe-hint {
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 6px;
    padding: 0.5rem 0.75rem; font-size: 0.8rem; margin-top: 1rem; display: none;
}
#oeDependent.locked .oe-hint { display: block; }
#oeDependent.locked .oe-record-add, #oeDependent.locked .oe-records,
#oeDependent.locked .oe-dropzone, #oeDependent.locked .oe-attachments,
#oeDependent.locked .oe-subtitle button { opacity: 0.45; pointer-events: none; }
.oe-record-add { display: flex; gap: 0.5rem; }
.oe-record-add input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.875rem; }
.oe-records { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.oe-records li {
    position: relative; padding: 0.35rem 0 0.35rem 1rem; font-size: 0.85rem; border-left: 2px solid #dbeafe; margin-left: 0.3rem;
}
.oe-records li::before {
    content: ""; position: absolute; left: -5px; top: 0.7rem; width: 8px; height: 8px; border-radius: 50%; background: #3498db;
}
.oe-records .t { display: block; font-size: 0.72rem; color: #888; }
.oe-dropzone {
    margin-top: 0.6rem; border: 1px dashed #c7ccd4; border-radius: 8px; padding: 1.1rem;
    text-align: center; color: #888; font-size: 0.8rem;
}
.oe-dropzone.over { border-color: #3498db; background: #eff6ff; }
.oe-attachments { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.oe-attachments li {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.6rem; border: 1px solid #eceef1; border-radius: 6px; margin-bottom: 0.4rem; font-size: 0.82rem;
}
.oe-attachments .name { flex: 1; word-break: break-all; color: #2563eb; cursor: pointer; }
.oe-attachments .meta { color: #888; font-size: 0.72rem; white-space: nowrap; }

/* 订单详情「异常处理记录」 */
.od-subtitle { font-weight: 600; font-size: 0.85rem; color: #2c3e50; margin: 0.8rem 0.8rem 0.4rem; }
.od-section .oe-attachments { margin: 0 0.8rem 0.8rem; }

.oe-src { display: inline-block; padding: 0 6px; border-radius: 8px; font-size: 0.7rem; line-height: 1.5; white-space: nowrap; }
.oe-src-system { background: #f3f4f6; color: #4b5563; }
.oe-src-ragic { background: #fef3c7; color: #92400e; }
.oe-src-manual { background: #dbeafe; color: #1d4ed8; }

/* 未完结异常订单统计报告 */
.er-fixed { padding: 0.75rem; border: 1px dashed #d0d5dd; border-radius: 6px; background: #f8fafc; font-size: 0.875rem; color: #344054; }
.er-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.er-table th, .er-table td { border: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; word-break: break-word; }
.er-table th { background: #f8f8f8; white-space: nowrap; }

/* 异常运输报警：超时订单卡片 + 不再提醒弹窗 */
.tr-card { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; margin-bottom: 0.6rem; border: 1px solid #eceef1; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.tr-card-ref { font-weight: 700; color: #2c3e50; word-break: break-all; }
.tr-card-days { margin-top: 0.2rem; font-size: 0.8rem; color: #e67e22; }
.tr-card-actions { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.tr-modal { max-width: 440px; }
.tr-order-box { background: #f3f4f6; border-radius: 8px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.875rem; }
.tr-note { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 8px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.85rem; }
.tr-choice { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.9rem 1rem; margin-bottom: 0.7rem; border: 1px solid #e5e7eb; border-radius: 10px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.tr-choice:hover { border-color: #3498db; background: #f5faff; }
.tr-choice-num { flex-shrink: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tr-choice-title { font-weight: 600; color: #1f2937; }
.tr-choice-desc { margin-top: 0.2rem; font-size: 0.8rem; color: #6b7280; }

/* ===================================================== */
/* 快递面单更换弹窗（订单管理页）                          */
/* ===================================================== */
.lr-modal {
    max-width: 900px;
}
.lr-body {
    min-height: 220px;
}

/* ① 输入单号 */
.lr-field-label {
    display: block;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.4rem;
}
.lr-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.lr-input:focus {
    outline: none;
    border-color: #6d28d9;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
}
.lr-hint {
    margin: 0.45rem 0 0;
    font-size: 0.8rem;
    color: #9ca3af;
}
.lr-label-note { font-size: 0.72rem; color: #9ca3af; margin-left: 0.25rem; }
.lr-note {
    margin-top: 0.8rem;
    padding: 0.65rem 0.85rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.8rem;
    line-height: 1.55;
    word-break: break-all;
}
.lr-result-notes {
    margin: 0.9rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.6;
}
.lr-result-notes:empty { display: none; }

/* 通用确认弹窗会从别的弹窗里被唤起：DOM 顺序在面单更换弹窗之前，同 z-index 会被盖在下面；
   消息里的换行（多行摘要）要保留 */
#confirmModal { z-index: 1100; }
#confirmMessage { white-space: pre-line; }

/* ② 订单摘要 */
.lr-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #eef1f5;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}
.lr-summary-item { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.lr-summary-key { font-size: 0.75rem; color: #9ca3af; }
.lr-summary-val { font-size: 0.9rem; color: #1f2937; font-weight: 500; word-break: break-all; }

/* 校验结论 */
.lr-alert {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.875rem;
}
.lr-alert.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.lr-alert.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.lr-alert.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.lr-alert-icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    margin-top: 0.1rem;
}
.lr-alert.ok .lr-alert-icon { background: #16a34a; }
.lr-alert.warn .lr-alert-icon { background: #f59e0b; }
.lr-alert.error .lr-alert-icon { background: #dc2626; }
.lr-alert-title { font-weight: 600; margin-bottom: 0.15rem; }
.lr-alert-text { line-height: 1.5; }

/* ③ 更换原因 */
.lr-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.7rem;
}
.lr-reason-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.lr-reason-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.lr-reason-card:hover { border-color: #6d28d9; background: #faf8ff; }
.lr-reason-card.selected {
    border-color: #6d28d9;
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}
.lr-reason-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.45rem;
}
.lr-reason-num {
    flex-shrink: 0;
    width: 1.5rem; height: 1.5rem;
    border-radius: 50%;
    background: #6d28d9;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.lr-reason-desc { font-size: 0.82rem; color: #6b7280; line-height: 1.5; }

/* ④ 表单 */
.lr-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.lr-section {
    border: 1px solid #eceef1;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}
.lr-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem 1.2rem;
}
.lr-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.lr-field-wide { grid-column: 1 / -1; }
.lr-field label { font-size: 0.82rem; color: #374151; }
.lr-field input[type="text"],
.lr-field select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}
.lr-field input.changed {
    border-color: #f59e0b;
    background: #fffbeb;
}
.lr-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: #374151;
    margin-top: 0.4rem;
    cursor: pointer;
}
.lr-footer { display: flex; justify-content: space-between; align-items: center; }

/* 无 API 仓库提醒弹窗：比换面单弹窗窄，纯粹是让人确认一句提醒 */
.lr-notice-modal {
    max-width: 520px;
}
.lr-notice-modal .lr-body {
    min-height: 0;
}
.lr-submit {
    background: #dc2626;
    color: #fff;
    border: 1px solid #dc2626;
    border-radius: 6px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.lr-submit:hover { background: #b91c1c; }
.lr-submit:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 820px) {
    .lr-summary { grid-template-columns: repeat(2, 1fr); }
    .lr-form-grid { grid-template-columns: repeat(2, 1fr); }
    .lr-reason-cards { grid-template-columns: 1fr; }
}


/* ========== 语言切换（i18n.js） ========== */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switch-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sidebar-ink-2);
}

.lang-select {
    min-height: 30px;
    height: auto;
    padding: 0 8px;
    background: var(--sidebar-2);
    color: var(--sidebar-ink);
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius-control);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.lang-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* 时区下拉：与语言下拉同一行，占剩余宽度（文字过长截断，完整名见 title） */
.lang-switch .tz-select {
    flex: 1;
    min-width: 0;
    text-overflow: ellipsis;
    min-height: 30px;
    height: auto;
    padding: 0 6px;
    background: var(--sidebar-2);
    color: var(--sidebar-ink);
    border: 1px solid var(--sidebar-line);
    border-radius: var(--radius-control);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.lang-switch .tz-select:focus {
    outline: none;
    border-color: var(--accent);
}

.login-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
}

.lang-switch-login {
    justify-content: center;
    gap: 6px;
    margin-top: 0;
}

.lang-switch-login .lang-switch-icon {
    width: 14px;
    height: 14px;
    color: var(--ink-4);
}

.lang-switch-login .lang-select {
    min-height: 28px;
    height: auto;
    padding: 0 4px;
    background: transparent;
    color: var(--ink-3);
    border-color: transparent;
    font-size: 12px;
}

.lang-switch-login .lang-select:hover {
    color: var(--ink);
}

.lang-switch-login .lang-select:focus {
    border-color: var(--accent);
}

/* ============================================================
   更新入仓状态弹窗（入库单 · 仅本系统/无API仓库）
   ============================================================ */
.ir-modal {
    max-width: 780px;
}

.ir-body {
    padding: 1rem 1.25rem;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.ir-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 1rem;
}

.ir-info-bar .ir-info-item {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.ir-info-bar .ir-info-item b {
    color: #111827;
    font-weight: 600;
}

.ir-tag-local {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    background: #e8f7ef;
    color: #1e8e5a;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ir-section {
    margin-bottom: 1.1rem;
}

.ir-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.6rem;
}

.ir-section-title .secondary {
    margin-left: auto;
}

.ir-fill-plan {
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: underline;
}

.ir-fill-plan:hover {
    color: #1d4ed8;
}

.ir-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1.25rem;
}

.ir-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ir-field > label {
    font-size: 0.85rem;
    color: #374151;
}

.ir-field input[type="datetime-local"],
.ir-field input[type="text"],
.ir-section textarea {
    padding: 0.45rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}

.ir-section textarea {
    resize: vertical;
    min-height: 64px;
}

.ir-radio {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 0.45rem 0;
}

.ir-radio label {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.ir-sku-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ir-sku-search-row input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: inherit;
}

.ir-sku-results {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.6rem;
}

.ir-sku-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.ir-sku-item:hover {
    background: #eff6ff;
}

.ir-sku-item .ir-sku-code {
    font-weight: 600;
    color: #1f2937;
}

.ir-sku-item .ir-sku-name {
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.ir-sku-empty {
    padding: 0.6rem 0.7rem;
    color: #9ca3af;
    font-size: 0.82rem;
}

.ir-table-wrap {
    overflow-x: auto;
}

.ir-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.ir-table th,
.ir-table td {
    border: 1px solid #e5e7eb;
    padding: 0.4rem 0.55rem;
    text-align: left;
    vertical-align: middle;
}

.ir-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.ir-table td.ir-num {
    text-align: right;
    white-space: nowrap;
}

.ir-table input[type="number"] {
    width: 90px;
    padding: 0.3rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.85rem;
    text-align: right;
    font-family: inherit;
}

.ir-table .ir-diff-zero {
    color: #9ca3af;
}

.ir-table .ir-diff-pos {
    color: #1e8e5a;
    font-weight: 600;
}

.ir-table .ir-diff-neg {
    color: #dc2626;
    font-weight: 600;
}

.ir-table .ir-del {
    border: none;
    background: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.15rem 0.4rem;
}

.ir-table .ir-del:hover {
    background: #fee2e2;
    border-radius: 4px;
}

.ir-table tfoot td {
    background: #f8fafc;
    font-weight: 600;
}

.ir-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid #f3f4f6;
    padding: 0.9rem 1.25rem;
}

.ir-modal-footer .ir-footer-hint {
    margin-right: auto;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ============================================================
   批量修改订单状态弹窗（订单查询页 · 独立页面权限 order-batch-status）
   ============================================================ */
.bs-new-badge {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0 0.35rem;
    background: #e74c3c;
    color: #fff;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: 1px;
}

.bs-modal {
    max-width: 980px;
}

.bs-body {
    padding: 1rem 1.25rem;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.bs-subtitle {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0.4rem 0 0.9rem;
}

.bs-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.bs-cols {
    display: grid;
    /* 右栏放状态清单表（含长说明文字），需要比左栏更宽；min-width:0 防止被表格撑出 */
    grid-template-columns: minmax(240px, 4fr) minmax(380px, 6fr);
    gap: 1rem;
}

.bs-cols > * {
    min-width: 0;
}

.bs-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1.4rem 1rem;
    cursor: pointer;
    text-align: center;
}

.bs-upload:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.bs-upload-icon {
    font-size: 1.6rem;
    color: #0ea5e9;
}

.bs-upload-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.92rem;
}

.bs-upload-hint {
    color: #9ca3af;
    font-size: 0.78rem;
}

.bs-file-chip {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    margin-top: 0.6rem;
}

.bs-parse-errors {
    margin-top: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    line-height: 1.6;
}

.bs-tpl-hint {
    margin-top: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
}

.bs-tpl-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #1f2937;
}

.bs-tpl-title a,
.bs-status-head a {
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: underline;
}

.bs-tpl-desc {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.6;
    margin-top: 0.3rem;
}

.bs-status-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.bs-status-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
}

.bs-status-scroll {
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* 状态清单表：固定列宽，说明列分到足够宽度，长文本正常换行而不是一字一行 */
.bs-status-table {
    table-layout: fixed;
}

.bs-status-table col.bs-col-value {
    width: 38%;
}

.bs-status-table col.bs-col-alias {
    width: 15%;
}

.bs-status-table col.bs-col-desc {
    width: 47%;
}

.bs-status-table td {
    word-break: break-word;
    line-height: 1.5;
}

.bs-status-table,
.bs-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.bs-status-table th,
.bs-status-table td,
.bs-result-table th,
.bs-result-table td {
    border-bottom: 1px solid #f3f4f6;
    padding: 0.35rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.bs-status-table th,
.bs-result-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

.bs-status-table .bs-code {
    font-family: Consolas, Menlo, monospace;
    font-size: 0.76rem;
    color: #1f2937;
    white-space: normal;
    overflow-wrap: anywhere;
}

.bs-result-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.bs-result-sub {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0.25rem 0 0.75rem;
}

.bs-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.bs-stat {
    flex: 1;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.bs-stat b {
    font-size: 1.4rem;
}

.bs-stat span {
    font-size: 0.8rem;
}

.bs-stat-total {
    background: #f1f5f9;
    color: #334155;
}

.bs-stat-ok {
    background: #ecfdf5;
    color: #047857;
}

.bs-stat-fail {
    background: #fef2f2;
    color: #b91c1c;
}

.bs-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.4rem;
}

.bs-result-scroll {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.bs-result-table td.ir-num {
    text-align: right;
    white-space: nowrap;
}

.bs-tag {
    display: inline-block;
    padding: 0.08rem 0.5rem;
    border-radius: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.bs-tag-ok {
    background: #16a34a;
}

.bs-tag-fail {
    background: #dc2626;
}

.bs-result-foot {
    color: #9ca3af;
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

.bs-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid #f3f4f6;
    padding: 0.9rem 1.25rem;
}

.bs-modal-footer .bs-footer-hint {
    margin-right: auto;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ========== 计费页：可折叠分组（API 运费成本 / 客户报价配置）========== */
.bc-group { margin-top: 0.75rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.bc-group > summary {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0.9rem; cursor: pointer; list-style: none; user-select: none;
}
.bc-group > summary::-webkit-details-marker { display: none; }
.bc-group > summary::before { content: '▸'; color: #9ca3af; font-size: 0.8rem; transition: transform 0.15s; }
.bc-group[open] > summary::before { transform: rotate(90deg); }
.bc-group[open] > summary { border-bottom: 1px solid #f3f4f6; }
.bc-group > :not(summary) { padding: 0.5rem 0.9rem 0.9rem; }
.bc-group .bc-group { margin-top: 0.5rem; }
.bc-title { font-weight: 600; color: #1f2937; }
.bc-supplier > summary .bc-title { font-size: 1.05rem; }
.bc-meta { font-size: 0.78rem; color: #9ca3af; }
.bc-export { margin-left: auto; }

/* =============================================================
   统一修正层
   旧页面各自写死的颜色、字重、渐变、发光和圆角在这里收口。
   新组件优先使用上面的令牌。
   ============================================================= */

/* —— 徽标：语义色只表达状态，一律浅底深字 —— */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    background: var(--muted-soft);
    color: var(--ink-2);
    border: 1px solid transparent;
}
.badge-neutral { background: var(--muted-soft); color: var(--ink-2); }
.badge-info    { background: var(--accent-soft); color: var(--accent-ink); }
.badge-progress{ background: #eef2ff; color: #3730a3; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn    { background: var(--warn-soft); color: var(--warn); }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-muted   { background: transparent; color: var(--ink-4); border-color: var(--line); }
.badge-outline { background: transparent; color: var(--ink-3); border-color: var(--line-strong); }
.badge-xs      { height: 18px; padding: 0 6px; font-size: 10px; }

/* 旧徽标类收口 */
.mo-badge,
.oe-tag,
.mp-badge,
.bs-tag,
.ir-tag-local {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.mo-badge-ok, .oe-tag-normal, .bs-tag-ok { background: var(--success-soft); color: var(--success); }
.mo-badge-no, .oe-tag-issue, .bs-tag-fail { background: var(--danger-soft); color: var(--danger); }
.oe-tag-processed { background: var(--accent-soft); color: var(--accent-ink); }
.mp-badge-on { background: var(--success-soft); color: var(--success); }
.mp-badge-off { background: var(--muted-soft); color: var(--ink-3); }
.ir-tag-local { background: var(--muted-soft); color: var(--ink-3); }

/* NEW 徽标不再使用装饰性红块 */
.bs-new-badge { display: none; }

/* —— 统计数字：数字用等宽对齐；带状态含义的卡片只给数字上状态色 —— */
.mo-stat-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 16px 20px;
}
.mo-stat-card .mo-stat-v {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.mo-stat-card .mo-stat-l { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
/* 状态色与表格里的状态徽标同源（.oe-tag-* / .badge-*），卡片底色与边框保持中性 */
.mo-stat-blue .mo-stat-v { color: var(--accent-ink); }
.mo-stat-green .mo-stat-v { color: var(--success); }
.mo-stat-red .mo-stat-v { color: var(--danger); }

/* 订单异常页：三个筛选卡改成紧凑的一行统计，别让空数字占满整屏 */
#oeSummary { gap: 8px; }
#oeSummary .mo-stat-card {
    flex: 0 0 auto;
    min-width: 200px;
    padding: 12px 16px;
    background: var(--surface);
    transition: border-color 0.15s, background-color 0.15s;
}
#oeSummary .mo-stat-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
#oeSummary .mo-stat-card.active { border-color: var(--accent); background: var(--accent-soft); }
#oeSummary .mo-stat-v { font-size: 20px; }
#oeSummary .mo-stat-l { margin-top: 2px; }

/* 手工单结果页：去掉渐变、发光和 800 字重 */
.mo-result-hero {
    background: var(--success-soft);
    border: 1px solid rgba(21, 128, 61, 0.16);
    border-radius: var(--radius-card);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.mo-result-hero .mo-check-circle {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: none;
}
.mo-result-hero h3 { font-size: 18px; font-weight: 500; color: var(--success); }
.mo-result-hero p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

.mo-rs-card { border-radius: var(--radius-card); padding: 16px 20px; }
.mo-rs-num {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.mo-rs-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-control);
    font-size: 18px;
}
.mo-progress {
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.mo-progress-bar {
    height: 100%;
    background: var(--success);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* 卡片悬停不再上浮 */
.mo-dl-card:hover,
.oe-card:hover,
.tr-card:hover { transform: none; box-shadow: none; }
.oe-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

/* —— 其余页面里的高饱和色统一降级 —— */
.threshold-save {
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
}
.threshold-save:hover { background: var(--accent-ink); }

.section-link, .sku-link, .expand-icon { color: var(--accent-ink); }

/* 页内提示框（黄/蓝/红底）统一成浅底 + 细边 */
.mo-tip-box {
    background: var(--warn-soft);
    border: 1px solid rgba(180, 83, 9, 0.18);
    color: var(--warn);
    border-radius: var(--radius-control);
}

/* 计费页标题不再用 600/700 抢层级 */
.bc-title { font-weight: 500; color: var(--ink); }
.bc-supplier > summary .bc-title { font-size: 14px; }
.bc-group { border-color: var(--line); border-radius: var(--radius-control); }

/* 页面里的步骤编号：不用高饱和紫，改用中性 ink */
.lr-reason-num {
    background: var(--ink-2);
    color: #fff;
    font-weight: 500;
}
.mo-step.active { font-weight: 500; }

/* 表格里的状态文字与数字统一等宽 */
td .num, td.num, .tr-card-ref, .mo-rs-num { font-variant-numeric: tabular-nums; }

/* 下拉框兜底：高度随内边距与内容增长，内联 padding 不应把文字裁掉 */
select { height: auto; }

/* 滚动条在浅色面板上保持安静 */
.oq-table-wrap::-webkit-scrollbar { height: 8px; }
.oq-table-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

/* 单号用等宽字体：运单号、OMS 单号扫描/核对时逐位对齐 */
.oq-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--ink);
}

/* 数据异常状态下方的原因说明 */
.oq-status-reason {
    font-size: 11px;
    color: var(--danger);
    max-width: 16rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 店铺同步统计：四个数字统一排版，不再四色 */
.sync-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.sync-stat {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: 12px 16px;
}
.sync-stat-v {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.sync-stat-l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.sync-stat-foot {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-4);
}

/* 各店铺同步次数 */
.sync-store-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    padding: 12px 16px;
    margin-bottom: 8px;
}
.sync-store-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sync-store-name { font-weight: 500; color: var(--ink); word-break: break-all; }
.sync-store-count {
    font-size: 20px;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.sync-store-meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* 次要文字 */
.muted { color: var(--ink-4); }

/* 窄屏：操作列不再常驻，避免 250px 的粘性列吃掉表格可视宽度 */
@media (max-width: 1199px) {
    .oq-table-wrap > table th:last-child,
    .oq-table-wrap > table td:last-child:not([colspan]) {
        position: static;
        box-shadow: none;
    }
}

@media (max-width: 1100px) {
    .sidebar { width: 208px; }
    .main-content { margin-left: 208px; padding: 20px 20px 32px; }
    .nav-sub-item { padding-left: 36px; }
}

/* 徽标里的小圆点：类别用点，不用整块颜色 */
.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

/* —— 仓库配置「UPS 出单规则」：国家 × 数据来源 → 出单类型 ——
   选「快递仅询价」的格子用暖色高亮，一眼看出哪些单不由系统出面单。 */
.oms-ship-rules { margin: 0.75rem 0 1rem; }
.oms-ship-rules-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.oms-ship-rules-help-btn {
    width: 20px; height: 20px; padding: 0; border-radius: 50%;
    border: 1px solid var(--line-strong); background: var(--surface-2);
    color: var(--ink-3); font-size: 0.75rem; line-height: 1; cursor: pointer;
}
.oms-ship-rules-help {
    font-size: 0.82rem; line-height: 1.6; color: var(--ink-2);
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-control); padding: 0.5rem 0.9rem; margin-bottom: 0.6rem;
}
.oms-ship-rules-help p { margin: 0.4rem 0; }
.oms-ship-rules-note { font-size: 0.75rem; color: var(--ink-3); margin: 0.35rem 0; }
.oms-ship-rules-table { width: 100%; border-collapse: collapse; }
.oms-ship-rules-table th,
.oms-ship-rules-table td { border: 1px solid var(--line); padding: 0.35rem 0.6rem; text-align: left; vertical-align: middle; }
.oms-ship-rules-table select { width: 100%; padding: 0.4rem 0.5rem; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.oms-ship-rules-table .oms-ship-country { font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.oms-ship-rules-table select.is-warehouse { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.oms-ship-rules-table select.is-mixed { border-style: dashed; color: var(--warn); }
.oms-ship-rules-table select:disabled { opacity: 0.6; cursor: not-allowed; }

/* —— 订单查询「合并导出 Label/CI」弹窗：左待选、右已选，两区筛选与列表页相同 —— */
.modal.lc-modal {
    max-width: 1560px; width: 96vw; height: 92vh; max-height: 92vh;
    padding: 0; overflow: hidden; display: flex; flex-direction: column;
}
.lc-head { display: flex; align-items: center; gap: 0.75rem; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.lc-head .modal-close { margin-left: auto; }
.lc-head-summary { font-size: 12px; color: var(--ink-3); }
.lc-panes { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 12px 16px; background: var(--surface-2); }
.lc-pane {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control);
}
.lc-pane-head { display: flex; align-items: center; gap: 0.5rem; padding: 10px 12px 6px; }
.lc-pane-title { font-weight: 600; font-size: 14px; }
.lc-badge { font-size: 12px; color: var(--accent); background: rgba(37, 99, 235, 0.08); border-radius: 999px; padding: 1px 8px; }
.lc-pane-tip { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.lc-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 8px; padding: 0 12px 8px; }
.lc-filters .filter-group { gap: 2px; min-width: 0; }
.lc-filters .filter-group label { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-filters .filter-group input,
.lc-filters .filter-group select { width: 100%; min-width: 0; min-height: 30px; font-size: 12px; padding: 0 6px; }
.lc-filters .oq-ms-btn { min-width: 0; max-width: none; width: 100%; min-height: 30px; font-size: 12px; }
.lc-filters .lc-filter-reset { align-self: end; min-height: 30px; font-size: 12px; }
.lc-table-wrap { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lc-table-wrap table { margin: 0; font-size: 12px; }
.lc-table-wrap th, .lc-table-wrap td { white-space: nowrap; padding: 6px 5px; }
.lc-table-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.lc-seq { color: var(--ink-3); text-align: right; }
.lc-pane-footer { display: flex; align-items: center; gap: 0.5rem; padding: 8px 12px; flex-wrap: wrap; }
.lc-pagination { margin: 0 auto; gap: 0.4rem; }
.lc-pagination .info { font-size: 12px; }
.lc-actions { display: flex; align-items: center; gap: 0.4rem; }
.lc-count { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.lc-ok { color: var(--success); font-weight: 600; }
.lc-bottom { display: flex; align-items: center; gap: 0.75rem; padding: 12px 20px; border-top: 1px solid var(--line); }
.lc-bottom-label { font-size: 13px; color: var(--ink-2); }
.lc-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-control); overflow: hidden; }
.lc-seg button { border: 0; border-radius: 0; background: var(--surface); color: var(--ink-2); font-size: 13px; padding: 6px 14px; cursor: pointer; }
.lc-seg button + button { border-left: 1px solid var(--line-strong); }
.lc-seg button.active { background: rgba(37, 99, 235, 0.08); color: var(--accent); font-weight: 600; }
.lc-bottom-summary { font-size: 13px; color: var(--ink-2); }
.lc-help {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
    border-radius: 50%; border: 1px solid var(--line-strong); font-size: 11px; color: var(--ink-3); cursor: help;
}
.lc-bottom #lcGenerateBtn { margin-left: auto; }

/* 进度 / 结果弹窗 */
.lc-result-modal { max-width: 520px; width: 92vw; }
.lc-res-progress { padding: 4px 0 12px; }
.lc-res-progress-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.lc-res-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.lc-res-bar > div { height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.lc-res-bar.failed > div { background: var(--danger); }
.lc-res-sub { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.lc-res-summary { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.lc-res-section { border: 1px solid var(--line); border-radius: var(--radius-control); padding: 12px; margin-bottom: 12px; }
.lc-res-section-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.lc-res-opts { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 6px; }
.lc-res-opts label { display: flex; gap: 0.35rem; align-items: center; font-weight: normal; font-size: 13px; cursor: pointer; }
.lc-res-row { display: flex; align-items: center; gap: 0.75rem; }
.lc-res-hint { flex: 1; font-size: 12px; color: var(--ink-3); }
.lc-res-file { display: flex; align-items: center; gap: 0.75rem; padding: 6px 0; font-size: 13px; }
.lc-res-file + .lc-res-file { border-top: 1px solid var(--line); }
.lc-res-file-name { flex: 1; min-width: 0; }
.lc-res-file-name small { display: block; color: var(--ink-3); word-break: break-all; }
