* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
}

/* ========== 左侧导航 ========== */
.sidebar {
    width: 220px;
    background: #2c3e50;
    /* 固定为视口高度（此前 min-height 随导航项增长，fixed 容器超出部分
       无法滚动到，底部租户切换/退出登录被推出可视区）。 */
    height: 100vh;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h1 {
    font-size: 1rem;
    font-weight: 600;
    color: #ecf0f1;
}

.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: #34495e;
    border-radius: 3px;
}

.nav-list::-webkit-scrollbar-thumb:hover {
    background: #46617e;
}

.nav-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #bdc3c7;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #34495e;
    color: #ecf0f1;
}

.nav-item.active {
    background: #34495e;
    color: #3498db;
    border-left-color: #3498db;
}

.nav-item .nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 折叠菜单：一级分组 + 二级页面 */
.nav-group-header {
    padding: 0.875rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ecf0f1;
    font-size: 0.95rem;
    font-weight: 600;
    user-select: none;
    border-left: 3px solid transparent;
    transition: background 0.2s;
}

.nav-group-header:hover {
    background: #34495e;
}

.nav-group-header .nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

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

.nav-arrow {
    font-size: 0.8rem;
    color: #95a5a6;
    transition: transform 0.2s;
}

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

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

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

.nav-group.open > .nav-sub-list {
    display: block;
}

.nav-sub-item {
    padding: 0.7rem 1rem 0.7rem 3.1rem;
    font-size: 0.875rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #34495e;
    /* 纵向堆叠：租户切换器 / 用户名 / 退出按钮各占一行。
       此前是横向 flex，三者挤一行导致 select 被横向截断。 */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* superadmin 的代入租户切换器 */
.acting-tenant-wrap label {
    display: block;
    font-size: 0.75rem;
    color: #95a5a6;
    margin-bottom: 0.25rem;
}

.acting-tenant-select {
    width: 100%;
    padding: 0.375rem 0.5rem;
    background: #34495e;
    color: #ecf0f1;
    border: 1px solid #46617e;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.acting-tenant-select:focus {
    outline: none;
    border-color: #3498db;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #ecf0f1;
}

.user-icon {
    font-size: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #bdc3c7;
}

.logout-btn {
    /* footer 已改纵向布局，不再需要 margin-left:auto 挤到行尾 */
    padding: 0.375rem 0.75rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    align-self: flex-start;
}

.logout-btn:hover {
    background: #c0392b;
}

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

/* ========== 主内容区 ========== */
.main-content {
    margin-left: 220px;
    flex: 1;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

.content-section {
    display: none;
}

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

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
}

.section-header p {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

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

.login-box {
    background: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.login-error {
    color: #c00;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.login-btn:hover {
    background: #2980b9;
}

/* ========== 卡片容器 ========== */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* ========== 按钮 ========== */
button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
}

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

button.primary {
    background: #3498db;
    color: white;
}

button.primary:hover {
    background: #2980b9;
}

button.secondary,
a.secondary {
    background: #ecf0f1;
    color: #333;
}

button.secondary:hover,
a.secondary:hover {
    background: #bdc3c7;
}

button.danger {
    background: #e74c3c;
    color: white;
}

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

button.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* ========== Tab栏 ========== */
.tab-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

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

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

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.875rem;
}

th {
    background: #f8f8f8;
    font-weight: 600;
    color: #555;
}

tbody tr:hover {
    background: #fafafa;
}

.expand-icon {
    cursor: pointer;
    color: #3498db;
    font-size: 0.7rem;
}

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

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: #666;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* 订单查询：横向滚动 + 列设定 */
.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: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    padding: 0.75rem 0.9rem;
    min-width: 220px;
    max-height: 360px;
    overflow-y: auto;
}

.oq-col-panel-title {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.oq-col-panel label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #333;
    padding: 0.25rem 0;
    cursor: pointer;
    user-select: none;
}

.oq-col-panel label:hover {
    color: #2980b9;
}

.oq-col-panel-actions {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid #eee;
}

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

/* ========== 消息提示 ========== */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    display: none;
}

.message.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.message.success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.message.show {
    display: block;
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: #3498db;
}

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

.upload-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.upload-label:hover {
    background: #2980b9;
}

/* ========== 阈值输入 ========== */
.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;
}
.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: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

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

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* ========== 链接 ========== */
.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 {
    height: 34px; 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 {
    height: 30px; 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: 280px; white-space: normal; word-break: break-word; }

.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; }
.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: 0.5rem;
}

.lang-select {
    padding: 0.375rem 0.5rem;
    background: #34495e;
    color: #ecf0f1;
    border: 1px solid #46617e;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.lang-select:focus {
    outline: none;
    border-color: #3498db;
}

.lang-switch-login {
    justify-content: center;
    margin-top: 1rem;
}

.lang-switch-login .lang-select {
    background: #fff;
    color: #555;
    border-color: #ddd;
}
