/**
 * 表格组件样式
 */

/* 基础表格样式 */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--text-dark);
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid var(--border-color);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--border-color);
  background-color: var(--bg-light);
  font-weight: 600;
  text-align: left;
}

/* 表格行悬停效果 */
.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* 表格类型 */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

.table-bordered {
  border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.075);
}

/* 紧凑型表格 */
.table-sm th,
.table-sm td {
  padding: 0.3rem;
}

/* 响应式表格 */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table-responsive > .table {
  margin-bottom: 0;
}

.table-responsive > .table-bordered {
  border: 0;
}

/* 用户管理表格 */
.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.users-table th {
  background-color: var(--bg-light);
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
}

.users-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.users-table tr.user-row:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* 表格列宽度 */
.id-column {
  width: 60px;
}

.username-column {
  width: 120px;
}

.name-column {
  width: 120px;
}

.phone-column {
  width: 120px;
}

.role-column {
  width: 100px;
}

.permission-column {
  width: 100px;
}

.created-column {
  width: 150px;
}

.actions-column {
  width: 200px;
}

/* 空表格状态 */
.empty-row td {
  text-align: center;
  padding: 40px !important;
}

.empty-state {
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state h4 {
  margin-bottom: 8px;
  color: var(--text-dark);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 0;
}
