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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar {
    width: 240px;
    background: white;
    height: calc(100vh - 60px);
    margin-top: 60px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    color: #555;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #667eea;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    color: #667eea;
    border-left-color: #667eea;
}

.nav-icon {
    font-size: 20px;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    margin-top: 60px;
    padding: 30px;
    background: #f8f9fa;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #333;
}

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

.warehouse-selector-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.warehouse-selector-container label {
    font-weight: 600;
    color: #333;
}

.warehouse-selector {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background: white;
    cursor: pointer;
}

.warehouse-selector:hover {
    border-color: #667eea;
}

.page-actions {
    display: flex;
    gap: 15px;
}

.page-actions input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
}

/* LPS 拣货规划模拟器样式 */
#picking-planning .analytics-section {
    height: auto;
    min-height: 750px;
}

#picking-planning #picking-sim-container {
    width: 100%;
    height: 700px;
    min-height: 700px;
    position: relative;
}

#picking-planning #picking-sim-container iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 700px !important;
    border: none;
    display: block;
}

/* ==================== TMS 运输管理系统样式 ==================== */

/* TMS 配置消息 */
.config-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
}

.message-content {
    text-align: center;
    background: white;
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 500px;
}

.message-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.message-content h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 12px;
}

.message-content p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 16px;
}

/* TMS 仪表盘 */
.tms-dashboard {
    padding: 20px;
}

.tms-info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.tms-card-header h3 {
    font-size: 18px;
    color: #1f2937;
    font-weight: 600;
}

.tms-badge {
    background: #e5e7eb;
    color: #6b7280;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tms-badge.active {
    background: #dbeafe;
    color: #2563eb;
}

.tms-card-body {
    color: #4b5563;
}

.tms-placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* TMS 分区 */
.tms-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tms-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tms-section-header h3 {
    font-size: 18px;
    color: #1f2937;
    font-weight: 600;
}

.tms-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* TMS 仓库网格 */
.tms-warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tms-warehouse-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.tms-warehouse-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.tms-warehouse-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tms-warehouse-card h4 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 8px;
}

.tms-warehouse-card .location {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.tms-warehouse-card .coverage {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #059669;
    background: #d1fae5;
    padding: 6px 12px;
    border-radius: 6px;
}

/* TMS 快速操作 */
.tms-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tms-action-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.tms-action-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.tms-action-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.tms-action-text {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
}

/* TMS 占位符页面 */
.tms-placeholder-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 40px;
}

.tms-placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.tms-placeholder-section h3 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 8px;
}

.tms-placeholder-section p {
    color: #6b7280;
    margin-bottom: 8px;
}

.tms-placeholder-hint {
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

/* TMS 导入对话框 */
.tms-import-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.tms-import-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
}

.tms-import-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tms-import-header h3 {
    font-size: 18px;
    color: #1f2937;
}

.tms-import-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
}

.tms-import-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.tms-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.tms-upload-area:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.tms-upload-area.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tms-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.tms-upload-text {
    color: #4b5563;
    margin-bottom: 8px;
}

.tms-upload-hint {
    color: #9ca3af;
    font-size: 13px;
}

.tms-manual-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.tms-manual-section h4 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.tms-form-group {
    margin-bottom: 16px;
}

.tms-form-group label {
    display: block;
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

.tms-form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* 响应式 */
@media (max-width: 1024px) {
    .tms-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .tms-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .tms-warehouse-grid {
        grid-template-columns: 1fr;
    }
}
