* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background-color: #f5f0e6;
    color: #222;
}

/* ========== 通用按钮 ========== */
.btn-primary {
    padding: 7px 16px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: #337ecc; }
.btn-primary:active { transform: scale(0.98); }

.btn-success {
    padding: 7px 16px;
    background: #67c23a;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}
.btn-success:hover { background: #529b2e; }
.btn-success:active { transform: scale(0.98); }

.btn-warn {
    padding: 7px 16px;
    background: #e6a23c;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}
.btn-warn:hover { background: #cf9236; }
.btn-warn:active { transform: scale(0.98); }

.btn-danger {
    padding: 7px 16px;
    background: #f56c6c;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}
.btn-danger:hover { background: #dd6161; }
.btn-danger:active { transform: scale(0.98); }

.btn-default {
    padding: 7px 16px;
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s, transform 0.1s;
}
.btn-default:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.btn-default:active { transform: scale(0.98); }

.btn-info {
    padding: 7px 16px;
    background: #16a8a5;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
}
.btn-info:hover { background: #138a87; }

.btn-mini {
    padding: 3px 8px;
    margin: 0 2px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
}
.btn-mini.btn-primary { background: #409eff; }
.btn-mini.btn-success { background: #67c23a; }
.btn-mini.btn-danger  { background: #f56c6c; }
.btn-mini.btn-warn    { background: #e6a23c; }
.btn-mini.btn-info    { background: #16a8a5; }
.btn-mini.btn-default { background: #fff; color: #909399; border: 1px solid #dcdfe6; }
.btn-mini.btn-default:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-link {
    background: transparent;
    border: none;
    color: #409eff;
    cursor: pointer;
    font-size: 14px;
}
.btn-link:hover { text-decoration: underline; }

/* ========== 状态标签 ========== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    background: #f0f2f5;
    color: #606266;
}
.tag-success { background: #f0f9eb; color: #67c23a; }
.tag-warn    { background: #fdf6ec; color: #e6a23c; }
.tag-danger  { background: #fef0f0; color: #f56c6c; }
.tag-primary { background: #ecf5ff; color: #409eff; }
.tag-info    { background: #f4f4f5; color: #909399; }

/* 已删除订单行样式 */
.deleted-row { background-color: #f5f5f5; }
.deleted-row td { color: #909399; text-decoration: line-through; }

.muted { color: #c0c4cc; font-size: 12px; }
.empty { text-align: center; color: #909399; padding: 30px 0; }
.cell-wrap { max-width: 240px; word-break: break-all; color: #606266; }

/* 预计到仓时间：输入框 + 确认按钮 组合 */
.datetime-confirm-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.datetime-confirm-group input[type="datetime-local"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    font-size: 13px;
    color: #303133;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
}
.datetime-confirm-group input[type="datetime-local"]:focus {
    outline: none;
    border-color: #67c23a;
    box-shadow: 0 0 0 2px rgba(103, 194, 58, 0.15);
}
.datetime-confirm-group input.confirmed {
    border-color: #67c23a;
    background: #f0f9eb;
    color: #529b2e;
    font-weight: 600;
}
.datetime-confirm-group .btn-mini {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
}

/* ========== 登录视图 ========== */
.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}
.login-card {
    width: 380px;
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
.login-title {
    text-align: center;
    font-size: 24px;
    color: #1e3c72;
    margin-bottom: 6px;
}
.login-sub {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-bottom: 24px;
}
.login-card .form-row {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}
.login-card .form-row label {
    width: 48px;
    color: #555;
    font-size: 14px;
}
.login-card .form-row input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
}
.remember-row {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 18px;
    cursor: pointer;
}
.remember-row input { margin-right: 6px; }
.login-btn {
    width: 100%;
    padding: 10px;
    background: #1e3c72;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
}
.login-btn:hover { background: #2a5298; }
.login-tip {
    margin-top: 12px;
    text-align: center;
    color: #f56c6c;
    font-size: 13px;
    min-height: 18px;
}

/* ========== 主视图框架 ========== */
.main-view { min-height: 100vh; }
.top-header {
    height: 56px;
    background: #1e3c72;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}
.top-header .app-name { font-size: 16px; font-weight: bold; }
.top-header .user-info { margin-left: auto; font-size: 13px; opacity: 0.92; }
.top-header .btn-link { color: #fff; opacity: 0.85; }
.top-header .btn-link:hover { opacity: 1; }

/* ========== Tab 导航 ========== */
.tab-nav {
    background: #fff;
    padding: 0 24px;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    gap: 4px;
}
.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}
.tab-btn:hover { color: #409eff; }
.tab-btn.active {
    color: #1e3c72;
    border-bottom-color: #1e3c72;
    font-weight: bold;
}
/* Tab 红点徽章 */
.tab-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 12px;
    background: #f56c6c;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}
.tab-badge.pulse {
    animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ========== Tab 内容区 ========== */
.tab-content {
    padding: 12px 16px;
    max-width: none;
    margin: 0 auto;
    width: 100%;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.pane-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #ebeef5;
}
.pane-bar h3 {
    font-size: 16px;
    color: #1e3c72;
    font-weight: 600;
}

/* ========== 表单卡片 ========== */
.form-card {
    background: #fff;
    padding: 28px 32px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
}
/* 分组 */
.form-section { margin-bottom: 24px; }
.form-section:last-of-type { margin-bottom: 0; }
.form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid #ebeef5;
    letter-spacing: 0.5px;
}
.form-section-title .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #409eff, #67c23a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
/* 网格布局 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 32px;
}
.form-grid .form-row {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}
.form-grid .form-row label {
    width: 120px;
    flex-shrink: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    padding-right: 14px;
    box-sizing: border-box;
}
.form-grid .form-row label em {
    color: #ef4444;
    font-style: normal;
    margin-left: 2px;
    font-weight: 600;
}
.form-grid .form-row label.radio-inline {
    width: auto;
    text-align: left;
    padding-right: 4px;
    cursor: pointer;
}
.form-grid .form-row label.radio-inline input {
    width: auto;
    margin-right: 2px;
}
.form-grid .form-row input,
.form-grid .form-row select,
.form-grid .form-row textarea {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-width: 0;
    font-family: inherit;
}
.form-grid .form-row textarea {
    resize: vertical;
    line-height: 1.6;
    min-height: 38px;
}
.form-grid .form-row input::placeholder,
.form-grid .form-row textarea::placeholder {
    color: #94a3b8;
}
.form-grid .form-row input:hover,
.form-grid .form-row select:hover,
.form-grid .form-row textarea:hover {
    border-color: #cbd5e1;
}
.form-grid .form-row input:focus,
.form-grid .form-row select:focus,
.form-grid .form-row textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}
.form-grid .form-row input:disabled,
.form-grid .form-row select:disabled,
.form-grid .form-row textarea:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}
.form-grid .form-row input[type="number"] { text-align: right; }
.form-grid .form-row input[type="datetime-local"] { color: #1e293b; }
.form-actions {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f0f2f5;
    text-align: right;
}
.form-actions button { margin-left: 10px; }

/* 弹窗内非grid布局的form-row样式 */
.dialog-body .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}
.dialog-body .form-row label {
    width: 120px;
    flex-shrink: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    padding-right: 14px;
    box-sizing: border-box;
}
.dialog-body .form-row label em {
    color: #ef4444;
    font-style: normal;
    margin-left: 2px;
    font-weight: 600;
}
.dialog-body .form-row input,
.dialog-body .form-row select,
.dialog-body .form-row textarea {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-width: 0;
    font-family: inherit;
}
.dialog-body .form-row textarea {
    resize: vertical;
    line-height: 1.6;
    min-height: 38px;
}
.dialog-body .form-row input::placeholder,
.dialog-body .form-row textarea::placeholder {
    color: #94a3b8;
}
.dialog-body .form-row input:focus,
.dialog-body .form-row select:focus,
.dialog-body .form-row textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.dialog-body .form-row input:disabled,
.dialog-body .form-row select:disabled,
.dialog-body .form-row textarea:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

/* 弹窗内提示信息块 */
.dialog-info-block {
    margin: 12px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.7;
}
.dialog-info-block div {
    margin-bottom: 4px;
}
.dialog-info-block div:last-child {
    margin-bottom: 0;
}

/* ========== 操作栏 ========== */
.bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bar-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}
.search-input {
    width: 240px;
    padding: 7px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
}
.status-select {
    padding: 7px 10px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    background: #fff;
}

/* ========== 通用表格 ========== */
.table-wrap {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th { background-color: #f0f2f5; }
td, th {
    text-align: center;
    padding: 9px;
    border: 1px solid #ebeef5;
    font-size: 12px;
}
td { color: #444; }

/* ========== 分页 ========== */
.page-box {
    margin-top: 14px;
    text-align: right;
}
.page-info {
    font-size: 13px;
    color: #606266;
    margin-right: 8px;
}
.page-btn {
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #606266;
}
.page-btn:hover:not(.active):not(:disabled) {
    color: #409eff;
    border-color: #c6e2ff;
}
.page-btn.active {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
}
.page-btn:disabled {
    color: #c0c4cc;
    background: #f4f4f5;
    cursor: not-allowed;
}

/* ========== 弹窗 ========== */
.mask {
    display: none;
    position: fixed;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    animation: maskFadeIn 0.2s ease-out;
}
@keyframes maskFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.dialog {
    display: none;
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 520px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 12px 24px -8px rgba(0, 0, 0, 0.15),
        0 4px 12px -2px rgba(0, 0, 0, 0.08);
    z-index: 100;
    animation: dialogSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translateY(0);
    }
}
.dialog-head {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
    z-index: 1;
}
.close { 
    cursor: pointer; 
    font-size: 18px; 
    color: #94a3b8; 
    transition: all 0.2s ease; 
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
}
.close:hover { 
    color: #ef4444; 
    background: #fef2f2;
}
.dialog-body { 
    padding: 24px; 
}
.dialog-tip {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
    border-left: 4px solid #f59e0b;
}
.audit-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}
.audit-info .info-line { margin-bottom: 10px; font-size: 13px; color: #334155; }
.audit-info .info-line:last-child { margin-bottom: 0; }
.audit-info .info-line span {
    display: inline-block;
    width: 90px;
    color: #64748b;
    font-weight: 500;
}
.dialog-foot {
    padding: 16px 24px;
    border-top: 1px solid #f0f2f5;
    text-align: right;
    position: sticky;
    bottom: 0;
    background: linear-gradient(0deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.dialog-foot button {
    padding: 9px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: 0;
}
.dialog-foot button:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.dialog-foot button:active {
    transform: translateY(0);
}
.dialog-foot button.btn-primary,
.dialog-foot button.btn-success,
.dialog-foot button.btn-warn {
    color: #fff;
    font-weight: 500;
}
.dialog-foot button.btn-primary { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.dialog-foot button.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.dialog-foot button.btn-success { 
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.dialog-foot button.btn-success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}
.dialog-foot button.btn-warn { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.dialog-foot button.btn-warn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.dialog-foot button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== 配载清单专用样式（原配载模块） ========== */
.channel-filter {
    width: 160px;
    padding: 5px;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
}
.stat-info {
    color: #1d4ed8;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 10px;
    background: #eff6ff;
    border-radius: 8px;
}
.cutoff-input {
    padding: 5px 8px;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
    color: #303133;
}
.kdf-search-input {
    padding: 5px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
    color: #303133;
    width: 240px;
    height: 28px;
    line-height: 1.2;
    transition: border-color .2s;
}
.kdf-search-input:focus {
    outline: none;
    border-color: #2563eb;
}
.kdf-search-input::placeholder {
    color: #c0c4cc;
    font-size: 12px;
}
.status-filter {
    padding: 5px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
    color: #303133;
    height: 28px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .2s;
}
.status-filter:focus {
    outline: none;
    border-color: #2563eb;
}
.cargo-layout {
    display: flex;
    gap: 12px;
    min-height: 0;
}
.location-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #f8f9fb;
    border: 1px solid #e4e7ed;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
}
.location-sidebar .ls-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #ebeef5;
    background: #fff;
}
.location-sidebar .ls-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e4e7ed;
    font-weight: 600;
    font-size: 13px;
    color: #303133;
    background: #f8f9fb;
}
.location-grid {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.location-grid .ls-empty {
    text-align: center;
    color: #909399;
    font-size: 12px;
    padding: 20px 10px;
}
.location-card {
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.location-card:hover {
    border-color: #409eff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.12);
    transform: translateY(-1px);
}
.location-card.active {
    border-color: #409eff;
    background: #409eff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}
.location-card.active .lc-name,
.location-card.active .lc-row,
.location-card.active .lc-row .val,
.location-card.active .lc-count {
    color: #fff;
}
.location-card.other-location-card {
    border-style: solid;
    background: #fff;
}
.location-card.other-location-card:hover {
    border-color: #409eff;
    background: #fff;
}
.location-card.other-location-card.active {
    border-color: #409eff;
    background: #409eff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}
.lc-count {
    font-size: 12px;
    color: #909399;
    font-weight: normal;
}
.lc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.lc-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lc-name {
    font-weight: 600;
    font-size: 14px;
    color: #303133;
}
.lc-badge {
    font-size: 12px;
    color: #409eff;
    background: #ecf5ff;
    padding: 2px 8px;
    border-radius: 10px;
}
.location-card.active .lc-badge {
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
}
.lc-actions {
    display: none;
    gap: 4px;
}
.location-card:hover .lc-actions {
    display: flex;
}
.lc-actions button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
}
.lc-actions button:hover {
    background: #f0f2f5;
}
.lc-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #606266;
    margin-bottom: 3px;
}
.lc-row .val {
    font-weight: 500;
}
.lc-row .val.ok { color: #67c23a; }
.lc-row .val.warn { color: #e6a23c; }
.lc-row .val.danger { color: #f56c6c; }
.lc-progress {
    height: 4px;
    background: #ebeef5;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}
.location-card.active .lc-progress {
    background: rgba(255, 255, 255, 0.3);
}
.lc-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}
.cargo-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f5f0e6;
    border-radius: 12px;
    padding: 4px;
}
.cargo-main .cargo-table-wrap {
    flex: 1;
    max-height: calc(100vh - 220px);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    overflow: auto;
}
.location-sidebar.collapsed {
    width: 36px;
    min-width: 36px;
    overflow: hidden;
}
.location-sidebar.collapsed .ls-header,
.location-sidebar.collapsed .location-grid {
    display: none;
}
.location-sidebar.collapsed .ls-toolbar {
    padding: 6px 4px;
    justify-content: center;
}

.cargo-table-wrap {
    background: #fff;
    max-height: calc(100vh - 280px);
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #ebeef5;
}
.cargo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}
.cargo-table .col-hidden {
    display: none;
}
.cargo-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1e40af;
    color: #fff;
    border-right: 1px solid #1e3a8a;
    border-bottom: 2px solid #1e3a8a;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.cargo-table thead th:first-child {
    border-left: 1px solid #1e3a8a;
}
.cargo-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}
.cargo-table thead th.sortable:hover {
    background: #2563eb;
}
#sortArrowStatus, #sortArrowVolume {
    font-size: 11px;
    margin-left: 2px;
}
.cargo-table tbody td {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 8px 6px;
    text-align: center;
    font-size: 13px;
    color: #333;
    user-select: none;
}
.cargo-table tbody td:first-child {
    border-left: 1px solid #ddd;
}
.cargo-table tbody tr:first-child td {
    border-top: 1px solid #ddd;
}
.cargo-table tbody tr:last-child td {
    border-bottom: 1px solid #ddd;
}
.cargo-table tbody tr:hover { background-color: #f0f7ff; }
.cargo-table tbody td[contenteditable="true"] {
    user-select: text !important;
    cursor: text;
}
.cargo-table tbody td[contenteditable="true"]:focus {
    background: #e8f4ff;
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}
.cargo-error-tip {
    background: #fef0f0;
    color: #f56c6c;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 13px;
    border: 1px solid #fbc4c4;
}
/* 配载清单：预报方数差异超过20%的行标红提示 */
.cargo-table tbody tr.row-warn {
    background-color: #fef0f0 !important;
}
.cargo-table tbody tr.row-warn:hover {
    background-color: #fde2e2 !important;
}
.cargo-table tbody td.cell-warn {
    color: #f56c6c !important;
    font-weight: bold;
}

/* 通用 cell-warn 样式（用于预报等表格） */
table tbody td.cell-warn {
    color: #f56c6c !important;
    font-weight: bold;
}

/* 预计时间标签 */
.time-est-tag {
    color: #e6a23c;
    font-size: 11px;
    font-weight: normal;
    margin-left: 3px;
}
.cargo-table tbody td.cell-warn .time-est-tag {
    color: #f56c6c;
}

/* 合并报关行样式 */
.cargo-table tbody tr.merge-parent-row {
    background: linear-gradient(90deg, #fff7e6 0%, #fffbe6 100%) !important;
}
.cargo-table tbody tr.merge-parent-row td {
    font-weight: 500;
    border-top: 2px solid #e6a23c;
}
.cargo-table tbody tr.merge-parent-row:hover {
    background: linear-gradient(90deg, #fff1d4 0%, #fff7d4 100%) !important;
}
.cargo-table tbody tr.merge-parent-row td {
    font-weight: 500;
}
.cargo-table tbody tr.merge-child-row {
    background-color: #f9fafb !important;
    font-size: 13px;
}
.cargo-table tbody tr.merge-child-row td {
    color: #606266;
}
.cargo-table tbody tr.merge-child-row td:first-child {
    border-left: 3px solid #1e88e5;
}
.cargo-table tbody td.merge-kdf-cell {
    background: transparent !important;
    font-weight: 600;
}
.cargo-table tbody td.merge-kdf-cell .merge-label {
    color: #e67e22;
    font-weight: 600;
    font-size: 13px;
}
.cargo-table tbody td.merge-kdf-cell .merge-count-tag {
    color: #909399;
    font-size: 12px;
}
.cargo-table tbody td.merge-cno-cell {
    color: #e67e22;
    font-weight: 500;
}
.merge-toggle-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

/* 问题件列表样式 */
.cargo-table tbody tr.row-problem {
    background-color: #fdf6ec !important;
}
.cargo-table tbody tr.row-problem:hover {
    background-color: #faecd8 !important;
}
.cargo-table tbody td.problem-reason {
    color: #e6a23c;
    font-weight: bold;
}

/* ========== 舱位管理样式 ========== */
.capacity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.capacity-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 18px 20px;
    transition: box-shadow 0.2s, transform 0.1s;
    border-left: 4px solid #409eff;
}
.capacity-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #ebeef5;
    margin-bottom: 14px;
}
.cc-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3c72;
}
.cc-actions {
    display: flex;
    gap: 4px;
}

.cc-body { display: flex; flex-direction: column; gap: 8px; }

.cc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.cc-row-col { flex-direction: column; align-items: flex-start; gap: 6px; }
.cc-label { color: #909399; flex-shrink: 0; }
.cc-value { color: #303133; }

.cc-progress-wrap {
    position: relative;
    height: 18px;
    background: #f0f2f5;
    border-radius: 9px;
    overflow: hidden;
    margin: 4px 0;
}
.cc-progress-bar {
    height: 100%;
    border-radius: 9px;
    transition: width 0.3s ease, background 0.3s ease;
    min-width: 0;
}
.cc-progress-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 0 3px rgba(255,255,255,0.8);
}

.cc-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* 只读卡片样式 */
.capacity-card-readonly {
    border-left-color: #909399;
    opacity: 0.95;
}
.capacity-card-readonly:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 已截单卡片样式 */
.capacity-card-closed {
    background: #f5f5f5;
    border-left-color: #909399;
    opacity: 0.85;
}
.capacity-card-closed:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.capacity-card-closed .cc-title {
    color: #909399;
    text-decoration: line-through;
}
.capacity-card-closed .cc-label {
    color: #c0c4cc;
}
.capacity-card-closed .cc-value {
    color: #909399;
}
.capacity-card-closed .cc-progress-wrap {
    background: #e4e7ed;
}
.capacity-card-closed .cc-tags .tag {
    opacity: 0.6;
}
.cc-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f4f4f5;
    color: #909399;
    border: 1px solid #dcdfe6;
}

/* ========== 渠道多选下拉 ========== */
.channel-multi-select {
    flex: 1;
    position: relative;
    min-width: 0;
}
.ms-dropdown { position: relative; }
.ms-dropdown input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 12px;
    font-size: 13px;
    color: #303133;
    background: #fff;
    box-sizing: border-box;
}
.ms-dropdown input[type="text"]:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64,158,255,0.15);
}
.ms-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    margin-top: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.ms-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #303133;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ms-option:hover { background: #ecf5ff; }
.ms-option.selected { background: #f0f9eb; color: #67c23a; }
.ms-empty {
    padding: 12px;
    text-align: center;
    color: #c0c4cc;
    font-size: 13px;
}

.ms-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 10px;
    min-height: 34px;
    width: 100%;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
}
.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}
.ms-tag-close {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    line-height: 1;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s;
}
.ms-tag-close:hover { 
    background: rgba(255, 255, 255, 0.2);
    color: #fff; 
}

/* 特殊处理：关联渠道行使用垂直布局 */
#cap_channel_select {
    flex-direction: column !important;
    align-items: stretch !important;
}
#cap_channel_select label {
    width: 100% !important;
    text-align: left !important;
    padding-right: 0 !important;
    margin-bottom: 8px;
}
#cap_channel_select input {
    width: 100% !important;
}
#cap_channel_select .ms-options {
    position: fixed !important;
    z-index: 10000 !important;
}

/* ========== 批量预报表格 ========== */
.batch-table-wrap {
    background: #fff;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #ebeef5;
    max-height: calc(100vh - 200px);
}
.batch-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}
.batch-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #2563eb;
    color: #fff;
    border: 1px solid #1e40af;
    padding: 10px 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.batch-table tbody td {
    border: 1px solid #dcdfe6;
    padding: 2px;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}
.batch-table tbody td .batch-cell {
    width: 100%;
    min-width: 60px;
    box-sizing: border-box;
}
.batch-table tbody td .batch-cell:focus {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
    background: #e8f4ff;
}
.batch-table tbody td.row-idx {
    background: #f5f7fa;
    color: #909399;
    font-size: 12px;
    font-weight: 600;
    width: 28px;
}
.batch-table tbody td.row-check {
    text-align: center;
    width: 32px;
    background: #f5f7fa;
}
.batch-table thead th:first-child {
    text-align: center;
    padding: 6px;
}
.batch-table tbody td.row-actions .row-del {
    padding: 2px 6px;
    font-size: 11px;
}
.batch-table tbody tr:hover {
    background-color: #f0f7ff;
}
/* 合并报关组视觉标识 */
.batch-table tbody tr.batch-merge-row td {
    background-color: #fff7e6 !important;
}
.batch-table tbody tr.batch-merge-row:hover td {
    background-color: #ffe7ba !important;
}
/* 合并组左侧竖条：给第一个 td（复选框列）加左边框 */
.batch-table tbody tr.batch-merge-row td:first-child {
    border-left: 4px solid #fa8c16 !important;
}
/* 合并组最后一行：底部加粗，形成组边界 */
.batch-table tbody tr.batch-merge-row[data-merge-end="true"] td {
    border-bottom: 2px solid #fa8c16 !important;
}
/* 合并组标记徽章：放在序号列 */
.batch-table tbody tr.batch-merge-row td.row-idx {
    position: relative;
    background: #fa8c16 !important;
    color: #fff !important;
    font-size: 11px !important;
}
/* 合并组标记徽章显示组号 */
.batch-table tbody tr.batch-merge-row td.row-idx::after {
    content: attr(data-group-badge);
    display: block;
    font-size: 9px;
    font-weight: 400;
    opacity: 0.85;
    margin-top: -1px;
}
.batch-table tbody td .batch-cell[type="number"] {
    text-align: right;
}
.batch-table tbody td .batch-cell[type="datetime-local"] {
    min-width: 140px;
}
.batch-table tbody td textarea.batch-cell {
    min-height: 28px;
    resize: vertical;
    overflow: hidden;
}

/* ========== 批量预报自动填充样式 ========== */
.batch-cell-td {
    position: relative;
    padding: 0 !important;
}
.batch-cell-td .fill-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 6px;
    height: 6px;
    background: transparent;
    cursor: crosshair;
    z-index: 10;
    border-radius: 0 0 2px 0;
    transition: background 0.15s;
}
.batch-cell-td:hover .fill-handle,
.batch-cell-td.active .fill-handle {
    background: #409eff;
}
.batch-cell-td.dragging .fill-handle {
    background: #1d4ed8;
}
.batch-fill-highlight {
    position: absolute;
    border: 2px solid #409eff;
    background: rgba(64, 158, 255, 0.1);
    pointer-events: none;
    z-index: 9999;
}

/* ========== 预报渠道筛选面板 ========== */
.channel-filter-panel,
.column-filter-panel {
    position: absolute;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1000;
    min-width: 200px;
    max-width: 280px;
    padding: 0;
    overflow: hidden;
}
.cf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f5f7fa;
    border-bottom: 1px solid #ebeef5;
    font-weight: 600;
    font-size: 13px;
    color: #303133;
}
.cf-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #909399;
    font-size: 14px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-close:hover { color: #303133; }
.cf-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
}
.cf-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #303133;
    transition: background 0.15s;
}
.cf-option:hover { background: #ecf5ff; }
.cf-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}
.cf-option input[type="checkbox"]:checked + span {
    color: #409eff;
    font-weight: 500;
}
.cf-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #ebeef5;
    background: #fafbfc;
}

/* 渠道筛选按钮激活状态 */
.btn-active {
    background: #409eff !important;
    color: #fff !important;
    border-color: #409eff !important;
}
.btn-active:hover {
    background: #66b1ff !important;
    border-color: #66b1ff !important;
}

/* ========== 通用列隐藏样式 ========== */
.col-hidden {
    display: none !important;
}

/* ========== 右键菜单样式 ========== */
.context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 2000;
    min-width: 180px;
    max-width: 240px;
    padding: 4px 0;
}
.context-menu-header {
    padding: 8px 14px;
    font-weight: 600;
    font-size: 13px;
    color: #303133;
    border-bottom: 1px solid #ebeef5;
    background: #f5f7fa;
    border-radius: 8px 8px 0 0;
}
.context-menu-item {
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #303133;
    transition: background 0.15s;
}
.context-menu-item:hover {
    background: #ecf5ff;
}
.context-menu-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.context-menu-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* ========== 表格排序样式 ========== */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px;
}
th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #c0c4cc;
    opacity: 0.5;
}
th.sortable.sort-asc::after {
    content: '↑';
    color: #409eff;
    opacity: 1;
}
th.sortable.sort-desc::after {
    content: '↓';
    color: #409eff;
    opacity: 1;
}
th.sortable:hover {
    background: #ebeef5;
}

/* ========== 现代简约表格（供应商/账号管理/同船期计划风格） ========== */
.modern-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    padding: 0;
}
.modern-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}
.modern-table-wrap thead th {
    background: #f0f4ff;
    color: #1f2d3d;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 16px;
    border: none;
    border-bottom: 2px solid #d6e4f0;
    text-align: center;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.modern-table-wrap tbody td {
    font-size: 14px;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid #ebeef5;
    text-align: center;
    color: #303133;
}
.modern-table-wrap tbody tr:last-child td {
    border-bottom: none;
}
.modern-table-wrap tbody tr:hover td {
    background: #f8faff;
}
.modern-table-wrap tbody td:first-child,
.modern-table-wrap thead th:first-child {
    text-align: left;
}


/* ========== 列头筛选图标 ========== */
.col-filter-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    color: #c0c4cc;
    cursor: pointer;
    padding: 0 3px;
    user-select: none;
    transition: color 0.15s;
}
.col-filter-icon:hover {
    color: #409eff;
}
.col-filter-icon.active {
    color: #409eff;
    font-weight: bold;
}
th:hover .col-filter-icon {
    color: #909399;
}
th .col-filter-icon.active {
    color: #409eff;
}
