* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    /* 确保在移动端正确显示 */
    overflow-x: hidden;
    position: relative;
}

html {
    /* 确保在移动端正确显示 */
    overflow-x: hidden;
    position: relative;
}

.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 60px;
}

.page.active {
    display: block;
}

/* 登录页面 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1890ff;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.login-tip {
    margin-top: 20px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* 头部 */
.header {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h2 {
    font-size: 18px;
    font-weight: bold;
}

/* 内容区域 */
.content {
    padding: 12px;
    padding-bottom: calc(12px + 60px + env(safe-area-inset-bottom));
    min-height: calc(100vh - 120px);
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 状态标签切换 */
.status-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.status-tab {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.status-tab:hover {
    background: #e8e8e8;
}

.status-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 统计信息 */
.stats-info {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.stats-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1;
    min-width: 120px;
}

.stats-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stats-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.stats-value.stats-in-progress {
    color: #fa8c16;
}

.stats-value.stats-completed {
    color: #52c41a;
}

.stats-unit {
    font-size: 14px;
    color: #999;
}

/* 项目列表网格布局 - 每行2个卡片 */
#orders-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.order-card {
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 加载更多提示 */
.loading-more {
    font-size: 14px;
    color: #999;
}

/* H5响应式 - 移动端单列显示 */
@media (max-width: 768px) {
    .status-tabs {
        gap: 8px;
        padding: 6px;
    }
    
    .status-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .stats-info {
        gap: 12px;
        padding: 12px;
    }
    
    .stats-item {
        min-width: 100px;
        flex: 1 1 calc(50% - 6px);
    }
    
    .stats-label {
        font-size: 13px;
    }
    
    .stats-value {
        font-size: 18px;
    }
    
    .stats-unit {
        font-size: 13px;
    }
    
    #orders-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tag-default {
    background: #f0f0f0;
    color: #666;
}

.tag-warning {
    background: #fff7e6;
    color: #fa8c16;
}

.tag-success {
    background: #f6ffed;
    color: #52c41a;
}

/* 列表 */
.list {
    list-style: none;
}

.list-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:last-child {
    border-bottom: none;
}

/* 底部导航 */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex !important;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 1000 !important;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    /* 确保在移动端显示 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    /* 防止被其他元素覆盖 */
    visibility: visible !important;
    opacity: 1 !important;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    transition: color 0.3s;
    color: #999;
}

.nav-item.active {
    color: #1890ff;
}

.nav-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-text {
    display: block;
    font-size: 12px;
}

/* 搜索栏 */
.search-container {
    margin-bottom: 12px;
}

.search-bar {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0;
    font-size: 14px;
}

.date-search-wrapper {
    position: relative;
}

.search-date {
    margin-top: 8px;
    margin-bottom: 0;
    padding-right: 35px; /* 为清除按钮留出空间 */
}

.clear-date-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.clear-date-btn:hover {
    background: #ff7875;
    transform: translateY(-50%) scale(1.1);
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 80px;
}

.btn-group .btn.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-group .btn.btn-success:hover {
    background: #73d13d;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.modal-footer .btn {
    flex: 1;
}

/* 表单样式增强 */
.modal-content .form-group {
    margin-bottom: 16px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.modal-content .form-group input[type="text"],
.modal-content .form-group input[type="date"],
.modal-content .form-group select,
.modal-content .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.modal-content .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-content .form-group input[type="checkbox"] {
    margin-right: 8px;
}

/* 多选拍摄人员样式 */
#photographer-select {
    background: #fff;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    box-sizing: border-box;
}

/* 多日期选择器样式 */
.date-selector-container {
    width: 100%;
}

.date-selector-options {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.date-selector-options input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.selected-dates-container {
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-date-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    color: #1890ff;
    transition: all 0.2s;
}

.selected-date-tag:hover {
    background: #bae7ff;
    border-color: #40a9ff;
}

.selected-date-tag button {
    background: none;
    border: none;
    color: #1890ff;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 16px;
    line-height: 1;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.selected-date-tag button:hover {
    background: #91d5ff;
    color: #fff;
}

#photographer-select label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1;
}

#photographer-select label:hover {
    background: #f0f2f5;
}

#photographer-select input[type="checkbox"] {
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
    pointer-events: auto;
    position: relative;
    z-index: 2;
    vertical-align: middle;
}

#photographer-select input[type="checkbox"]:checked {
    accent-color: #1890ff;
}

#photographer-select label span {
    flex: 1;
    line-height: 1.5;
    word-break: break-word;
}

/* 实时展示页面样式 - 全屏独立页面 */
.display-page-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    z-index: 3000;
    overflow-y: auto;
    padding: 0;
    display: none;
}

.display-page-fullscreen.active {
    display: block !important;
}

.display-page-content {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.display-page-header {
    margin-bottom: 20px;
}

.display-back-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.display-back-btn:hover {
    background: #f0f2f5;
    border-color: #667eea;
    color: #667eea;
}

.display-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.display-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
}

.display-title-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.display-stats {
    display: flex;
    gap: 20px;
}

.display-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.display-stat-value {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.display-stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.display-content {
    padding-bottom: 20px;
}

.display-month-section {
    margin-bottom: 30px;
}

.display-month-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #f0f2f5 0%, #e8ebf0 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #333;
}

.display-month-icon {
    font-size: 18px;
}

.display-month-title {
    font-size: 16px;
    flex: 1;
}

.display-month-count {
    font-size: 14px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.display-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .display-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .display-cards-grid {
        grid-template-columns: 1fr;
    }
}

.display-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8ebf0;
    position: relative;
    overflow: hidden;
}

.display-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.display-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.display-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
}

.display-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.display-card-date {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
    white-space: nowrap;
}

.display-card-project-name {
    flex: 1;
}

.display-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.display-card-status.status-progress {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.display-card-status.status-progress .status-dot {
    background: #52c41a;
    box-shadow: 0 0 8px rgba(82, 196, 26, 0.5);
    animation: blink 2s infinite;
}

.display-card-status.status-completed {
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
}

.display-card-status.status-completed .status-dot {
    background: #1890ff;
}

.display-card-status.status-pending {
    background: rgba(250, 173, 20, 0.1);
    color: #faad14;
}

.display-card-status.status-pending .status-dot {
    background: #faad14;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.display-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.display-card-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.6;
}

.display-card-label {
    color: #666;
    min-width: 80px;
    font-weight: 500;
}

.display-card-value {
    color: #333;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.display-card-link {
    color: #1890ff;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.display-card-link:hover {
    color: #40a9ff;
}

.display-card-bold {
    font-weight: bold;
}

.display-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.display-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.display-empty-text {
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
    .login-container {
        margin: 50px auto;
        padding: 20px;
    }
    
    /* 移动端底部导航栏优化 */
    .bottom-nav {
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        height: auto;
        min-height: 60px;
    }
    
    .nav-item {
        padding: 6px 8px;
    }
    
    .nav-icon {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .nav-text {
        font-size: 11px;
    }
    
    /* 确保内容区域在移动端有足够的底部空间 */
    .content {
        padding-bottom: calc(12px + 70px + env(safe-area-inset-bottom));
    }
    
    /* 确保页面在移动端有足够的底部空间 */
    .page {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
    
    /* 确保主页面在移动端正确显示 */
    #main-page {
        position: relative;
        min-height: 100vh;
    }
    
    /* 确保底部导航栏在移动端始终可见 */
    #main-page .bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 状态标签 */
.status-pending {
    background: #f0f0f0;
    color: #666;
}

.status-in_progress {
    background: #fff7e6;
    color: #fa8c16;
}

.status-completed {
    background: #f6ffed;
    color: #52c41a;
}
