:root {
  --laa-night: #101620;
  --laa-night-soft: #182130;
  --laa-warm: #faf9f6;
  --laa-red: #d83249;
}

body {
  background: var(--laa-warm);
}

.account-page {
  padding-top: 36px;
}

.account-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 40px;
}

.account-sidebar {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 0 20px 20px 0;
  background: var(--laa-night);
  color: #fff;
  box-shadow: 0 20px 50px rgba(16, 22, 32, .16);
}

.account-profile {
  position: relative;
  padding: 26px 20px 24px;
  background: linear-gradient(145deg, #202b3d, #111823);
}

.account-profile::after {
  content: "PLAYER ACCOUNT";
  position: absolute;
  left: 20px;
  bottom: 7px;
  color: #657187;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .16em;
}

.account-profile__avatar {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
}

.account-menu {
  gap: 4px;
  padding: 18px 14px 12px;
}

.account-menu a,
.logout-button {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-menu a {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 9px;
  color: #9ea9b9;
  transition: color .16s, background .16s, transform .16s;
}

.account-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .055);
  transform: translateX(2px);
}

.account-menu a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  font-weight: 700;
}

.account-menu a.is-active::before {
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--laa-red);
}

.menu-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
}

.menu-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu a.is-active .menu-icon {
  color: #ff5369;
}

.logout-button {
  min-height: 44px;
  margin: 6px 14px 14px;
  width: calc(100% - 28px);
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: #8995a6;
}

.logout-button:hover {
  color: #fff;
  border-color: rgba(216, 50, 73, .38);
  background: rgba(216, 50, 73, .1);
}

.orders-heading {
  position: relative;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e2dc;
}

.orders-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 46px;
  height: 2px;
  background: var(--laa-red);
}

.eyebrow {
  color: #8d8a84;
}

.browse-link {
  border: 0;
  background: var(--laa-night);
  color: #fff;
  box-shadow: none;
}

.browse-link:hover {
  color: #fff;
  background: #283141;
}

.overview-card,
.recent-purchases,
.order-card,
.cdk-order-card,
.security-card,
.verification-card,
.detail-view {
  border-radius: 4px 18px 4px 18px !important;
}

.profile-card,
.recent-purchases {
  border: 1px solid #e9e6e0 !important;
  box-shadow: 0 10px 30px rgba(31, 29, 25, .045);
}

.order-summary-card {
  border-radius: 4px 22px 4px 22px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .045), transparent 45%),
    linear-gradient(145deg, #1e2939, #101620);
}

.order-summary-card::after {
  content: "";
  width: 150px;
  height: 62px;
  right: -16px;
  bottom: 10px;
  background: url("../assets/logo-exact.svg") right center / contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: .04;
}

.recent-order {
  border-left: 3px solid transparent;
  border-radius: 4px 12px 4px 12px;
}

.recent-order:hover {
  border-left-color: var(--laa-red);
}

.order-filters {
  border-radius: 4px 16px 0 0;
}

.order-filters button.is-active::after {
  background: var(--laa-red);
}

.shop-button,
.action-button--primary,
.show-codes-button {
  background: var(--laa-night) !important;
}

@media (max-width: 980px) {
  .account-shell {
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .account-shell {
    grid-template-columns: 1fr;
  }
}

/* LAA light account rail and full-width page heading */
.account-shell {
  position: relative;
  padding-top: 92px;
}

.orders-heading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
}

.account-sidebar {
  top: 108px;
  align-self: start;
  border: 1px solid #e5e2dc;
  border-radius: 18px;
  background: #fffefa;
  color: #20242c;
  box-shadow: 0 12px 34px rgba(31, 29, 25, .065);
}

.account-profile {
  padding: 24px 20px 28px;
  border-bottom: 1px solid #ece9e3;
  background: #f6f3ed;
  color: #20242c;
}

.account-profile::after {
  color: #a29d94;
}

.account-profile__avatar {
  border-color: #d9d4cb;
  background: #fffefa;
  color: #20242c;
}

.account-profile span {
  color: #817d76;
}

.account-menu {
  padding-top: 20px;
}

.account-menu a {
  color: #686b72;
}

.account-menu a:hover {
  color: #20242c;
  background: #f5f2ec;
}

.account-menu a.is-active {
  color: #20242c;
  background: #efebe4;
}

.account-menu a.is-active .menu-icon {
  color: var(--laa-red);
}

.logout-button {
  border-color: #e7e3dc;
  background: #f7f4ee;
  color: #77736d;
}

.logout-button:hover {
  color: #b42439;
  border-color: rgba(216, 50, 73, .24);
  background: rgba(216, 50, 73, .055);
}

.balance-module {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(420px, 1.28fr);
  overflow: hidden;
  border: 1px solid #e7e3dc;
  border-radius: 4px 20px 4px 20px;
  background: #fffefa;
  box-shadow: 0 10px 30px rgba(31, 29, 25, .05);
}

.balance-module__summary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 28px;
  color: #fff;
  background: linear-gradient(145deg, #253044, #111823);
}

.balance-module__summary::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 70px;
  right: -24px;
  bottom: 16px;
  background: url("../assets/logo-exact.svg") right center / contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: .045;
}

.balance-module__summary .section-kicker {
  color: #8f9caf;
}

.balance-module__summary > span {
  display: block;
  margin-top: 30px;
  color: #bdc6d3;
  font-size: 12px;
}

.balance-module__summary > strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.balance-module__summary > strong small {
  margin-right: 5px;
  color: #ff6579;
  font-size: .46em;
  vertical-align: .42em;
}

.balance-module__summary > p:last-child {
  margin: 16px 0 0;
  color: #8f9aac;
  font-size: 11px;
}

.balance-module__ledger {
  min-width: 0;
  padding: 24px 26px;
}

.balance-ledger__count {
  color: #98948d;
  font-size: 11px;
}

.balance-ledger__list {
  display: grid;
  margin-top: 14px;
}

.balance-ledger__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 112px 126px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border-top: 1px solid #eeeae3;
}

.balance-ledger__mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 700;
}

.balance-ledger__mark--in {
  color: #157251;
  background: #e9f6f0;
}

.balance-ledger__mark--out {
  color: #b52b40;
  background: #fff0f2;
}

.balance-ledger__row > div:nth-child(2) strong,
.balance-ledger__row > div:nth-child(2) span,
.balance-ledger__amount strong,
.balance-ledger__amount span {
  display: block;
}

.balance-ledger__row > div:nth-child(2) strong {
  font-size: 12px;
}

.balance-ledger__row > div:nth-child(2) span,
.balance-ledger__amount span,
.balance-ledger__row time {
  margin-top: 2px;
  overflow: hidden;
  color: #8b8780;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-ledger__amount {
  text-align: right;
}

.balance-ledger__amount strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.balance-ledger__amount .is-positive {
  color: #157251;
}

.balance-ledger__amount .is-negative {
  color: #b52b40;
}

.balance-ledger__row time {
  margin: 0;
  text-align: right;
}

.balance-ledger__empty {
  min-height: 130px;
  display: grid;
  place-content: center;
  text-align: center;
}

.balance-ledger__empty strong,
.balance-ledger__empty span {
  display: block;
}

.balance-ledger__empty span {
  margin-top: 4px;
  color: #918d86;
  font-size: 11px;
}

@media (max-width: 1080px) {
  .balance-module {
    grid-template-columns: 1fr;
  }

  .balance-module__summary > span {
    margin-top: 20px;
  }
}

@media (max-width: 860px) {
  .account-shell {
    padding-top: 86px;
  }
}

@media (max-width: 680px) {
  .balance-module__summary,
  .balance-module__ledger {
    padding: 20px 16px;
  }

  .balance-ledger__row {
    grid-template-columns: 32px minmax(0, 1fr) 104px;
  }

  .balance-ledger__row time {
    display: none;
  }
}

/* ===== 余额明细弹窗 ===== */
.balance-ledger-modal__dialog {
  width: min(100%, 880px);
  max-height: min(780px, calc(100dvh - 48px));
  border-radius: 20px !important;
  overscroll-behavior: contain;
}
.balance-ledger-modal__head {
  min-height: 92px;
  padding: 17px 24px;
  background: linear-gradient(135deg, #fff 0%, #fbfbfc 68%, #fff3f4 100%);
}
.balance-ledger-modal__head > div { min-width: 0; }
.balance-ledger-modal__head > div > span { color: #bd2b40; font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
.balance-ledger-modal__head h2 { margin-top: 3px; color: #20242d; font-size: 20px; letter-spacing: -.02em; text-wrap: balance; }
.balance-ledger-modal__head p { margin: 4px 0 0; color: #848a94; font-size: 11px; }
.balance-ledger-modal__head .code-modal__close { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .75); }
.balance-ledger-modal__head .code-modal__close:hover { background: #f2f3f5; }
.balance-ledger-modal__summary {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 22px 20px;
  background: #f7f8fa;
  border-bottom: 1px solid var(--border);
}
.balance-ledger-modal__stat {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 88px;
  padding: 14px 15px;
  border: 1px solid #e6e8ec;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(25, 31, 42, .035);
}
.balance-ledger-modal__stat--balance { border-color: #2d323c; background: #242832; box-shadow: 0 10px 24px rgba(24, 29, 38, .15); }
.balance-ledger-modal__stat span { color: #747b87; font-size: 11px; }
.balance-ledger-modal__stat strong { color: #252a33; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.balance-ledger-modal__stat small { overflow: hidden; color: #9aa0a9; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.balance-ledger-modal__stat--balance span,
.balance-ledger-modal__stat--balance small { color: #abb2c0; }
.balance-ledger-modal__stat--balance strong { color: #fff; font-size: 24px; }
.balance-ledger-modal__stat strong.is-positive { color: #1a9e6c; }
.balance-ledger-modal__stat strong.is-negative { color: #d93a3a; }
.balance-ledger-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px 10px;
  background: #fff;
}
.balance-ledger-modal__toolbar > div:first-child { display: grid; gap: 2px; }
.balance-ledger-modal__toolbar strong { color: #292e37; font-size: 13px; }
.balance-ledger-modal__toolbar span { color: #9298a2; font-size: 10px; }
.balance-ledger-modal__filters { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #e4e7eb; border-radius: 10px; background: #f5f6f8; }
.balance-ledger-modal__filters button {
  min-width: 54px;
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  color: #747b86;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.balance-ledger-modal__filters button:hover { color: #292e37; background: #eceef1; }
.balance-ledger-modal__filters button.is-active { color: #fff; background: #292e37; box-shadow: 0 3px 8px rgba(30, 35, 44, .15); }
.balance-ledger-modal__filters button:focus-visible { outline: 2px solid #d83249; outline-offset: 2px; }
.balance-ledger-modal__body {
  min-height: 220px;
  padding: 0 22px 18px;
  overflow-y: auto;
  background: #fff;
  overscroll-behavior: contain;
}
.balance-ledger-modal__body .balance-ledger__row {
  grid-template-columns: 38px minmax(0, 1fr) 130px 132px;
  min-height: 66px;
  border-top: 0;
  border-bottom: 1px solid #eef0f3;
  content-visibility: auto;
  contain-intrinsic-size: auto 66px;
}
.balance-ledger-modal__body .balance-ledger__row:last-child {
  border-bottom: 0;
}
.balance-ledger-modal__body .balance-ledger__mark { width: 32px; height: 32px; border-radius: 10px; }
.balance-ledger-modal__body .balance-ledger__mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.balance-ledger-modal__body .balance-ledger__row > div:nth-child(2) { min-width: 0; }
.balance-ledger-modal__body .balance-ledger__row > div:nth-child(2) strong { color: #30353e; font-size: 12.5px; }
.balance-ledger-modal__body .balance-ledger__row > div:nth-child(2) span { max-width: 100%; }
.balance-ledger-modal__body .balance-ledger__amount strong { font-size: 13px; }
.balance-ledger-modal__body .balance-ledger__amount span { margin-top: 4px; }
.balance-ledger-modal__body .balance-ledger__row time { color: #7f8691; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.balance-ledger-modal__foot { min-height: 62px; justify-content: space-between; }
.balance-ledger-modal__foot > span { color: #9298a2; font-size: 10px; }
.balance-ledger-modal__foot .action-button { min-width: 88px; min-height: 38px; justify-content: center; }

@media (max-width: 640px) {
  .balance-ledger-modal__dialog { max-height: calc(100dvh - 20px); border-radius: 16px !important; }
  .balance-ledger-modal__head { min-height: 84px; padding: 14px 16px; }
  .balance-ledger-modal__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 16px;
    background: #fff;
  }
  .balance-ledger-modal__stat {
    min-height: 82px;
    padding: 12px;
  }
  .balance-ledger-modal__stat--balance strong { font-size: 21px; }
  .balance-ledger-modal__toolbar { align-items: flex-start; padding: 14px 16px 9px; }
  .balance-ledger-modal__filters button { min-width: 48px; padding-inline: 8px; }
  .balance-ledger-modal__body { padding: 0 16px 14px; }
  .balance-ledger-modal__body .balance-ledger__row { grid-template-columns: 34px minmax(0, 1fr) 104px; gap: 9px; padding: 11px 0; }
  .balance-ledger-modal__body .balance-ledger__row time { display: block; grid-column: 2 / -1; grid-row: 2; text-align: left; }
  .balance-ledger-modal__foot { padding: 10px 16px; }
}

@media (max-width: 430px) {
  .balance-ledger-modal__toolbar { display: grid; }
  .balance-ledger-modal__filters { width: 100%; }
  .balance-ledger-modal__filters button { flex: 1; }
  .balance-ledger-modal__foot > span { display: none; }
  .balance-ledger-modal__foot .action-button { width: 100%; }
}
