/* 客户中心子站公共样式（登录页 + 用户中心页） */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fb;
  color: #2f3542;
  min-height: 100vh;
}

/* ---------- 登录页 ---------- */
.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4e73df 0%, #1cc88a 100%);
}
.auth-card {
  width: 400px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  padding: 36px 32px 24px;
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-logo {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  color: #fff;
  font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.auth-brand h1 { font-size: 22px; color: #2f3542; }
.auth-brand p { font-size: 13px; color: #98a2b3; margin-top: 6px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #6c757d; margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 42px;
  border: 1px solid #e2e6ee;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.field input:focus { border-color: #4e73df; }
.field-tip { font-size: 12px; color: #e74c3c; min-height: 16px; margin-top: 4px; }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row button {
  flex-shrink: 0;
  width: 110px;
  border: 1px solid #4e73df;
  background: #eef2ff;
  color: #4e73df;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.code-row button:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(92deg, #4e73df, #1cc88a);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  margin-top: 4px;
}
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.auth-footer { text-align: center; font-size: 12px; color: #b7bfcc; margin-top: 20px; }

/* ---------- 用户中心页（布局对齐旧系统 auth/user_center.php） ---------- */
.page-center { background: #f5f7fb; }
.uc-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 80px; }

/* 概要横幅 */
.uc-hero {
  background: linear-gradient(92deg, #4e73df, #1cc88a);
  color: #fff;
  border-radius: 14px;
  padding: 22px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  box-shadow: 0 10px 20px rgba(78, 115, 223, .15);
}
.uc-hero-main { flex: 1 1 auto; min-width: 0; }
.uc-sub { font-size: 14px; opacity: .95; }
.uc-sub strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.uc-meta { font-size: 13px; opacity: .9; margin-top: 4px; word-break: break-all; }
.uc-actions { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.uc-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 0; border-radius: 12px;
  padding: 8px 14px; cursor: pointer; text-decoration: none;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .08);
  transition: box-shadow .2s, color .2s;
}
.uc-logout { color: #dc3545; }
.uc-logout:hover { color: #bd2130; box-shadow: 0 8px 16px rgba(220, 53, 69, .25); }
.uc-contact { color: #1cc88a; }
.uc-contact:hover { color: #159a6b; box-shadow: 0 8px 16px rgba(28, 200, 138, .25); }

/* 统计卡片 */
.uc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.uc-stat {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.uc-stat-icon {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.uc-stat-icon.blue { background: #4e73df; }
.uc-stat-icon.green { background: #1cc88a; }
.uc-stat-icon.indigo { background: #6f42c1; }
.uc-stat-icon.orange { background: #fd7e14; }
.uc-stat-text { min-width: 0; line-height: 1.2; }
.uc-stat-label { font-size: 12px; color: #6c757d; }
.uc-stat-value {
  font-size: 18px; font-weight: 600; color: #2f3542; margin-top: 5px;
  word-break: break-all; font-variant-numeric: tabular-nums;
}
.uc-stat-value.sm { font-size: 15px; }
.uc-stat-value.danger { color: #e74c3c; }

/* 记录卡片 */
.uc-card {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  overflow: hidden;
}
.uc-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f2f7;
}
.uc-card-head h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600; color: #2f3542;
}
.uc-card-head svg { color: #6c757d; }
.uc-card-body { padding: 16px 20px 8px; }

/* 搜索行（对齐旧系统 #f8f9fa 浅灰条） */
.uc-search {
  display: flex; align-items: center; width: 100%;
  background: #f8f9fa;
  border-radius: 5px;
  padding: 10px 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .08);
}
.uc-search input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: none; background: transparent;
  padding: 8px 4px; font-size: 15px; color: #2f3542;
}
.uc-search input::placeholder { color: #a8b0bd; }
.btn-search, .btn-reset {
  flex: 0 0 auto;
  margin-left: 10px;
  padding: 8px 14px;
  border: 0; border-radius: 4px;
  font-size: 14px; white-space: nowrap; cursor: pointer;
  transition: background .2s;
}
.btn-search { background: #007bff; color: #fff; }
.btn-search:hover { background: #0069d9; }
.btn-reset { background: #6c757d; color: #fff; }
.btn-reset:hover { background: #5c636a; }

/* 表格 */
.uc-table-wrap { margin-top: 14px; overflow-x: auto; }
.uc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.uc-table th, .uc-table td {
  padding: 10px 8px; text-align: left;
  border-top: 1px solid #eef1f7; white-space: nowrap;
}
.uc-table thead th { color: #6c757d; font-weight: 600; font-size: 13px; border-top: 0; }
.uc-table tbody tr:nth-child(odd) { background: #fcfcfd; }
.uc-table tbody tr:hover { background: #f6f9ff; }
.uc-code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #eef2ff; color: #3730a3;
  padding: 2px 6px; border-radius: 6px; font-size: 13px;
}
.status-badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 500; }
.status-done { background: #e7f9f1; color: #159a6b; }
.status-failed { background: #fdf0ef; color: #e74c3c; }
.status-pending, .status-processing { background: #fff7e6; color: #d97706; }

/* 空状态（对齐旧系统虚线框） */
.uc-empty {
  text-align: center; color: #98a2b3;
  padding: 16px !important; margin: 14px 0;
  background: #f8fafc; border: 1px dashed #e5e7eb; border-radius: 12px;
}

/* 分页 */
.uc-pager {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 14px; font-size: 13px; color: #6c757d;
}
.uc-pager button {
  border: 1px solid #dee2e6; background: #fff; color: #007bff;
  border-radius: 4px; padding: 3px 12px; font-size: 13px;
  cursor: pointer; margin-left: 8px;
  transition: background .2s;
}
.uc-pager button:hover:not(:disabled) { background: #f1f5fb; }
.uc-pager button:disabled { color: #adb5bd; cursor: not-allowed; }

/* 客服弹层 */
.uc-modal-mask {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.uc-modal-mask[hidden] { display: none; }
.uc-modal {
  width: 320px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .22);
  overflow: hidden;
}
.uc-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #f0f2f7;
}
.uc-modal-head h3 { font-size: 16px; font-weight: 600; }
.uc-modal-close {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  color: #98a2b3; cursor: pointer;
}
.uc-modal-close:hover { color: #6c757d; }
.uc-modal-body { padding: 18px 16px 20px; text-align: center; }
.uc-contact-img {
  width: 220px; max-width: 100%; border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
.uc-contact-line { margin-top: 10px; font-size: 13px; color: #6c757d; }
.uc-contact-line[hidden] { display: none; }

/* 悬浮返回首页 */
.fab-entry { position: fixed; right: 16px; bottom: 20px; z-index: 1040; }
.btn-fab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 9999px;
  background: #fff; color: #4e73df;
  border: 1px solid #c9d6f5;
  font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
  transition: box-shadow .2s, background .2s;
}
.btn-fab:hover { box-shadow: 0 16px 32px rgba(0, 0, 0, .22); background: #f5f8ff; }

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
  .uc-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .uc-wrap { padding: 16px 12px 84px; }
  .uc-hero { flex-direction: column; align-items: flex-start; padding: 20px; }
  .uc-actions { flex-direction: row; align-items: center; }
  .uc-table th, .uc-table td { padding: 9px 6px; }
}
@media (max-width: 575.98px) {
  .uc-stats { grid-template-columns: 1fr; }
  .uc-search { flex-wrap: wrap; gap: 8px; }
  .uc-search input { flex: 1 1 100%; }
  .btn-search, .btn-reset { margin-left: 0; flex: 1 1 0; }
  .btn-fab span { display: none; }
  .btn-fab { padding: 12px; }
}
