/**
 * 鑫三利系统 - 表格样式
 */

/* 表格容器 */
.table-container {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 24px;
}

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* 表头 */
.table thead {
  background: #fafafa;
}

.table th {
  height: 39px;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 500;
  color: #565454;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

/* 表格内容 */
.table td {
  height: 44px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 400;
  color: #000;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

/* 斑马纹 */
.table--striped tbody tr:nth-child(odd) {
  background: #fafafa;
}

/* 行悬停效果 */
.table tbody tr:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 选中行 */
.table tbody tr.selected {
  background: #eaf2fe;
}

/* 右对齐 */
.table td.text-right {
  text-align: right;
}

/* 居中 */
.table td.text-center {
  text-align: center;
}

/* 链接样式 */
.table .link {
  color: #1890ff;
  text-decoration: none;
  cursor: pointer;
}

.table .link:hover {
  color: #40a9ff;
  text-decoration: underline;
}

/* 操作列 */
.table .action-cell {
  white-space: nowrap;
  text-align: left;
}

.table .action-cell .link {
  margin-right: 8px;
}

.table .action-cell .link:not(:last-child)::after {
  content: '|';
  margin-left: 8px;
  color: #d9d9d9;
}

/* 无数据 */
.table-empty {
  text-align: center;
  padding: 60px 0;
  color: #999;
  font-size: 14px;
}

.table-empty-icon {
  font-size: 48px;
  color: #d9d9d9;
  margin-bottom: 8px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
  margin: 0 24px 16px;
}

.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
  color: #1890ff;
  border-color: #1890ff;
}

.pagination-btn.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}

.pagination-btn:disabled {
  color: #ccc;
  border-color: #f0f0f0;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 12px;
  color: #666;
}

/* 表格单元格高亮 */
.table td.highlight {
  font-weight: 600;
  color: #1890ff;
}

/* 表格内嵌套表格样式 */
.nested-table {
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  margin: 8px 0;
}

.nested-table th,
.nested-table td {
  font-size: 12px;
}

.nested-table th {
  height: 36px;
  background: #fafafa;
}

.nested-table td {
  height: 40px;
}

/* 隐藏字段（用于排序） */
.hide {
  display: none;
}

/* 可展开行 */
.expandable-row {
  cursor: pointer;
}

.expandable-row:hover {
  background: #eaf2fe;
}

.expandable-row .expand-icon {
  transition: transform 0.3s;
}

.expandable-row.expanded .expand-icon {
  expanded
}

.expandable-row.expanded .expand-icon {
  transform: rotate(90deg);
}

/* 子表格行 */
.child-rows {
  background: #fafafa;
}

.child-rows td {
  padding: 16px 16px 16px 48px;
}

/* 表格操作栏 */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
