:root {
    --primary-color: #007AFF;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --background-color: #F2F2F7;
    --card-background: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --border-color: #E5E5EA;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.button-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.refresh-btn {
    background-color: var(--success-color);
}

.year-btn {
    background-color: var(--primary-color);
}

.last-year-btn {
    background-color: var(--success-color);
}

.month-btn {
    background-color: var(--warning-color);
}

.week-btn {
    background-color: var(--danger-color);
}

.stats {
    margin: 20px 0;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.stats-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-title i {
    color: var(--primary-color);
    font-size: 20px;
}

.stats-update-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background-color: var(--background-color);
    padding: 6px 12px;
    border-radius: 6px;
}

.stats-update-time i {
    color: var(--primary-color);
}

.stats-update-time .stat-value {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: 4px;
}

.stats h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-item i {
    font-size: 24px;
    margin-bottom: 10px;
}

.stat-item p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-item .stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-top: 5px;
    color: var(--text-primary);
    line-height: 1.2;
}

/* 为不同类型的统计项设置不同的颜色 */
.stat-item.total .stat-value {
    color: var(--primary-color);
}

.stat-item.hongrun .stat-value {
    color: var(--success-color);
}

.stat-item.shunchang .stat-value {
    color: var(--warning-color);
}

.stat-item.manufacturer .stat-value {
    color: var(--danger-color);
}

/* 为不同类型的统计项设置不同的图标颜色 */
.stat-item.total i {
    color: var(--primary-color);
}

.stat-item.hongrun i {
    color: var(--success-color);
}

.stat-item.shunchang i {
    color: var(--warning-color);
}

.stat-item.manufacturer i {
    color: var(--danger-color);
}

.stat-item.update-time i {
    color: var(--text-secondary);
}

.date-range {
    display: none;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--background-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

td {
    font-size: 14px;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

/* .hongrun { background-color: rgba(52, 199, 89, 0.1); }
.shunchang { background-color: rgba(255, 149, 0, 0.1); }
.manufacturer { background-color: rgba(255, 59, 48, 0.1); } */

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.error-message {
    display: none;
    margin: 15px 0;
    padding: 12px 15px;
    background-color: rgba(255, 59, 48, 0.1);
    border-radius: 8px;
    color: var(--danger-color);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        padding-bottom: 80px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .button-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    table {
        display: block;
        overflow-x: auto;
    }

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

    .stat-item {
        padding: 15px;
    }

    .stat-item .stat-value {
        font-size: 28px;
    }

    .stat-item i {
        font-size: 20px;
    }

    .floating-nav {
        bottom: 10px;
        padding: 8px 12px;
        margin-bottom: 10px;
        width: auto;
        max-width: 90%;
    }
}

.filter-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.filter-group.sticky {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.status-filter {
    flex: 1;
    min-width: 130px;
    max-width: 200px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}

.status-select {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.filter-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.filter-group.sticky {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background-color: var(--background-color);
    padding: 6px 12px;
    border-radius: 6px;
}

.date-range i {
    color: var(--primary-color);
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    transform: translateY(-2px);
    background-color: var(--border-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-btn.active i {
    color: white;
}

.filter-btn i {
    font-size: 13px;
}

/* 为不同类型的筛选按钮设置不同的激活颜色 */
.filter-btn.active.hongrun {
    background-color: var(--success-color);
}

.filter-btn.active.shunchang {
    background-color: var(--warning-color);
}

.filter-btn.active.manufacturer {
    background-color: var(--danger-color);
}


.import-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.import-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* 隐藏行 */
tr.hidden {
    display: none;
}

.progress-container {
    width: 100%;
    margin-top: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
}

.progress-percentage {
    font-weight: 600;
}

.progress-target {
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 为不同类型的进度条设置不同的颜色 */
.stat-item.hongrun .progress {
    background-color: var(--success-color);
}

.stat-item.shunchang .progress {
    background-color: var(--warning-color);
}

.stat-item.hongrun .progress-percentage {
    color: var(--success-color);
}

.stat-item.shunchang .progress-percentage {
    color: var(--warning-color);
}

.comparison-info {
    margin-top: 8px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.comparison-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
}

.comparison-value i {
    font-size: 0.9em;
    line-height: 1;
}

.comparison-value.up {
    color: #4CAF50;
}

.comparison-value.down {
    color: #f44336;
}

.growth-percentage {
    margin-left: 4px;
    font-size: 0.9em;
}

.comparison-label {
    margin-left: 4px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* 视图切换按钮样式 */
.view-switch {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.view-btn i {
    margin-right: 6px;
    font-size: 13px;
}

.view-btn:hover {
    background: #e9ecef;
    color: #333;
    border-color: #d0d0d0;
}

.view-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .view-switch {
        margin: 15px 0;
    }

    .view-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .view-btn i {
        font-size: 12px;
    }

    .filter-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-buttons {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .status-filter {
        min-width: 130px;
        max-width: 200px;
        margin-right: auto;
    }

    .status-select {
        font-size: 13px;
        padding: 6px 10px;
    }

    .filter-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .filter-btn i {
        font-size: 13px;
    }
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c82333;
    color: white;
}

.logout-btn i {
    font-size: 1.1em;
    display: inline-block;
}

/* 确保加载状态不会影响图标显示 */
.logout-btn.loading i {
    display: inline-block !important;
    opacity: 1 !important;
}

/* 瀑布流视图 */
#waterfall-view {
    display: none;
    padding: 0;
    margin-top: 20px;
}

#waterfall-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
}

.order-card {
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.order-header {
    padding: 15px;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.order-title {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-title i {
    color: var(--primary-color);
}

.order-company {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-company i {
    color: var(--text-secondary);
}

.order-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.order-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.order-info-item i {
    color: var(--text-secondary);
    width: 16px;
}

.order-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.order-status-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-status-text i {
    color: var(--text-secondary);
}

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: auto;
}

.sync-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

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

.sync-status.syncing {
    background-color: #cce5ff;
    color: #004085;
}

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

.sync-status i {
    font-size: 12px;
}

.sync-status.syncing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    #waterfall-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 10px;
        padding: 0;
        margin: 0;
    }

    .order-card {
        margin: 0;
    }

    .order-header {
        padding: 10px;
    }

    .order-content {
        padding: 10px;
    }

    .order-info {
        gap: 6px;
    }

    .order-info-item {
        font-size: 13px;
        gap: 6px;
    }

    .order-status {
        margin-top: 10px;
        padding-top: 10px;
        font-size: 13px;
    }
}

/* 悬浮栏样式 */
.floating-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--success-color);
}

.nav-btn i {
    font-size: 12px;
}

.current-period {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .floating-nav {
        bottom: 10px;
        padding: 8px 12px;
        margin-bottom: 10px;
        width: auto;
        max-width: 90%;
    }

    .nav-content {
        gap: 8px;
    }

    .nav-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .current-period {
        padding: 6px 10px;
        font-size: 12px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-text {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.sync-orders {
    display: flex;
    align-items: center;
}

.sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sync-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.sync-btn:active {
    transform: translateY(0);
}

.sync-btn i {
    font-size: 14px;
}

.sync-btn.loading {
    background-color: var(--text-secondary);
    cursor: not-allowed;
}

.sync-btn.loading i {
    animation: spin 1s linear infinite;
}

.sync-btn.syncing {
    background-color: #dc3545;
}

.sync-btn.syncing:hover {
    background-color: #c82333;
}

.sync-btn.syncing i {
    animation: none;
}

.sync-btn .sync-text {
    white-space: nowrap;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 当弹窗打开时禁止主页面滚动 */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
    top: 0;
}

/* 订单详情弹窗 */
.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90vh;
    background-color: var(--background-color);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    will-change: transform;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h2 i {
    color: var(--primary-color);
}

.modal-header h2 .company-tag {
    margin-left: 8px;
    padding: 4px 8px;
    background-color: var(--success-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.modal-header h2 .period-tag {
    margin-left: 8px;
    padding: 4px 8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.modal-header h2 .warning-tag {
    margin-left: 8px;
    padding: 4px 8px;
    background-color: var(--warning-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.modal-header h2 .success-tag {
    margin-left: 8px;
    padding: 4px 8px;
    background-color: var(--success-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.modal-header h2 .primary-tag {
    margin-left: 8px;
    padding: 4px 8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    /* 增加 iOS 滚动惯性 */
    overscroll-behavior: contain;
    /* 防止滚动穿透 */
}

.detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    padding: 20px;
}

.detail-content {
    display: none;
}

.detail-content.show {
    display: block;
}

.detail-section {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-section h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-section h3 i {
    color: #666;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    width: 90px;
    color: #666;
    font-size: 13px;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #333;
    font-size: 13px;
    word-break: break-all;
}

/* 照片网格布局 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
}

.photo-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* 保持1:1的宽高比 */
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* 照片标签样式 */
.photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    font-size: 11px;
    text-align: center;
    z-index: 1;
}

/* 根据照片数量调整布局 */
.photo-grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
}

.photo-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.photo-grid[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.photo-grid[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
}

.photo-grid[data-count="5"],
.photo-grid[data-count="6"],
.photo-grid[data-count="7"],
.photo-grid[data-count="8"],
.photo-grid[data-count="9"] {
    grid-template-columns: repeat(3, 1fr);
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .sync-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .sync-btn i {
        font-size: 13px;
    }

    .modal-body {
        padding: 12px !important;
    }

    .detail-section {
        margin-bottom: 10px;
        padding: 10px;
    }

    .detail-section h3 {
        margin: 0 0 8px 0;
        font-size: 14px;
    }

    .detail-item {
        padding: 4px 0;
    }

    .detail-label {
        width: 80px;
        font-size: 12px;
    }

    .detail-value {
        font-size: 12px;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 16px;
    }
}

@media (min-width: 1200px) {
    .modal-content {
        max-height: 96vh;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        max-width: 1200px;
    }

    .modal.show .modal-content {
        transform: translateX(-50%) translateY(0);
    }
}

/* 空状态样式 */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.empty-state-content {
    text-align: center;
    color: #6c757d;
}

.empty-state-content i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #adb5bd;
}

.empty-state-content p {
    font-size: 18px;
    margin: 0;
}





/* 预览区样式 */
#preview-list .preview-item {
    width: 120px;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px;
    background: #fafafa;
    position: relative;
}

#preview-list img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 6px;
}

.progress-bar-inner {
    height: 100%;
    background: #4caf50;
    border-radius: 3px;
    width: 0;
    transition: width 0.3s;
}

.preview-status {
    font-size: 12px;
    margin-top: 4px;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    color: #f44336;
    cursor: pointer;
}

/* 批量上传弹窗样式 */
.batch-upload-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

.batch-upload-left {
    flex: 1;
    min-width: 280px;
}

.batch-upload-right {
    flex: 2;
}

.upload-drop-area {
    border: 2px dashed var(--border-color);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    background-color: var(--background-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-drop-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 122, 255, 0.05);
}

.upload-drop-area i {
    font-size: 36px;
    color: var(--text-secondary);
}

#upload-drop-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.option-group {
    margin-top: 16px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.radio-label input {
    cursor: pointer;
}

#start-upload-btn {
    margin-top: 20px;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
}

#start-upload-btn:hover {
    background-color: #0056b3;
}

.preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.preview-item {
    flex: 0 0 calc(20% - 16px);
    min-width: 120px;
    max-width: 160px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    background: var(--card-background);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
}

.preview-remove:hover {
    background: var(--danger-color);
    color: white;
}

.preview-status {
    font-size: 12px;
    margin-top: 8px;
    color: var(--text-secondary);
    text-align: center;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .batch-upload-container {
        flex-direction: column;
    }
    
    .upload-drop-area {
        padding: 20px;
    }
    
    .upload-drop-area i {
        font-size: 28px;
    }
    
    .preview-item {
        flex: 0 0 calc(33.33% - 12px);
    }
}