/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f8f8 0%, #f8f8f8 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}


.card-body {
    padding: 25px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: #6509a3;
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--danger);
}

.btn-warning {
    background: var(--warning);
}

/* 消息样式 */
.message {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.success-message {
    background: rgba(76, 201, 240, 0.2);
    border-left: 4px solid var(--success);
    color: #0c5460;
}

.error-message {
    background: rgba(247, 37, 133, 0.2);
    border-left: 4px solid var(--danger);
    color: #721c24;
}

.warning-message {
    background: rgba(248, 150, 30, 0.2);
    border-left: 4px solid var(--warning);
    color: #856404;
}

/* 导航样式 */
.nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-item {
    flex: 1;
    margin: 0 5px;
}

.nav-link {
    display: block;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    text-align: center;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.nav-link:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

/* 图片预览 */
.image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: none;
}

/* 多图片预览相关样式 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.image-count {
    margin-top: 10px;
    font-size: 14px;
    color: var(--gray);
    text-align: center;
}

/* 图片网格布局 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.images-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    padding-left: 45px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

.status-processing {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

.status-shipped {
    background: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.status-completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

/* 文件上传区域 */
.file-upload {
    position: relative;
    margin-bottom: 20px;
}

.file-upload input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 20px;
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    text-align: center;
    background: var(--light);
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-label:hover {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

.file-upload-label i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

/* 添加快递信息样式 */
.express-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.express-info h3 {
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2rem;
}

.express-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: center;
}

.express-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.express-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.express-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.express-status {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin-top: 10px;
}

/* 快递公司图标 */
.express-company {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: white;
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 状态标签更新 */
.status-shipped {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

/* 表单样式更新 */
.express-form {
    background: var(--light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.express-form h4 {
    margin-bottom: 15px;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 统计信息样式 */
.stats-container {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.stat-item {
    background: var(--light);
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

/* 订单详情样式 */
.order-info h3 {
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 10px;
}

.order-info p {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
}

.order-info p:last-child {
    border-bottom: none;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-buttons .btn {
    flex: 1;
    margin-top: 0;
}

/* 订单卡片样式 */
.order-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.order-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* 快递单号样式 */
.express-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 1px;
    background: var(--light);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .card-body {
        padding: 20px;
    }

    th, td {
        padding: 10px;
        font-size: 14px;
    }

    .nav {
        flex-direction: column;
    }

    .nav-item {
        margin: 5px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .express-details {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* PC端限制 */
.pc-restriction {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.pc-restriction-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 400px;
}

.pc-restriction h2 {
    color: var(--primary);
    margin-bottom: 15px;
}

.pc-restriction p {
    margin-bottom: 20px;
    color: var(--gray);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* 批量操作区域样式 */
.batch-operations {
    background: var(--light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border: 2px dashed var(--gray-light);
}

.batch-download {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.batch-download h4 {
    margin-bottom: 15px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-download h4:before {
    content: "📥";
}

/* 下载按钮样式 */
.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #3aa8c7;
}

.btn-secondary {
    background: var(--gray);
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 选择状态区域 */
.selection-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.selected-count {
    font-weight: 600;
    color: var(--primary);
    font-size: 16px;
}

#clear-selection {
    padding: 8px 16px;
    font-size: 14px;
}

/* 批量操作按钮组 */
.batch-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.batch-company {
    flex: 1;
    min-width: 150px;
}

.batch-hint {
    margin-top: 10px;
    color: var(--gray);
    font-size: 12px;
    line-height: 1.4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .batch-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-company {
        min-width: auto;
    }

    .selection-status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .express-number-input {
        min-width: 100px;
        font-size: 12px;
    }

    table th:nth-child(6),
    table td:nth-child(6) {
        display: none;
    }
}
/* 输入提示样式 */
.input-hint {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
    font-weight: bold;
    line-height: 1.4;
    text-align: right;
}

.required {
    color: var(--danger);
    font-size: 12px;
}

/* 输入验证样式 */
.form-control.valid {
    border-color: var(--success);
}

.form-control.invalid {
    border-color: var(--danger);
}

/* 验证消息样式 */
.validation-message {
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.validation-message.valid {
    color: var(--success);
    display: block;
}

.validation-message.invalid {
    color: var(--danger);
    display: block;
}
/* 通关号样式 */
.pass-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: 1px;
}

/* 表格响应式调整 */
@media (max-width: 768px) {
    table th:nth-child(3), /* 通关号 */
    table td:nth-child(3),
    table th:nth-child(5), /* 手机号 */
    table td:nth-child(5),
    table th:nth-child(8), /* 快递公司 */
    table td:nth-child(8) {
        display: none;
    }

    .pass-code {
        font-size: 12px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    table th:nth-child(4), /* 姓名 */
    table td:nth-child(4) {
        display: none;
    }

    .express-number-input {
        min-width: 80px;
        font-size: 11px;
        padding: 6px 8px;
    }
}
/* 管理员后台样式 */
.admin-container {
    min-height: 100vh;
    background: #f5f6fa;
}

/* 顶部导航 */
.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-content {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.admin-header h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn, .home-btn {
    padding: 8px 16px;
    background: var(--gray-light);
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.logout-btn:hover, .home-btn:hover {
    background: var(--gray);
    color: white;
}

/* 主布局 */
.admin-main {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

/* 侧边栏 */
.admin-sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(67, 97, 238, 0.05);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* 主内容区 */
.admin-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}

/* 搜索筛选区域 */
.search-filter-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.filter-controls {
    display: flex;
    gap: 15px;
}

/* 批量操作区域 */
.batch-operations {
    background: var(--light);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid var(--gray-light);
}

.batch-section {
    margin-bottom: 20px;
}

.batch-section:last-child {
    margin-bottom: 0;
}

.batch-section h3 {
    margin-bottom: 15px;
    color: var(--dark);
    font-size: 1.1rem;
}

/* 表格样式优化 */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-light);
}

table {
    width: 100%;
    min-width: 800px;
}

/* 小按钮 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .admin-main {
        grid-template-columns: 200px 1fr;
        padding: 15px;
    }

    .admin-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .admin-main {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .admin-sidebar {
        position: static;
        order: 2;
    }

    .admin-content {
        order: 1;
    }

    .admin-header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 10px;
    }

    .search-filter-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-controls {
        flex-direction: column;
    }

    .batch-controls {
        flex-direction: column;
        gap: 10px;
    }

    .batch-company {
        min-width: auto;
    }

    /* 移动端表格列隐藏 */
    table th:nth-child(3), /* 通关号 */
    table td:nth-child(3),
    table th:nth-child(5), /* 手机号 */
    table td:nth-child(5),
    table th:nth-child(8), /* 快递公司 */
    table td:nth-child(8),
    table th:nth-child(9), /* 时间 */
    table td:nth-child(9) {
        display: none;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 5px;
    }

    .admin-content {
        padding: 5px;
    }

    .batch-operations {
        padding: 5px;
    }

    .admin-user-info {
        flex-direction: column;
        gap: 8px;
    }

    table th:nth-child(4), /* 姓名 */
    table td:nth-child(4) {
        display: none;
    }

    .express-number-input {
        min-width: 80px;
        font-size: 11px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) and (max-width: 2560px) {
    .admin-header-content,
    .admin-main {
      width: 100%;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .admin-container {
        background: #1a1a1a;
    }

    .admin-header,
    .admin-sidebar,
    .admin-content {
        background: #2d2d2d;
        color: white;
    }

    .nav-item {
        color: #e0e0e0;
    }

    .batch-operations {
        background: #3d3d3d;
        border-color: #555;
    }
}
