:root {
  color-scheme: light;
  --brand: #cf4b45;
  --brand-pale: #fff3f1;
  --ink: #333942;
  --muted: #737985;
  --soft-text: #969ba4;
  --line: #e8e5e3;
  --surface: #ffffff;
  --page: #f7f5f3;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 14% 0%, rgba(207, 75, 69, .07), transparent 30rem), var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.account-shell { min-height: 100vh; }

.account-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 248px;
  padding: 24px 18px 20px;
  flex-direction: column;
  background: rgba(255, 255, 255, .95);
  border-right: 1px solid var(--line);
}

.account-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.account-brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.account-brand strong, .account-brand small { display: block; }
.account-brand strong { font-size: 18px; font-weight: 550; }
.account-brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }

.account-nav {
  display: flex;
  margin-top: 34px;
  flex-direction: column;
  gap: 6px;
}

.account-nav a {
  display: flex;
  min-height: 46px;
  padding: 0 14px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  border-radius: 11px;
}

.account-nav a:hover, .account-nav a:focus-visible { color: var(--ink); background: #faf8f7; }
.account-nav a.active { color: var(--brand); font-weight: 550; background: var(--brand-pale); }
.account-nav svg { width: 20px; height: 20px; flex: 0 0 auto; }

.account-sidebar-profile {
  display: flex;
  margin-top: auto;
  padding: 9px 10px;
  align-items: center;
  gap: 10px;
}

.account-sidebar-profile img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
}

.account-sidebar-profile span { min-width: 0; }
.account-sidebar-profile strong, .account-sidebar-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-sidebar-profile strong { color: var(--ink); font-size: 14px; font-weight: 550; }
.account-sidebar-profile small { margin-top: 2px; color: var(--muted); font-size: 12px; }

.account-content {
  min-height: 100vh;
  margin-left: 248px;
  padding: clamp(28px, 4vw, 58px);
}

.account-page-head { margin-bottom: 26px; }
.account-eyebrow { color: var(--brand); font-size: 14px; font-weight: 550; }
.account-page-head h1 { margin: 9px 0 10px; font-size: clamp(34px, 5vw, 58px); font-weight: 550; letter-spacing: -.03em; }
.account-page-head p { max-width: 820px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

.account-summary-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.account-summary-card, .account-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.account-summary-card { min-height: 126px; padding: 24px; }
.account-summary-card span { color: var(--muted); font-size: 14px; }
.account-summary-card strong { display: block; margin-top: 18px; color: var(--ink); font-size: clamp(25px, 3vw, 38px); font-weight: 550; }

.account-panel { padding: 24px; }
.account-panel-head { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 16px; }
.account-panel-head h2 { margin: 0; font-size: 22px; font-weight: 550; }
.account-panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.account-profile-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.account-profile-card > img { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; }
.account-profile-card.no-avatar { grid-template-columns: 1fr; }
.account-profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.account-profile-field { min-height: 74px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.account-profile-field dt { color: var(--muted); font-size: 13px; }
.account-profile-field dd { margin: 8px 0 0; color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }

.account-record-list { display: grid; gap: 10px; }
.account-record-row {
  display: grid;
  grid-template-columns: minmax(100px, .9fr) minmax(180px, 2fr) minmax(100px, 1fr) minmax(100px, .8fr);
  min-height: 68px;
  padding: 12px 16px;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.account-record-row.heading { min-height: 42px; color: var(--muted); font-size: 13px; background: #faf8f7; }
.account-record-main { min-width: 0; }
.account-record-main strong, .account-record-main small { display: block; }
.account-record-main strong { overflow: hidden; color: var(--ink); font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.account-record-main small, .account-record-meta { margin-top: 4px; color: var(--muted); font-size: 13px; }
.account-record-amount { color: var(--brand); font-weight: 550; text-align: right; }
.account-record-empty { padding: 68px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; }

.account-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 15px;
  font-weight: 550;
  background: var(--brand-pale);
  border: 1px solid rgba(207, 75, 69, .24);
  border-radius: 12px;
  cursor: pointer;
}

.account-button:disabled { color: var(--soft-text); background: #f0ecea; border-color: var(--line); cursor: not-allowed; }
.account-login-note { padding: 50px 24px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
  .account-sidebar { position: static; width: auto; padding: 18px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .account-nav { margin-top: 18px; flex-direction: row; overflow-x: auto; }
  .account-nav a { flex: 0 0 auto; }
  .account-sidebar-profile { display: none; }
  .account-content { margin-left: 0; padding: 24px 16px 36px; }
  .account-summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .account-summary-card { min-height: 98px; padding: 18px; }
  .account-summary-card strong { margin-top: 10px; }
  .account-profile-card { grid-template-columns: 1fr; }
  .account-profile-fields { grid-template-columns: 1fr; }
  .account-panel { padding: 16px; }
  .account-record-row { grid-template-columns: 1fr 1fr; gap: 9px 14px; }
  .account-record-row.heading { display: none; }
  .account-record-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .account-record-row > :nth-child(1) { grid-column: 1; grid-row: 2; }
  .account-record-row > :nth-child(3) { grid-column: 1; grid-row: 3; }
  .account-record-row > :nth-child(4) { grid-column: 2; grid-row: 2 / 4; align-self: center; }
}
