
/* S09D v1.0.2 — shared Account billing presentation. Local styles only.
   Keep this exact block bundled in era-to-excel/styles.css; no extra request. */
#authModal .auth-card.lb-billing-account-card {
  width: min(780px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b6aecf transparent;
}
#lbBillingCenter {
  --lb-billing-style-version: S09D-v1.0.2;
  --lb-billing-surface: #ffffff;
  --lb-billing-soft: #f7f8fc;
  --lb-billing-line: #e3e6f0;
  --lb-billing-ink: #10162f;
  --lb-billing-muted: #68708a;
  --lb-billing-accent: #7045d5;
  --lb-billing-accent-soft: #f2edff;
  --lb-billing-green: #166a4d;
  --lb-billing-green-soft: #e9f8f1;
  --lb-billing-green-line: #b8e2d0;
  --lb-billing-danger: #a23757;
  --lb-billing-danger-soft: #fff4f7;
  --lb-billing-danger-line: #eac8d3;
  --lb-billing-shadow: 0 8px 26px rgba(47, 37, 109, .055);
  position: relative;
  isolation: isolate;
  margin: 20px 0;
  border: 1px solid var(--lb-billing-line);
  border-radius: 20px;
  background: var(--lb-billing-surface);
  color: var(--lb-billing-ink);
  box-shadow: var(--lb-billing-shadow), 0 0 22px rgba(131,89,239,.045);
  overflow: hidden;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
/* Honor hidden even when flex/grid styles apply to a control. */
#lbBillingCenter[hidden],
#lbBillingCenter [hidden] { display: none !important; }
#lbBillingCenter::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(110deg, #23b9e8, #8359ef 48%, #f448a4 85%, #23b9e8);
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .5;
  animation: lbBillingEdge 14s linear infinite;
  pointer-events: none;
}
@keyframes lbBillingEdge { to { background-position: 220% 0; } }
#lbBillingCenter .lb-billing-toggle {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 94px;
  margin: 0;
  border: 0;
  border-radius: 19px;
  padding: 20px;
  background: linear-gradient(110deg, rgba(35,185,232,.035), rgba(131,89,239,.06) 60%, rgba(244,72,164,.035));
  color: var(--lb-billing-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color .2s ease;
}
#lbBillingCenter.expanded .lb-billing-toggle { border-radius: 19px 19px 0 0; }
#lbBillingCenter .lb-billing-toggle:hover { background-color: rgba(131,89,239,.045); }
#lbBillingCenter .lb-billing-toggle-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(131,89,239,.2);
  border-radius: 13px;
  background: var(--lb-billing-surface);
  color: var(--lb-billing-accent);
  box-shadow: 0 4px 15px rgba(131,89,239,.06);
}
#lbBillingCenter .lb-billing-toggle-icon svg { width: 24px; height: 24px; }
#lbBillingCenter .lb-billing-toggle-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
#lbBillingCenter .lb-billing-toggle-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.025em;
  font-weight: 800;
}
#lbBillingCenter .lb-billing-toggle-copy small {
  display: block;
  color: var(--lb-billing-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#lbBillingCenter .lb-billing-toggle-side { display: flex; align-items: center; gap: 17px; flex: 0 0 auto; }
#lbBillingCenter .lb-billing-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--lb-billing-green-line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--lb-billing-green-soft);
  color: var(--lb-billing-green);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
  white-space: nowrap;
}
#lbBillingCenter .lb-billing-status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
#lbBillingCenter .lb-billing-status-pill.syncing { background: #fff7e6; border-color: #e6d3a0; color: #886015; }
#lbBillingCenter .lb-billing-status-pill.cancelled { background: var(--lb-billing-danger-soft); border-color: var(--lb-billing-danger-line); color: var(--lb-billing-danger); }
#lbBillingCenter .lb-billing-chevron {
  width: 9px; height: 9px; margin: -4px 3px 0 0;
  border-right: 2px solid var(--lb-billing-muted); border-bottom: 2px solid var(--lb-billing-muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
#lbBillingCenter .lb-billing-toggle[aria-expanded="true"] .lb-billing-chevron { transform: rotate(225deg); margin-top: 4px; }
#lbBillingCenter .lb-billing-body { border-top: 1px solid var(--lb-billing-line); padding: 22px; }
#lbBillingCenter .lb-billing-overview-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#lbBillingCenter .lb-billing-overview-head > span:first-child { font-size: 12px; font-weight: 800; color: var(--lb-billing-muted); }
#lbBillingCenter .lb-billing-test-label { color: var(--lb-billing-muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
#lbBillingCenter .lb-billing-summary { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; margin: 0 0 24px; }
#lbBillingCenter .lb-billing-summary > div {
  min-width: 0; border: 1px solid var(--lb-billing-line); border-radius: 12px;
  padding: 13px 12px; background: var(--lb-billing-soft);
}
#lbBillingCenter .lb-billing-summary span { display: block; margin-bottom: 6px; font-size: 10px; letter-spacing: .065em; font-weight: 750; text-transform: uppercase; color: var(--lb-billing-muted); }
#lbBillingCenter .lb-billing-summary strong { display: block; font-size: 14px; font-weight: 750; line-height: 1.5; overflow-wrap: anywhere; }
#lbBillingCenter .lb-billing-summary > div:first-child strong { color: var(--lb-billing-accent); }
#lbBillingCenter .lb-billing-pending {
  margin: -7px 0 22px; border: 1px solid rgba(131,89,239,.25); border-radius: 12px;
  padding: 14px 16px; background: var(--lb-billing-accent-soft); color: var(--lb-billing-muted);
  font-size: 13px; line-height: 1.6; overflow-wrap: anywhere;
}
#lbBillingCenter .lb-billing-pending strong { color: var(--lb-billing-accent); }
#lbBillingCenter .lb-billing-section-label { display: grid; gap: 3px; margin-bottom: 14px; }
#lbBillingCenter .lb-billing-section-label strong { font-size: 15px; font-weight: 800; }
#lbBillingCenter .lb-billing-section-label small { font-size: 12px; color: var(--lb-billing-muted); line-height: 1.6; }
#lbBillingCenter .lb-billing-plans { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 12px; }
#lbBillingCenter .lb-billing-plan {
  display: flex; flex-direction: column; align-items: stretch; min-width: 0; gap: 16px;
  position: relative; border: 1px solid var(--lb-billing-line); border-radius: 15px; padding: 16px 14px;
  background: var(--lb-billing-surface); box-shadow: 0 4px 14px rgba(35,42,83,.025);
  transition: border-color .2s ease, box-shadow .2s ease;
}
#lbBillingCenter .lb-billing-plan:not(.current):hover { border-color: rgba(131,89,239,.4); box-shadow: 0 8px 24px rgba(131,89,239,.08); }
#lbBillingCenter .lb-billing-plan.current {
  border-color: rgba(131,89,239,.38);
  background: linear-gradient(150deg, var(--lb-billing-surface), var(--lb-billing-accent-soft));
  box-shadow: 0 0 0 1px rgba(131,89,239,.07), 0 6px 24px rgba(131,89,239,.065);
}
#lbBillingCenter .lb-billing-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; min-height: 28px; }
#lbBillingCenter .lb-billing-plan-icon { display: flex; align-items: center; color: var(--lb-billing-accent); }
#lbBillingCenter .lb-billing-plan-icon svg { width: 25px; height: 25px; }
#lbBillingCenter .lb-billing-plan[data-plan="operations"] .lb-billing-plan-icon { color: #1184ae; }
#lbBillingCenter .lb-billing-plan-badge {
  display: inline-flex; justify-content: center; align-items: center; padding: 4px 7px;
  border: 1px solid rgba(131,89,239,.22); border-radius: 999px;
  background: var(--lb-billing-accent-soft); color: var(--lb-billing-accent); font-size: 10px; line-height: 1.3; font-weight: 800;
}
#lbBillingCenter .lb-billing-plan-copy { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
#lbBillingCenter .lb-billing-plan-name { display: block; font-size: 16px; font-weight: 800; line-height: 1.35; letter-spacing: -.025em; }
#lbBillingCenter .lb-billing-plan-price { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 4px; row-gap: 0; }
#lbBillingCenter .lb-billing-plan-price > span { font-size: 26px; font-weight: 800; letter-spacing: -.055em; line-height: 1.2; }
#lbBillingCenter .lb-billing-plan-price > small { color: var(--lb-billing-muted); font-size: 11px; white-space: nowrap; }
#lbBillingCenter .lb-billing-plan-detail { margin: 0; font-size: 12px; line-height: 1.6; color: var(--lb-billing-muted); min-height: 39px; }
#lbBillingCenter .lb-billing-plan-action,
#lbBillingCenter .lb-billing-secondary {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; margin: 0; padding: 10px 12px;
  border: 1px solid var(--lb-billing-line); border-radius: 10px;
  background: var(--lb-billing-surface); color: var(--lb-billing-ink);
  font-family: inherit; font-size: 12px; font-weight: 800; line-height: 1.4;
  text-align: center; text-decoration: none; white-space: normal;
  cursor: pointer; transition: box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
#lbBillingCenter .lb-billing-plan-action {
  width: 100%; border: 1px solid transparent; color: #fff;
  background: linear-gradient(#181e3d,#181e3d) padding-box, linear-gradient(115deg,#23b9e8,#8359ef,#f448a4) border-box;
  box-shadow: 0 4px 12px rgba(46,30,102,.10);
}
#lbBillingCenter .lb-billing-plan-action:hover:not(:disabled) { box-shadow: 0 0 0 2px rgba(131,89,239,.1), 0 6px 18px rgba(131,89,239,.16); }
#lbBillingCenter .lb-billing-secondary:hover:not(:disabled) { border-color: var(--lb-billing-accent); box-shadow: 0 3px 12px rgba(131,89,239,.10); }
#lbBillingCenter button:focus-visible { outline: 2px solid var(--lb-billing-accent); outline-offset: 3px; }
#lbBillingCenter .lb-billing-toggle:focus-visible { outline-offset: -4px; }
#lbBillingCenter .lb-billing-plan-action:disabled,
#lbBillingCenter .lb-billing-secondary:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
#lbBillingCenter .lb-billing-plan.current .lb-billing-plan-action:disabled,
#lbBillingCenter .lb-billing-plan.scheduled .lb-billing-plan-action:disabled {
  opacity: 1; border-color: rgba(131,89,239,.18); background: var(--lb-billing-accent-soft); color: var(--lb-billing-accent); box-shadow: none;
}
#lbBillingCenter .lb-billing-plan.current .lb-billing-plan-action:disabled::before { content: "✓"; font-size: 13px; }
#lbBillingCenter .lb-billing-renewal {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 22px; padding: 16px; border: 1px solid var(--lb-billing-line); border-radius: 13px;
  background: var(--lb-billing-soft);
}
#lbBillingCenter .lb-billing-renewal-copy { display: grid; gap: 4px; min-width: 0; }
#lbBillingCenter .lb-billing-renewal-copy strong { font-size: 14px; font-weight: 750; }
#lbBillingCenter .lb-billing-renewal-copy span { color: var(--lb-billing-muted); font-size: 12px; line-height: 1.6; }
#lbBillingCenter .lb-billing-renewal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; flex: 0 0 auto; max-width: 50%; }
#lbBillingCenter .lb-billing-secondary.danger { background: var(--lb-billing-danger-soft); color: var(--lb-billing-danger); border-color: var(--lb-billing-danger-line); }
#lbBillingCenter .lb-billing-secondary.keep { background: var(--lb-billing-green-soft); color: var(--lb-billing-green); border-color: var(--lb-billing-green-line); box-shadow: 0 0 12px rgba(35,185,232,.05); }
#lbBillingCenter .lb-billing-secondary.clear { background: var(--lb-billing-accent-soft); color: var(--lb-billing-accent); border-color: rgba(131,89,239,.3); }
#lbBillingCenter .lb-billing-confirm { margin-top: 16px; border: 1px solid rgba(131,89,239,.33); border-radius: 13px; padding: 18px; background: var(--lb-billing-accent-soft); }
#lbBillingCenter .lb-billing-confirm-kicker { display: block; color: var(--lb-billing-accent); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; margin-bottom: 7px; }
#lbBillingCenter .lb-billing-confirm > strong { display: block; font-size: 16px; font-weight: 800; }
#lbBillingCenter .lb-billing-confirm > p { margin: 8px 0 16px; color: var(--lb-billing-muted); font-size: 13px; line-height: 1.65; }
#lbBillingCenter .lb-billing-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#lbBillingCenter .lb-billing-confirm-actions button { width: 100%; }
#lbBillingCenter .lb-billing-message { margin: 15px 0 0; color: var(--lb-billing-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#lbBillingCenter .lb-billing-message:empty { display: none; }
#lbBillingCenter .lb-billing-message.error { color: var(--lb-billing-danger); }
#lbBillingCenter .lb-billing-message.success { color: var(--lb-billing-green); }
#lbBillingCenter .lb-billing-footnote { display: flex; align-items: flex-start; gap: 8px; margin: 17px 2px 0; color: var(--lb-billing-muted); font-size: 11px; line-height: 1.7; }
#lbBillingCenter .lb-billing-footnote svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; opacity: .8; }
body.dark-mode #lbBillingCenter {
  --lb-billing-surface: #101735;
  --lb-billing-soft: #0d1430;
  --lb-billing-line: #303b67;
  --lb-billing-ink: #edf3ff;
  --lb-billing-muted: #a9b2ca;
  --lb-billing-accent: #c1acff;
  --lb-billing-accent-soft: #221b45;
  --lb-billing-green: #9ee4c6;
  --lb-billing-green-soft: #123126;
  --lb-billing-green-line: #255842;
  --lb-billing-danger: #ffc1d2;
  --lb-billing-danger-soft: #321b2e;
  --lb-billing-danger-line: #68405b;
  --lb-billing-shadow: 0 8px 30px rgba(0,0,0,.13);
}
body.dark-mode #lbBillingCenter::before { opacity: .64; }
body.dark-mode #lbBillingCenter .lb-billing-status-pill.syncing { background: #342713; border-color: #6b5426; color: #f0ce87; }
body.dark-mode #lbBillingCenter .lb-billing-plan[data-plan="operations"] .lb-billing-plan-icon { color: #62d4ed; }
body.dark-mode #lbBillingCenter .lb-billing-plan-action:not(:disabled) { background: linear-gradient(#231d46,#231d46) padding-box, linear-gradient(115deg,#23b9e8,#8359ef,#f448a4) border-box; }
/* Respect the later shared shell's appearance signals without introducing
   another settings store or editing its controls here. */
html[data-effects="subtle"] #lbBillingCenter::before,
html[data-visuals="subtle"] #lbBillingCenter::before,
body[data-effects="subtle"] #lbBillingCenter::before,
body[data-visuals="subtle"] #lbBillingCenter::before { animation: none; opacity: .3; }
@media (max-width: 720px) {
  #authModal .auth-card.lb-billing-account-card { width: calc(100vw - 32px); }
  #lbBillingCenter .lb-billing-plans { grid-template-columns: 1fr; gap: 10px; }
  #lbBillingCenter .lb-billing-plan { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 16px; padding: 18px; }
  #lbBillingCenter .lb-billing-plan-top { grid-column: 1 / -1; justify-content: flex-start; gap: 12px; min-height: 22px; }
  #lbBillingCenter .lb-billing-plan-icon svg { width: 21px; height: 21px; }
  #lbBillingCenter .lb-billing-plan-copy { gap: 7px; }
  #lbBillingCenter .lb-billing-plan-name { font-size: 17px; }
  #lbBillingCenter .lb-billing-plan-detail { min-height: 0; }
  #lbBillingCenter .lb-billing-plan-action { width: auto; min-width: 140px; align-self: center; }
  #lbBillingCenter .lb-billing-renewal-actions { max-width: 48%; }
}
@media (max-width: 520px) {
  #authModal .auth-card.lb-billing-account-card { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 26px 18px 20px; }
  #authModal:has(.lb-billing-account-card) { padding: 12px; }
  #lbBillingCenter { border-radius: 16px; }
  #lbBillingCenter .lb-billing-toggle { padding: 16px; gap: 10px; flex-wrap: wrap; border-radius: 15px; }
  #lbBillingCenter.expanded .lb-billing-toggle { border-radius: 15px 15px 0 0; }
  #lbBillingCenter .lb-billing-toggle-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  #lbBillingCenter .lb-billing-toggle-icon svg { width: 21px; height: 21px; }
  #lbBillingCenter .lb-billing-toggle-copy strong { font-size: 16px; }
  #lbBillingCenter .lb-billing-toggle-copy small { font-size: 12px; }
  #lbBillingCenter .lb-billing-toggle-side { width: 100%; padding-left: 46px; justify-content: space-between; }
  #lbBillingCenter .lb-billing-body { padding: 17px 14px; }
  #lbBillingCenter .lb-billing-summary { grid-template-columns: 1fr; gap: 8px; margin-bottom: 21px; }
  #lbBillingCenter .lb-billing-summary > div { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 11px 12px; }
  #lbBillingCenter .lb-billing-summary span { margin: 0; font-size: 10px; flex: 0 0 auto; }
  #lbBillingCenter .lb-billing-summary strong { text-align: right; font-size: 13px; }
  #lbBillingCenter .lb-billing-plan { display: flex; flex-direction: column; gap: 13px; padding: 16px; }
  #lbBillingCenter .lb-billing-plan-top { justify-content: space-between; }
  #lbBillingCenter .lb-billing-plan-copy { gap: 8px; }
  #lbBillingCenter .lb-billing-plan-action { min-width: 0; width: 100%; min-height: 44px; }
  #lbBillingCenter .lb-billing-plan-detail { font-size: 13px; }
  #lbBillingCenter .lb-billing-renewal { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  #lbBillingCenter .lb-billing-renewal-actions { max-width: none; width: 100%; flex-direction: column; }
  #lbBillingCenter .lb-billing-secondary { min-height: 44px; }
  #lbBillingCenter .lb-billing-confirm { padding: 14px; }
  #lbBillingCenter .lb-billing-confirm-actions { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #lbBillingCenter::before { animation: none !important; }
  #lbBillingCenter *, #lbBillingCenter *::before, #lbBillingCenter *::after { transition: none !important; scroll-behavior: auto !important; }
}
/* END S09D BILLING STYLES */
