/* Account and billing workspace. Shared brand colours remain in brand.css. */
.checkout-page .shell { width: min(1120px, calc(100% - 64px)); }
.checkout-page #top { scroll-margin-top: 104px; }
.checkout-page .header-inner { height: 72px; justify-content: flex-start; gap: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.checkout-page .header-actions { margin-left: auto; gap: 24px; }
.checkout-page .back-link { color: #9aabc2; font-weight: 500; }
.checkout-page .back-link:hover { color: #e2e8f0; }
.account-menu { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px; border-radius: 8px; cursor: pointer; list-style: none; font-size: 13px; }
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger::marker { content: ''; }
.account-trigger:hover { background: #192131; }
.account-sign-in { padding: 5px 10px 5px 5px; color: #b9daff; border: 1px solid #304762; background: #192638; }
.account-sign-in:hover { border-color: #6da7e4; background: #22344c; }
.account-trigger > svg { color: #8293ab; transition: transform .15s; }
.account-menu[open] .account-trigger > svg { transform: rotate(180deg); }
.account-avatar { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #3b5371; border-radius: 50%; background: #20344c; color: #9bceff; flex-shrink: 0; font-size: 11px; font-weight: 700; }
#checkoutUser { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover { position: absolute; top: calc(100% + 12px); right: 0; width: 280px; padding: 8px; background: #171f2d; border: 1px solid #324159; border-radius: 12px; box-shadow: 0 18px 48px #0006; }
.account-menu-heading { margin: 0 4px 6px; padding: 12px 8px 16px; border-bottom: 1px solid #2b384c; }
.account-menu-heading > span { font-size: 11px; color: #8293ab; }
.account-menu-heading p { font-size: 12px; color: #c3cfdf; line-height: 1.7; margin: 7px 0 0; overflow-wrap: anywhere; }
.account-menu-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; border: 0; background: transparent; color: #cdd8e7; padding: 12px; font: inherit; font-size: 13px; text-align: left; border-radius: 7px; cursor: pointer; }
.account-menu-link > span { color: #7e92ad; }
.account-menu-link:hover { background: #233047; }
.account-menu-link[aria-disabled=true] { color: #8191a8; cursor: default; pointer-events: none; }
.checkout-page .recharge-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 44px; padding-bottom: 28px; }
.checkout-page .recharge-intro .eyebrow { font-size: 10px; letter-spacing: .16em; color: #718cac; }
.checkout-page .recharge-intro h1 { font-size: 30px; letter-spacing: -.035em; line-height: 1.3; font-weight: 700; margin: 10px 0; }
.checkout-page .recharge-intro p { font-size: 13px; line-height: 1.7; color: #8d9fb8; }
.intro-help { display: inline-flex; align-items: center; gap: 8px; color: #94a8c3; font-size: 12px; white-space: nowrap; }
.intro-help:hover { color: #79baff; }
.account-overview { margin-bottom: 20px; }
.balance-card { display: flex; align-items: center; gap: 32px; padding: 27px 32px; border: 1px solid #2a384e; border-radius: 14px; background: #161e2c; }
.balance-primary { flex: 0 0 29%; min-width: 190px; }
.balance-label { display: flex; align-items: center; gap: 10px; color: #a4b4ca; font-size: 12px; }
.balance-refresh { display: grid; place-items: center; border: 0; border-radius: 5px; padding: 4px; color: #7f94b1; background: transparent; cursor: pointer; }
.balance-refresh:hover { color: #80bfff; background: #27364c; }
.balance-refresh:disabled { opacity: .45; cursor: wait; }
.balance-primary > strong { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 9px; font-size: 36px; line-height: 1.15; letter-spacing: -.045em; font-weight: 650; font-variant-numeric: tabular-nums; }
.balance-primary small { font-size: 14px; color: #8fabc9; font-weight: 400; letter-spacing: 0; }
.balance-caption { font-size: 11px; color: #7d91ae; }
.balance-sources { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; width: 100%; border-left: 1px solid #2d3a50; padding: 8px 0 8px 32px; }
.balance-source { display: grid; gap: 12px; }
.balance-source > span { font-size: 11px; color: #8297b4; }
.balance-source > strong { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.checkout-tabs { display: flex; gap: 32px; margin-bottom: 28px; border-bottom: 1px solid #263348; }
.checkout-tabs button { font: inherit; font-size: 13px; color: #8e9fb9; border: 0; background: transparent; padding: 18px 2px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.checkout-tabs button:hover { color: #d9e5f5; }
.checkout-tabs button[aria-selected=true] { color: #cbe5ff; border-bottom-color: #4facfe; font-weight: 600; }
.checkout-page .purchase-section { padding: 0 0 64px; border: 0; background: transparent; }
.checkout-page .purchase-layout { display: grid; grid-template-columns: minmax(0, 1fr) 324px; gap: 36px; align-items: start; padding: 30px; background: #151d2a; border: 1px solid #2a384e; border-radius: 14px; }
.purchase-main { min-width: 0; }
.checkout-page .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.checkout-page .section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; font-weight: 600; }
.checkout-page .section-heading p { color: #8598b3; font-size: 12px; }
.exchange-rate { border: 1px solid #2e4562; border-radius: 6px; background: #1b2a3d; color: #a8c9ed; padding: 7px 9px; font-size: 11px; white-space: nowrap; }
.exchange-rate > span { padding: 0 4px; color: #6384ab; }
.checkout-page .recharge-form { background: transparent; border: 0; padding: 0; border-radius: 0; }
.checkout-page .recharge-form label { font-size: 12px; font-weight: 500; color: #b2c2d9; margin-bottom: 12px; }
.checkout-page .recharge-form label span { font-size: 10px; color: #7087a7; }
.checkout-page .amount-input-wrap { height: 72px; padding: 0 20px; background: #0e1622; border-color: #354861; border-radius: 9px; }
.checkout-page .amount-input-wrap > span { font-size: 25px; color: #7995b8; font-weight: 500; }
.checkout-page .amount-input-wrap input { font-size: 32px; font-weight: 550; }
.checkout-page .amount-input-wrap input::placeholder { font-size: 20px; color: #536b8b; }
.quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.quick-amounts button { min-height: 42px; border: 1px solid #2d3e55; border-radius: 7px; background: #192332; color: #adbed6; font-size: 13px; font-variant-numeric: tabular-nums; transition: background .15s, border-color .15s; }
.quick-amounts button:hover { border-color: #5b85b5; color: #daebff; }
.quick-amounts button[aria-pressed=true] { background: #1b3551; border-color: #4facfe; color: #9fceff; }
.checkout-page .recharge-form .amount-hint { margin: 12px 0 0; font-size: 11px; color: #7186a3; }
.checkout-page .credit-preview { border: 0; border-radius: 0; background: transparent; padding: 0; margin-top: 0; }
.checkout-page .credit-preview > div { gap: 10px; }
.checkout-page .credit-preview > div > span { color: #92a8c7; font-size: 12px; }
.checkout-page .credit-preview strong { font-size: 32px; color: #85c2ff; font-weight: 550; font-variant-numeric: tabular-nums; }
.checkout-page .checkout-card { min-width: 0; position: static; margin: 0; padding: 0 0 0 30px; background: transparent; border: 0; border-left: 1px solid #2a384e; box-shadow: none; border-radius: 0; }
.checkout-page .checkout-card h2 { margin: 0 0 24px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.checkout-page .summary-divider { margin: 24px 0; border-top-style: solid; border-color: #29384f; }
.checkout-page .summary-total { font-size: 12px; color: #a6b9d1; margin-bottom: 25px; }
.checkout-page .summary-total div { gap: 4px; }
.checkout-page .summary-total strong { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout-page .summary-total small { font-size: 16px; font-weight: 500; }
.checkout-page .payment-method { font-size: 12px; border-color: #29384f; padding: 18px 0 22px; margin: 0; }
.checkout-page .primary-button { height: 46px; border-radius: 8px; font-size: 13px; }
.checkout-page .refund-note { margin-top: 16px; color: #7f94b2; font-size: 11px; line-height: 1.9; }
.checkout-page .refund-note a { display: block; color: #9eb6d6; text-decoration: none; }
.account-action { display: inline-flex; align-items: center; justify-content: center; background: #1b2738; border: 1px solid #33445f; color: #b3c9e4; border-radius: 7px; padding: 9px 13px; cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap; }
.account-action:hover { border-color: #5a7da7; }
.account-action:disabled { opacity: .4; cursor: default; }
.history-panel { padding-top: 0; padding-bottom: 64px; min-height: 400px; }
.history-card { background: #151d2a; border: 1px solid #2a384e; border-radius: 14px; overflow: hidden; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; }
.history-heading h2 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.history-heading p { font-size: 12px; color: #8499b8; margin: 0; line-height: 1.7; }
.history-columns, .history-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .8fr); gap: 24px; }
.history-columns { background: #192333; border-block: 1px solid #2a384e; padding: 13px 28px; font-size: 11px; color: #7c92b1; }
.history-columns > :last-child { text-align: right; }
.history-list { min-height: 230px; color: #8b9fbd; font-size: 12px; }
.history-list:not(:has(.history-row)) { display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; padding: 36px 24px; text-align: center; }
.history-list:not(:has(.history-row))::before { content: ''; display: block; width: 31px; height: 37px; border: 1.5px solid #405571; border-radius: 6px; background: linear-gradient(#405571,#405571) 7px 11px / 15px 1px no-repeat, linear-gradient(#405571,#405571) 7px 18px / 15px 1px no-repeat, linear-gradient(#405571,#405571) 7px 25px / 10px 1px no-repeat; }
.history-row { align-items: center; padding: 22px 28px; border-bottom: 1px solid #27364b; }
.history-row:last-child { border-bottom: 0; }
.history-row > div { display: grid; align-content: center; gap: 8px; min-width: 0; }
.history-row > div:last-child { text-align: right; }
.history-row strong { font-size: 13px; font-weight: 500; color: #dae5f4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.history-row small { font-size: 11px; color: #7d93b2; line-height: 1.6; overflow-wrap: anywhere; }
.history-reference { font-family: ui-monospace, monospace; color: #a2b4ce !important; }
.history-more { display: flex; width: max-content; margin: 20px auto 24px; }
.history-negative { color: #d6b2b7 !important; }
.checkout-page .compact-footer { padding-top: 26px; padding-bottom: 26px; font-size: 10px; gap: 13px; color: #71849f; }
.checkout-page .record-links { margin-top: 0; }
[hidden] { display: none !important; }
.account-trigger:focus-visible, .account-menu-link:focus-visible, .balance-refresh:focus-visible, .quick-amounts button:focus-visible, .account-action:focus-visible, .checkout-tabs button:focus-visible { outline: 2px solid #7abaff; outline-offset: 4px; }
@media (max-width: 1000px) {
  .checkout-page .header-inner { gap: 28px; }
  .checkout-page .brand-caption, .checkout-page .brand-divider { display: none; }
  .balance-card { gap: 24px; padding: 26px; }
  .balance-sources { gap: 16px; padding-left: 24px; }
  .checkout-page .purchase-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; padding: 26px; }
  .exchange-rate { font-size: 10px; }
}
@media (max-width: 800px) {
  .checkout-page .shell { width: calc(100% - 40px); }
  .checkout-page .header-inner { height: 64px; gap: 20px; }
  .checkout-page .header-actions { gap: 20px; }
  .balance-card { align-items: flex-start; }
  .balance-primary { flex: 0 0 36%; min-width: 160px; }
  .balance-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .checkout-page .purchase-layout { grid-template-columns: minmax(0, 1fr) 258px; gap: 24px; padding: 24px; }
  .checkout-page .section-heading { flex-direction: column; gap: 16px; }
  .checkout-page .checkout-card { padding-left: 24px; }
  .quick-amounts { gap: 7px; }
}
@media (max-width: 680px) {
  .checkout-page .recharge-intro { padding-top: 30px; padding-bottom: 24px; }
  .checkout-page .recharge-intro h1 { font-size: 26px; }
  .checkout-page .recharge-intro p { max-width: 260px; font-size: 12px; }
  .intro-help { font-size: 11px; }
  .checkout-page .purchase-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 24px; }
  .checkout-page .section-heading { flex-direction: row; gap: 12px; }
  .checkout-page .checkout-card { border-left: 0; border-top: 1px solid #2a384e; padding: 24px 0 0; }
  .balance-card { display: block; padding: 20px; }
  .balance-primary > strong { font-size: 34px; }
  .balance-sources { margin-top: 18px; padding: 18px 0 0; border-left: 0; border-top: 1px solid #2c3a50; gap: 17px 24px; }
  .balance-source { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .balance-source > strong { font-size: 14px; }
  .checkout-tabs { gap: 26px; margin-bottom: 22px; }
  .checkout-tabs button { font-size: 12px; }
  .checkout-page .purchase-section, .history-panel { padding-bottom: 40px; }
  .history-heading { padding: 22px 20px; align-items: flex-start; gap: 14px; }
  .history-heading h2 { font-size: 17px; }
  .history-heading p { font-size: 11px; max-width: 200px; }
  .history-columns { display: none; }
  .history-row { grid-template-columns: minmax(0, 1fr) auto; padding: 20px; gap: 12px; }
  .history-row > .history-middle { grid-column: 1 / -1; grid-row: 2; }
  .history-row > div:last-child { max-width: 155px; }
  .history-list { border-top: 1px solid #29384e; }
}
@media (max-width: 480px) {
  .checkout-page .shell { width: calc(100% - 32px); }
  .checkout-page .header-actions { gap: 12px; }
  .checkout-page .header-actions > .back-link { display: none; }
  #checkoutUser { max-width: 110px; }
  .account-popover { width: min(280px, calc(100vw - 32px)); }
  .checkout-page .recharge-intro { gap: 12px; }
  .intro-help { gap: 5px; }
  .intro-help svg { display: none; }
  .checkout-page .recharge-form label span { font-size: 10px; }
  .checkout-page .section-heading h2 { font-size: 18px; }
  .exchange-rate { padding: 6px 8px; font-size: 10px; }
  .checkout-page .purchase-layout { padding: 20px; }
  .checkout-page .compact-footer .footer-meta { gap: 7px 12px; }
  .checkout-page .compact-footer .footer-meta > :nth-child(2) { flex-basis: 100%; }
  .checkout-page .compact-footer .footer-links { gap: 10px 16px; }
}
@media (max-width: 360px) {
  .checkout-page .header-inner { gap: 12px; }
  #checkoutUser { max-width: 90px; }
  .balance-source { display: grid; gap: 7px; }
  .exchange-rate { font-size: 9px; padding: 6px; }
  .checkout-page .section-heading { gap: 8px; }
  .checkout-page .section-heading h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .account-trigger > svg, .quick-amounts button { transition: none; } }
