/* ========== 管理后台评论管理 ========== */

/* --- 页面标题 --- */
.admin-page-header {
    margin-bottom: 24px;
}
.admin-page-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

/* --- 工具栏/搜索 --- */
.admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-search-input {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.admin-search-input:focus {
    border-color: var(--primary);
}

/* --- 表格 --- */
.admin-table-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f9fafb;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #374151;
    vertical-align: middle;
}
.admin-table tbody tr:hover {
    background: #f8f9ff;
}

/* 列宽 */
.th-id { width: 60px; }
.th-author { width: 100px; }
.th-post { width: 160px; }
.th-time { width: 140px; }
.th-actions { width: 100px; }

/* 表格空状态 / 加载失败 */
.admin-table-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}
.admin-table-error {
    text-align: center;
    padding: 40px;
    color: #dc2626;
}

/* 评论内容列 */
.comment-body-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 分页 --- */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.admin-page-link {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
}
.admin-page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.admin-page-info {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- 加载状态 --- */
.admin-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- 按钮适配 --- */
.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}
.btn-secondary:hover {
    background: #d1d5db;
}

/* --- 工具类 --- */
.admin-hidden {
    display: none;
}
