/* ============================
   profile.css — 个人中心页面专属样式
   Version: 20260404-profile-2
   ============================ */

.profile-page {
  background: #f5f7fa;
  padding: 0 0 40px;
  min-height: 100vh;
}

.profile-container {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
}

/* ========== 头部信息 ========== */

.profile-header {
  background: linear-gradient(180deg, #1f8ef5 0%, #1b82eb 100%);
  padding: 28px 32px;
  margin-bottom: 20px;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.profile-header::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.profile-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar-block {
  flex-shrink: 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 32px;
  font-weight: 600;
}

.profile-avatar-text {
  color: rgba(255, 255, 255, 0.9);
}

.profile-header-info {
  flex: 1;
}

.profile-username-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ========== Banner 右侧 VIP 入口 ========== */

.profile-header-vip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 14px 24px;
  min-width: 140px;
  text-align: center;
}

.profile-header-vip-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.profile-header-vip-expire {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.profile-header-vip-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 5px 18px;
  border-radius: 20px;
  background: #ffffff;
  color: #1b82eb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.profile-header-vip-btn:hover {
  opacity: 0.85;
}

.profile-header-vip-btn.is-hidden {
  display: none;
}

.profile-username {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

.profile-logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.profile-logout-link:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.profile-header-meta {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-meta-separator {
  opacity: 0.6;
}

/* ========== 页面布局 ========== */

.profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

/* ========== 左侧菜单 ========== */

.profile-sidebar {
  background: #ffffff;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: fit-content;
  position: sticky;
  top: calc(var(--subject-nav-offset) + 20px);
}

.profile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-menu-item {
  border-bottom: 1px solid #f0f2f5;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-button {
  width: 100%;
  padding: 16px 18px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #48607d;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-menu-button:hover {
  background: #f5f7fa;
  color: #1976d2;
}

.profile-menu-item.is-active .profile-menu-button {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #1976d2;
}

.profile-menu-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ========== 右侧内容区 ========== */

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.profile-section {
  display: none;
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-section.is-active {
  display: block;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ecf0f5;
}

.profile-section-header .profile-section-title {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.profile-section-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  color: #1d2a3f;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f2f5;
}

.profile-section-card {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #e8f0ff;
  border-radius: 6px;
}

.profile-section-card:last-child {
  margin-bottom: 0;
}

/* ========== 账户信息 ========== */

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-info-label {
  font-size: 13px;
  font-weight: 600;
  color: #70839b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-info-value {
  font-size: 15px;
  color: #1d2a3f;
  font-weight: 500;
  word-break: break-all;
}

.profile-info-value-action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-password-hint {
  font-size: 15px;
  color: #1d2a3f;
  font-weight: 500;
  letter-spacing: 2px;
}

/* VIP 状态徽章 */

.profile-vip-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.profile-vip-badge.is-inactive {
  background: #f0f2f5;
  color: #70839b;
}

.profile-vip-badge.is-active {
  background: linear-gradient(90deg, #ffd800 0%, #ffb800 100%);
  color: #ffffff;
}

.profile-vip-row {
  margin-bottom: 8px;
}

.profile-vip-row:last-child {
  margin-bottom: 0;
}

/* ========== 邀请码块 ========== */

.profile-invite-card {
  background: linear-gradient(135deg, #fafbff 0%, #eef5ff 100%);
  border: 1px solid #dce7f7;
}

.profile-invite-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e3ebf7;
}

.profile-invite-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1976d2;
}

.profile-invite-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-invite-code {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  align-items: center;
}

.profile-invite-input {
  padding: 10px 14px;
  border: 1px solid #c9d6eb;
  background: #ffffff;
  border-radius: 4px;
  font-size: 14px;
  color: #1d2a3f;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.profile-invite-input:focus {
  outline: none;
  border-color: #1a73c9;
  box-shadow: 0 0 0 3px rgba(26, 115, 201, 0.12);
}

.profile-invite-description {
  margin: 0;
}

.profile-invite-desc-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #48607d;
}

.profile-invite-desc-highlight {
  font-weight: 700;
  color: #1976d2;
}

/* ========== 钱包区域 ========== */

.profile-wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #e8f0ff;
  border-radius: 6px;
}

.profile-balance-card {
  flex: 1;
}

.profile-wallet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-balance-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.profile-balance-label {
  font-size: 14px;
  color: #70839b;
  font-weight: 500;
}

.profile-balance-value {
  font-size: 24px;
  font-weight: 700;
  color: #d93025;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

/* ========== 移动端子模块标题（桌面隐藏）========== */

.profile-mobile-sub-title {
  display: none;
}

/* ========== Tabs ========== */

.profile-wallet-tabs,
.profile-resources-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f2f5;
}

.profile-tab-button {
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #70839b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.profile-tab-button:hover {
  color: #1976d2;
  background: #ecf5ff;
}

.profile-tab-button.is-active {
  color: #1976d2;
  border-bottom-color: #1976d2;
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.is-active {
  display: block;
}

/* ========== 表格 ========== */

.profile-table-wrapper {
  width: 100%;
  margin-bottom: 16px;
  overflow-x: auto;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.profile-table thead {
  background: #f8fbff;
  border-bottom: 2px solid #e8f0ff;
}

.profile-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #48607d;
  white-space: nowrap;
}

.profile-table td {
  padding: 12px 16px;
  color: #48607d;
  border-bottom: 1px solid #f0f2f5;
}

.profile-table tbody tr:hover {
  background: #f8fbff;
}

.profile-table-empty {
  text-align: center;
  color: #a6b8d0;
  font-style: italic;
}

.profile-cell-phone {
  font-weight: 500;
  color: #1d2a3f;
}

/* 状态标记 */

.profile-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.profile-status-success {
  background: #e6f5eb;
  color: #23815e;
}

.profile-status-pending {
  background: #fff3cd;
  color: #856404;
}

.profile-status-failed {
  background: #fce4e4;
  color: #c53d35;
}

/* 分页 */

.profile-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.profile-page-btn {
  padding: 6px 12px;
  border: 1px solid #c9d6eb;
  background: #ffffff;
  color: #1976d2;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-page-btn:hover:not(:disabled) {
  background: #e3f2fd;
  border-color: #1976d2;
}

.profile-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #a6b8d0;
}

.profile-page-info {
  font-size: 13px;
  color: #70839b;
  min-width: 60px;
  text-align: center;
}

/* ========== 资源卡片 (已隐藏，改用表格列表) ========== */

.profile-resource-grid {
  display: none;
}

.profile-resource-card {
  display: none;
}

.profile-resource-header {
  flex: 1;
}

.profile-resource-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1d2a3f;
  line-height: 1.4;
  word-break: break-word;
}

.profile-resource-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #70839b;
}

.profile-resource-type {
  display: inline-block;
  padding: 2px 8px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 3px;
  font-weight: 600;
  font-size: 11px;
}

.profile-resource-date {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-resource-actions {
  display: flex;
  gap: 8px;
}

.profile-resource-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #a6b8d0;
}

.profile-resource-empty p {
  margin: 0;
  font-size: 14px;
}

/* ========== 试题链接 ========== */

.profile-question-link {
  color: #1976d2;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid #bcd8f5;
  transition: all 0.2s ease;
}

.profile-question-link:hover {
  color: #0d47a1;
  border-bottom-color: #0d47a1;
  text-decoration: underline;
}

/* ========== 按钮 ========== */

.profile-btn {
  height: 38px;
  padding: 0 22px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.profile-btn-primary {
  background: linear-gradient(180deg, #1f8ef5 0%, #1b82eb 100%);
  color: #ffffff;
}

.profile-btn-primary:hover {
  background: linear-gradient(180deg, #197dde 0%, #126ec9 100%);
}

.profile-btn-small {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(180deg, #1f8ef5 0%, #1b82eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.profile-btn-small:hover {
  background: linear-gradient(180deg, #197dde 0%, #126ec9 100%);
}

.profile-btn-outline {
  background: transparent;
  color: #1976d2;
  border: 1px solid #1976d2;
}

.profile-btn-outline:hover {
  background: #e3f2fd;
}

.profile-btn-copy {
  background: #edf5ff;
  color: #1a73c9;
  border: 1px solid #a7c8ed;
}

.profile-btn-copy:hover {
  background: #dcebff;
  border-color: #1a73c9;
}

/* ========== 响应式设计 ========== */

@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: relative;
    top: auto;
    width: 100%;
  }

  .profile-menu-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 8px;
  }

  .profile-menu-item {
    border: 1px solid #e8f0ff;
    border-bottom: 1px solid #e8f0ff;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .profile-menu-item.is-active {
    background: #e3f2fd;
    border-color: #1976d2;
  }

  .profile-menu-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    text-align: center;
    font-size: 13px;
    min-height: 80px;
  }

  .profile-menu-icon {
    display: block;
    margin: 0;
    font-size: 26px;
    line-height: 1;
  }

  .profile-menu-item.is-active .profile-menu-button {
    border-left: none;
    border-bottom: none;
    padding-left: 8px;
    box-shadow: none;
  }

  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .profile-wallet-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-wallet-actions {
    width: 100%;
  }

  .profile-wallet-actions .profile-btn {
    flex: 1;
  }

  .profile-resource-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    padding: 20px;
  }

  .profile-header-inner {
    flex-direction: column;
    text-align: center;
  }

  .profile-header-vip {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 10px 14px;
    min-width: unset;
    align-items: center;
  }

  .profile-header-vip-label {
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    text-align: left;
  }

  .profile-header-vip-status {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .profile-header-vip-btn {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    margin-top: 0;
  }

  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .profile-username {
    font-size: 22px;
  }

  /* 移动端钱包和资源模块平铺展示 */
  .profile-wallet-tabs,
  .profile-resources-tabs {
    display: none;
  }

  #wallet-section .profile-tab-content,
  #resources-section .profile-tab-content {
    display: block;
    margin-bottom: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f2f5;
  }

  #wallet-section .profile-tab-content:last-child,
  #resources-section .profile-tab-content:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .profile-mobile-sub-title {
    display: block;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #1d2a3f;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f2f5;
  }

  /* 移动端订单表格卡片化 */
  #orders-section .profile-table,
  #corrections-section .profile-table {
    border-collapse: collapse;
  }

  #orders-section .profile-table thead,
  #corrections-section .profile-table thead {
    display: none;
  }

  #orders-section .profile-table tbody,
  #orders-section .profile-table tr,
  #orders-section .profile-table td,
  #corrections-section .profile-table tbody,
  #corrections-section .profile-table tr,
  #corrections-section .profile-table td {
    display: block;
    width: 100%;
  }

  #orders-section .profile-table tr,
  #corrections-section .profile-table tr {
    margin-bottom: 12px;
    border: 1px solid #e8f0ff;
    border-radius: 8px;
    padding: 4px 12px;
    background: #ffffff;
  }

  #orders-section .profile-table tr:hover,
  #corrections-section .profile-table tr:hover {
    background: #f8fbff;
  }

  #orders-section .profile-table td,
  #corrections-section .profile-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f7fa;
    font-size: 13px;
    word-break: break-all;
  }

  #orders-section .profile-table td:last-child,
  #corrections-section .profile-table td:last-child {
    border-bottom: none;
  }

  #orders-section .profile-table td::before,
  #corrections-section .profile-table td::before {
    font-weight: 600;
    color: #70839b;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 52px;
  }

  /* 订单列标签 */
  #orders-section .profile-table td:nth-child(1)::before { content: "订单号"; }
  #orders-section .profile-table td:nth-child(2)::before { content: "商品"; }
  #orders-section .profile-table td:nth-child(3)::before { content: "金额"; }
  #orders-section .profile-table td:nth-child(4)::before { content: "时间"; }
  #orders-section .profile-table td:nth-child(5)::before { content: "状态"; }

  /* 纠错列标签 */
  #corrections-section .profile-table td:nth-child(1)::before { content: "试题"; }
  #corrections-section .profile-table td:nth-child(2)::before { content: "错误类型"; }
  #corrections-section .profile-table td:nth-child(3)::before { content: "纠错内容"; }
  #corrections-section .profile-table td:nth-child(4)::before { content: "提交时间"; }
  #corrections-section .profile-table td:nth-child(5)::before { content: "状态"; }
  #corrections-section .profile-table td:nth-child(6)::before { content: "操作"; }

  /* 移动端钱包和资源表格卡片化（通用结构）*/
  #withdrawals-tab .profile-table,
  #commissions-tab .profile-table,
  #friends-tab .profile-table,
  #collections-tab .profile-table,
  #paper-downloads-tab .profile-table,
  #composition-downloads-tab .profile-table {
    border-collapse: collapse;
  }

  #withdrawals-tab .profile-table thead,
  #commissions-tab .profile-table thead,
  #friends-tab .profile-table thead,
  #collections-tab .profile-table thead,
  #paper-downloads-tab .profile-table thead,
  #composition-downloads-tab .profile-table thead {
    display: none;
  }

  #withdrawals-tab .profile-table tbody,
  #withdrawals-tab .profile-table tr,
  #withdrawals-tab .profile-table td,
  #commissions-tab .profile-table tbody,
  #commissions-tab .profile-table tr,
  #commissions-tab .profile-table td,
  #friends-tab .profile-table tbody,
  #friends-tab .profile-table tr,
  #friends-tab .profile-table td,
  #collections-tab .profile-table tbody,
  #collections-tab .profile-table tr,
  #collections-tab .profile-table td,
  #paper-downloads-tab .profile-table tbody,
  #paper-downloads-tab .profile-table tr,
  #paper-downloads-tab .profile-table td,
  #composition-downloads-tab .profile-table tbody,
  #composition-downloads-tab .profile-table tr,
  #composition-downloads-tab .profile-table td {
    display: block;
    width: 100%;
  }

  #withdrawals-tab .profile-table tr,
  #commissions-tab .profile-table tr,
  #friends-tab .profile-table tr,
  #collections-tab .profile-table tr,
  #paper-downloads-tab .profile-table tr,
  #composition-downloads-tab .profile-table tr {
    margin-bottom: 12px;
    border: 1px solid #e8f0ff;
    border-radius: 8px;
    padding: 4px 12px;
    background: #ffffff;
  }

  #withdrawals-tab .profile-table tr:hover,
  #commissions-tab .profile-table tr:hover,
  #friends-tab .profile-table tr:hover,
  #collections-tab .profile-table tr:hover,
  #paper-downloads-tab .profile-table tr:hover,
  #composition-downloads-tab .profile-table tr:hover {
    background: #f8fbff;
  }

  #withdrawals-tab .profile-table td,
  #commissions-tab .profile-table td,
  #friends-tab .profile-table td,
  #collections-tab .profile-table td,
  #paper-downloads-tab .profile-table td,
  #composition-downloads-tab .profile-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f7fa;
    font-size: 13px;
    word-break: break-all;
  }

  #withdrawals-tab .profile-table td:last-child,
  #commissions-tab .profile-table td:last-child,
  #friends-tab .profile-table td:last-child,
  #collections-tab .profile-table td:last-child,
  #paper-downloads-tab .profile-table td:last-child,
  #composition-downloads-tab .profile-table td:last-child {
    border-bottom: none;
  }

  #withdrawals-tab .profile-table td::before,
  #commissions-tab .profile-table td::before,
  #friends-tab .profile-table td::before,
  #collections-tab .profile-table td::before,
  #paper-downloads-tab .profile-table td::before,
  #composition-downloads-tab .profile-table td::before {
    font-weight: 600;
    color: #70839b;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 52px;
  }

  /* 提现明细列标签 */
  #withdrawals-tab .profile-table td:nth-child(1)::before { content: "提现金额"; }
  #withdrawals-tab .profile-table td:nth-child(2)::before { content: "提现时间"; }
  #withdrawals-tab .profile-table td:nth-child(3)::before { content: "状态"; }
  #withdrawals-tab .profile-table td:nth-child(4)::before { content: "备注"; }

  /* 佣金明细列标签 */
  #commissions-tab .profile-table td:nth-child(1)::before { content: "邀请用户"; }
  #commissions-tab .profile-table td:nth-child(2)::before { content: "消费金额"; }
  #commissions-tab .profile-table td:nth-child(3)::before { content: "佣金"; }
  #commissions-tab .profile-table td:nth-child(4)::before { content: "获得时间"; }

  /* 邀请好友列标签 */
  #friends-tab .profile-table td:nth-child(1)::before { content: "好友账户"; }
  #friends-tab .profile-table td:nth-child(2)::before { content: "加入时间"; }
  #friends-tab .profile-table td:nth-child(3)::before { content: "会员等级"; }

  /* 我的收藏列标签 */
  #collections-tab .profile-table td:nth-child(1)::before { content: "资源名称"; }
  #collections-tab .profile-table td:nth-child(2)::before { content: "类型"; }
  #collections-tab .profile-table td:nth-child(3)::before { content: "时间"; }
  #collections-tab .profile-table td:nth-child(4)::before { content: "操作"; }

  /* 试卷下载列标签 */
  #paper-downloads-tab .profile-table td:nth-child(1)::before { content: "资源名称"; }
  #paper-downloads-tab .profile-table td:nth-child(2)::before { content: "类型"; }
  #paper-downloads-tab .profile-table td:nth-child(3)::before { content: "下载信息"; }
  #paper-downloads-tab .profile-table td:nth-child(4)::before { content: "操作"; }

  /* 组卷下载列标签 */
  #composition-downloads-tab .profile-table td:nth-child(1)::before { content: "资源名称"; }
  #composition-downloads-tab .profile-table td:nth-child(2)::before { content: "类型"; }
  #composition-downloads-tab .profile-table td:nth-child(3)::before { content: "下载信息"; }
  #composition-downloads-tab .profile-table td:nth-child(4)::before { content: "操作"; }
}

/* ========== 我的秘钥 ========== */

.profile-keys-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px dashed #c9d6eb;
  text-align: center;
  gap: 16px;
}

.profile-keys-prompt-icon {
  font-size: 40px;
  line-height: 1;
}

.profile-keys-prompt-text {
  font-size: 14px;
  color: #70839b;
  max-width: 320px;
  margin: 0;
  line-height: 1.6;
}

#keys-section .profile-table td:nth-child(1) {
  font-family: monospace;
  letter-spacing: 0.5px;
  color: #1d2a3f;
  font-weight: 600;
}

/* 移动端卡片式展示 */
@media (max-width: 768px) {
  #keys-section .profile-section-header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 14px;
  }

  #keys-section .profile-section-header .profile-section-title {
    font-size: 18px;
  }

  #keys-section .profile-section-header .profile-btn {
    font-size: 13px;
    padding: 0 16px;
    height: 34px;
    white-space: nowrap;
  }

  #keys-section .profile-table thead {
    display: none;
  }

  #keys-section .profile-table tbody,
  #keys-section .profile-table tr {
    display: block;
    width: 100%;
  }

  #keys-section .profile-table tr {
    margin-bottom: 12px;
    border: 1px solid #e8f0ff;
    border-radius: 8px;
    padding: 4px 12px;
    background: #ffffff;
  }

  #keys-section .profile-table tr:hover {
    background: #f8fbff;
  }

  #keys-section .profile-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f7fa;
    font-size: 13px;
    word-break: break-all;
  }

  #keys-section .profile-table td:last-child {
    border-bottom: none;
  }

  #keys-section .profile-table td::before {
    font-weight: 600;
    color: #70839b;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 52px;
  }

  #keys-section .profile-table td:nth-child(1)::before { content: "秘钥"; }
  #keys-section .profile-table td:nth-child(2)::before { content: "创建日期"; }
  #keys-section .profile-table td:nth-child(3)::before { content: "操作"; }
}

/* ========== 统一消息面板（复用于全站） ========== */

.basket-alert-dialog {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.basket-alert-dialog[hidden] {
  display: none;
}

.basket-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 44, 0.42);
  backdrop-filter: blur(2px);
}

.basket-alert-panel {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100vw - 40px));
  background: #ffffff;
  border: 1px solid rgba(187, 206, 230, 0.9);
  border-radius: 18px;
  box-shadow: 0 24px 56px rgba(14, 38, 68, 0.24);
  padding: 24px 24px 18px;
}

.basket-alert-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: #17304f;
}

.basket-alert-message {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: #2f4057;
  word-break: break-word;
}

.basket-alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.basket-action-btn {
  min-width: 96px;
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.basket-action-btn-primary {
  background: #1a73c9;
  color: #fff;
}

.basket-action-btn-primary:hover {
  background: #1557a0;
}

.basket-action-btn-secondary {
  background: #f5f8fc;
  color: #4a5d75;
  border: 1px solid #c9d9ec;
}

.basket-action-btn-secondary:hover {
  background: #e8f0f8;
}

@media (max-width: 768px) {
  .basket-alert-panel {
    padding: 20px 18px 16px;
    border-radius: 16px;
  }

  .basket-alert-title {
    font-size: 20px;
  }

  .basket-alert-message {
    font-size: 15px;
  }
}
