/* Profile / Member center — 参考目标站复刻 */
.profile-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.profile-head-text { flex: 1; min-width: 0; }
.profile-title {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #18181b;
  line-height: 1.15;
}
.profile-subtitle {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.6;
  color: #71717a;
}
.profile-joined { flex-shrink: 0; padding-top: 6px; }
.profile-joined-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  white-space: nowrap;
}
.profile-joined-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4d4d8;
  flex-shrink: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 20px;
  padding: 18px 20px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.profile-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-card-head-inline { margin-bottom: 0; }
.profile-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #18181b;
  flex-shrink: 0;
}
.profile-card-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.profile-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}
.profile-card-sub {
  font-size: 12px;
  color: #a1a1aa;
  margin-top: 2px;
}

/* 账户资料 */
.profile-card-account {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
.profile-kv {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.profile-kv-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}
.profile-kv-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  flex-shrink: 0;
  margin-top: 2px;
}
.profile-kv-content { min-width: 0; }
.profile-kv-label {
  font-size: 12px;
  color: #a1a1aa;
  margin-bottom: 3px;
}
.profile-kv-value {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
  word-break: break-all;
}
.profile-id-bar {
  margin: 14px -20px 0;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 20px 20px;
  background: #fafafa;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #a1a1aa;
  text-align: center;
  word-break: break-all;
  line-height: 1.5;
}

/* 积分充值 */
.profile-card-recharge {
  display: flex;
  flex-direction: column;
}
.profile-recharge-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  transition: background 0.15s;
}
.profile-link:hover {
  background: #f4f4f5;
  color: #18181b;
}
.profile-points-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 12px 8px 20px;
  gap: 10px;
}
.profile-coins-stack {
  position: relative;
  width: 56px;
  height: 40px;
  margin-bottom: 4px;
}
.profile-coin {
  position: absolute;
  color: #f59e0b;
  stroke: #d97706;
}
.profile-coin-back {
  left: 0;
  top: 6px;
  opacity: 0.55;
  transform: rotate(-12deg);
}
.profile-coin-front {
  right: 0;
  top: 0;
  transform: rotate(8deg);
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.25));
}
.profile-recharge-title {
  font-size: 15px;
  font-weight: 800;
  color: #18181b;
}
.profile-recharge-desc {
  margin: 0;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.55;
  color: #71717a;
}
.profile-primary-btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}
.profile-primary-btn:hover { opacity: 0.9; }

/* 促销码 */
.profile-promo {
  padding: 14px 18px;
  margin-bottom: 16px;
}
.profile-promo-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-promo-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.profile-promo-title {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}
.profile-promo-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
}
.profile-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: #18181b;
  font-family: inherit;
}
.profile-input::placeholder { color: #a1a1aa; font-weight: 400; }
.profile-secondary-btn {
  flex-shrink: 0;
  height: 40px;
  min-width: 72px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: #18181b;
}
.profile-secondary-btn:hover { background: #f4f4f5; }
@media (max-width: 720px) {
  .profile-promo-inner { flex-direction: column; align-items: stretch; }
  .profile-promo-right { max-width: none; margin-left: 0; }
}

/* 密码与安全 */
.profile-actions-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .profile-actions-2 { grid-template-columns: 1fr; }
}
.profile-action-btn {
  height: 44px;
  border-radius: 14px;
  border: none;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}
.profile-action-btn:hover { opacity: 0.9; }
.profile-action-btn-outline {
  background: #fff;
  color: #18181b;
  border: 1px solid #e4e4e7;
}
.profile-action-btn-outline:hover {
  background: #fafafa;
  opacity: 1;
}

/* 积分明细 */
.profile-page > .profile-card {
  margin-bottom: 16px;
}
.profile-page > .profile-card:last-child {
  margin-bottom: 0;
}

.profile-ledger-card {
  padding: 20px 20px 16px;
}
.profile-ledger-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.profile-ledger-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}
.profile-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #71717a;
}
.profile-date-btn:hover { background: #f4f4f5; }
.profile-date-btn.has-range { color: #18181b; }

.profile-date-picker-wrap { position: relative; }
.profile-date-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 320px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  padding: 14px 14px 10px;
}
.profile-date-picker[hidden] { display: none !important; }
.profile-date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.profile-date-picker-month {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}
.profile-date-picker-nav {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  font-family: inherit;
  padding: 0;
}
.profile-date-picker-nav:hover {
  background: #f9fafb;
  color: #111827;
}
.profile-date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
}
.profile-date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.profile-date-picker-day {
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.profile-date-picker-day:hover:not(:disabled) { background: #f3f4f6; }
.profile-date-picker-day.is-other { color: #d1d5db; font-weight: 500; }
.profile-date-picker-day.is-today { font-weight: 800; }
.profile-date-picker-day.is-selected,
.profile-date-picker-day.is-range-start,
.profile-date-picker-day.is-range-end {
  background: #f3f4f6;
  color: #111827;
}
.profile-date-picker-day.is-in-range {
  background: #f9fafb;
  border-radius: 0;
}
.profile-date-picker-day.is-range-start { border-radius: 10px 0 0 10px; }
.profile-date-picker-day.is-range-end { border-radius: 0 10px 10px 0; }
.profile-date-picker-day.is-range-start.is-range-end { border-radius: 10px; }
.profile-date-picker-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-date-picker-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #71717a;
  text-align: center;
  line-height: 1.5;
  min-height: 18px;
}
.profile-date-picker-clear {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 8px;
}
.profile-date-picker-clear:hover { color: #111827; }
.profile-date-picker-apply {
  height: 34px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.profile-date-picker-apply:hover:not(:disabled) { opacity: 0.9; }
.profile-date-picker-apply:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.profile-points-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
  font-size: 12px;
  color: #71717a;
}
.profile-summary-label { font-weight: 600; color: #52525b; }
.profile-summary-item strong {
  font-weight: 800;
  color: #18181b;
}

.profile-ledger {
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
  padding-top: 6px;
}
.profile-ledger-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 2px;
  border-bottom: 1px solid #f4f4f5;
}
.profile-ledger-item:last-child { border-bottom: none; }
.profile-ledger-left { min-width: 0; flex: 1; }
.profile-ledger-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.profile-ledger-title {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
  line-height: 1.45;
}
.profile-ledger-time {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-top: 2px;
}
.profile-ledger-badge {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
  flex-shrink: 0;
}
.profile-ledger-amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: #10b981;
  padding-top: 2px;
  min-width: 36px;
  text-align: right;
}
.profile-ledger-amount-minus { color: #ef4444; }
.profile-ledger-empty {
  padding: 28px 16px;
  text-align: center;
  color: #a1a1aa;
  font-size: 13px;
}

.profile-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 4px;
}
.profile-page-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #18181b;
}
.profile-page-btn:hover:not(:disabled) { background: #f4f4f5; }
.profile-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.profile-page-info {
  font-size: 13px;
  color: #71717a;
}

.profile-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(24, 24, 27, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 9999;
}
.profile-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modals */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.profile-modal[hidden] { display: none !important; }
.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.profile-modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
.profile-modal-dialog-wide { width: min(480px, 100%); }
.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
}
.profile-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}
.profile-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.profile-modal-close:hover {
  background: #f4f4f5;
  color: #18181b;
}
.profile-modal-body {
  padding: 8px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-modal-label {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}
.profile-modal-input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0 14px;
  font-size: 13px;
  color: #111827;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.profile-modal-input::placeholder { color: #9ca3af; font-weight: 400; }
.profile-modal-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}
.profile-modal-input-readonly {
  background: #f9fafb;
  color: #6b7280;
  cursor: default;
}
.profile-modal-input-readonly:focus {
  border-color: #e5e7eb;
  box-shadow: none;
}
.profile-modal-email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.profile-modal-code-btn {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.profile-modal-code-btn:hover:not(:disabled) { background: #f9fafb; }
.profile-modal-code-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  color: #6b7280;
}
.profile-otp-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.profile-otp-group { display: flex; gap: 8px; }
.profile-otp-input {
  width: 40px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  font-family: inherit;
  outline: none;
  padding: 0;
}
.profile-otp-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}
.profile-otp-dot {
  font-size: 18px;
  color: #9ca3af;
  line-height: 1;
  user-select: none;
}
.profile-modal-submit {
  margin-top: 6px;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.profile-modal-submit:hover { opacity: 0.92; }
.profile-modal-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .profile-title { font-size: 28px; }
  .profile-head { flex-direction: column; }
  .profile-joined { padding-top: 0; }
  .profile-ledger-head { flex-direction: column; }
  .profile-ledger-tools { align-items: stretch; width: 100%; }
  .profile-points-summary { justify-content: flex-start; }
}
