/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 认证页面样式 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.code-input-group input {
    flex: 1;
}

.send-code-btn {
    flex-shrink: 0;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-btn:hover {
    background: #5a6fd8;
}

.auth-footer {
    text-align: center;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 仪表盘样式 */
.dashboard-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.dashboard-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.header-content h1 {
    color: #667eea;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-level {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h3 {
    margin-bottom: 15px;
    color: #333;
}

.space-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

.space-text {
    font-size: 14px;
    color: #666;
}

.level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-level {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.upgrade-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
}

.upload-area.dragover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: #333;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.upload-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.upload-options {
    margin-top: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* 文件列表 */
.file-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.section-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 250px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.file-list {
    min-height: 200px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-icon {
    font-size: 24px;
    margin-right: 15px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-actions .action-btn {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 6px 10px;
    font-size: 12px;
}

.file-actions .action-btn.danger {
    color: #e74c3c;
    border-color: #e74c3c;
}

.file-actions .action-btn:hover {
    background: #f8f9fa;
}

/* 分页 */
.pagination {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.page-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
}

.page-btn:hover {
    background: #f8f9fa;
}

.page-current {
    background: #667eea;
    color: white;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 4px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

/* 管理员后台样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    margin-bottom: 5px;
    font-size: 20px;
}

.sidebar-header p {
    color: #bdc3c7;
    font-size: 12px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: #34495e;
    color: white;
    border-left: 4px solid #667eea;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
    font-size: 12px;
}

.logout-link {
    color: #e74c3c;
    text-decoration: none;
}

.admin-content {
    flex: 1;
    background: #f8f9fa;
    overflow-y: auto;
}

.content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* 内容卡片 */
.content-card {
    background: white;
    margin: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.content-card h3 {
    padding: 20px;
    border-bottom: 1px solid #eee;
    color: #2c3e50;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 500;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

/* 等级标签 */
.level-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* 警告框 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .file-actions {
        justify-content: space-between;
    }
    
    .search-input {
        width: 100%;
    }
}

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

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 文件上传进度 */
.upload-progress {
    text-align: center;
}

.progress-text {
    margin-bottom: 10px;
    color: #333;
}

.progress-fill {
    background: #667eea;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}