/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c2461, #1e3799);
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
}

.admin-link {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 查询容器 */
.query-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.query-box h2 {
    color: #1e3799;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1e3799;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #1e3799;
    outline: none;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3799, #0c2461);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(12, 36, 97, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #ff5252;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 结果框 */
.result-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    border-left: 5px solid #1e3799;
}

.result-content {
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.label {
    font-weight: 600;
    color: #1e3799;
    min-width: 100px;
}

.value {
    color: #333;
    flex: 1;
    word-break: break-word;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    width: auto;
}

.status-1 { background: #ff6b6b; color: white; }
.status-2 { background: #4ecdc4; color: white; }
.status-3 { background: #45b7d1; color: white; }
.status-4 { background: #96ceb4; color: white; }

/* 状态示例 */
.status-examples {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.status-examples h4 {
    color: #1e3799;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-1 .status-dot { background: #ff6b6b; }
.status-2 .status-dot { background: #4ecdc4; }
.status-3 .status-dot { background: #45b7d1; }
.status-4 .status-dot { background: #96ceb4; }

/* 页脚 */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 40px;
    opacity: 0.8;
}

/* 登录页面 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.login-header i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.login-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-link {
    color: #1e3799;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* 后台管理样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #0c2461, #1e3799);
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background: #f8f9fa;
    min-height: 100vh;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.user-info i {
    font-size: 2.5rem;
}

.user-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.logout {
    color: #ff6b6b;
    margin-top: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.admin-header h1 {
    color: #1e3799;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tracking-number {
    background: #e9ecef;
    padding: 8px 16px;
    border-radius: 20px;
    color: #495057;
    font-weight: 500;
    margin-right: 20px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-form {
    display: flex;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.search-form input {
    padding: 10px 20px;
    border: none;
    min-width: 300px;
    outline: none;
}

.search-form button {
    padding: 10px 20px;
    background: #1e3799;
    color: white;
    border: none;
    cursor: pointer;
}

.action-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.action-card i {
    font-size: 2.5rem;
    color: #1e3799;
    margin-bottom: 15px;
}

.action-card h3 {
    color: #1e3799;
    margin-bottom: 10px;
}

.action-card button {
    margin-top: 15px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3799;
}

/* 数据表格 */
.data-table-container {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.data-table-container h2 {
    color: #1e3799;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    color: #1e3799;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.address-cell {
    max-width: 200px;
}

.address-text {
    cursor: help;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-address {
    color: #999;
    font-style: italic;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 200px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.status-select select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    min-width: 80px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

/* 表单容器 */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.add-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.form-help {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1e3799;
}

.form-help h3 {
    color: #1e3799;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-help ul {
    padding-left: 20px;
    color: #666;
}

.form-help li {
    margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form input {
        min-width: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .actions {
        flex-wrap: wrap;
        min-width: auto;
    }
    
    .tracking-number {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }
}

/* 错误消息样式 */
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: #721c24;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin: 0;
}

/* 查询选项样式 */
.query-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #1e3799;
}

.option-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #1e3799;
    font-weight: 600;
}

.option-note i {
    color: #1e3799;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9rem;
}

.option-item i {
    color: #28a745;
    font-size: 0.8rem;
}

.option-item:last-child {
    margin-bottom: 0;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
}

/* 多个快递结果显示样式 */
.result-count {
    font-size: 1.1rem;
    color: #1e3799;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.express-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

.express-number {
    font-weight: 600;
    color: #1e3799;
    font-size: 1rem;
}

.express-id {
    color: #666;
    font-size: 0.9rem;
    font-family: monospace;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
}

.express-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #dee2e6, transparent);
    margin: 20px 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .express-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .express-id {
        font-size: 0.8rem;
    }
}

    
    /* 用户管理页面样式 */
.user-management-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.user-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.user-section:nth-child(3) {
    grid-column: span 2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h3 {
    color: #1e3799;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-user, .user-count, .total-users {
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #495057;
}

.user-form {
    margin-top: 20px;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.strength-bar {
    height: 5px;
    background: #dc3545;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
    margin-bottom: 5px;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* 密码匹配指示器 */
.password-match {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 0.85rem;
}

.password-match.matched {
    background: #d4edda;
    color: #155724;
}

.password-match i {
    font-size: 0.9rem;
}

/* 密码要求列表 */
.password-requirements {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1e3799;
}

.password-requirements h5 {
    color: #1e3799;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.password-requirements li {
    padding: 5px 0;
    padding-left: 25px;
    position: relative;
    color: #666;
    font-size: 0.9rem;
}

.password-requirements li:before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #dc3545;
}

.password-requirements li.valid:before {
    content: '✓';
    color: #28a745;
}

/* 用户表格 */
.user-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th {
    background: #f8f9fa;
    color: #1e3799;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.user-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.user-table tbody tr:hover {
    background: #f8f9fa;
}

.current-user-row {
    background: #e7f3ff !important;
    border-left: 4px solid #1e3799;
}

.username {
    font-weight: 500;
    color: #333;
}

.user-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-current {
    background: #1e3799;
    color: white;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
}

.btn-warning:hover {
    background: #e0a800;
    color: #212529;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.user-notes {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.user-notes h5 {
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.user-notes ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
    font-size: 0.9rem;
}

.user-notes li {
    margin-bottom: 5px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 15px;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #495057;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .user-management-container {
        grid-template-columns: 1fr;
    }
    
    .user-section:nth-child(3) {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-table {
        font-size: 0.9rem;
    }
    
    .user-table th,
    .user-table td {
        padding: 8px 10px;
    }
    
    .user-table .btn-icon {
        width: 30px;
        height: 30px;
    }
}



          
   /* Excel导入相关样式 */
.file-input-container {
    position: relative;
    margin-bottom: 10px;
}

.file-input-container input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.file-label:hover {
    background: #e9ecef;
    border-color: #1e3799;
    color: #1e3799;
}

.file-label i {
    font-size: 1.2rem;
    color: #28a745;
}

.file-name {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    word-break: break-all;
}

.file-name.has-file {
    background: #e7f3ff;
    color: #1e3799;
    border-left: 4px solid #1e3799;
}

.btn-outline {
    background: transparent;
    border: 1px solid #1e3799;
    color: #1e3799;
}

.btn-outline:hover {
    background: #1e3799;
    color: white;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

.text-muted {
    color: #6c757d !important;
}

.d-block {
    display: block !important;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notification-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-success i { color: #28a745; }
.notification-error i { color: #dc3545; }
.notification-info i { color: #17a2b8; }

.notification-content span {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.notification-close:hover {
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
} 


   
   /* 扫描管理样式 */
.scan-control-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mode-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.mode-btn.active {
    background: #e7f3ff;
    border-color: #1e3799;
    color: #1e3799;
}

.mode-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.mode-btn span {
    font-weight: 600;
    font-size: 1.1rem;
}

.mode-btn small {
    color: #666;
    font-size: 0.85rem;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #1e3799;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.in-stat {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.stat-icon.out-stat {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.stat-icon.stock-stat {
    background: linear-gradient(135deg, #45b7d1, #3498db);
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #1e3799;
}

.mode-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-text {
    background: #1e3799;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.scan-mode-indicator {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 快递信息展示 */
.express-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #1e3799;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.info-value {
    color: #333;
    font-weight: 500;
    word-break: break-word;
}

.status-input {
    background: #f8f9fa;
    color: #1e3799;
    font-weight: 600;
    text-align: center;
}

/* 历史记录样式 */
.history-action {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.inbound-action {
    background: #d4edda;
    color: #155724;
}

.outbound-action {
    background: #f8d7da;
    color: #721c24;
}

/* 实时操作记录 */
.recent-actions {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid;
}

.action-item.inbound {
    border-left-color: #4ecdc4;
}

.action-item.outbound {
    border-left-color: #ff6b6b;
}

.action-item i {
    font-size: 1.2rem;
}

.action-item.inbound i {
    color: #4ecdc4;
}

.action-item.outbound i {
    color: #ff6b6b;
}

.action-details {
    flex: 1;
}

.action-type {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.action-number {
    display: block;
    font-weight: 500;
    color: #333;
    font-family: monospace;
}

.action-time {
    display: block;
    font-size: 0.8rem;
    color: #999;
}

.action-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.action-stat {
    text-align: center;
}

.action-stat span:first-child {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.action-stat .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3799;
}

/* 警告状态 */
.status-warning {
    border-left: 4px solid #ffc107 !important;
}

.status-warning .status-dot {
    background: #ffc107 !important;
}

/* 提示框 */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.alert-close:hover {
    opacity: 1;
}

.info-help {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card:nth-child(3) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .mode-selector {
        flex-direction: column;
    }
    
    .stats-panel {
        grid-template-columns: 1fr;
    }
    
    .stat-card:nth-child(3) {
        grid-column: span 1;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .scan-controls {
        flex-wrap: wrap;
    }
    
    .scan-controls .btn {
        flex: 1;
        min-width: 120px;
    }
}
