/* PrettyTable CSS Framework */
/* 基础样式 */
.pretty-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.pretty-table th,
.pretty-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.pretty-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.pretty-table tbody tr:last-child td {
  border-bottom: none;
}

.pretty-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* 斑马纹样式 */
.pretty-table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.03);
}

.pretty-table-striped tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* 边框样式 */
.pretty-table-bordered {
  border: 1px solid #dee2e6;
}

.pretty-table-bordered th,
.pretty-table-bordered td {
  border: 1px solid #dee2e6;
}

/* 紧凑样式 */
.pretty-table-compact th,
.pretty-table-compact td {
  padding: 0.3rem;
}

/* 主题样式 */
/* 主题: 蓝色 */
.pretty-table-theme-blue th {
  background-color: #e7f5ff;
  color: #1864ab;
  border-bottom: 2px solid #4dabf7;
}

.pretty-table-theme-blue tbody tr:hover {
  background-color: rgba(77, 171, 247, 0.05);
}

/* 主题: 绿色 */
.pretty-table-theme-green th {
  background-color: #ebfbee;
  color: #2b8a3e;
  border-bottom: 2px solid #69db7c;
}

.pretty-table-theme-green tbody tr:hover {
  background-color: rgba(105, 219, 124, 0.05);
}

/* 主题: 红色 */
.pretty-table-theme-red th {
  background-color: #fff5f5;
  color: #c92a2a;
  border-bottom: 2px solid #ff8787;
}

.pretty-table-theme-red tbody tr:hover {
  background-color: rgba(255, 135, 135, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .pretty-table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 卡片式布局（在小屏幕上将表格转换为卡片式布局） */
  .pretty-table-cards {
    border: none;
    box-shadow: none;
  }
  
  .pretty-table-cards thead {
    display: none;
  }
  
  .pretty-table-cards tbody, 
  .pretty-table-cards tr, 
  .pretty-table-cards td {
    display: block;
    width: 100%;
  }
  
  .pretty-table-cards tr {
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }
  
  .pretty-table-cards td {
    text-align: right;
    position: relative;
    padding-left: 50%;
  }
  
  .pretty-table-cards td:before {
    content: attr(data-label);
    position: absolute;
    left: 0.75rem;
    width: 45%;
    padding-right: 10px;
    text-align: left;
    font-weight: 600;
    color: #495057;
  }
}

/* 排序指示器 */
.pretty-table th.sortable {
  cursor: pointer;
  position: relative;
}

.pretty-table th.sortable:after {
  content: "↕";
  position: absolute;
  right: 8px;
  color: #adb5bd;
}

.pretty-table th.sorted-asc:after {
  content: "↑";
  color: #495057;
}

.pretty-table th.sorted-desc:after {
  content: "↓";
  color: #495057;
}

/* 状态行样式 */
.pretty-table tr.active {
  background-color: rgba(0, 123, 255, 0.1);
}

.pretty-table tr.success {
  background-color: rgba(40, 167, 69, 0.1);
}

.pretty-table tr.warning {
  background-color: rgba(255, 193, 7, 0.1);
}

.pretty-table tr.danger {
  background-color: rgba(220, 53, 69, 0.1);
}

/* 分页样式 */
.pretty-table-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.pretty-table-pagination button {
  background-color: #fff;
  border: 1px solid #dee2e6;
  padding: 0.375rem 0.75rem;
  margin-left: 0.25rem;
  cursor: pointer;
  border-radius: 4px;
}

.pretty-table-pagination button:hover {
  background-color: #e9ecef;
}

.pretty-table-pagination button.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* 表格容器 */
.pretty-table-container {
  margin-bottom: 1.5rem;
}

/* 表格标题 */
.pretty-table-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #212529;
}

/* 表格描述 */
.pretty-table-description {
  margin-bottom: 0.75rem;
  color: #6c757d;
}