/* Global Styles */
body {
    background-color: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* App Layout */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar-column {
    background: #2c3e50;
    min-height: 100vh;
    color: #ecf0f1;
    width: 250px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-column.collapsed {
    width: 60px;
}

.sidebar-column.collapsed .sidebar-title,
.sidebar-column.collapsed .sidebar-menu li a span,
.sidebar-column.collapsed .menu-header {
    display: none;
    opacity: 0;
}

.sidebar-column.collapsed .sidebar-header {
    padding: 10px;
    justify-content: center !important;
}

.sidebar-column.collapsed .sidebar-menu li a {
    padding: 12px 0;
    text-align: center;
}

.sidebar-column.collapsed .sidebar-menu i {
    margin-right: 0;
    font-size: 1.2em;
}

.sidebar-content {
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
    height: 60px; /* 固定高度防止抖动 */
}

.sidebar-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
}

.sidebar-menu li a i {
    flex-shrink: 0;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: #34495e;
    color: #fff;
    border-left-color: #3498db;
}

.sidebar-menu .menu-header {
    padding: 15px 20px 5px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #7f8c8d;
    font-weight: 600;
    transition: opacity 0.3s;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Column */
.main-column {
    padding: 20px;
    flex-grow: 1;
    min-width: 0; /* 防止内容撑破 flex 容器 */
    transition: all 0.3s ease;
}

/* Sidebar Toggle for Mobile */
.mobile-header {
    display: none;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    align-items: center;
}

.btn-toggle-sidebar {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    .sidebar-column {
        display: none;
        position: absolute;
        z-index: 1000;
        background: #2c3e50;
        width: 250px;
        height: 100vh;
        overflow-y: auto;
        top: 0;
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    .sidebar-column.active {
        display: block;
    }
}

/* Search Panel */
.search-panel {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.search-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.search-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
}

.form-label {
    font-weight: 600;
    color: #606266;
    margin-right: 5px;
    margin-bottom: 0;
}

.form-input, .form-select {
    padding: 6px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    color: #606266;
    height: 34px;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
    border-color: #409eff;
    outline: none;
}

.action-group {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.btn-primary {
    background-color: #409eff;
    border-color: #409eff;
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-secondary {
    background-color: #fff;
    border-color: #dcdfe6;
    color: #606266;
    padding: 6px 15px;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover { background-color: #66b1ff; border-color: #66b1ff; }
.btn-secondary:hover { color: #409eff; border-color: #c6e2ff; background-color: #ecf5ff; }

/* Nav Tabs */
.nav-tabs-custom {
    margin-bottom: 20px;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-tabs-custom a {
    padding: 10px 20px;
    color: #303133;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-tabs-custom a:hover {
    color: #409eff;
}

.nav-tabs-custom a.active {
    color: #409eff;
    border-bottom-color: #409eff;
    font-weight: 600;
}

/* Order List Layout */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Order Card */
.order-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header-custom {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-id {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.time-info {
    color: #888;
    font-size: 0.9em;
    margin-left: 15px;
}

.card-body-custom {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.info-col {
    flex: 1;
    min-width: 250px;
    border-right: 1px solid #f0f0f0;
    padding-right: 15px;
}

.info-col:last-child {
    border-right: none;
}

.info-col h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    color: #909399;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.field-row {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
}

.field-label {
    width: 60px;
    color: #606266;
    flex-shrink: 0;
}

.field-val {
    color: #303133;
    word-break: break-all;
}

/* Logistics Tags */
.wuliu-block {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    margin-right: 5px;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Status Tags */
.status-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #ddd;
}

.tag-green { background: #e1f3d8; color: #67c23a; border-color: #e1f3d8; }
.tag-blue { background: #ecf5ff; color: #409eff; border-color: #d9ecff; }
.tag-gray { background: #f4f4f5; color: #909399; border-color: #e9e9eb; }

/* Summary Bar */
.summary-bar {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    border-top: 3px solid #409eff;
}

.summary-item {
    background: #f9fafc;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #606266;
    border: 1px solid #ebeef5;
}

.summary-val {
    font-weight: bold;
    color: #303133;
    margin-left: 5px;
}

/* Page Foot */
#div_Page {
    text-align: center;
    padding: 20px 0;
}
