/* ===== 后台页面通用样式 ===== */

/* 页面标题 */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 600; color: #1a1a2e; }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* 工具栏 */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }

/* 内页Tab切换（胶囊式） */
.tabs { display: flex; gap: 4px; background: #f5f5f5; border-radius: 8px; padding: 4px; margin-bottom: 16px; }
.tabs a { padding: 6px 14px; border-radius: 6px; font-size: 13px; color: #666; text-decoration: none; transition: all 0.2s; }
.tabs a:hover { color: #b1ce48; }
.tabs a.active { background: #fff; color: #b1ce48; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* 搜索 */
.search-form { display: flex; gap: 8px; align-items: center; }
.search-input { padding: 7px 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 13px; width: 200px; outline: none; }
.search-input:focus { border-color: #b1ce48; }

/* 批量操作栏 */
.batch-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; margin-bottom: 12px; }
.batch-info { font-size: 13px; color: #92400e; }
.batch-info strong { color: #b45309; }

/* 卡片容器 */
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td { padding: 12px 16px; text-align: left; }
.data-table th { font-weight: 500; color: #888; font-size: 12px; background: #fafbfc; border-bottom: 1px solid #f0f0f0; }
.data-table td { font-size: 14px; color: #333; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
.data-table tr:nth-child(even) td { background: #fafbfc; }
.data-table tr:hover td { background: #f8faf5; }

/* 列表项 */
.item-title { font-weight: 500; }
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { color: #b1ce48; text-decoration: underline; }
.item-meta { font-size: 12px; color: #999; margin-top: 2px; }
.item-cell { display: flex; align-items: center; gap: 12px; }
.item-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; background: #f5f5f5; flex-shrink: 0; }
.item-content { flex: 1; min-width: 0; }
.item-desc { font-size: 12px; color: #999; margin-top: 2px; }

/* 单元格通用 */
.cell-id { color: #aaa; font-size: 13px; }
.cell-price { color: #e55c5c; font-weight: 600; }
.cell-stock, .cell-duration, .cell-category, .cell-budget { font-size: 13px; color: #666; }
.cell-author, .cell-time { font-size: 13px; color: #666; }

/* 销售标签 */
.sale-tag { padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.sale-on { background: #d1fae5; color: #065f46; }
.sale-off { background: #f3f4f6; color: #6b7280; }

/* 审核状态标签 */
.status-tag { padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* 操作按钮区域 */
.cell-actions { vertical-align: middle; white-space: nowrap; }
.cell-actions .act-btn { margin-right: 4px; vertical-align: middle; display: inline-block; }
.cell-actions .act-btn:last-child { margin-right: 0; }
td.cell-actions { border-bottom: none !important; }
.act-btn { padding: 4px 10px; border: 1px solid #e8e8e8; border-radius: 4px; font-size: 12px; cursor: pointer; background: #fff; color: #666; text-decoration: none; transition: all 0.15s; white-space: nowrap; }
.act-btn:hover { border-color: #b1ce48; color: #b1ce48; }
.act-edit { color: #6ba3d6; border-color: rgba(107,163,214,0.3); }
.act-edit:hover { background: rgba(107,163,214,0.08); }
.act-on { color: #10b981; border-color: rgba(16,185,129,0.3); }
.act-off { color: #f59e0b; border-color: rgba(245,158,11,0.3); }
.act-approve { color: #10b981; border-color: rgba(16,185,129,0.3); }
.act-approve:hover { background: rgba(16,185,129,0.08); }
.act-reject { color: #f59e0b; border-color: rgba(245,158,11,0.3); }
.act-reject:hover { background: rgba(245,158,11,0.08); }
.act-del { color: #ef4444; border-color: rgba(239,68,68,0.2); }
.act-del:hover { background: rgba(239,68,68,0.05); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.pagination a { background: #fff; color: #666; text-decoration: none; border: 1px solid #e8e8e8; }
.pagination a:hover { border-color: #b1ce48; color: #b1ce48; }
.pagination a.active { background: #b1ce48; color: #fff; border-color: #b1ce48; }
.pagination .disabled { color: #ccc; cursor: not-allowed; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* 提示消息 */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* 按钮（页面级覆盖） */
.btn { padding: 8px 20px; border: none; border-radius: 20px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s; font-weight: 500; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-primary { background: #b1ce48; color: #fff; }
.btn-primary:hover { background: #9ab73a; }
.btn-secondary { background: #f0f0f0; color: #666; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: #666; }
.btn-outline:hover { border-color: #b1ce48; color: #b1ce48; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
