/* Application/Index Module - Table Styles */

/* 切换按钮样式 */
button[name="toggle"][title="切换"] {
  background: rgba(225, 121, 137, 0.16) !important;
  border-radius: 3px !important;
  padding: 6px 12px;
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

button[name="toggle"][title="切换"]:hover {
  opacity: 0.9;
}

/* 按钮内的图标颜色 */
button[name="toggle"][title="切换"] i {
  color: #e17989 !important;
}

/* 列按钮样式 */
.btn-group[title="列"] button[aria-label="columns"] {
  background: rgba(247, 162, 9, 0.16) !important;
  border-radius: 3px !important;
  padding: 6px 12px;
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-group[title="列"] button[aria-label="columns"]:hover {
  opacity: 0.9;
}

/* 列按钮内的图标颜色 */
.btn-group[title="列"] button[aria-label="columns"] i {
  color: #f7a209 !important;
}

/* 列按钮下拉箭头颜色 */
.btn-group[title="列"] button[aria-label="columns"] .caret {
  border-top-color: #f7a209 !important;
}

/* 导出按钮样式 */
.export.btn-group button[title="导出数据"] {
  background: rgba(152, 201, 184, 0.16) !important;
  border-radius: 3px !important;
  padding: 6px 12px;
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.export.btn-group button[title="导出数据"]:hover {
  opacity: 0.9;
}

/* 导出按钮内的图标颜色 */
.export.btn-group button[title="导出数据"] i {
  color: #98c9b8 !important;
}

/* 导出按钮下拉箭头颜色 */
.export.btn-group button[title="导出数据"] .caret {
  border-top-color: #98c9b8 !important;
}

/* 工具栏右侧按钮容器内的子元素间距 */
.columns.columns-right > button,
.columns.columns-right > .btn-group {
  margin-left: 8px;
  margin-right: 8px;
}

/* 第一个元素不需要左边距 */
.columns.columns-right > button:first-child,
.columns.columns-right > .btn-group:first-child {
  margin-left: 0;
}

/* 最后一个元素不需要右边距 */
.columns.columns-right > button:last-child,
.columns.columns-right > .btn-group:last-child {
  margin-right: 0;
}

/* 搜索按钮样式 */
button[name="commonSearch"][title="Common search"] {
  background: rgba(126, 123, 176, 0.16) !important;
  border-radius: 3px !important;
  padding: 6px 12px;
  border: none !important;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

button[name="commonSearch"][title="Common search"]:hover {
  opacity: 0.9;
}

/* 搜索按钮内的图标颜色 */
button[name="commonSearch"][title="Common search"] i {
  color: #7e7bb0 !important;
}

/* 搜索输入框样式 */
.pull-right.search {
  position: relative;
}

.pull-right.search input.form-control {
  background: #ffffff !important;
  border-radius: 3px !important;
  padding-right: 35px;
  border: 1px solid #e0e0e0;
}

/* 搜索框后的图标 */
.pull-right.search::after {
  content: "\e003";
  font-family: "Glyphicons Halflings";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #2a3cf5;
  pointer-events: none;
  font-size: 14px;
}

/* 刷新按钮样式 */
.toolbar .btn-refresh {
  width: 32px !important;
  height: 32px !important;
  background: #2a3cf5 !important;
  border-radius: 3px !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.toolbar .btn-refresh:hover {
  opacity: 0.9;
}

.toolbar .btn-refresh i {
  color: #ffffff !important;
  font-size: 16px;
}

/* 表格容器样式 */
.table-container {
  background: #ffffff;
  border-radius: 4px;
}

.table-content {
  padding: 12px;
}

/* Bootstrap表格样式覆盖 */
.table-content .table {
  background: #ffffff;
  margin-bottom: 0;
}

.table-content .table thead th {
  background: #f5f5f5;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  border-top: none;
}

.table-content .table tbody td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
}

.table-content .table tbody tr:hover td {
  background: #fafafa;
}

/* 工具栏样式 */
.table-content .toolbar {
  margin-bottom: 12px;
}

/* 表格通用样式 (保持向后兼容) */
.application-index-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.application-index-table th {
  background: #f5f5f5;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
}

.application-index-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.application-index-table tr:hover {
  background: #fafafa;
}

/* 操作列样式 */
.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ============================================
   Financial Records Table Styles (Merged)
   ============================================ */

/* ============================================
   全局移除斑马纹样式
   ============================================ */

/* 强制移除所有 table-striped 的斑马纹效果 */
.table-striped > tbody > tr:nth-of-type(odd),
.table-striped > tbody > tr:nth-of-type(even) {
  background-color: #fff !important;
}

/* 确保所有表格行背景都是白色 */
.table > tbody > tr {
  background-color: #fff !important;
}

/* Hover effect */
.table-hover > tbody > tr:hover {
  background-color: #f5f7fa;
}

/* Table Header - White Background */
.table thead th {
  background-color: #ffffff;
  height: 48px;
  color: #333333;
  font-weight: 600;
  font-size: 14px;
  vertical-align: middle;
  border-bottom: none !important;
  border-top: none;
  border-color: transparent;
}

/* 在thead和tbody之间添加12px间距 */
.table tbody::before {
  content: "";
  display: table-row;
  height: 12px;
}

/* Table Body */
.table tbody tr {
  height: 64px;
  color: #666666;
  font-size: 14px;
}

.table tbody tr td {
  vertical-align: middle;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

/* Remove left and right borders */
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
  border-left: none;
  border-right: none;
}

/* Amount Column */
.cell-amount {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cell-amount .coin-icon {
  font-size: 18px;
}

.cell-amount span {
  color: #333333;
  font-weight: 600;
}

/* Platform Badge */
.platform-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 爱签平台样式 */
.platform-badge-asign {
    background-color: rgba(225, 121, 137, 0.1);
    color: #E17989;
}

/* 租先知平台样式 */
.platform-badge-zxz {
    background-color: rgba(231, 203, 137, 0.1);
    color: #E7CB89;
}

/* Description Cell */
.description-cell {
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #666666;
}

/* Time Column */
.table tbody td[data-field="createtime"] {
  color: #bfbfbf;
  font-family: "Courier New", monospace;
}

/* Pagination Styles */
.fixed-table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin-top: 16px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

/* 移除默认的::after清除浮动样式 */
.fixed-table-pagination::after {
  content: none !important;
  display: none !important;
}

/* 左侧信息统计 */
.pagination-info {
  color: #b9b9c3;
  font-size: 13px;
}

.pagination-detail .page-list {
  display: inline-block;
  color: #b9b9c3;
  font-size: 13px;
}

/* 每页显示下拉框 */
.pagination-detail .page-list .btn-group .btn {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background-color: #ffffff;
  color: #333333;
  font-size: 13px;
  min-width: 50px;
}

.pagination-detail .page-list .btn-group .btn:hover {
  border-color: #3b5de7;
}

.pagination-detail .page-list .btn-group .btn .caret {
  margin-left: 6px;
}

/* 右侧分页按钮 */
.pagination {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination li {
  display: inline-block;
}

.pagination li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 13px;
  transition: all 0.3s ease;
  text-decoration: none;
}

/* 普通页码按钮 */
.pagination .page-number a {
  background-color: #ffffff;
  color: #3b5de7;
  border: 1px solid #e0e0e0;
}

.pagination .page-number a:hover {
  background-color: #f0f4ff;
}

/* 当前激活页码 */
.pagination .page-number.active a {
  background-color: #ced4da;
  color: #333333;
  border: 1px solid #ced4da;
  font-weight: 600;
}

/* 上一页/下一页按钮 */
.pagination .page-pre a,
.pagination .page-next a {
  background-color: #3b5de7;
  color: #ffffff;
  border: 1px solid #3b5de7;
  font-weight: 500;
}

.pagination .page-pre a:hover,
.pagination .page-next a:hover {
  background-color: #2a4dd0;
  border-color: #2a4dd0;
}

/* 禁用状态 */
.pagination .page-pre.disabled a,
.pagination .page-next.disabled a,
.pagination .page-last-separator.disabled a {
  background-color: #e9ecef;
  color: #adb5bd;
  border: 1px solid #e9ecef;
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination .page-pre.disabled a:hover,
.pagination .page-next.disabled a:hover {
  background-color: #e9ecef;
  border-color: #e9ecef;
}

/* 最后一页按钮 */
.pagination .page-last a {
  background-color: #ffffff;
  color: #3b5de7;
  border: 1px solid #e0e0e0;
}

.pagination .page-last a:hover {
  background-color: #f0f4ff;
}

/* 省略号 */
.pagination .page-last-separator a {
  background-color: transparent;
  color: #74788d;
  border: none;
  cursor: default;
}

/* 跳转输入框和GO按钮 */
.pagination .jumpto {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
}

.pagination .jumpto input.form-control {
  width: 50px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background-color: #ffffff;
  font-size: 13px;
  text-align: center;
}

.pagination .jumpto input.form-control:focus {
  border-color: #3b5de7;
  outline: none;
}

.pagination .jumpto button.btn {
  min-width: 50px;
  height: 32px;
  padding: 0 12px;
  background-color: #3b5de7;
  color: #ffffff;
  border: 1px solid #3b5de7;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination .jumpto button.btn:hover {
  background-color: #2a4dd0;
  border-color: #2a4dd0;
}

/* Bootstrap Table Overrides */
.bootstrap-table .fixed-table-container {
  border: none !important;
}

/* Keep the bootstrap table toolbar visible */
.fixed-table-toolbar {
  margin-bottom: 16px;
}

/* Remove extra borders */
.table-bordered {
  border: none;
}

.table-bordered > thead > tr > th:first-child,
.table-bordered > tbody > tr > td:first-child {
  border-left: none;
}

.table-bordered > thead > tr > th:last-child,
.table-bordered > tbody > tr > td:last-child {
  border-right: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .fixed-table-container {
    overflow-x: auto;
  }
}

.page-header {
  border-bottom: none;
}

/* Bootstrap Table Checkbox Styles */
.bootstrap-table .bs-checkbox input[type="checkbox"] {
  border-radius: 3px;
  border: 1px solid #b9b9c3;
  width: 16px;
  height: 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  position: relative;
}

.bootstrap-table .bs-checkbox input[type="checkbox"]:checked {
  background-color: #3451f1;
  border-color: #3451f1;
}

.bootstrap-table .bs-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
