/* 仓库配置页面样式 - 方案一：左侧导航 + 右侧内容区 */

/* ==================== 主容器布局 ==================== */
.warehouse-config-card {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* ==================== 页面标题栏 ==================== */
.warehouse-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.warehouse-config-title {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

/* ==================== 内容区域（导航 + 主体） ==================== */
.warehouse-config-body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* ==================== 左侧导航 ==================== */
.warehouse-config-sidebar {
    width: 200px;
    background: #fafbfc;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.warehouse-config-nav {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}

.warehouse-config-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #606266;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.warehouse-config-nav-item:hover {
    background: #f0f2f5;
    color: #303133;
}

.warehouse-config-nav-item.active {
    background: #e6f4ff;
    color: #0052d9;
    border-left-color: #0052d9;
    font-weight: 500;
}

.warehouse-config-nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 右侧内容区 ==================== */
.warehouse-config-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.warehouse-config-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    min-height: 0;
}

/* ==================== 内容面板（各配置项通用） ==================== */
.warehouse-config-panel {
    display: none;
    height: 100%;
}

.warehouse-config-panel.active {
    display: block;
}

.warehouse-config-panel-header {
    margin-bottom: 24px;
}

.warehouse-config-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2129;
    margin: 0 0 8px 0;
}

.warehouse-config-panel-desc {
    font-size: 14px;
    color: #606266;
    margin: 0;
}

/* ==================== 配置表单样式 ==================== */
.warehouse-config-form-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.warehouse-config-form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.warehouse-config-form-group {
    margin-bottom: 20px;
}

.warehouse-config-form-group:last-child {
    margin-bottom: 0;
}

.warehouse-config-form-group-flex {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warehouse-config-form-group-flex .warehouse-config-form-group {
    flex: 1;
    margin-bottom: 0;
}

.warehouse-config-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    margin-bottom: 8px;
}

.warehouse-config-form-required {
    color: #ff4d4f;
    margin-left: 2px;
}

.warehouse-config-form-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2129;
    transition: all 0.2s;
    box-sizing: border-box;
}

.warehouse-config-form-input:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.warehouse-config-form-input:hover {
    border-color: #c0c0c0;
}

.warehouse-config-form-input:disabled {
    background: #f5f5f5;
    color: #8c8c8c;
    cursor: not-allowed;
}

.warehouse-config-form-select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2129;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.warehouse-config-form-select:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.warehouse-config-form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #86909c;
    line-height: 1.5;
}

.warehouse-config-form-row {
    display: flex;
    gap: 16px;
}

.warehouse-config-form-row .warehouse-config-form-group {
    flex: 1;
}

/* ==================== 省市区三级联动样式 ==================== */
.warehouse-config-region-selects {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.warehouse-config-region-selects .warehouse-config-form-select {
    flex: 1;
    min-width: 120px;
}

.warehouse-config-region-hint {
    font-size: 12px;
    color: #86909c;
    margin-top: 8px;
}

/* ==================== 地图选点样式 ==================== */
.warehouse-config-location-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #ffffff;
    color: #606266;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    align-self: flex-end;
    margin-left: 12px;
}

.warehouse-config-location-btn:hover {
    border-color: #0052d9;
    color: #0052d9;
    background: #f0f5ff;
}

.warehouse-config-coords-display {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    font-size: 13px;
    color: #606266;
    border-top: 1px dashed #e5e7eb;
    margin-top: 12px;
}

.warehouse-config-coords-display span {
    flex: 1;
}

.warehouse-config-coords-display strong {
    color: #1d2129;
    font-weight: 500;
    margin-left: 4px;
}

/* 地图弹窗 */
.warehouse-config-map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.warehouse-config-map-modal-overlay.hidden {
    display: none;
}

.warehouse-config-map-modal {
    width: 90%;
    max-width: 900px;
    height: 600px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.warehouse-config-map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.warehouse-config-map-modal-title {
    font-size: 15px;
    font-weight: 500;
    color: #303133;
    margin: 0;
}

.warehouse-config-map-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 20px;
    color: #909399;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warehouse-config-map-modal-close:hover {
    background: #e5e5e5;
    color: #606266;
}

.warehouse-config-map-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.warehouse-config-map-modal-map {
    width: 100%;
    height: 100%;
}

.warehouse-config-map-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    gap: 16px;
    flex-shrink: 0;
}

.warehouse-config-map-modal-coords {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #606266;
}

.warehouse-config-map-modal-coords strong {
    color: #1d2129;
    font-weight: 500;
    margin-left: 4px;
}

.warehouse-config-range-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.warehouse-config-range-input {
    width: 70px;
    height: 26px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.warehouse-config-range-input:focus {
    border-color: #0052d9;
    outline: none;
}

.warehouse-config-range-input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.warehouse-config-range-input:disabled::placeholder {
    color: #bbb;
}

.warehouse-config-range-unit {
    color: #909399;
    font-size: 13px;
}

.warehouse-config-coords-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f5ff;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.warehouse-config-coords-hint .hint-icon {
    font-size: 14px;
}

.warehouse-config-map-modal-hint {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #909399;
}

.warehouse-config-map-modal-actions {
    display: flex;
    gap: 12px;
}

.warehouse-config-map-modal-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.warehouse-config-map-modal-btn-cancel {
    border: 1px solid #d9d9d9;
    background: #ffffff;
    color: #606266;
}

.warehouse-config-map-modal-btn-cancel:hover {
    border-color: #bfbfbf;
}

.warehouse-config-map-modal-btn-confirm {
    border: none;
    background: #0052d9;
    color: #ffffff;
}

.warehouse-config-map-modal-btn-confirm:hover {
    background: #003bb3;
}

/* ==================== 按钮样式 ==================== */
.warehouse-config-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.warehouse-config-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
}

.warehouse-config-btn-primary {
    background: #0052d9;
    color: #ffffff;
}

.warehouse-config-btn-primary:hover {
    background: #003bb3;
}

.warehouse-config-btn-default {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #d9d9d9;
}

.warehouse-config-btn-default:hover {
    border-color: #0052d9;
    color: #0052d9;
}

/* ==================== 空状态 ==================== */
.warehouse-config-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
    padding: 40px;
}

.warehouse-config-empty-icon {
    font-size: 64px;
    color: #d9d9d9;
    margin-bottom: 24px;
}

.warehouse-config-empty-title {
    font-size: 18px;
    font-weight: 500;
    color: #303133;
    margin: 0 0 12px 0;
}

.warehouse-config-empty-desc {
    font-size: 14px;
    color: #909399;
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .warehouse-config-sidebar {
        width: 180px;
    }
    
    .warehouse-config-content {
        padding: 20px;
    }
    
    .warehouse-config-form-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .warehouse-config-body {
        flex-direction: column;
    }
    
    .warehouse-config-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        max-height: 200px;
    }
    
    .warehouse-config-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 8px 0;
    }
    
    .warehouse-config-nav-item {
        padding: 8px 16px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    
    .warehouse-config-nav-item.active {
        border-left: none;
        border-bottom-color: #0052d9;
    }
    
    .warehouse-config-content {
        padding: 16px;
    }
    
    .warehouse-config-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ==================== 功能设计中提示 ==================== */
.warehouse-config-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.warehouse-config-coming-soon .coming-soon-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.warehouse-config-coming-soon .coming-soon-text {
    font-size: 20px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 12px;
}

.warehouse-config-coming-soon .coming-soon-hint {
    font-size: 14px;
    color: #909399;
}

/* ==================== 拣货类型配置表格 ==================== */
.warehouse-config-pick-config-table-wrapper {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.warehouse-config-pick-config-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.warehouse-config-pick-config-table th {
    background: #f8f9fa;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.warehouse-config-pick-config-table th.col-status,
.warehouse-config-pick-config-table th.col-range {
    text-align: center;
}

.warehouse-config-pick-config-table td {
    padding: 16px;
    font-size: 14px;
    color: #303133;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.warehouse-config-pick-config-table tbody tr:last-child td {
    border-bottom: none;
}

.warehouse-config-pick-config-table tbody tr.disabled .warehouse-config-pick-type-name {
    color: #909399;
}

.warehouse-config-pick-config-table tbody tr.disabled td {
    background: #fafafa;
}

.warehouse-config-pick-config-table tbody tr.disabled .warehouse-config-pick-select {
    background: #f5f5f5;
    color: #909399;
    cursor: not-allowed;
    border-color: #e5e5e5;
}

.warehouse-config-pick-config-table tbody tr.disabled .warehouse-config-range-input {
    background: #f5f5f5;
    color: #909399;
    cursor: not-allowed;
    border-color: #e5e5e5;
}

.warehouse-config-pick-config-table tbody tr.disabled .warehouse-config-range-arrow,
.warehouse-config-pick-config-table tbody tr.disabled .warehouse-config-range-label {
    color: #c0c4cc;
}

.col-type { width: 120px; }
.col-status { width: 70px; text-align: center; }
.col-scope { width: 140px; }
.col-claim { width: 130px; }
.col-range { width: 180px; text-align: center; }

.warehouse-config-range-group {
    display: inline-flex;
    justify-content: center;
}

.warehouse-config-pick-type-name {
    font-weight: 500;
    color: #303133;
}

/* ==================== 开关样式 ==================== */
.warehouse-config-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.warehouse-config-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.warehouse-config-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c0c4cc;
    transition: 0.3s;
    border-radius: 22px;
}

.warehouse-config-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.warehouse-config-switch input:checked + .warehouse-config-slider {
    background-color: #0052d9;
}

.warehouse-config-switch input:checked + .warehouse-config-slider:before {
    transform: translateX(18px);
}

/* ==================== 下拉选择框样式 ==================== */
.warehouse-config-pick-select {
    width: 100%;
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 13px;
    color: #1d2129;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s;
}

.warehouse-config-pick-select:hover {
    border-color: #8c8c8c;
}

.warehouse-config-pick-select:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

/* ==================== 任务数量范围样式 ==================== */
.warehouse-config-range-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.warehouse-config-range-input {
    width: 56px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    transition: all 0.2s;
}

.warehouse-config-range-input::placeholder {
    color: #c0c4cc;
    font-size: 11px;
}

.warehouse-config-range-input:focus {
    border-color: #0052d9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.warehouse-config-range-input:hover:not(:focus) {
    border-color: #8c8c8c;
}

.warehouse-config-range-arrow {
    color: #909399;
    font-size: 13px;
}

.warehouse-config-range-label {
    color: #606266;
    font-size: 12px;
    white-space: nowrap;
}

/* ==================== 拣货配置说明区域 ==================== */
.warehouse-config-pick-config-desc {
    margin-top: 20px;
    padding: 16px 20px;
    background: #f0f5ff;
    border-radius: 8px;
    border: 1px solid #d9e6ff;
}

.warehouse-config-pick-config-desc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #bfd7ff;
    font-size: 13px;
    color: #0052d9;
}

.warehouse-config-pick-config-desc-header .hint-icon {
    font-size: 14px;
}

.warehouse-config-pick-config-desc-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.warehouse-config-pick-config-desc-item h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1d2129;
}

.warehouse-config-pick-config-desc-item p {
    margin: 0;
    font-size: 12px;
    color: #606266;
    line-height: 1.5;
}

.warehouse-config-pick-config-desc-item ul {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
    color: #606266;
    line-height: 1.6;
}

.warehouse-config-pick-config-desc-item ul li {
    margin-bottom: 2px;
}

.warehouse-config-pick-config-desc-item ul strong {
    color: #1d2129;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .warehouse-config-pick-config-desc-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==================== 适用范围多选样式 ==================== */
.warehouse-config-multi-select {
    position: relative;
    min-height: 32px;
    padding: 4px 28px 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.warehouse-config-multi-select:hover:not(.disabled) {
    border-color: #8c8c8c;
}

.warehouse-config-multi-select.active {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.warehouse-config-multi-select.disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.warehouse-config-multi-select::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    pointer-events: none;
}

.warehouse-config-multi-select.active::after {
    border-top: none;
    border-bottom: 5px solid #666;
}

.warehouse-config-multi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 22px;
}

.warehouse-config-multi-placeholder {
    color: #c0c4cc;
    font-size: 13px;
    line-height: 22px;
}

.warehouse-config-multi-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f0f5ff;
    border: 1px solid #d9e6ff;
    border-radius: 4px;
    font-size: 12px;
    color: #0052d9;
    line-height: 18px;
}

.warehouse-config-multi-tag-remove {
    cursor: pointer;
    font-size: 14px;
    color: #8c8c8c;
    line-height: 1;
    margin-left: 2px;
}

.warehouse-config-multi-tag-remove:hover {
    color: #ff4d4f;
}

.warehouse-config-multi-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -1px;
    right: -1px;
    margin-top: 4px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.warehouse-config-multi-select.active .warehouse-config-multi-dropdown {
    display: block;
}

.warehouse-config-multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #1d2129;
    transition: background 0.2s;
}

.warehouse-config-multi-option:hover {
    background: #f5f5f5;
}

.warehouse-config-multi-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0052d9;
}

.warehouse-config-multi-option input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

/* 禁用行的多选样式 */
.warehouse-config-pick-config-table tbody tr.disabled .warehouse-config-multi-select {
    background: #f5f5f5;
}