/* ========================================
   WMS工作台 - 登录模块样式
   ======================================== */

/* 登录页面容器 */
.wms-login-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    user-select: none;
}

/* 登录卡片 */
.wms-login-box {
    width: 420px;
    padding: 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Tab切换 */
.wms-login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    padding: 4px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    background-color: #fff;
    color: #0052d9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn svg {
    flex-shrink: 0;
}

/* 窗口右上角配置按钮 */
.wms-config-btn-window {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    z-index: 100;
}

.wms-config-btn-window:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 登录标题 */
.wms-login-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* 扫码区域 */
.wms-login-scan-area {
    text-align: center;
    padding: 20px 0;
}

.scan-icon {
    color: #0052d9;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.scan-icon.verifying {
    color: #666;
    animation: pulse 1s infinite;
}

.scan-icon.error {
    color: #ff4d4f;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.scan-text {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.scan-text.verifying {
    color: #0052d9;
}

.scan-text.error {
    color: #ff4d4f;
    background-color: #fff2f0;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #ffccc7;
    margin: 0 20px 10px;
    font-size: 14px;
}

/* 条码输入框 - 隐藏但可聚焦 */
.barcode-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* 手动输入区域 */
.wms-login-manual {
    padding: 10px 0;
}

/* 手动输入显示 */
.manual-input-display {
    width: 100%;
    height: 56px;
    line-height: 56px;
    font-size: 28px;
    font-weight: 500;
    text-align: center;
    color: #333;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
    letter-spacing: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manual-input-display[data-error] {
    color: #ff4d4f;
    background-color: #fff2f0;
    font-size: 14px;
    letter-spacing: 0;
    position: relative;
}

.manual-input-display[data-error]::after {
    content: attr(data-error);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff2f0;
}

/* 虚拟数字键盘 */
.virtual-keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.vk-btn {
    height: 60px;
    font-size: 24px;
    font-weight: 500;
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.vk-btn:active {
    background-color: #e7e7e7;
    transform: scale(0.96);
}

.vk-btn-action {
    background-color: #fff;
}

.vk-btn-action:active {
    background-color: #e7e7e7;
}

.vk-btn-login {
    background-color: #0052d9;
    border-color: #0052d9;
    color: #fff;
    font-size: 18px;
}

.vk-btn-login:active {
    background-color: #0043a8;
    border-color: #0043a8;
}

/* 配置对话框遮罩 */
.wms-config-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 配置对话框 */
.wms-config-dialog {
    width: 420px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 仓库配置对话框（更宽） */
.wms-config-dialog-warehouse {
    width: 520px;
    user-select: none;
}

.wms-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.wms-config-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.wms-config-close {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.wms-config-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.wms-config-body {
    padding: 20px;
}

/* 步骤指示器 */
.wms-config-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 12px 0;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.wms-step {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999;
    transition: color 0.3s ease;
}

.wms-step-num {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    background-color: #ddd;
    color: #fff;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.wms-step-text {
    font-size: 12px;
    font-weight: 500;
}

.wms-step-line {
    width: 40px;
    height: 2px;
    background-color: #ddd;
    margin: 0 8px;
}

.wms-step.wms-step-active .wms-step-num {
    background-color: #667eea;
}

.wms-step.wms-step-active .wms-step-text {
    color: #667eea;
}

.wms-step.wms-step-completed .wms-step-num {
    background-color: #52c41a;
}

.wms-step.wms-step-completed .wms-step-text {
    color: #52c41a;
}

/* 配置区块 */
.wms-config-section {
    margin-bottom: 16px;
    padding: 16px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.wms-config-section:last-child {
    margin-bottom: 0;
}

.wms-config-section-header {
    margin-bottom: 12px;
}

.wms-config-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.wms-config-section-desc {
    font-size: 12px;
    color: #999;
}

/* 输入行 */
.wms-config-input-row {
    display: flex;
    gap: 12px;
}

.wms-config-display {
    flex: 1;
    height: 44px;
    line-height: 44px;
    padding: 0 16px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    color: #333;
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 4px;
}

.wms-config-display-empty {
    color: #999;
    font-size: 14px;
    letter-spacing: 0;
}

.wms-config-display-error {
    color: #ff4d4f;
    background-color: #fff2f0;
    border-color: #ffccc7;
    font-size: 14px;
    letter-spacing: 0;
}

.wms-config-display-station {
    letter-spacing: 2px;
    cursor: pointer;
}

.wms-config-display-station:hover {
    border-color: #667eea;
}

.wms-config-input-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #667eea;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wms-config-input-btn:hover {
    background-color: #5a6fd6;
}

/* 工作台扫码行 */
.wms-config-station-row {
    display: flex;
}

/* 仓库列表 */
.wms-warehouse-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    background-color: #fff;
}

.wms-warehouse-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.wms-warehouse-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wms-warehouse-item:last-child {
    border-bottom: none;
}

.wms-warehouse-item:hover {
    background-color: #f5f5f5;
}

.wms-warehouse-item.selected {
    background-color: #e6f4ff;
    border-left: 3px solid #667eea;
    padding-left: 11px;
}

.wms-warehouse-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.wms-warehouse-code {
    font-size: 11px;
    color: #999;
}

/* 内联提示 */
.wms-config-alert {
    min-height: 0;
    padding: 0 20px;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.wms-config-alert:empty {
    padding: 0;
}

.wms-config-alert-error {
    min-height: 36px;
    line-height: 36px;
    padding: 0 20px;
    margin: 0 20px;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    color: #ff4d4f;
}

.wms-config-alert-success {
    min-height: 36px;
    line-height: 36px;
    padding: 0 20px;
    margin: 0 20px;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
    color: #52c41a;
}

.wms-config-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #e7e7e7;
}

.wms-config-cancel,
.wms-config-save {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wms-config-cancel {
    background-color: #fff;
    border: 1px solid #e7e7e7;
    color: #666;
}

.wms-config-cancel:hover {
    background-color: #f5f5f5;
}

.wms-config-save {
    background-color: #667eea;
    border: none;
    color: #fff;
}

.wms-config-save:hover {
    background-color: #5a6fd6;
}

/* 未配置仓库提示 */
.wms-login-config-hint {
    text-align: center;
    padding: 30px 0;
}

.wms-config-hint-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: #fff;
}

.wms-config-hint-icon svg {
    width: 48px;
    height: 48px;
}

.wms-config-hint-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.wms-config-hint-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
}

.wms-config-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.wms-config-hint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.wms-config-hint-btn:active {
    transform: translateY(0);
}

/* 已配置信息显示 */
.wms-login-config-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wms-config-info-item {
    font-size: 13px;
    color: #666;
}

.wms-config-info-divider {
    color: #ddd;
    font-size: 13px;
}
