/* ========== 个人中心页面样式 ========== */

:root {
  --primary-blue: #2468f2;
  --text-dark: #1a1a1b;
  --text-muted: #63718e;
  --bg-light: #f4faff;
  --border-color: #ffffff;
  --success-green: #21b065;
  --danger-red: #f37474;
  --warning-yellow: #e3a115;
  --warning-bg: #fef4dd;
  --warning-border: #ffdb7c;
}

/* 用户信息卡片 */
.user-card {
  background: url("../image/me/hero-bg.png");
  height: 440px;
  padding: 30px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.user-card  .user-info {
  width: 855px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info-content {
  font-size: 32px;
  font-weight: 500;
  line-height: 44px;
  text-align: left;
  color: rgb(255, 255, 255);
}

.user-info-content .user-name {
  width: 500px;
  font-size: 28px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.user-info-des {
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  text-align: left;
  color: rgb(255, 255, 255);
  display: flex;
  width: 200px;
  height: 100px;
  flex-wrap: wrap;
  align-content: space-between;
  margin-top: 42px;
}
.user-info-des p {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-info-des img {
  width: 20px;
  height: 20px;
}

.meal-process {
  width: 212px;
  height: 212px;
  background-image: linear-gradient(
    217.78deg,
    rgb(203, 223, 255) 21.83%,
    rgb(8, 102, 255) 75.94%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 500;
  line-height: 44px;
  text-align: left;
  color: rgb(255, 255, 255);
  color: rgb(255, 255, 255);
}
.meal-process__in {
  width: 190px;
  height: 190px;
  background-color: rgb(82, 115, 170);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.meal-process__number {
  text-align: center;
}
.meal-process__btn {
  border: none;
  width: 79px;
  height: 32px;
  font-size: 16px;
  font-weight: 500;
  line-height: 32px;
  cursor: pointer;
  text-align: center !important;
  background: rgb(8, 102, 255);
  border-radius: 4px;
  margin: 32px auto 0px;
  color: rgb(255, 255, 255);
}

/* 数据表格区域 */
.data-section {
  padding: 30px 0 80px;
}

/* Tab 导航 */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab.active {
  color: var(--primary-blue);
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-blue);
}

.tab:hover:not(.active) {
  color: var(--text-dark);
}

/* 操作栏 */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #333333;
  border-radius: 4px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-create:hover {
  background: #f5f5f5;
}

.icon-plus::before {
  content: "+";
  font-size: 18px;
}

.share-switch {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ccc;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-switch[data-on="true"] {
  background: var(--primary-blue);
}

.toggle-switch__slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch[data-on="true"] .toggle-switch__slider {
  transform: translateX(20px);
}

/* 视图容器 */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table thead {
  background: #f4f6f8;
}

.data-table th {
  padding: 12px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #000;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.data-table .mono {
  font-family: "Courier New", monospace;
  font-size: 13px;
}

/* 徽章样式 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge.success {
  background: #dcfce7;
  color: var(--success-green);
}

.badge.danger {
  background: #fee2e2;
  color: var(--danger-red);
}

.badge.warn {
  background: var(--warning-bg);
  color: var(--warning-yellow);
}

.badge.info {
  background: #e0e7ff;
  color: #6366f1;
}

/* 操作链接 */
.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.link {
  color: var(--primary-blue);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.3s;
}

.link:hover {
  opacity: 0.8;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 12px 0;
}

.pagination__count {
  font-size: 14px;
  color: var(--text-muted);
}

.pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination__btn {
  padding: 6px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.pagination__btn:hover:not(:disabled) {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.pagination__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination__pages {
  display: flex;
  gap: 4px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.page-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.page-btn[aria-current="page"] {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.pagination__jump {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.pagination__jump input {
  width: 50px;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

/* 备注 */
.note {
  margin-top: 30px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Toast 提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  font-weight: 800;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* 响应式 */
@media (max-width: 1024px) {
  .user-card__content {
    flex-direction: column;
  }

  .user-card__right {
    width: 100%;
  }

  .btn-recharge {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .user-card__left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-container {
    font-size: 12px;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
  }

  .action-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}
