/* ============================================
   文档管理系统 - 现代化CSS样式
   设计理念：简洁、专业、现代化
   ============================================ */

/* CSS变量定义 - 支持浅色/深色主题 */
:root {
    /* 主色调 - 科技蓝 */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-hover: #1d4ed8;
    
    /* 辅助色 */
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    
    /* 文字色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* 边框与阴影 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* 过渡动画 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 间距 */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* 字体 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
}

/* 全局重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 选择文本样式 */
::selection {
    background: var(--primary-light);
    color: var(--text-inverse);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ============================================
   布局容器
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ============================================
   头部样式
   ============================================ */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

/* ============================================
   搜索表单
   ============================================ */
.search-form {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
}

.search-form input {
    padding: var(--space-3) var(--space-4);
    padding-left: var(--space-10);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 280px;
    transition: var(--transition);
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    width: 320px;
}

.search-form::before {
    content: '🔍';
    position: absolute;
    left: var(--space-4);
    font-size: 0.875rem;
    opacity: 0.5;
    pointer-events: none;
}

.search-form button {
    padding: var(--space-3) var(--space-6);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.search-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.4);
}

.search-form button:hover::before {
    left: 100%;
}

.search-form button:active {
    transform: translateY(0);
}

/* ============================================
   主内容区域
   ============================================ */
main {
    max-width: 1280px;
    margin: var(--space-8) auto;
    padding: var(--space-8);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-height: calc(100vh - 200px);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   标题样式
   ============================================ */
h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
}

/* ============================================
   链接样式
   ============================================ */
.back-link,
.logout-link,
.download-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover,
.logout-link:hover,
.download-link:hover {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.download-link {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--text-inverse);
    border-color: transparent;
    font-weight: 600;
}

.download-link:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ============================================
   文档表格
   ============================================ */
.document-table-wrapper {
    width: 100%;
    overflow: hidden;
}

.document-table-container {
    margin-top: var(--space-6);
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.document-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.document-table th,
.document-table td {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.document-table th {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.document-table th:first-child {
    border-top-left-radius: var(--radius);
}

.document-table th:last-child {
    border-top-right-radius: var(--radius);
}

.document-table tbody tr {
    background: var(--bg-primary);
    transition: var(--transition-fast);
}

.document-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.document-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
    transform: scale(1.002);
}

.document-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius);
}

.document-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius);
}

.document-table tbody tr:last-child td {
    border-bottom: none;
}

.document-table a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.document-table a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.document-table a::before {
    content: '📄';
}

/* 文件类型标签 */
.file-type {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ============================================
   分页样式
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-8);
    padding: var(--space-4);
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-4);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-link.current {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    border-color: transparent;
    font-weight: 600;
    cursor: default;
    box-shadow: var(--shadow-md);
}

.page-link.current:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--text-muted);
}

.empty-state::before {
    content: '📁';
    display: block;
    font-size: 4rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ============================================
   文档查看器
   ============================================ */
.document-viewer {
    margin-top: var(--space-8);
}

.document-container {
    width: 100%;
    min-height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: var(--space-8);
    background: var(--bg-primary);
    overflow: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    gap: var(--space-4);
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   消息提示
   ============================================ */
.message {
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    border-radius: var(--radius);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.success::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.error::before {
    content: '!';
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ============================================
   表单样式
   ============================================ */
.upload-form {
    margin-bottom: var(--space-8);
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group label::after {
    content: '*';
    color: var(--danger);
    margin-left: var(--space-1);
}

.form-group label[for]:not([for*="optional"])::after {
    content: '*';
}

.form-group input[type="text"],
.form-group textarea,
.form-group input[type="file"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

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

.form-group input[type="file"] {
    padding: var(--space-3);
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    padding: var(--space-2) var(--space-4);
    margin-right: var(--space-4);
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.form-group input[type="file"]::file-selector-button:hover {
    background: var(--primary-dark);
}

.form-group button[type="submit"] {
    padding: var(--space-3) var(--space-8);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.form-group button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.4);
}

.form-group button[type="submit"]:active {
    transform: translateY(0);
}

/* ============================================
   登录表单
   ============================================ */
.login-form {
    max-width: 420px;
    margin: var(--space-12) auto;
    padding: var(--space-10);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.6s ease-out;
}

.login-form h2 {
    text-align: center;
    margin-bottom: var(--space-8);
    border-bottom: none;
    justify-content: center;
}

.login-form h2::before {
    display: none;
}

.login-form h2::after {
    content: '🔐';
    font-size: 2rem;
}

.login-form .form-group label::after {
    display: none;
}

/* ============================================
   操作按钮
   ============================================ */
.action-buttons {
    display: flex;
    gap: var(--space-2);
}

.action-buttons a {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.view-btn {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    color: var(--text-inverse);
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--text-inverse);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ============================================
   页脚
   ============================================ */
footer {
    background: var(--bg-primary);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-6);
    margin-top: var(--space-8);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

footer p::before {
    content: '©';
}

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

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

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

.stat-icon.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
}

.stat-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.stat-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================   响应式设计   ============================================ */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-form {
        order: 3;
        width: 100%;
    }
    
    .search-form input {
        flex: 1;
        width: auto;
    }
    
    .search-form input:focus {
        width: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --space-6: 1rem;
        --space-8: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
    }
    
    header h1 {
        text-align: center;
        font-size: 1.25rem;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form input {
        width: 100%;
    }
    
    main {
        margin: var(--space-4);
        padding: var(--space-4);
        border-radius: var(--radius);
        min-height: calc(100vh - 160px);
    }
    
    .document-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .document-table {
        min-width: 600px;
    }
    
    .document-table th,
    .document-table td {
        padding: var(--space-3);
        font-size: 0.8125rem;
    }
    
    .document-table-container {
        margin: var(--space-4) 0;
        border-radius: var(--radius);
        border: 1px solid var(--border-color);
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: var(--space-1);
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 var(--space-3);
        font-size: 0.8125rem;
    }
    
    .upload-form {
        padding: var(--space-4);
    }
    
    .login-form {
        margin: var(--space-6) var(--space-4);
        padding: var(--space-6);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .stat-card {
        padding: var(--space-4);
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .stat-content p {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    :root {
        --space-4: 0.75rem;
        --space-6: 1rem;
    }
    
    body {
        font-size: 13px;
    }
    
    header h1 {
        font-size: 1.125rem;
    }
    
    main {
        margin: var(--space-3);
        padding: var(--space-3);
    }
    
    .search-form input {
        padding: var(--space-2) var(--space-3);
        padding-left: var(--space-8);
    }
    
    .search-form button {
        padding: var(--space-2) var(--space-4);
    }
    
    .document-table {
        min-width: 500px;
        font-size: 0.75rem;
    }
    
    .document-table th,
    .document-table td {
        padding: var(--space-2);
    }
    
    .pagination {
        gap: var(--space-1);
    }
    
    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 var(--space-2);
        font-size: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .action-buttons a {
        justify-content: center;
    }
    
    footer {
        padding: var(--space-4);
        font-size: 0.75rem;
    }
}

/* 针对横屏手机的适配 */
@media (max-height: 480px) and (orientation: landscape) {
    main {
        min-height: calc(100vh - 120px);
        margin: var(--space-3);
        padding: var(--space-3);
    }
    
    .document-table th,
    .document-table td {
        padding: var(--space-2);
        font-size: 0.75rem;
    }
}

/* ============================================
   动画效果
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ============================================
   工具类
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
