/* =============================================
   文件收集系统 - 全局样式
   ============================================= */

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

/* ========== 导航栏 ========== */
.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--gray-600) !important;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white !important;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ========== 主内容 ========== */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* ========== 卡片 ========== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

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

.btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f0ff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

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

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: white;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ========== 表格 ========== */
.table-wrap {
    overflow-x: auto;
}

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

table th, table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

table tr:hover td {
    background: var(--gray-50);
}

/* ========== 标签 ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.primary { background: #eef2ff; color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.info { background: #dbeafe; color: var(--info); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ========== 认证页面 ========== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card .card-body {
    padding: 32px;
}

.auth-title {
    text-align: center;
    margin-bottom: 24px;
}

.auth-title h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

.auth-title p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ========== 文件上传区 ========== */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: #f0f0ff;
}

.upload-zone i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.upload-zone p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.upload-zone .upload-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 8px;
}

/* ========== 文件列表 ========== */
.file-list {
    list-style: none;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: white;
    transition: var(--transition);
}

.file-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.file-icon.pdf { background: #fee2e2; color: #dc2626; }
.file-icon.doc { background: #dbeafe; color: #2563eb; }
.file-icon.xls { background: #d1fae5; color: #059669; }
.file-icon.img { background: #fef3c7; color: #d97706; }
.file-icon.other { background: var(--gray-200); color: var(--gray-500); }

.file-name {
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ========== 进度条 ========== */
.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ========== 分享链接框 ========== */
.share-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--gray-700);
    outline: none;
}

.share-box .share-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    letter-spacing: 1px;
}

/* ========== Toast 通知 ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast.info { border-color: var(--info); }

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

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ========== 提交页面（公开） ========== */
.submit-page {
    max-width: 680px;
    margin: 0 auto;
}

.submit-header {
    text-align: center;
    padding: 40px 20px 30px;
}

.submit-header h1 {
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.submit-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.submit-success {
    text-align: center;
    padding: 60px 20px;
}

.submit-success i {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}

.submit-success h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.submit-success p {
    color: var(--gray-500);
}

/* ========== 动态表单字段 ========== */
.field-builder {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.field-builder-header {
    background: var(--gray-50);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
}

.field-builder-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: grid;
    grid-template-columns: 1fr 1fr 120px auto;
    gap: 10px;
    align-items: center;
}

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

/* ========== 页脚 ========== */
.footer {
    padding: 20px 0;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.8rem;
    border-top: 1px solid var(--gray-200);
    background: white;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .nav-content {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 16px;
    }
    
    .nav-links {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .field-builder-item {
        grid-template-columns: 1fr;
    }
    
    .share-box {
        flex-direction: column;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ========== 加载动画 ========== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* ========== 收集卡片列表 ========== */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.collection-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.collection-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.collection-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.collection-card p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.collection-card .card-meta .meta-stats {
    display: flex;
    gap: 12px;
}

/* ========== 文件预览 ========== */
.preview-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.preview-container {
    background: white; border-radius: 12px; max-width: 90vw; max-height: 90vh;
    overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex; flex-direction: column;
}
.preview-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
    font-weight: 600; font-size: 0.95rem;
}
.preview-header button {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
    color: var(--gray-500); padding: 0 8px;
}
.preview-header button:hover { color: var(--gray-800); }
.preview-body { overflow: auto; }
.preview-body img { max-width: 85vw; max-height: 80vh; display: block; margin: auto; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========== 二维码弹窗 ========== */
.qr-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 9998;
    display: flex; align-items: center; justify-content: center;
}
.qr-card {
    background: white; border-radius: 16px; padding: 32px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15); max-width: 360px; width: 90%;
}
.qr-card h3 { margin-bottom: 16px; font-size: 1.1rem; }
.qr-card canvas, .qr-card img { margin: 0 auto 16px; display: block; }
.qr-card .qr-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* ========== 任务卡片增强 ========== */
.collection-card { position: relative; transition: all 0.2s ease; }
.collection-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.collection-card .pin-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--warning); color: white; border-radius: 50%;
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
}
.collection-card .archive-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--gray-400); color: white; border-radius: 50%;
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
}
.collection-card.archived { opacity: 0.65; }

/* ========== 筛选栏 ========== */
.filter-bar {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    padding: 12px 0; margin-bottom: 16px; border-bottom: 1px solid var(--gray-100);
}
.filter-bar .filter-btn {
    padding: 6px 14px; border-radius: 20px; border: 1px solid var(--gray-200);
    background: white; cursor: pointer; font-size: 0.85rem; color: var(--gray-600);
    transition: all 0.15s;
}
.filter-bar .filter-btn.active {
    background: var(--primary); color: white; border-color: var(--primary);
}
.filter-bar .filter-btn:hover:not(.active) {
    background: var(--gray-50); border-color: var(--gray-300);
}

/* ========== 活动日志 ========== */
.activity-timeline { position: relative; padding-left: 24px; }
.activity-timeline::before {
    content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px;
    width: 2px; background: var(--gray-200);
}
.activity-item {
    position: relative; padding: 8px 0 16px; font-size: 0.85rem;
}
.activity-item::before {
    content: ''; position: absolute; left: -20px; top: 12px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
    border: 2px solid white;
}
.activity-item .activity-time { color: var(--gray-400); font-size: 0.75rem; }

/* ========== 下拉菜单 ========== */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute; right: 0; top: 100%; z-index: 100;
    background: white; border-radius: 8px; box-shadow: var(--shadow-lg);
    min-width: 160px; padding: 4px 0; display: none;
    border: 1px solid var(--gray-100);
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; font-size: 0.85rem; cursor: pointer;
    color: var(--gray-700); border: none; background: none; width: 100%; text-align: left;
}
.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }

/* ========== 空状态增强 ========== */
.empty-state { padding: 48px 20px; text-align: center; color: var(--gray-400); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--gray-600); margin-bottom: 8px; font-size: 1.1rem; }
.empty-state p { font-size: 0.9rem; max-width: 300px; margin: 0 auto 16px; }

/* ========== 加载骨架屏 ========== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
.skeleton-card { height: 140px; border-radius: 12px; }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 60%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ========== 通知小红点 ========== */
.dot-badge { position: relative; }
.dot-badge::after {
    content: ''; position: absolute; top: -2px; right: -2px;
    width: 8px; height: 8px; background: var(--danger); border-radius: 50%;
    border: 2px solid white;
}

/* ========== 统计卡片增强 ========== */
.stat-card { transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); }

/* ========== 操作确认条 ========== */
.confirm-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--gray-800); color: white; padding: 12px 20px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    z-index: 1000; animation: slideUp 0.2s ease;
}
.confirm-bar .btn { min-width: 80px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ========== 排序选择器 ========== */
.sort-select {
    padding: 6px 12px; border-radius: 20px; border: 1px solid var(--gray-200);
    background: white; font-size: 0.85rem; color: var(--gray-600);
    cursor: pointer; outline: none;
}
.sort-select:focus { border-color: var(--primary); }

/* ========== 搜索框 ========== */
.search-input {
    padding: 8px 14px 8px 36px; border-radius: 20px; border: 1px solid var(--gray-200);
    background: white; font-size: 0.85rem; color: var(--gray-700); outline: none;
    width: 220px; transition: all 0.2s;
}
.search-input:focus { border-color: var(--primary); width: 280px; }
.search-wrap { position: relative; display: inline-block; }
.search-wrap i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--gray-400); font-size: 0.85rem;
}

/* ========== 倒计时文本 ========== */
.countdown-text { font-size: 0.75rem; color: var(--warning); font-weight: 500; }
.countdown-text.urgent { color: var(--danger); }
.countdown-text.expired { color: var(--gray-400); }

/* ========== QR码内联显示 ========== */
.qr-inline {
    display: inline-block; vertical-align: middle; margin-left: 12px;
    cursor: pointer;
}
.qr-inline img { width: 60px; height: 60px; border-radius: 4px; border: 1px solid var(--gray-200); }

/* ========== 响应式增强 ========== */
@media (max-width: 640px) {
    .preview-container { max-width: 100vw; border-radius: 0; max-height: 100vh; }
    .qr-card { padding: 24px 16px; }
    .filter-bar { padding: 8px 0; }
    .dropdown-menu { right: auto; left: 0; }
    .search-input { width: 160px; }
    .search-input:focus { width: 200px; }
    .collection-grid { grid-template-columns: 1fr; }
}
