/* Account modal and plan comparison, scoped away from private admin pages. */
#authOverlay {
  --checkout-ink: #172a46;
  --checkout-muted: #65748b;
  --checkout-line: #e1e7f0;
  --checkout-soft: #f5f8fc;
  --checkout-accent: #2458df;
  --checkout-good: #087f68;
  background: #0c172bb3;
}
html[data-theme="dark"] #authOverlay {
  --checkout-ink: #edf3fc;
  --checkout-muted: #a9bad1;
  --checkout-line: #2b3c55;
  --checkout-soft: #122136;
  --checkout-accent: #91b5ff;
  --checkout-good: #68d4b6;
  background: #020712d6;
}
#authOverlay .auth-dialog {
  width: min(1040px, 100%);
  height: min(790px, 100%);
  border: 1px solid var(--checkout-line);
  border-radius: 18px;
  box-shadow: 0 30px 100px #020c2733;
}
html[data-theme] .marketing-page #authOverlay .auth-modal-visual {
  padding: 32px;
  background: var(--checkout-soft) !important;
  border-right: 1px solid var(--checkout-line);
  color: var(--checkout-ink) !important;
}
#authOverlay .auth-modal-brand .brand-accounting-logo { width: 230px; }
#authOverlay .auth-modal-copy { margin-block: auto; }
#authOverlay .auth-modal-copy small { color: var(--checkout-accent) !important; font-size: 13px !important; font-weight: 700 !important; }
#authOverlay .auth-modal-copy h2 { margin-top: 18px; color: var(--checkout-ink) !important; font-size: 36px !important; font-weight: 700 !important; line-height: 1.16; letter-spacing: -.04em; }
#authOverlay .auth-modal-copy p { font-size: 13px !important; font-weight: 400; line-height: 1.85; color: var(--checkout-muted) !important; }
#authOverlay .auth-benefits { gap: 14px; margin-top: 28px; }
#authOverlay .auth-benefits > span { font-size: 13px; font-weight: 500; color: var(--checkout-muted) !important; }
#authOverlay .auth-benefits b { width: 18px; height: 18px; font-size: 13px; }
#authOverlay .auth-modal-foot { display: grid; gap: 6px; padding-top: 25px; color: var(--checkout-muted) !important; font-size: 13px !important; }
#authOverlay .auth-modal-foot a { color: var(--checkout-accent); font-size: 13px; }
#authOverlay .auth-modal-main { padding: 62px 36px 30px; scrollbar-width: thin; scrollbar-color: var(--checkout-line) transparent; scroll-padding-top: 64px; }
#authOverlay .auth-close { top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 9px; font-size: 22px; border-color: var(--checkout-line); color: var(--checkout-muted); }
#authOverlay .auth-close:hover { color: var(--checkout-ink); background: var(--checkout-soft); }
#authOverlay .auth-view h2 { color: var(--checkout-ink); font-size: 29px !important; font-weight: 700 !important; }
#authOverlay .auth-view > p { color: var(--checkout-muted); font-size: 13px; font-weight: 400; }
#authOverlay .auth-field label { font-size: 13px; font-weight: 600; }
#authOverlay .auth-field input { border-radius: 8px; background: var(--ui-surface); font-size: 14px !important; }
#authOverlay .auth-submit { border-radius: 8px; background: #2458df !important; box-shadow: none !important; font-size: 13px !important; font-weight: 700 !important; }
#authOverlay .auth-status { font-size: 13px; font-weight: 400; border-radius: 8px; line-height: 1.7; }
#authOverlay .checkout-story { display: none; }
#authOverlay .checkout-business-identity { margin: 0 0 22px; padding: 12px 14px; border-radius: 8px; background: var(--ui-surface-2); color: var(--checkout-muted); }
#authOverlay .checkout-business-identity p { margin: 0; font-size: 13px !important; line-height: 1.8; overflow-wrap: anywhere; }
#authOverlay .checkout-business-identity strong { color: var(--checkout-ink); font-weight: 700; }

/* A compact sidebar leaves room to compare the real plan allowances. */
#authOverlay[data-view="pricing"] .auth-dialog { width: min(1200px, 100%); grid-template-columns: 280px minmax(0, 1fr); }
#authOverlay[data-view="pricing"] .auth-modal-visual { padding: 32px 26px 26px; }
#authOverlay[data-view="pricing"] .auth-modal-brand .brand-accounting-logo { width: 225px; }
#authOverlay[data-view="pricing"] .auth-modal-copy { display: none; }
#authOverlay[data-view="pricing"] .checkout-story { display: block; margin-block: 46px auto; }
#authOverlay .checkout-story-kicker { display: block; color: var(--checkout-accent); font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
#authOverlay .checkout-story h2 { margin: 18px 0 0; color: var(--checkout-ink); font-size: 32px !important; font-weight: 700 !important; line-height: 1.14; letter-spacing: -.045em; }
#authOverlay .checkout-story > p { margin: 18px 0 0; color: var(--checkout-muted) !important; font-size: 13px; font-weight: 400; line-height: 1.9; }
#authOverlay .checkout-story-benefits { display: grid; gap: 23px; margin-top: 30px; }
#authOverlay .checkout-story-benefits > div { display: flex; align-items: flex-start; gap: 11px; }
#authOverlay .checkout-story-benefits > div > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--checkout-line); border-radius: 8px; background: var(--ui-surface); color: var(--checkout-accent); }
#authOverlay .checkout-story-benefits strong { display: block; padding-top: 2px; color: var(--checkout-ink); font-size: 13px; font-weight: 600 !important; }
#authOverlay .checkout-story-benefits small { display: block; margin-top: 5px; color: var(--checkout-muted) !important; font-size: 13px; font-weight: 400; line-height: 1.7; }
#authOverlay :is(.checkout-story, .checkout-heading-icon, .plan-pack-icon, .plan-device-row, .payment-note) svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#authOverlay .checkout-renewal-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--checkout-line); color: var(--checkout-muted); font-size: 13px; font-weight: 400; line-height: 1.8; }
#authOverlay .checkout-renewal-note svg { width: 17px; height: 17px; color: var(--checkout-good); }
#authOverlay[data-view="pricing"] .auth-modal-main { padding: 32px 34px 27px; }
#authOverlay .checkout-steps { display: flex; align-items: center; gap: 20px; margin: 0 42px 28px 0; padding: 0; list-style: none; color: var(--checkout-muted); }
#authOverlay .checkout-steps li { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
#authOverlay .checkout-steps li > span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--checkout-line); border-radius: 50%; color: var(--checkout-muted); background: var(--ui-surface); font-size: 13px; }
#authOverlay .checkout-steps li:first-child { color: var(--checkout-accent); }
#authOverlay .checkout-steps li:first-child > span { border-color: var(--checkout-accent); color: #fff; background: #2458df; }
#authOverlay .checkout-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#authOverlay .checkout-heading .auth-view-kicker { color: var(--checkout-accent) !important; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
#authOverlay .checkout-heading h2 { margin-top: 9px; font-size: 30px !important; line-height: 1.2; letter-spacing: -.04em; }
#authOverlay .checkout-heading-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid var(--checkout-line); border-radius: 11px; background: var(--checkout-soft); color: var(--checkout-good); }
#authOverlay .checkout-heading-icon svg { width: 23px; height: 23px; }
#authOverlay .checkout-intro { max-width: 540px; margin: 13px 0 25px; color: var(--checkout-muted); font-size: 13px; font-weight: 400; line-height: 1.8; }

/* Price, page quantity and PCs are all populated from the existing admin API. */
#authOverlay[data-view="pricing"] .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 12px; }
#authOverlay[data-view="pricing"] .plan-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: 20px 18px 15px; border: 1px solid var(--checkout-line); border-radius: 12px; background: var(--ui-surface) !important; box-shadow: none; }
#authOverlay[data-view="pricing"] .plan-card:hover { transform: translateY(-2px); border-color: var(--checkout-accent); box-shadow: 0 8px 22px #13294b0a; }
#authOverlay[data-view="pricing"] .plan-card.recommended { border-color: #92adf1; background: var(--checkout-soft) !important; }
#authOverlay[data-view="pricing"] .plan-card::before { display: none; content: none; }
#authOverlay .plan-card-title { display: flex; align-items: center; gap: 10px; min-height: 32px; }
#authOverlay .plan-pack-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid var(--checkout-line); border-radius: 8px; color: var(--checkout-accent); background: var(--checkout-soft); }
#authOverlay .plan-name { font-size: 15px; font-weight: 700 !important; line-height: 1.4; color: var(--checkout-ink); overflow-wrap: anywhere; }
#authOverlay .plan-allowance { margin-top: 18px; }
#authOverlay .plan-allowance strong { display: block; font-size: 32px; font-weight: 700 !important; letter-spacing: -.04em; color: var(--checkout-ink); line-height: 1.1; }
#authOverlay .plan-allowance small { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--checkout-muted) !important; }
#authOverlay .plan-device-row { display: flex; align-items: center; gap: 7px; margin-top: 14px; padding-bottom: 16px; font-size: 13px; color: var(--checkout-muted); }
#authOverlay .plan-device-row svg { width: 16px; height: 16px; color: var(--checkout-accent); }
#authOverlay .plan-side { display: grid; grid-template-rows: auto auto minmax(12px, 1fr) auto; align-items: start; flex: 1; gap: 0; margin-top: 0; padding-top: 14px; border-top: 1px solid var(--checkout-line); }
#authOverlay .plan-price { display: block; grid-row: 1; color: var(--checkout-ink); font-size: 25px; font-weight: 700; letter-spacing: -.04em; line-height: 1.25; }
#authOverlay .plan-price-caption { grid-row: 2; margin-top: 4px; color: var(--checkout-muted) !important; font-size: 13px; font-weight: 400; }
#authOverlay[data-view="pricing"] .plan-tax-note { grid-row: 3; max-width: none; margin-top: 7px; color: var(--checkout-muted) !important; font-size: 13px; font-weight: 400; line-height: 1.7; }
#authOverlay[data-view="pricing"] .plan-buy { grid-row: 4; width: 100%; min-width: 0; min-height: 39px; height: auto; margin-top: 9px; padding: 9px 7px; border: 1px solid #2458df; border-radius: 7px; color: #fff !important; background: #2458df !important; box-shadow: none !important; font-size: 13px !important; font-weight: 700 !important; }
#authOverlay[data-view="pricing"] .plan-buy:hover { background: #1847be !important; }
#authOverlay[data-view="pricing"] .plan-buy:disabled { color: var(--checkout-muted) !important; background: var(--checkout-soft) !important; border-color: var(--checkout-line); opacity: 1; cursor: not-allowed; }
#authOverlay .plan-availability { display: block; margin-top: 8px; font-size: 13px; font-weight: 400; color: var(--checkout-muted) !important; text-align: center; line-height: 1.6; }
#authOverlay .plan-availability:empty { display: none; }
#authOverlay[data-view="pricing"] .plan-card.coupon-applied { border-color: var(--checkout-good) !important; box-shadow: 0 0 0 1px var(--checkout-good); }
#authOverlay [aria-busy="true"] .plan-card { opacity: .6; }

#authOverlay[data-view="pricing"] .checkout-coupon { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--checkout-line); border-radius: 12px; background: var(--checkout-soft); }
#authOverlay[data-view="pricing"] .checkout-coupon > label { display: flex; gap: 11px; align-items: center; color: var(--checkout-ink); font-size: 13px; font-weight: 600; }
#authOverlay .coupon-label-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--checkout-line); border-radius: 8px; background: var(--ui-surface); }
#authOverlay .checkout-coupon label small { display: block; margin-top: 4px; color: var(--checkout-muted) !important; font-size: 13px; font-weight: 400; }
#authOverlay .coupon-optional { margin-left: auto; color: var(--checkout-muted); font-size: 13px; font-weight: 400; }
#authOverlay[data-view="pricing"] .checkout-coupon-fields { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) auto; gap: 9px; margin-top: 15px; }
#authOverlay[data-view="pricing"] .checkout-coupon-fields :is(input, select) { height: 41px; padding-inline: 12px; border-color: var(--checkout-line); border-radius: 7px; font-size: 13px; background: var(--ui-surface); color: var(--checkout-ink); }
#authOverlay[data-view="pricing"] .checkout-coupon-fields button { min-height: 41px; border: 1px solid #2458df; border-radius: 7px; background: #2458df; color: #fff; font-size: 13px; font-weight: 600; }
#authOverlay[data-view="pricing"] .checkout-coupon > small { margin-top: 10px; color: var(--checkout-muted); font-size: 13px; font-weight: 400; }
#authOverlay[data-view="pricing"] #checkoutCouponRemove { color: var(--checkout-accent); background: transparent; border-color: var(--checkout-line); min-height: 29px; }
#authOverlay .checkout-coupon-breakdown { border-color: var(--checkout-line); font-size: 13px; }
#authOverlay .checkout-coupon-breakdown > div { gap: 15px; }
#authOverlay .checkout-coupon-total strong { font-size: 17px; }
#authOverlay[data-view="pricing"] .payment-status { margin-top: 16px; padding: 11px 13px; font-size: 13px; }
#authOverlay[data-view="pricing"] .payment-note { display: flex; align-items: center; gap: 9px; margin-top: 17px; padding: 0; border: 0; background: none; color: var(--checkout-muted) !important; font-size: 13px; font-weight: 400; line-height: 1.8; }
#authOverlay .payment-note svg { color: var(--checkout-good); width: 16px; height: 16px; }
#authOverlay .checkout-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--checkout-line); color: var(--checkout-muted); font-size: 13px; }
#authOverlay .checkout-bottom button { display: inline-flex; align-items: center; gap: 10px; font-size: 13px !important; font-weight: 600 !important; color: var(--checkout-accent); }
#authOverlay .paid-plan { margin: 0 0 19px; padding: 14px 16px; border-radius: 9px; }
#authOverlay .paid-plan > strong { font-size: 13px; }
#authOverlay .paid-plan > span { font-size: 13px; }
#authOverlay .paid-download { margin-top: 10px; font-size: 13px; }
#authOverlay .pending-coupon-payments { border-color: var(--checkout-line); border-radius: 9px; }
#authOverlay .pending-coupon-payments > strong { font-size: 13px; }
#authOverlay #pendingCouponList > div { display: flex; align-items: center; gap: 15px; justify-content: space-between; padding-block: 10px; border-top: 1px solid var(--checkout-line); color: var(--checkout-muted); font-size: 13px; }
#authOverlay #pendingCouponList button { min-height: 36px; padding: 8px 12px; border: 1px solid var(--checkout-line); border-radius: 6px; background: var(--ui-surface); color: var(--checkout-accent); font-size: 13px; }

@media (max-width: 1100px) {
  #authOverlay[data-view="pricing"] .auth-dialog { grid-template-columns: 240px minmax(0, 1fr); }
  #authOverlay[data-view="pricing"] .auth-modal-visual { padding-inline: 23px; }
  #authOverlay[data-view="pricing"] .auth-modal-brand .brand-accounting-logo { width: 194px; }
  #authOverlay[data-view="pricing"] .auth-modal-main { padding-inline: 26px; }
  #authOverlay .checkout-story h2 { font-size: 28px !important; }
  #authOverlay .checkout-story-benefits { gap: 20px; }
  #authOverlay[data-view="pricing"] .plan-card { padding-inline: 14px; }
  #authOverlay .plan-card-title { gap: 8px; }
  #authOverlay .plan-pack-icon { width: 28px; height: 28px; flex-basis: 28px; }
  #authOverlay .plan-name { font-size: 14px; }
}
@media (max-width: 980px) {
  #authOverlay[data-view="pricing"] .auth-dialog { width: min(920px, 100%); grid-template-columns: minmax(0, 1fr); }
  #authOverlay[data-view="pricing"] .auth-modal-visual { display: none; }
  #authOverlay[data-view="pricing"] .auth-modal-main { padding: 31px 28px 27px; }
}
@media (max-width: 900px), (max-height: 600px) {
  #authOverlay .auth-dialog { width: min(640px, 100%); grid-template-columns: minmax(0, 1fr); }
  #authOverlay .auth-modal-visual { display: none; }
  #authOverlay .auth-modal-main { padding: 63px 28px 28px; }
  #authOverlay[data-view="pricing"] .auth-dialog { width: min(920px, 100%); grid-template-columns: minmax(0, 1fr); }
  #authOverlay .auth-field input:not(.otp-input), #authOverlay .checkout-coupon-fields :is(input, select) { font-size: 16px !important; }
}
@media (max-width: 700px) {
  #authOverlay { --auth-gap: 10px; }
  #authOverlay .auth-dialog { border-radius: 13px; }
  #authOverlay[data-view="pricing"] .auth-modal-main { padding: 28px 20px 23px; }
  #authOverlay .auth-close { width: 33px; height: 33px; top: 12px; right: 12px; font-size: 21px; }
  #authOverlay .checkout-steps { gap: 14px; margin: 0 32px 26px 0; }
  #authOverlay .checkout-steps li { gap: 5px; font-size: 13px; }
  #authOverlay .checkout-steps li > span { width: 17px; height: 17px; font-size: 13px; }
  #authOverlay .checkout-heading h2 { font-size: 26px !important; }
  #authOverlay .checkout-heading-icon { display: none; }
  #authOverlay .checkout-heading .auth-view-kicker { font-size: 13px; }
  #authOverlay .checkout-intro { margin-block: 12px 20px; font-size: 13px; }
  #authOverlay[data-view="pricing"] .pricing-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  #authOverlay[data-view="pricing"] .plan-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "title price" "allowance price" "devices price" "availability availability"; gap: 0 15px; padding: 18px; border-radius: 10px; }
  #authOverlay .plan-card-title { grid-area: title; gap: 8px; min-height: 26px; }
  #authOverlay .plan-pack-icon { width: 26px; height: 26px; flex-basis: 26px; border-radius: 6px; }
  #authOverlay .plan-pack-icon svg { width: 16px; height: 16px; }
  #authOverlay .plan-name { font-size: 14px; }
  #authOverlay .plan-allowance { grid-area: allowance; margin-top: 18px; }
  #authOverlay .plan-allowance strong { font-size: 28px; }
  #authOverlay .plan-allowance small { font-size: 13px; margin-top: 4px; }
  #authOverlay .plan-device-row { grid-area: devices; margin-top: 12px; padding-bottom: 0; gap: 6px; font-size: 13px; }
  #authOverlay .plan-side { grid-area: price; display: flex; flex-direction: column; align-items: stretch; align-self: center; width: 100%; margin-top: 0; padding-top: 0; border: 0; text-align: right; }
  #authOverlay .plan-price { font-size: 24px; }
  #authOverlay .plan-price-caption { font-size: 13px; }
  #authOverlay[data-view="pricing"] .plan-tax-note { font-size: 13px; }
  #authOverlay[data-view="pricing"] .plan-buy { margin-top: 13px; min-height: 37px; font-size: 13px !important; }
  #authOverlay .plan-availability { grid-area: availability; margin-top: 12px; text-align: left; }
  #authOverlay[data-view="pricing"] .checkout-coupon { padding: 17px; }
  #authOverlay[data-view="pricing"] .checkout-coupon > label { gap: 9px; font-size: 13px; line-height: 1.6; }
  #authOverlay .coupon-optional { display: none; }
  #authOverlay .checkout-coupon label small { font-size: 13px; }
  #authOverlay .coupon-label-icon { width: 28px; height: 28px; flex-basis: 28px; }
  #authOverlay[data-view="pricing"] .checkout-coupon-fields { grid-template-columns: minmax(0, 1fr) auto; }
  #authOverlay[data-view="pricing"] #checkoutCouponCode { grid-column: 1 / -1; }
  #authOverlay[data-view="pricing"] .checkout-coupon-fields button { padding-inline: 20px; }
  #authOverlay .checkout-bottom { gap: 10px; font-size: 13px; }
  #authOverlay .checkout-bottom button { font-size: 13px !important; }
  #authOverlay .payment-note { align-items: flex-start; }
  #authOverlay #pendingCouponList > div { align-items: flex-start; flex-direction: column; gap: 10px; }
}
@media (max-width: 370px) {
  #authOverlay[data-view="pricing"] .auth-modal-main { padding-inline: 15px; }
  #authOverlay .checkout-steps { gap: 8px; margin-right: 28px; }
  #authOverlay .checkout-steps li { gap: 4px; font-size: 13px; }
  #authOverlay .checkout-steps li > span { width: 15px; height: 15px; font-size: 13px; }
  #authOverlay .checkout-heading h2 { font-size: 24px !important; }
  #authOverlay[data-view="pricing"] .plan-card { padding: 16px 13px; gap: 0 10px; }
  #authOverlay .plan-card-title { gap: 6px; }
  #authOverlay .plan-name { font-size: 13px; }
  #authOverlay .plan-allowance strong { font-size: 26px; }
  #authOverlay .plan-price { font-size: 22px; }
  #authOverlay[data-view="pricing"] .checkout-coupon { padding: 15px 12px; }
  #authOverlay .checkout-bottom { display: grid; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  #authOverlay *, #authOverlay { transition: none !important; animation: none !important; }
}

/* Plan selection and payment review are separate stages. The plans have no
   inner scroller; unusually short screens can scroll the outer page safely. */
#authOverlay:is([data-view="pricing"], [data-view="checkout"]) {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#authOverlay:is([data-view="pricing"], [data-view="checkout"]) .auth-dialog {
  display: block;
  flex: 0 0 auto;
  width: min(1080px, 100%);
  height: auto;
  max-height: none;
  margin: auto;
}
#authOverlay[data-view="checkout"] .auth-dialog { width: min(860px, 100%); }
#authOverlay:is([data-view="pricing"], [data-view="checkout"]) .auth-modal-visual { display: none; }
#authOverlay:is([data-view="pricing"], [data-view="checkout"]) .auth-modal-main {
  height: auto;
  overflow: visible;
  padding: 24px;
  scrollbar-gutter: auto;
}
#authOverlay [hidden] { display: none !important; }
#authOverlay .purchase-stage .checkout-topline { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-right: 44px; margin-bottom: 16px; }
#authOverlay .purchase-stage .checkout-topline .brand-accounting-logo { width: 180px; }
#authOverlay .purchase-stage .checkout-steps { margin: 0; gap: 14px; }
#authOverlay .purchase-stage .checkout-steps li { color: var(--checkout-muted); }
#authOverlay .purchase-stage .checkout-steps li > span { color: var(--checkout-muted); background: var(--ui-surface); border-color: var(--checkout-line); }
#authOverlay .purchase-stage .checkout-steps li[aria-current="step"] { color: var(--checkout-accent); }
#authOverlay .purchase-stage .checkout-steps li[aria-current="step"] > span { color: #fff; background: #2458df; border-color: #2458df; }
#authOverlay .purchase-stage .checkout-heading h2 { margin: 0; font-size: 28px !important; line-height: 1.25; }
#authOverlay .purchase-stage .checkout-intro { max-width: none; margin: 8px 0 18px; line-height: 1.6 !important; }
#authOverlay .purchase-stage .checkout-business-identity { margin-bottom: 16px; padding: 10px 12px; }
#authOverlay .purchase-stage .pricing-owner { margin: 16px 0 0; color: var(--checkout-muted); font-size: 13px; text-align: center; }

#authOverlay .purchase-stage[data-auth-view="pricing"] .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-card { display: flex; padding: 18px; min-height: 0; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-card-title { min-height: 28px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-card::before { display: none; content: none; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-name { font-size: 17px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-allowance { margin-top: 12px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-allowance strong { font-size: 28px; line-height: 1.2; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-allowance small { margin-top: 2px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-device-row { margin-top: 8px; padding-bottom: 12px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-side { display: grid; grid-template-rows: auto auto 1fr auto; gap: 0; margin-top: 0; padding-top: 12px; border-top: 1px solid var(--checkout-line); text-align: left; justify-items: stretch; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-price { font-size: 25px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-price-caption { margin-top: 2px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-tax-note { margin-top: 4px; line-height: 1.5; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-buy { min-height: 42px; margin-top: 12px; }
#authOverlay .purchase-stage[data-auth-view="pricing"] .plan-availability { margin-top: 6px; }

#authOverlay #checkoutReview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#authOverlay .checkout-selected-plan { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--checkout-line); border-radius: 10px; background: var(--checkout-soft); }
#authOverlay .checkout-selected-plan strong { display: block; color: var(--checkout-ink); font-size: 17px; }
#authOverlay .checkout-selected-plan span { display: block; color: var(--checkout-muted); font-size: 14px; margin-top: 3px; }
#authOverlay .purchase-stage .checkout-coupon { padding: 16px; margin: 0; border: 1px solid var(--checkout-line); border-radius: 10px; background: var(--checkout-soft); }
#authOverlay .purchase-stage .checkout-coupon > label { display: flex; gap: 10px; align-items: flex-start; color: var(--checkout-ink); font-size: 14px; line-height: 1.5; }
#authOverlay .purchase-stage .checkout-coupon label small { display: block; margin-top: 4px; color: var(--checkout-muted); font-size: 13px; font-weight: 400; }
#authOverlay .purchase-stage .coupon-svg { width: 20px; height: 20px; fill: none; stroke: var(--checkout-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#authOverlay .purchase-stage .checkout-coupon .coupon-optional { display: none; }
#authOverlay .purchase-stage .checkout-coupon-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; }
#authOverlay .purchase-stage .checkout-coupon-fields :is(input:not([type="hidden"]), button) { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--checkout-line); border-radius: 7px; }
#authOverlay .purchase-stage .checkout-coupon-fields input { color: var(--checkout-ink); background: var(--ui-surface); }
#authOverlay .purchase-stage .checkout-coupon-fields button { color: #fff; background: #2458df; font-size: 14px; font-weight: 700; cursor: pointer; }
#authOverlay .purchase-stage #checkoutCouponRemove { color: var(--checkout-accent); border-color: var(--checkout-line); background: transparent; }
#authOverlay .purchase-stage .checkout-coupon > small { display: block; margin-top: 10px; color: var(--checkout-muted); font-size: 13px; line-height: 1.6; }
#authOverlay .checkout-review-totals { align-self: start; margin: 0; padding: 16px; border: 1px solid var(--checkout-line); border-radius: 10px; }
#authOverlay .checkout-review-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 10px; font-size: 14px; }
#authOverlay .checkout-review-totals > div:first-child { margin-top: 0; }
#authOverlay .checkout-review-totals dt { color: var(--checkout-muted); }
#authOverlay .checkout-review-totals dd { margin: 0; color: var(--checkout-ink); font-weight: 700; text-align: right; overflow-wrap: anywhere; }
#authOverlay .checkout-review-total { padding-top: 12px; border-top: 1px solid var(--checkout-line); }
#authOverlay .checkout-review-total dd { font-size: 22px; }
#authOverlay .checkout-payment-action, #authOverlay #checkoutReview > :is(.paid-plan, .pending-coupon-payments) { grid-column: 1 / -1; }
#authOverlay .checkout-payment-action .auth-submit { margin-top: 0; min-height: 46px; height: auto; padding: 12px; }
#authOverlay .checkout-gateway-note { margin: 8px 0 0; color: var(--checkout-muted); font-size: 13px; text-align: center; line-height: 1.6; }
#authOverlay[data-view="checkout"] .payment-note { margin-top: 14px; padding: 0; border: 0; background: none; }
#authOverlay[data-view="checkout"] .checkout-bottom { margin-top: 14px; padding-top: 12px; }

@media (max-width: 700px) {
  #authOverlay:is([data-view="pricing"], [data-view="checkout"]) { --auth-gap: 10px; }
  #authOverlay:is([data-view="pricing"], [data-view="checkout"]) .auth-modal-main { padding: 18px 16px; }
  #authOverlay .purchase-stage .checkout-topline { gap: 12px; padding-right: 34px; margin-bottom: 14px; }
  #authOverlay .purchase-stage .checkout-topline .brand-accounting-logo { width: 150px; }
  #authOverlay .purchase-stage .checkout-heading h2 { font-size: 25px !important; }
  #authOverlay .purchase-stage .checkout-intro { font-size: 14px !important; margin-bottom: 14px; }
  #authOverlay .purchase-stage .checkout-steps { gap: 10px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .pricing-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .checkout-intro { display: none; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .checkout-heading { margin-bottom: 14px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title price" "allowance price" "devices price" "availability availability"; gap: 3px 10px; padding: 12px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-card-title { min-height: 24px; gap: 7px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-name { font-size: 16px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-pack-icon { width: 24px; height: 24px; flex-basis: 24px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-allowance { margin-top: 0; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-allowance strong { display: inline; font-size: 20px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-allowance small { display: inline; margin: 0 0 0 5px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-device-row { margin-top: 0; padding-bottom: 0; font-size: 13px; gap: 5px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-side { display: flex; flex-direction: column; align-items: stretch; align-self: center; padding: 0; border: 0; text-align: right; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-price { font-size: 21px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-price-caption { display: none; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-buy { min-height: 40px; margin-top: 6px; padding-inline: 8px; }
  #authOverlay .purchase-stage[data-auth-view="pricing"] .plan-tax-note { max-width: 130px; }
  #authOverlay .purchase-stage .pricing-owner { margin-top: 12px; }
  #authOverlay #checkoutReview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #authOverlay .checkout-selected-plan { flex-wrap: wrap; gap: 8px; }
}
