/* 文件管理页面扩展样式 */

/* ===== 统一主题覆盖（在 novel.css 之后加载，只影响本页） ===== */
body {
    background: #f6f7fb;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #171c2e;
}

.content {
    border: 1px solid #e8eaf1;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(23, 28, 46, 0.06);
}

.info-bar,
.batch-controls {
    border-color: #e8eaf1;
}

.info-bar-left h1 {
    color: #171c2e;
    font-weight: 800;
}

thead {
    background: #f8fafc;
}

button {
    background: #f2f4fa;
    color: #3f4658;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
}

button:hover {
    background: #e8ebf5;
    border-color: #d5dae8;
    transform: none;
}

button:disabled {
    background: #f7f8fc;
    color: #aab0c2;
    border-color: #eceef5;
    cursor: not-allowed;
}

.delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fbdcdc;
}

.delete-btn:hover:not(:disabled) {
    background: #fee4e4;
    border-color: #f7c9c9;
}

.batch-controls button {
    background: #f2f4fa;
    color: #3f4658;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
}

.batch-controls button:hover:not(:disabled) {
    background: #e8ebf5;
    border-color: #d5dae8;
}

.batch-controls .delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fbdcdc;
}

.batch-controls .delete-btn:hover:not(:disabled) {
    background: #fee4e4;
    border-color: #f7c9c9;
}

.batch-controls input,
.batch-controls select {
    border-color: #e8eaf1;
    border-radius: 8px;
}

td input[type="checkbox"] {
    accent-color: #4f46e5;
}

tbody tr:hover td {
    background: #f5f6fd;
    box-shadow: none;
}

a {
    color: #4f46e5;
}

a:hover {
    color: #4338ca;
}

.pagination button {
    background: #f2f4fa;
    color: #3f4658;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
}

.pagination button:hover:not(:disabled) {
    background: #e8ebf5;
    border-color: #d5dae8;
    transform: none;
}

.pagination button:disabled {
    background: #f7f8fc;
    color: #aab0c2;
    border-color: #eceef5;
}

.pagination input {
    border-color: #e8eaf1;
    border-radius: 8px;
}

/* 文件名单元格 */
.file-name-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空状态 */
.empty {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    padding: 40px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-text {
    font-size: 18px;
    font-weight: 500;
}

/* 加载状态 */
.loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
    padding: 40px;
}

/* 移动端卡片样式 */
.card-list {
    display: none;
}

@media (max-width: 768px) {
    .table-wrapper {
        display: none !important;
    }
    
    .card-list {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .file-card {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 12px;
        flex-shrink: 0;
    }
    
    .file-card-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }
    
    .file-card-name {
        font-weight: 500;
        color: #212529;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }
    
    .file-card-meta {
        display: flex;
        justify-content: space-between;
        color: #6c757d;
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .file-card-actions {
        display: flex;
        gap: 8px;
    }
    
    .file-card-actions button {
        flex: 1;
        text-align: center;
        padding: 6px 10px;
        font-size: 12px;
    }
}
