/* 用户中心与后台共用的业务列表、弹窗与客服会话样式。 */
.record-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  border-bottom: 1px solid var(--line, #323b4b);
  margin-bottom: 24px;
  padding-bottom: 10px;
}
.record-tabs button {
  white-space: nowrap;
  color: var(--muted, #a4afbf);
}
.record-tabs .active {
  color: var(--accent, #c8ee80);
  background: #c8ee8015;
}
.center-toolbar,
.center-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
}
.center-toolbar .actions {
  display: flex;
  gap: 8px;
}
.center-pagination {
  justify-content: center;
  font-size: 13px;
}
.center-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 18px 0;
}
.center-filters label {
  flex: 1 1 130px;
  margin: 0;
  font-size: 12px;
  color: var(--muted, #a4afbf);
}
.center-filters input,
.center-filters select {
  margin-top: 6px;
  min-height: 42px;
}
.center-filters button {
  height: 42px;
}
.center-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  background: var(--panel, #191e27);
  border: 1px solid var(--line, #323b4b);
  border-radius: 14px;
  color: var(--ink, #f2f5f8);
}
.center-dialog::backdrop {
  background: #000a;
}
.center-dialog .dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.center-dialog h2 {
  font-size: 21px;
  margin: 0;
}
.center-dialog h3 {
  font-size: 15px;
  margin: 20px 0 12px;
}
.center-dialog p {
  font-size: 13px;
  color: var(--muted, #a4afbf);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.center-dialog label {
  display: block;
  margin: 16px 0;
  font-size: 13px;
  color: var(--muted, #a4afbf);
}
.center-dialog textarea {
  display: block;
  resize: vertical;
  min-height: 84px;
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--line, #323b4b);
  border-radius: 8px;
  background: var(--bg, #101319);
  color: var(--ink, #f2f5f8);
  font: inherit;
}
.center-dialog input[type="checkbox"] {
  width: auto;
}
.center-dialog .detail-list {
  margin: 0;
}
.center-dialog .detail-list > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line, #323b4b);
  padding: 12px 0;
  font-size: 13px;
}
.center-dialog dt {
  color: var(--muted, #a4afbf);
}
.center-dialog dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.event-list {
  padding-left: 20px;
  font-size: 13px;
}
.event-list li {
  padding: 5px 0;
}
.event-list time {
  display: block;
  color: var(--muted, #a4afbf);
  font-size: 11px;
}
.event-list p {
  margin: 4px 0 12px;
}
.center-error {
  color: var(--red, #ffa6a6) !important;
  white-space: pre-wrap;
}
.cell-caption {
  display: block;
  font-size: 11px;
  color: var(--muted, #a4afbf);
  margin-top: 4px;
}
.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--accent, #c8ee80);
  border-radius: 50%;
}
.ticket-meta {
  font-size: 12px;
  color: var(--muted, #a4afbf);
  margin-bottom: 16px;
}
.ticket-conversation {
  display: grid;
  gap: 12px;
  max-height: 45vh;
  overflow: auto;
  padding: 2px;
}
.ticket-reply {
  background: var(--bg, #101319);
  border: 1px solid var(--line, #323b4b);
  border-radius: 9px;
  padding: 14px;
}
.ticket-reply.staff {
  border-left: 3px solid var(--blue, #91caff);
}
.ticket-reply strong {
  font-size: 13px;
}
.ticket-reply small {
  font-size: 11px;
  color: var(--muted, #a4afbf);
}
.ticket-reply p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}
.ticket-reply img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 6px;
}
.center-dialog .message-body {
  white-space: pre-wrap;
  font-size: 15px;
}
.center-dialog .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.center-dialog .badge,
.center-table .badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line, #465166);
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.center-table .good {
  color: var(--accent, #c8ee80);
}
.center-table .bad {
  color: var(--red, #ffa6a6);
}
.center-table table {
  width: 100%;
  white-space: nowrap;
}
.wallet-services #withdraw-open {
  opacity: 1;
  cursor: pointer;
  color: var(--accent, #c8ee80);
  border-color: #c8ee8040;
}
.center-table {
  overflow: auto;
}
.center-dialog input,
.center-dialog select {
  width: 100%;
}
.center-dialog .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.center-dialog .form-row > label {
  flex: 1;
}
.center-table button {
  min-height: 36px;
}
.center-dialog button {
  min-height: 40px;
}
@media (max-width: 650px) {
  .center-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .center-filters {
    gap: 8px;
  }
  .center-filters label {
    flex-basis: 140px;
  }
  .center-dialog {
    padding: 18px;
  }
  .center-dialog .detail-list > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .center-pagination {
    gap: 8px;
  }
  .center-pagination button {
    padding: 8px 12px;
  }
}
#message-count:not(:empty) {
  display: inline-block;
  font-size: 12px;
  color: var(--accent, #c8ee80);
  min-width: 20px;
  text-align: center;
  padding: 0 5px;
  background: #c8ee8015;
  border-radius: 10px;
}

.withdrawal-security-warning {
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #d5a344;
  border-left: 4px solid #edb950;
  border-radius: 8px;
  background: #edb95018;
  color: #ffd98a;
}
.withdrawal-security-warning strong {
  font-size: 16px;
}
.withdrawal-security-warning p {
  margin: 8px 0 0;
  line-height: 1.6;
}

/* 前后台表格统一单行，列宽不足时由外层容器横向滚动。 */
table th,
table td {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
table .cell-caption,
table small,
table td p {
  display: inline !important;
  margin: 0 0 0 8px;
  white-space: nowrap !important;
}
table br {
  display: none;
}
.withdrawal-quote {
  padding: 12px;
  border: 1px solid #596b43;
  border-radius: 8px;
  background: #a7cb6610;
}
.withdrawal-rules p {
  line-height: 1.7;
  color: #aab8cc;
}
table th,
table td {
  padding: 8px 12px !important;
  line-height: 20px;
  font-size: 13px;
}
table td button {
  padding: 2px 8px;
  line-height: 20px;
}
table td .link,
table td .row-link {
  padding: 0;
}
table .badge {
  padding: 1px 7px;
  line-height: 18px;
}

/* 手机和平板的表单文字至少为 16px，避免聚焦时浏览器自动放大整个页面。
   统一覆盖表单继承字号及弹窗局部样式，保留桌面字号和用户手动缩放。 */
@media (max-width: 768px), (any-pointer: coarse) {
  input,
  select,
  textarea {
    font-size: max(16px, 1rem) !important;
  }
}
