/* LAA account — warm pastel card system. Visual overrides only. */
:root {
  --account-ink: #292b35;
  --account-muted: #777985;
  --account-line: #e7e2da;
  --account-paper: #fffdf9;
  --account-coral: #dc5b6b;
  --account-coral-deep: #c94759;
  --account-blue: #edf1f6;
  --account-blue-strong: #2f4564;
  --account-mint: #edf4f0;
  --account-peach: #fffdf9;
  --account-lilac: #f5f2ed;
}

body,
.account-page {
  color: var(--account-ink);
  background: #f7f4ef;
}

.account-sidebar {
  border: 1px solid var(--account-line);
  border-radius: 20px;
  background: var(--account-paper);
  box-shadow: 0 12px 34px rgba(45, 42, 38, .06);
}

.account-profile {
  border: 1px solid #e8e2da;
  border-radius: 16px;
  background: #f5f2ed;
}

.account-profile__avatar {
  color: #34445b;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgba(52, 68, 91, .12);
}

.account-profile strong,
.account-menu a.is-active {
  color: var(--account-ink);
}

.account-profile span,
.account-menu a,
.logout-button {
  color: var(--account-muted);
}

.account-menu a {
  border-radius: 12px;
}

.account-menu a:hover {
  color: #29384d;
  background: #f2f0ec;
}

.account-menu a.is-active {
  background: #e9edf2;
  box-shadow: inset 0 0 0 1px rgba(47, 69, 100, .08);
}

.account-menu a.is-active::before {
  background: #344a69;
}

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

.logout-button {
  border-color: #e0e5dd;
  border-radius: 12px;
  background: rgba(255, 253, 249, .72);
}

.orders-heading .eyebrow,
.section-kicker {
  color: #88818b;
}

.browse-link,
.shop-button,
.action-button--primary,
.show-codes-button {
  border-color: var(--account-coral);
  color: #fff;
  background: var(--account-coral);
  box-shadow: 0 7px 16px rgba(220, 91, 107, .17);
}

.browse-link:hover,
.shop-button:hover,
.action-button--primary:hover,
.show-codes-button:hover {
  border-color: var(--account-coral-deep);
  color: #fff;
  background: var(--account-coral-deep);
  box-shadow: 0 9px 20px rgba(201, 71, 89, .2);
}

.overview-card,
.recent-purchases,
.order-card,
.codes-panel,
.security-card,
.detail-view,
.empty-state,
.login-state {
  border-color: var(--account-line);
  border-radius: 18px;
  background: var(--account-paper);
  box-shadow: 0 12px 34px rgba(66, 58, 48, .055);
}

.overview-card:first-child {
  background: var(--account-paper);
}

.order-summary-card {
  color: var(--account-ink);
  border-color: var(--account-line);
  background: var(--account-paper);
}

.order-summary-card .section-kicker,
.order-summary-card span,
.order-summary-card p {
  color: var(--account-muted);
}

.order-summary-card .overview-card__head h2,
.order-summary-card .summary-item,
.order-summary-card .summary-item strong {
  color: var(--account-ink);
}

.order-summary-card .inline-link {
  color: #d83249;
}

.order-summary-card .inline-link:hover {
  color: #bd263c;
}

.order-summary-card .summary-item {
  border-left-color: #e4e7ec;
}

.order-summary-card .summary-item span {
  color: var(--account-muted);
}

.order-summary-card .summary-item:hover strong {
  color: #d83249;
}

.order-summary-card .summary-item:hover span {
  color: #4f5662;
}

.order-summary-card strong,
.order-summary-card h2 {
  color: var(--account-ink);
}

.balance-module {
  border-color: #dfe3e8;
  border-radius: 18px;
  background: var(--account-paper);
  box-shadow: 0 14px 38px rgba(71, 86, 122, .075);
}

.balance-module__summary {
  color: #fff;
  background: linear-gradient(145deg, #30445f, #202d40);
}

.balance-module__summary::after {
  filter: brightness(0) invert(1);
  opacity: .045;
}

.balance-module__summary .section-kicker,
.balance-module__summary > span,
.balance-module__summary > p:last-child {
  color: #b8c2d0;
}

.balance-module__summary > strong small {
  color: var(--account-coral);
}

.balance-module__ledger {
  background: #fffdf9;
}

.balance-ledger__row {
  border-color: #ece8e1;
}

.balance-ledger__mark--in {
  color: #42735e;
  background: var(--account-mint);
}

.balance-ledger__mark--out {
  color: #b34758;
  background: #fdebef;
}

.recent-order,
.cdk-order-row {
  border-color: #ebe6df;
  border-radius: 14px;
  background: #fbf9f5;
}

.recent-order:hover,
.cdk-order-row:hover {
  border-color: #d9d5ce;
  background: #f6f3ee;
}

.recent-order__game,
.order-game-icon,
.code-product__icon {
  border-radius: 12px;
  background: #efede9;
}

.action-button {
  border-color: #ddd8d0;
  border-radius: 10px;
  color: #575962;
  background: #fffdf9;
}

.action-button:hover {
  border-color: #cfc7bd;
  color: var(--account-ink);
  background: #f7f3ed;
}

.action-button--primary:hover {
  color: #fff;
  background: var(--account-coral-deep);
}

.order-card:focus-visible,
.recent-order:focus-visible,
.account-menu a:focus-visible,
.browse-link:focus-visible,
.action-button:focus-visible {
  outline: 3px solid rgba(88, 115, 189, .28);
  outline-offset: 3px;
}

/* Keep the established order-list palette; the new card system is for overview. */
#ordersResults .order-card,
.detail-view {
  border-color: #e4e7ec;
  background: #fff;
  box-shadow: 0 10px 34px rgba(26, 33, 46, .065);
}

#ordersResults .order-game-icon {
  background: #edf1fa;
}

#ordersResults .action-button,
.detail-view .action-button {
  border-color: #e4e7ec;
  color: #363a42;
  background: #fff;
  box-shadow: none;
}

#ordersResults .action-button:hover,
.detail-view .action-button:hover {
  border-color: #aeb3bd;
  color: #000;
  background: #fff;
}

#ordersResults .action-button--primary,
.detail-view .action-button--primary {
  border-color: #20242d;
  color: #fff;
  background: #20242d;
}

#ordersResults .action-button--primary:hover,
.detail-view .action-button--primary:hover {
  border-color: #30343a;
  color: #fff;
  background: #30343a;
}

@media (max-width: 860px) {
  .account-sidebar {
    background: var(--account-paper);
  }
}

@media (prefers-reduced-motion: reduce) {
  .overview-card,
  .recent-order,
  .order-card,
  .browse-link,
  .action-button {
    transition: none !important;
  }
}

/* Balance card refinement */
.balance-module__summary {
  padding: 24px 26px;
}

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

.balance-module__summary > strong {
  margin-top: 3px;
}

.balance-module__summary > p:last-of-type {
  margin: 10px 0 0;
  max-width: 245px;
  line-height: 1.55;
}

.balance-module__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.balance-module__actions small {
  max-width: 132px;
  color: #aeb9c8;
  font-size: 10px;
  line-height: 1.45;
}

.balance-recharge-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 10px;
  color: #26364c;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(12, 20, 32, .15);
}

.balance-recharge-button:hover {
  color: #fff;
  border-color: var(--account-coral);
  background: var(--account-coral);
}

.balance-ledger__mark svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balance-ledger__more {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 12px;
  border: 0;
  border-top: 1px solid #ece8e1;
  color: #5e6570;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.balance-ledger__more:hover {
  color: var(--account-coral-deep);
}

@media (max-width: 680px) {
  .balance-module__actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 860px) {
  .store-nav .brand,
  .store-nav .nav-user,
  .store-nav .browse-link,
  .store-nav .shop-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

/* Mobile account navigation: retain every section instead of hiding the sidebar. */
@media (max-width: 860px) {
  .account-sidebar {
    position: static;
    display: block !important;
    width: 100%;
    padding: 6px;
    overflow: hidden;
    border-radius: 13px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 6px 22px rgba(26,33,46,.055);
  }
  .account-profile,
  .account-sidebar .logout-button { display: none; }
  .account-menu {
    display: flex;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .account-menu::-webkit-scrollbar { display: none; }
  .account-menu a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 12px;
    white-space: nowrap;
  }
  .account-menu a.is-active::before {
    inset: auto 12px 1px;
    width: auto;
    height: 2px;
  }
}

/* Final account palette: neutral surfaces, navy hierarchy, LAA red accents. */
:root {
  --account-ink: #20242d;
  --account-muted: #747b87;
  --account-line: #e4e7ec;
  --account-paper: #ffffff;
  --account-coral: #d83249;
  --account-coral-deep: #bd263c;
  --account-blue: #edf1f6;
  --account-blue-strong: #27364b;
  --account-mint: #eef1f4;
  --account-peach: #ffffff;
  --account-lilac: #f3f5f7;
}

body,
.account-page {
  color: var(--account-ink);
  background: #f4f5f7;
}

.account-sidebar,
.account-profile,
.overview-card,
.recent-purchases,
.balance-module,
.balance-module__ledger,
.order-card,
.detail-view,
.codes-panel,
.security-card,
.empty-state,
.login-state {
  border-color: var(--account-line);
  background: #fff;
}

.account-sidebar {
  box-shadow: 0 12px 32px rgba(24, 31, 43, .055);
}

.account-profile {
  background: #f5f6f8;
}

.account-profile__avatar,
.profile-card__avatar {
  color: #fff;
  background: #27364b;
  box-shadow: none;
}

.account-menu a:hover {
  color: #27364b;
  background: #f3f5f7;
}

.account-menu a.is-active {
  color: #20242d;
  background: #edf0f4;
  box-shadow: none;
}

.account-menu a.is-active::before,
.order-filters button.is-active::after {
  background: #d83249;
}

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

.overview-card:first-child,
.order-summary-card {
  color: var(--account-ink);
  border-color: var(--account-line);
  background: #fff;
}

.order-summary-card::after {
  display: none;
}

.order-summary-card .section-kicker,
.order-summary-card span,
.order-summary-card p {
  color: var(--account-muted);
}

.balance-module {
  border-color: #dce1e8;
  box-shadow: 0 14px 34px rgba(31, 43, 61, .07);
}

.balance-module__summary {
  background: linear-gradient(145deg, #2c3c53, #1d293a);
}

.balance-module__summary > strong small,
.balance-ledger__more:hover {
  color: #ec5268;
}

.balance-ledger__mark--in {
  color: #237052;
  background: #eaf3ef;
}

.balance-ledger__mark--out {
  color: #bf3046;
  background: #fbecef;
}

.recent-order,
.cdk-order-row {
  border-color: var(--account-line);
  background: #fafbfc;
}

.recent-order:hover,
.cdk-order-row:hover {
  border-color: #cfd5dd;
  background: #f5f7f9;
}

.recent-order__game,
.order-game-icon,
.code-product__icon,
#ordersResults .order-game-icon {
  background: #edf0f4;
}

.browse-link,
.shop-button,
.show-codes-button,
.action-button--primary {
  border-color: #d83249;
  color: #fff;
  background: #d83249;
  box-shadow: 0 7px 16px rgba(216, 50, 73, .16);
}

.browse-link:hover,
.shop-button:hover,
.show-codes-button:hover,
.action-button--primary:hover {
  border-color: #bd263c;
  color: #fff;
  background: #bd263c;
}

/* Preserve the familiar dark primary action specifically inside order views. */
#ordersResults .action-button--primary,
.detail-view .action-button--primary {
  border-color: #20242d;
  background: #20242d;
  box-shadow: none;
}

#ordersResults .action-button--primary:hover,
.detail-view .action-button--primary:hover {
  border-color: #30343a;
  background: #30343a;
}

/* Wallet panel v2 */
.balance-module {
  display: block;
  overflow: hidden;
  border: 1px solid #e1e5eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(29, 39, 54, .06);
}

.balance-module__header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #e8ebef;
}

.balance-module__header h2 {
  margin: 3px 0 0;
  color: #20242d;
  font-size: 17px;
}

.balance-module__header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.balance-module__body {
  display: grid;
  grid-template-columns: minmax(250px, .68fr) minmax(480px, 1.32fr);
  gap: 0;
}

.balance-module__summary {
  min-height: 276px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 24px;
  color: #fff;
  background: #26364b;
}

.balance-module__summary::after {
  right: -10px;
  bottom: 18px;
  width: 150px;
  opacity: .035;
}

.balance-summary__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.balance-summary__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balance-summary__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 24px;
}

.balance-summary__label span {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.balance-summary__label small {
  color: #9facbd;
  font-size: 9px;
  letter-spacing: .08em;
}

.balance-module__summary > strong {
  margin-top: 7px;
  color: #fff;
  font-size: clamp(36px, 4vw, 48px);
}

.balance-module__summary > strong small {
  color: #f06478;
}

.balance-module__summary > p:last-child {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: auto 0 0;
  color: #b7c1ce;
  font-size: 10px;
}

.balance-module__summary > p:last-child span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #dce9e3;
  background: rgba(83, 155, 121, .22);
}

.balance-module__ledger {
  min-width: 0;
  padding: 20px 22px;
  background: #fff;
}

.balance-ledger__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}

.balance-ledger__head h3 {
  margin: 0;
  color: #20242d;
  font-size: 14px;
}

.balance-ledger__head div > span {
  display: block;
  margin-top: 4px;
  color: #8b919b;
  font-size: 10px;
}

.balance-ledger__count {
  padding: 5px 8px;
  border-radius: 999px;
  color: #69717d;
  background: #f1f3f6;
  white-space: nowrap;
}

.balance-ledger__more {
  width: auto;
  min-height: 36px;
  gap: 8px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  color: #505763;
  background: #fff;
}

.balance-recharge-button {
  min-height: 36px;
  padding: 0 14px;
  border-color: #d83249;
  border-radius: 9px;
  color: #fff;
  background: #d83249;
  box-shadow: none;
}

.balance-ledger__row {
  grid-template-columns: 36px minmax(0, 1fr) 112px 122px;
  min-height: 54px;
}

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

  .balance-module__summary {
    min-height: 230px;
  }
}

@media (max-width: 680px) {
  .balance-module__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .balance-module__header-actions,
  .balance-recharge-button {
    width: 100%;
  }

  .balance-ledger__more {
    flex: 1;
    justify-content: center;
  }

  .balance-module__summary,
  .balance-module__ledger {
    padding: 20px 16px;
  }
}
