/* LuaX shared color themes and theme picker */
html { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  --lx-bg: #f5f8fc;
  --lx-bg2: #edf3f9;
  --lx-card: rgba(255, 255, 255, 0.84);
  --lx-card-border: rgba(24, 52, 78, 0.12);
  --lx-card-hover: rgba(255, 255, 255, 0.98);
  --lx-line: rgba(24, 52, 78, 0.14);
  --lx-line2: rgba(2, 132, 199, 0.25);
  --lx-text: #102033;
  --lx-muted: #64748b;
  --lx-muted2: #42566d;
  --lx-accent: #0284c7;
  --lx-accent-glow: rgba(2, 132, 199, 0.22);
  --lx-accent2: #6366f1;
  --lx-green: #059669;
  --lx-green-glow: rgba(5, 150, 105, 0.22);
  --lx-red: #e11d48;
}

html[data-theme="light"] body {
  color: var(--lx-text);
  background-color: var(--lx-bg);
  background-image:
    radial-gradient(ellipse at 10% 55%, rgba(14, 165, 233, 0.13), transparent 44%),
    radial-gradient(ellipse at 90% 18%, rgba(99, 102, 241, 0.09), transparent 44%),
    radial-gradient(ellipse at 50% -12%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}
html[data-theme="light"] body.landing {
  background-color: #f7fbff;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(56, 189, 248, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 40%, rgba(45, 212, 191, 0.12), transparent 50%),
    radial-gradient(ellipse 45% 35% at 100% 70%, rgba(129, 140, 248, 0.1), transparent 50%),
    linear-gradient(180deg, #fbfdff 0%, #f1f7fc 48%, #f8fbff 100%);
}
html[data-theme="light"] body.auth {
  background-image:
    radial-gradient(ellipse 60% 45% at 50% -8%, rgba(56, 189, 248, 0.2), transparent 55%),
    radial-gradient(ellipse 42% 36% at 92% 82%, rgba(129, 140, 248, 0.1), transparent 50%),
    radial-gradient(ellipse 36% 30% at 4% 20%, rgba(20, 184, 166, 0.1), transparent 50%),
    linear-gradient(180deg, #f9fcff, #edf5fb);
}

html[data-theme="light"] :where(h1, h2, h3, h4, .brand, .lxBrand, .lxHeaderBrand, .lxTitle, .lxPlansPeriodTitle) { color: var(--lx-text); }
html[data-theme="light"] :where(p, .mini, .muted, .lxLead) { color: var(--lx-muted); }
html[data-theme="light"] a:hover { color: #075985; }

html[data-theme="light"] :where(.topbar, .lxLHeader) {
  background: rgba(250, 253, 255, 0.76);
  border-color: rgba(24, 52, 78, 0.09);
  box-shadow: 0 10px 32px rgba(35, 67, 96, 0.08);
}
html[data-theme="light"] :where(.topbar nav a, .lxLPill) { color: #31465c; }
html[data-theme="light"] :where(.topbar nav a:hover, .lxLPill:hover) {
  color: #0f2740;
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
}
html[data-theme="light"] .topbar nav .navBtn { color: #0f2740; background: rgba(255,255,255,.78); border-color: rgba(24,52,78,.13); }

html[data-theme="light"] :where(
  .panel, .card, .authBox, .authInfo.supportPanel, .tgLinkChoice, .choiceCard,
  .lxHowStep, .lxDeviceGrid a, .lxTariffCard, .lxPlanGrid a, .lxCompare,
  .lxFaq details, .lxCabCard, .lxCabActionCard, .lxCabPlanCard, .lxCabNewsItem,
  .lxCabOrder, .lxConnectCard, .lxTgCard, .lxBentoHero, .lxM-Tile,
  .lxInstruction, .lxPlatformCard, .lxInstallStep, .lxProfileCard, .lxProfileGroup,
  .lxDeviceCard, .lxPayPanel, .lxForeverCard, .emailCodeLogin, .tgAuthBox,
  .authAlternative, .lxEmptyStateNote, .admHeroCard, .admSection, .admSidebar,
  .admStatCard, .admUserInfoCard, .admToolCard, .admInlineCard, .admOrderMini,
  .admRefBox, .admRefCard, .admRefMoneyForm, .tableWrap
) {
  background-color: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(24, 52, 78, 0.12) !important;
  box-shadow: 0 14px 38px rgba(35, 67, 96, 0.08);
}
html[data-theme="light"] :where(.authBox, .panel, .card, .lxCabCard, .admHeroCard, .admSection) {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html[data-theme="light"] :where(.lxHowStep:hover, .lxDeviceGrid a:hover, .lxTariffCard:hover, .lxPlanGrid a:hover, .lxM-Tile:hover) {
  background-color: rgba(255,255,255,.96);
  border-color: rgba(2,132,199,.28);
}

html[data-theme="light"] .lxHeroGrid {
  background-image:
    linear-gradient(rgba(15, 56, 86, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 56, 86, 0.055) 1px, transparent 1px);
}
html[data-theme="light"] .lxHeroOrb--a { background: radial-gradient(circle, rgba(56,189,248,.24), rgba(94,234,212,.1) 40%, transparent 70%); }
html[data-theme="light"] .lxHeroOrb--b { background: radial-gradient(circle, rgba(129,140,248,.16), transparent 70%); }
html[data-theme="light"] .lxHeroBrand { color: #0d2033; text-shadow: 0 10px 32px rgba(35,67,96,.12); }
html[data-theme="light"] .lxHeroTitle { color: #243b53; }
html[data-theme="light"] .lxHeroLead { color: #52667b; }
html[data-theme="light"] .lxHeroBadge,
html[data-theme="light"] .lxDeviceCue { background: rgba(255,255,255,.72); border-color: rgba(2,132,199,.18); box-shadow: 0 12px 34px rgba(35,67,96,.1); }
html[data-theme="light"] .lxDeviceCueTx b { color: #163047; }
html[data-theme="light"] .lxDeviceCueTx small { color: #64748b; }
html[data-theme="light"] .lxGradientBtn { color: #fff; background: #10283e; box-shadow: 0 12px 28px rgba(15,39,64,.18); }
html[data-theme="light"] .lxGradientBtn:hover { color: #fff; background: #173b5c; }
html[data-theme="light"] .lxGhostBtn { color: #29435b; border-color: rgba(24,52,78,.2); }
html[data-theme="light"] .lxGhostBtn:hover { color: #075985; background: rgba(14,165,233,.08); }
html[data-theme="light"] .lxSectionHead h2,
html[data-theme="light"] .lxPlansPeriodTitle,
html[data-theme="light"] :where(.lxTariffCard h3, .lxTariffCard li, .lxPlanGrid a, .lxHowStep h3) { color: #10283e; }
html[data-theme="light"] :where(.lxSectionHead .muted, .lxLandingSection > .muted, .lxTariffCard > p) { color: #607187; }
html[data-theme="light"] .lxSectionHead .muted b { color: #203b54; }
html[data-theme="light"] .lxTariffBadge { background: #fff; color: #0369a1; }

html[data-theme="light"] :where(input, select, textarea) {
  color: #102033 !important;
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(24,52,78,.15) !important;
  box-shadow: inset 0 1px 1px rgba(15,39,64,.03);
}
html[data-theme="light"] :where(input, select, textarea)::placeholder { color: #8493a6; opacity: 1; }
html[data-theme="light"] :where(input, select, textarea):focus { background: #fff; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,.16); }
html[data-theme="light"] input:-webkit-autofill,
html[data-theme="light"] input:-webkit-autofill:hover,
html[data-theme="light"] input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #102033 !important;
}
html[data-theme="light"] .btn:not(.green):not(.danger):not(.telegram) { color: #fff; background: #10283e; border-color: #10283e; }
html[data-theme="light"] .btn:not(.green):not(.danger):not(.telegram):hover { color: #fff; background: #173b5c; }
html[data-theme="light"] .btn.secondary { color: #203b54; background: rgba(255,255,255,.82); border-color: rgba(24,52,78,.15); }
html[data-theme="light"] .btn.secondary:hover { color: #075985; background: #fff; border-color: rgba(2,132,199,.28); }
html[data-theme="light"] .lxChoiceTabBtn.active { color: #fff; background: #10283e; }

html[data-theme="light"] .lxHeaderBrand,
html[data-theme="light"] :where(.lxBentoValue, .lxBentoSub b, .lxM-Tile b, .lxInstruction h2, .lxPlatformCard h3, .lxProfileCard h3) { color: #10283e; }
html[data-theme="light"] .lxBentoValue {
  background: linear-gradient(120deg, #10283e 25%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .lxBentoHero { background: linear-gradient(155deg, rgba(255,255,255,.96), rgba(232,244,252,.92)); }
html[data-theme="light"] .lxBentoHero::before {
  background-image:
    linear-gradient(rgba(15,56,86,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,56,86,.045) 1px, transparent 1px);
}
html[data-theme="light"] .lxBentoStatus { color: #334e68; background: rgba(255,255,255,.7); border-color: rgba(24,52,78,.12); }
html[data-theme="light"] .lxBentoHint,
html[data-theme="light"] .lxM-Tile span { color: #61748a; }
html[data-theme="light"] .lxSupport { color: #42566d; background: rgba(255,255,255,.75); border: 1px solid rgba(24,52,78,.1); }
html[data-theme="light"] .lxSupport:hover { color: #075985; background: #fff; }
html[data-theme="light"] .lxNav { background: rgba(248,252,255,.94); border-color: rgba(24,52,78,.12); box-shadow: 0 -14px 36px rgba(35,67,96,.1); }
html[data-theme="light"] .lxNav button.active { color: #075985; background: rgba(2,132,199,.1); }
html[data-theme="light"] .lxForceBtn { color: #203b54; background: rgba(255,255,255,.82); border-color: rgba(24,52,78,.12); }
html[data-theme="light"] .lxForceBtn:hover { color: #075985; background: #fff; }
html[data-theme="light"] .lxDynIslandBlob { background: linear-gradient(165deg, #fff, #edf5fb); border-color: rgba(24,52,78,.18); box-shadow: 0 12px 32px rgba(35,67,96,.14), 0 0 0 1px rgba(56,189,248,.1); }
html[data-theme="light"] .lxDeviceIsland { color: #10283e; }
html[data-theme="light"] .lxIslandIcon,
html[data-theme="light"] .lxOsIcon { color: #075985; background: rgba(2,132,199,.09); }
html[data-theme="light"] .lxPickerChevron::before { border-color: #42566d; }
html[data-theme="light"] .lxOs { color: #52667b; background: rgba(255,255,255,.65); }
html[data-theme="light"] .lxOs:hover,
html[data-theme="light"] .lxOs.active { color: #075985; background: rgba(2,132,199,.1); }

html[data-theme="light"] .admSidebar { background: rgba(250,253,255,.84); }
html[data-theme="light"] :where(.admSidebarLogo .admLogoText span, .admStatCard b, .admUserInfoCard b, .admOrderMini b, .admRefChip b) { color: #10283e; }
html[data-theme="light"] .admNavItem { color: #52667b; }
html[data-theme="light"] .admNavItem:hover { color: #075985; background: rgba(2,132,199,.07); border-color: rgba(2,132,199,.12); }
html[data-theme="light"] .admNavItem.active { color: #075985; background: rgba(2,132,199,.11); border-color: rgba(2,132,199,.2); }
html[data-theme="light"] :where(.admQuickGrant, .admUserCard) { background: rgba(224,242,254,.72); }
html[data-theme="light"] :where(.admToolCard, .admInlineCard, .admMailBar, .admOrderMini, .admUserInfoCard, .admRefBox, .admRefCard) { background: rgba(246,250,253,.9); }
html[data-theme="light"] .table th { background: rgba(226,238,247,.7); color: #52667b; }
html[data-theme="light"] .table td { color: #243b53; border-color: rgba(24,52,78,.08); }
html[data-theme="light"] .table tr:hover td { background: rgba(2,132,199,.04); }

/* Picker */
.lxThemePicker { position: relative; flex: 0 0 auto; color: var(--lx-text); }
.lxThemeTrigger {
  width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border-radius: 11px; cursor: pointer; color: var(--lx-muted2);
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.lxThemeTrigger:hover,
.lxThemePicker.is-open .lxThemeTrigger { color: var(--lx-text); background: rgba(255,255,255,.1); border-color: rgba(125,211,252,.28); }
.lxThemeTrigger:active { transform: scale(.95); }
.lxThemeTriggerIcon { display: grid; place-items: center; }
.lxThemeTrigger svg { width: 18px; height: 18px; }
.lxThemeTriggerText,
.lxThemeTriggerArrow { display: none; }
.lxThemeMenu {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 12000;
  width: 214px; padding: 7px; border-radius: 16px; color: var(--lx-text);
  background: rgba(10,14,24,.96); border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 20px 54px rgba(0,0,0,.38);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  opacity: 0; visibility: hidden; transform: translateY(-5px) scale(.98);
  transform-origin: top right; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.lxThemePicker.is-open .lxThemeMenu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.lxThemeMenuTitle { padding: 7px 10px 8px; color: var(--lx-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lxThemeOption {
  width: 100%; min-height: 42px; display: grid; grid-template-columns: 28px 1fr 22px;
  align-items: center; gap: 7px; padding: 6px 9px; border: 0; border-radius: 11px;
  cursor: pointer; text-align: left; color: var(--lx-muted2); background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.25;
  transition: color .15s ease, background .15s ease;
}
.lxThemeOption:hover { color: var(--lx-text); background: rgba(255,255,255,.07); }
.lxThemeOption.is-active { color: #e0f2fe; background: rgba(56,189,248,.13); }
.lxThemeOptionIcon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.055); }
.lxThemeOptionIcon svg { width: 15px; height: 15px; }
.lxThemeOptionCheck { opacity: 0; color: #5eead4; }
.lxThemeOptionCheck svg { width: 17px; height: 17px; }
.lxThemeOption.is-active .lxThemeOptionCheck { opacity: 1; }
.lxThemePicker--floating { position: fixed; top: 16px; right: 16px; z-index: 12000; }
body.cabinet .lxThemePicker--floating {
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}
html[data-theme="light"] .lxThemeTrigger { color: #42566d; background: rgba(255,255,255,.78); border-color: rgba(24,52,78,.14); box-shadow: 0 6px 18px rgba(35,67,96,.08); }
html[data-theme="light"] .lxThemeTrigger:hover,
html[data-theme="light"] .lxThemePicker.is-open .lxThemeTrigger { color: #075985; background: #fff; border-color: rgba(2,132,199,.25); }
html[data-theme="light"] .lxThemeMenu { color: #10283e; background: rgba(255,255,255,.98); border-color: rgba(24,52,78,.13); box-shadow: 0 20px 50px rgba(35,67,96,.18); }
html[data-theme="light"] .lxThemeOption { color: #52667b; }
html[data-theme="light"] .lxThemeOption:hover { color: #10283e; background: rgba(2,132,199,.07); }
html[data-theme="light"] .lxThemeOption.is-active { color: #075985; background: rgba(2,132,199,.1); }
html[data-theme="light"] .lxThemeOptionIcon { background: rgba(2,132,199,.07); }
html[data-theme="light"] .lxThemeOptionCheck { color: #0284c7; }

@media (max-width: 640px) {
  .lxThemeMenu { position: fixed; top: 70px; right: 12px; width: min(214px, calc(100vw - 24px)); }
  .lxHeader .lxThemePicker { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .lxThemeMenu, .lxThemeTrigger, .lxThemeOption { transition: none !important; }
}

/* Current public site, authentication and cabinet */
html[data-theme="light"] :is(body.customerLanding, body.cabinet, body.auth) {
  --cx-bg: #f7f8fb;
  --cx-surface: #ffffff;
  --cx-ink: #18243c;
  --cx-muted: #66738a;
  --cx-line: #e1e6ee;
  --cx-blue: #2856d9;
  --cx-soft: #edf2ff;
  --lx-bg: var(--cx-bg);
  --lx-bg2: #edf3f9;
  --lx-card: #ffffff;
  --lx-card-border: var(--cx-line);
  --lx-text: var(--cx-ink);
  --lx-muted: var(--cx-muted);
  --lx-muted2: #506079;
  --lx-accent: var(--cx-blue);
  --lx-accent2: var(--cx-blue);
  background: #f7f8fb !important;
  background-image: none !important;
  color: var(--cx-ink) !important;
  color-scheme: light;
}

html[data-theme="light"] body.customerLanding :where(.cxPreview,.cxPlan) {
  color: var(--cx-ink);
  background: #ffffff !important;
  border-color: var(--cx-line) !important;
}
html[data-theme="light"] body.customerLanding .cxPlanFeatured {
  background: #fcfdff !important;
  border-color: var(--cx-blue) !important;
}
html[data-theme="light"] body.customerLanding :where(.cxPreviewHelp,.cxMobileNav,.cxNotice) {
  background: #f3f6fc !important;
  border-color: var(--cx-line) !important;
}
html[data-theme="light"] body.customerLanding .cxSetup { background: #edf2fb !important; }
html[data-theme="light"] body.customerLanding .cxFinal { background: #182c50 !important; }
/* These two sections deliberately stay dark in the light theme. */
html[data-theme="light"] body.customerLanding .cxLifetimeOffer {
  color: #f7f9ff !important;
}
html[data-theme="light"] body.customerLanding .cxLifetimeOffer .cxLifetimeLabel { color: #a9c2ff !important; }
html[data-theme="light"] body.customerLanding .cxLifetimeOffer .cxLifetimeStock { color: #d8e4ff !important; }
html[data-theme="light"] body.customerLanding .cxLifetimeOffer :is(h3,strong) { color: #ffffff !important; }
html[data-theme="light"] body.customerLanding .cxLifetimeOffer :is(p,.cxLifetimeBuy > span) { color: #c7d5f2 !important; }
html[data-theme="light"] body.customerLanding .cxFinal { color: #ffffff !important; }
html[data-theme="light"] body.customerLanding .cxFinal .cxEyebrow { color: #aec5fa !important; }
html[data-theme="light"] body.customerLanding .cxFinal h2 { color: #ffffff !important; }
html[data-theme="light"] body.customerLanding .cxFinal p { color: #c7d5e0 !important; }

html[data-theme="light"] body.customerLanding :where(.cxHero h1,.cxPreview h2,.cxPlan h3,.cxSteps h3,.cxFaq summary) {
  color: var(--cx-ink);
}
html[data-theme="light"] body.customerLanding :where(.cxIntro,.cxFine,.cxPreviewBody p:not(.cxEyebrow),.cxPlanDesc,.cxPlan > small,.cxSteps p,.cxFaq p) {
  color: var(--cx-muted);
}

html[data-theme="dark"] {
  --cx-bg: #080c14;
  --cx-surface: #111827;
  --cx-ink: #edf3ff;
  --cx-muted: #98a7bd;
  --cx-line: #273247;
  --cx-blue: #7aa2ff;
  --cx-soft: #172442;
  --lx-bg: #080c14;
  --lx-bg2: #0d1320;
  --lx-card: #111827;
  --lx-card-border: #273247;
  --lx-card-hover: #162033;
  --lx-line: #273247;
  --lx-text: #edf3ff;
  --lx-muted: #98a7bd;
  --lx-muted2: #bdc9da;
  --lx-accent: #7aa2ff;
  --lx-accent2: #8b9cff;
}

html[data-theme="dark"] :is(body.customerLanding, body.cabinet, body.auth) {
  color: var(--cx-ink);
  color-scheme: dark;
  background-color: var(--cx-bg) !important;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(59,130,246,.10), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(99,102,241,.08), transparent 30%),
    linear-gradient(180deg, #080c14 0%, #0b101b 100%) !important;
}

html[data-theme="dark"] :where(.customerLanding, body.cabinet, body.auth) :where(h1,h2,h3,h4,b,strong,label) { color: var(--cx-ink); }
html[data-theme="dark"] :where(.customerLanding, body.cabinet, body.auth) :where(p,small,.muted) { color: var(--cx-muted); }

html[data-theme="dark"] .cxHeader {
  border-bottom-color: rgba(255,255,255,.04);
}
html[data-theme="dark"] :where(.cxButtonSmall,.cxButtonOutline) {
  color: var(--cx-ink) !important;
  background: #121a29;
  border-color: var(--cx-line);
}
html[data-theme="dark"] :where(.cxButtonSmall,.cxButtonOutline):hover { background: #18243a; }
html[data-theme="dark"] :where(.cxPreview,.cxPlan) {
  background: #111827;
  border-color: var(--cx-line);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
html[data-theme="dark"] .cxPlanFeatured { background: #121b2e; border-color: #638cff; }
html[data-theme="dark"] :where(.cxDeviceGrid a,.cxPeriod select) { background: #0d1421; border-color: var(--cx-line); color: var(--cx-ink); }
html[data-theme="dark"] :where(.cxDeviceGrid a,.cxPeriod select):hover { background: #16233b; }
html[data-theme="dark"] .cxPreviewHelp { background: #0d1421; border-color: var(--cx-line); }
html[data-theme="dark"] .cxSetup { background: #0d1420; }
html[data-theme="dark"] .cxSteps li > span { border-color: var(--cx-line); }
html[data-theme="dark"] .cxNotice { color: #dce8ff; background: #132342; border-color: #2f4c82; }
html[data-theme="dark"] .cxMobileNav { background: rgba(10,15,25,.96); border-color: var(--cx-line); }
html[data-theme="dark"] .cxFinal { background: linear-gradient(135deg,#13213a,#172d57); }
html[data-theme="dark"] .cxSkip { color: var(--cx-ink); background: #111827; }

html[data-theme="dark"] body.cabinet,
html[data-theme="dark"] body.auth { background-color: var(--cx-bg) !important; background-image: none !important; }
html[data-theme="dark"] body.cabinet :where(
  .lxProfileSummary,.lxCleanPlanRow,.lxDeviceCard,.lxDeviceSettingsCard,.lxCleanTelegramCard,
  .lxBentoHero,.lxM-Tile,.lxInstruction,.lxCabCard,.panel,.lxConnectCard,.lxTgCard,
  .lxPayPanel,.lxDevicesCard,.lxSupportCard,.lxSpoiler,.lxForeverCard,.lxCabPlanCard,
  .lxCleanStat,.lxInfoRow,.lxPlanSummaryItem,.lxStep,.lxPlanPickBar,.lxPlanPickBtns,
  .lxPaymentAlert,.paymentStatus,.lxBeautifulPayPanel,.lxOrderCard,.lxProfileGroup
),
html[data-theme="dark"] body.auth :where(.authBox,.choiceCard,.confirmEmailCard,.tgAuthBox,.supportPanel,.authAlternative) {
  color: var(--cx-ink);
  background: #111827 !important;
  border-color: var(--cx-line) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.cabinet :where(.lxCleanPlanRow,.lxCleanStat,.lxInfoRow,.lxPlanSummaryItem,.lxStep,.lxSubscriptionFooter) {
  background: #0d1421 !important;
}
html[data-theme="dark"] body.cabinet :where(.lxHeaderNav,.lxSupport,.lxPlanPickBtn,.lxSubscriptionManage) {
  color: var(--cx-ink);
  background: #111827;
  border-color: var(--cx-line);
}
html[data-theme="dark"] body.cabinet :where(.lxM-Tile:hover,.lxCabPlanCard.featured) { background: #14203a; }
html[data-theme="dark"] body.cabinet :where(.lxSubscriptionStatus,.lxCleanStatus.is-on) { color: #72ddb0; background: #10241f; border-color: #215442; }
html[data-theme="dark"] body.cabinet :where(.lxSubscriptionStatus.is-inactive,.lxCleanStatus.is-off) { color: #f2a3ad; background: #2a151c; border-color: #68303d; }
html[data-theme="dark"] body.cabinet :where(input,select,textarea),
html[data-theme="dark"] body.auth :where(input,select,textarea),
html[data-theme="dark"] body.auth .authBox :where(input,select,textarea) {
  color: var(--cx-ink) !important;
  background: #0b111d !important;
  border-color: #344158 !important;
  -webkit-text-fill-color: var(--cx-ink);
}
html[data-theme="dark"] body.cabinet :where(input,select,textarea)::placeholder,
html[data-theme="dark"] body.auth :where(input,select,textarea)::placeholder { color: #718097 !important; }
html[data-theme="dark"] body.cabinet input:-webkit-autofill,
html[data-theme="dark"] body.auth input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0b111d inset !important;
  -webkit-text-fill-color: var(--cx-ink) !important;
}
html[data-theme="dark"] body.cabinet .btn.secondary,
html[data-theme="dark"] body.auth .btn.secondary,
html[data-theme="dark"] body.cabinet .lxCopyBtn {
  color: #a9c1ff;
  background: #172442;
  border-color: #304875;
}
html[data-theme="dark"] body.cabinet .lxHeader { border-color: var(--cx-line); }
html[data-theme="dark"] body.cabinet .lxSubscriptionFooter { border-color: var(--cx-line); }

html[data-theme="light"] body.cabinet :where(
  .lxProfileSummary,.lxCleanPlanRow,.lxDeviceCard,.lxDeviceSettingsCard,.lxCleanTelegramCard,
  .lxBentoHero,.lxM-Tile,.lxInstruction,.lxCabCard,.panel,.lxConnectCard,.lxTgCard,
  .lxPayPanel,.lxDevicesCard,.lxSupportCard,.lxSpoiler,.lxForeverCard,.lxCabPlanCard,
  .lxCleanStat,.lxInfoRow,.lxPlanSummaryItem,.lxStep,.lxPlanPickBar,.lxPlanPickBtns,
  .lxPaymentAlert,.paymentStatus,.lxBeautifulPayPanel,.lxOrderCard,.lxProfileGroup
),
html[data-theme="light"] body.auth :where(.authBox,.choiceCard,.confirmEmailCard,.tgAuthBox,.supportPanel,.authAlternative) {
  color: var(--cx-ink) !important;
  background: #ffffff !important;
  border-color: var(--cx-line) !important;
}
html[data-theme="light"] body.cabinet :where(.lxCleanPlanRow,.lxCleanStat,.lxInfoRow,.lxPlanSummaryItem,.lxStep,.lxSubscriptionFooter) {
  background: #f8faff !important;
}
html[data-theme="light"] body.cabinet :where(.lxHeaderNav,.lxSupport,.lxPlanPickBtn,.lxSubscriptionManage) {
  color: var(--cx-ink) !important;
  background: #ffffff !important;
  border-color: var(--cx-line) !important;
}
html[data-theme="light"] body.auth .authBox :where(input,select,textarea),
html[data-theme="light"] body.cabinet :where(input,select,textarea) {
  color: var(--cx-ink) !important;
  background: #ffffff !important;
  border-color: #cbd4e2 !important;
  -webkit-text-fill-color: var(--cx-ink) !important;
}
html[data-theme="light"] body.auth .authBox :where(input,textarea)::placeholder,
html[data-theme="light"] body.cabinet :where(input,textarea)::placeholder {
  color: #77849a !important;
  -webkit-text-fill-color: #77849a !important;
}
html[data-theme="light"] body.auth .lxLPill {
  color: var(--cx-ink) !important;
  background: #f5f7fc !important;
  border-color: var(--cx-line) !important;
}

/* Keep the picker comfortable in the compact public header. */
.cxHeader .lxThemePicker { margin-left: auto; margin-right: -14px; }
.cxHeader .lxThemeTrigger { width: 42px; height: 42px; border-radius: 10px; }
.luaxAppHeroV97 .lxThemePicker { position: relative; z-index: 2; margin-left: auto; }
.luaxAppHeroV97 .lxThemeTrigger { width: 40px; height: 40px; }
@media (max-width: 640px) {
  .luaxAppHeroV97 .lxThemePicker { align-self: flex-end; margin-top: -56px; }
  .luaxAppHeroV97 .lxThemeMenu { top: calc(100% + 8px); }
}
@media (max-width: 760px) {
  .cxHeader { gap: 9px; }
  .cxHeader .lxThemePicker { order: 2; margin-right: 0; }
  .cxHeader .cxButtonSmall { order: 3; }
  .cxHeader .lxThemeTrigger { width: 40px; height: 40px; }
}

/* Cabinet: theme and support form one compact action group. */
body.cabinet .lxHeaderActions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}
body.cabinet .lxHeaderActions .lxThemePicker { margin: 0; }
body.cabinet .lxHeader .lxThemeTrigger {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
body.cabinet .lxHeader .lxThemeTriggerText,
body.cabinet .lxHeader .lxThemeTriggerArrow { display: none; }
@media (min-width: 761px) {
  /* Keep the navigation geometrically centred, independent of right actions. */
  body.cabinet .lxHeader { position: relative; }
  body.cabinet .lxHeaderNav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
}
@media (max-width: 760px) {
  /* Keep both actions together instead of distributing them across the header. */
  body.cabinet .lxHeader { justify-content: flex-start; }
  body.cabinet .lxHeaderActions { margin-left: auto; gap: 8px; }
  body.cabinet .lxHeader .lxThemeTrigger { width: 40px; min-width: 40px; padding: 0; display: grid; }
}

/* Account settings: concise values and clearly separated actions. */
body.cabinet .cxAccountSettings .lxSpoilerBodyPad { padding: 0 22px !important; }
body.cabinet .cxAccountSettings.is-open > .lxSpoilerBody > .lxSpoilerBodyPad { padding: 22px !important; }
body.cabinet .cxSettingsGrid { gap: 16px; }
html[data-theme="light"] body.cabinet .cxSettingsGrid { align-items: start; }
body.cabinet .cxSettingCard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 168px;
  padding: 20px !important;
  border-radius: 18px;
  box-sizing: border-box;
  box-shadow: none;
}
body.cabinet .cxSettingHead { display: flex; align-items: flex-start; gap: 12px; }
body.cabinet .cxSettingHead > div { flex: 1 1 auto; min-width: 0; }
body.cabinet .cxSettingIcon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 12px;
  color: #84acff;
  background: rgba(74, 122, 235, .13);
}
body.cabinet .cxSettingIcon svg { width: 19px; height: 19px; }
body.cabinet .cxSettingCard h3 { margin: 1px 0 4px !important; font-size: 17px; letter-spacing: -.015em; }
body.cabinet .cxSettingCard > .cxSettingHead > div > p { margin: 0 !important; font-size: 13px; line-height: 1.5; }
body.cabinet .cxSettingCard .lxInfoRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: auto !important;
  padding: 16px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--cx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.cabinet .cxSettingCard .lxNameDisplay { flex: 1 1 0; min-width: 0; }
body.cabinet .cxSettingCard .lxNameDisplay b { display: block; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; word-break: normal; }
body.cabinet .cxSettingCard .lxEditNameBtn,
body.cabinet .cxSettingCard .lxSaveNameBtn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 13px;
}
body.cabinet .cxSettingCard .lxNameForm,
body.cabinet .cxSettingCard .lxProfileEditPanel { margin-top: auto; }
body.cabinet .cxSettingCard .lxNameForm .lxNameInputRow { padding-top: 16px; border-top: 1px solid var(--cx-line); }
html[data-theme="light"] body.cabinet .cxSettingCard { min-height: 0; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxInfoRow { margin-top: 0 !important; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxNameForm,
html[data-theme="light"] body.cabinet .cxSettingCard .lxProfileEditPanel { margin-top: 0; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxNameForm .lxNameInputRow { padding-top: 10px; border-top: 0; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxNameEditRow { grid-template-columns: minmax(0, 1fr); }
html[data-theme="light"] body.cabinet .cxSettingCard .lxProfileEditTitle { color: var(--cx-ink); font-size: 14px; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxProfileEditHead { align-items: flex-start; margin-bottom: 8px; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxProfileEditHead > div { min-width: 0; flex: 1; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxNameInputRow { align-items: center; }
html[data-theme="light"] body.cabinet .cxSettingCard .lxCancelEditBtn { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: var(--cx-soft); color: var(--cx-muted); }
html[data-theme="light"] body.cabinet .cxSettingCard .lxSaveNameBtn.secondary { color: var(--cx-blue); background: var(--cx-soft); border: 1px solid var(--cx-line); }
html[data-theme="light"] body.cabinet .cxSettingCard .lxSaveNameBtn.secondary:hover { filter: brightness(.95); }
html[data-theme="light"] body.cabinet .cxSettingCard .cxSettingsCancel { flex: 0 0 auto; align-self: center; font-size: 13px; min-height: 42px; padding: 8px 13px; border-radius: 11px; background: var(--cx-soft); }
html[data-theme="light"] body.cabinet .cxSettingCard .lxNameInput:focus-visible { outline: 2px solid #5d8cff; outline-offset: 2px; }
body.cabinet .cxSettingSensitive { border-style: solid !important; }
body.cabinet .cxSettingSensitive .cxSettingIcon { color: #d8a85b; background: rgba(216, 168, 91, .1); }
body.cabinet .cxSettingsFooter {
  margin-top: 16px !important;
  padding: 16px 18px !important;
  border: 1px solid var(--cx-line) !important;
  border-radius: 15px;
}
body.cabinet .cxSettingsFooter .lxLogout { min-height: 42px !important; }

html[data-theme="dark"] body.cabinet .cxSettingCard,
html[data-theme="dark"] body.cabinet .cxSettingsFooter {
  background: #111a29 !important;
  border-color: #2a3b55 !important;
}
html[data-theme="dark"] body.cabinet .cxSettingCard > .cxSettingHead > div > p,
html[data-theme="dark"] body.cabinet .cxSettingsFooter > span { color: #9cacc4 !important; }
html[data-theme="dark"] body.cabinet .cxSettingCard .lxNameInputRow { flex-wrap: wrap; }
html[data-theme="dark"] body.cabinet .cxSettingCard .cxSettingsCancel { flex: 0 0 100%; min-height: 44px; margin-top: 4px; padding: 8px 0; border: 0; background: transparent; color: var(--cx-muted); text-align: left; }
html[data-theme="dark"] body.cabinet .cxSettingSensitive {
  background: linear-gradient(135deg, #151b28, #1b1d25) !important;
  border-color: #655038 !important;
}
html[data-theme="light"] body.cabinet .cxSettingCard,
html[data-theme="light"] body.cabinet .cxSettingsFooter {
  background: #ffffff !important;
  border-color: #d6dfed !important;
}
html[data-theme="light"] body.cabinet .cxSettingCard > .cxSettingHead > div > p,
html[data-theme="light"] body.cabinet .cxSettingsFooter > span { color: #65738a !important; }
html[data-theme="light"] body.cabinet .cxSettingSensitive {
  background: linear-gradient(135deg, #fffdf8, #fff9ed) !important;
  border-color: #ead5a7 !important;
}
@media (max-width: 700px) {
  body.cabinet .cxAccountSettings .lxSpoilerBodyPad { padding: 0 14px !important; }
  body.cabinet .cxAccountSettings.is-open > .lxSpoilerBody > .lxSpoilerBodyPad { padding: 14px !important; }
  body.cabinet .cxSettingsGrid { gap: 10px; }
  body.cabinet .cxSettingCard { min-height: 0; padding: 16px !important; }
  body.cabinet .cxSettingCard .lxInfoRow { display: flex; align-items: stretch; flex-direction: column; gap: 12px; }
  body.cabinet .cxSettingCard .lxEditNameBtn,
  body.cabinet .cxSettingCard .lxSaveNameBtn { width: 100%; }
  body.cabinet .cxSettingsFooter { padding: 15px !important; }
  body.cabinet .cxSettingsFooter .lxLogout { width: 100%; }
}

/* Migration notice stays legible in the light palette. */
html[data-theme="light"] body.cabinet .luaxDomainNotice {
  background: linear-gradient(110deg, #fff9e8, #f2f8ff) !important;
  border-color: #f2cf7a !important;
  box-shadow: 0 10px 28px rgba(48, 71, 104, .08) !important;
}
html[data-theme="light"] body.cabinet .luaxDomainNotice b { color: #7a4b00 !important; }
html[data-theme="light"] body.cabinet .luaxDomainNotice span { color: #43566e !important; }
html[data-theme="light"] body.cabinet .luaxDomainNotice .btn.secondary {
  color: #ffffff !important;
  background: #173b5c !important;
  border-color: #173b5c !important;
}
html[data-theme="light"] body.cabinet .luaxDomainNotice .btn.secondary:hover { background: #0f2c46 !important; }

/* Device selector: override the OS dark-mode fallback when the site is light. */
html[data-theme="light"] body.cabinet .lxDynIslandBlob,
html[data-theme="light"] body.cabinet .lxDynIsland.is-open .lxDynIslandBlob {
  background: #ffffff !important;
  border-color: #d8e1ed !important;
  box-shadow: 0 12px 30px rgba(48, 71, 104, .08) !important;
}
html[data-theme="light"] body.cabinet .lxOs {
  color: #29425e !important;
  background: #f7faff !important;
  border-color: #d8e2ef !important;
}
html[data-theme="light"] body.cabinet .lxOs > span:last-child { color: inherit !important; }
html[data-theme="light"] body.cabinet .lxOsIcon {
  color: #1478b7 !important;
  background: #e8f5ff !important;
}
html[data-theme="light"] body.cabinet .lxOs:hover {
  color: #075985 !important;
  background: #eff8ff !important;
  border-color: #8fc8ed !important;
}
html[data-theme="light"] body.cabinet .lxOs.active {
  color: #155fc9 !important;
  background: #edf3ff !important;
  border-color: #7ea7ee !important;
}
html[data-theme="light"] body.cabinet .lxOs.active .lxOsIcon {
  color: #1d6ee8 !important;
  background: #d8e9ff !important;
}

/* Lifetime access uses its own dark card, so it needs a complete light palette. */
html[data-theme="light"] body.cabinet .cxPayNav {
  background: #edf2f8 !important;
  border-color: #d3deeb !important;
}
html[data-theme="light"] body.cabinet .cxPayNav button { color: #607087 !important; }
html[data-theme="light"] body.cabinet .cxPayNav button:hover { color: #173b5c !important; }
html[data-theme="light"] body.cabinet .cxPayNav button.is-active {
  color: #173b5c !important;
  background: #ffffff !important;
  box-shadow: 0 1px 5px rgba(36, 62, 91, .12) !important;
}
html[data-theme="light"] body.cabinet .lxForeverCard {
  background: linear-gradient(135deg, #ffffff 0%, #f9fcff 58%, #eef8ff 100%) !important;
  border-color: #b9def7 !important;
  box-shadow: 0 14px 34px rgba(48, 71, 104, .08) !important;
}
html[data-theme="light"] body.cabinet .lxForeverCard::before { background: linear-gradient(115deg, rgba(255,255,255,.78), transparent 42%) !important; }
html[data-theme="light"] body.cabinet .lxForeverGlow { background: rgba(56,189,248,.12) !important; }
html[data-theme="light"] body.cabinet .lxForeverIcon { color: #2381ba !important; background: linear-gradient(145deg, #e1f5ff, #edf1ff) !important; border-color: #b8e5fb !important; }
html[data-theme="light"] body.cabinet .lxForeverEyebrow { color: #14845f !important; }
html[data-theme="light"] body.cabinet .lxForeverCopy h3,
html[data-theme="light"] body.cabinet .lxForeverSupportCopy b { color: #172d48 !important; }
html[data-theme="light"] body.cabinet .lxForeverCopy p,
html[data-theme="light"] body.cabinet .lxForeverSupportCopy small { color: #65758d !important; }
html[data-theme="light"] body.cabinet .lxForeverMeta > span { color: #405672 !important; background: #f5f9fe !important; border-color: #d8e5f2 !important; }
html[data-theme="light"] body.cabinet .lxForeverMeta svg { color: #2589c2 !important; }
html[data-theme="light"] body.cabinet .lxForeverSupport { border-top-color: #dce7f1 !important; }
html[data-theme="light"] body.cabinet .lxForeverHeart { color: #d6586b !important; background: #fff0f3 !important; }
html[data-theme="light"] body.cabinet .lxForeverSupportBtn { color: #1766d2 !important; background: #eaf6ff !important; border-color: #bee7fb !important; }
html[data-theme="light"] body.cabinet .lxForeverSupportBtn:hover { color: #173f9f !important; background: #dcedff !important; border-color: #91cff3 !important; }

/* Preloader renders before the cabinet shell; do not let OS dark mode flash through. */
html[data-theme="light"] body.cabinet .lxPreloader {
  background: linear-gradient(145deg, #f8faff 0%, #edf3ff 100%) !important;
}
html[data-theme="light"] body.cabinet .lxTraceTrack { stroke: #dbe5fb !important; }
html[data-theme="light"] body.cabinet .lxPreloaderLogo {
  background: #18243c !important;
  box-shadow: 0 12px 28px rgba(40, 86, 217, .16) !important;
}
html[data-theme="light"] body.cabinet .lxPreloaderTitle { color: #1d3552 !important; text-shadow: none !important; }
html[data-theme="light"] body.cabinet .lxPreloaderSub { color: #60718a !important; }
html[data-theme="light"] body.cabinet .lxPreloaderDots i { background: #2864da !important; }
html[data-theme="dark"] body.cabinet .lxPreloader { background: linear-gradient(145deg, #0d1422, #17253b) !important; }
html[data-theme="dark"] body.cabinet .lxPreloaderLogo { background: #18243c !important; box-shadow: none !important; }
html[data-theme="dark"] body.cabinet .lxTraceTrack { stroke: #33445f !important; }
html[data-theme="dark"] body.cabinet .lxPreloaderTitle { color: #f0f5ff !important; text-shadow: none !important; }
html[data-theme="dark"] body.cabinet .lxPreloaderSub { color: #a7b6cd !important; }
html[data-theme="dark"] body.cabinet .lxPreloaderDots i { background: #84acff !important; }

/* Installation flow: the site theme must win over the OS colour-scheme. */
html[data-theme="dark"] body.cabinet .lxDynIslandBlob,
html[data-theme="dark"] body.cabinet .lxDynIsland.is-open .lxDynIslandBlob {
  background: #111b2c !important;
  border-color: #2d405e !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24) !important;
}
html[data-theme="dark"] body.cabinet .lxDeviceIsland { color: #f1f5ff !important; }
html[data-theme="dark"] body.cabinet .lxIslandIcon {
  color: #8eb2ff !important;
  background: #1d3151 !important;
}
html[data-theme="dark"] body.cabinet .lxIslandCopy b { color: #f1f5ff !important; }
html[data-theme="dark"] body.cabinet .lxIslandCopy small,
html[data-theme="dark"] body.cabinet .lxPickerChevron::before { color: #aab8d0 !important; border-color: #aab8d0 !important; }
html[data-theme="dark"] body.cabinet .lxOs {
  color: #e6eefc !important;
  background: #0d1523 !important;
  border-color: #2d405e !important;
}
html[data-theme="dark"] body.cabinet .lxOs.active {
  color: #a9c7ff !important;
  background: #1b3154 !important;
  border-color: #638cff !important;
}

/* QR remains white for reliable scanning; only its surrounding card follows dark mode. */
html[data-theme="dark"] body.cabinet .lxMobileInstallNote .lxTvSubQrCard {
  background: #0d1523 !important;
  border-color: #2d405e !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.cabinet .lxTvSubQrCard > b { color: #f1f5ff !important; }
html[data-theme="dark"] body.cabinet .lxTvSubQrCard > p { color: #aab8d0 !important; }
html[data-theme="dark"] body.cabinet .lxTvSubQrLink {
  color: #dce8ff !important;
  background: #080f1b !important;
  border-color: #2d405e !important;
}

/* Selected subscription must be unmistakable in the connection flow. */
html[data-theme] body.cabinet .lxPlanPickBar {
  padding: 10px !important;
  border: 1px solid var(--cx-line) !important;
  border-radius: 16px !important;
}
html[data-theme] body.cabinet .lxPlanPickBtns {
  gap: 8px !important;
  background: transparent !important;
}
html[data-theme] body.cabinet .lxPlanPickBtn {
  position: relative;
  min-height: 42px !important;
  height: 42px !important;
  color: var(--cx-muted) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
}
html[data-theme] body.cabinet .lxPlanPickBtn:hover {
  color: var(--cx-ink) !important;
  background: color-mix(in srgb, var(--cx-soft) 72%, transparent) !important;
}
html[data-theme] body.cabinet .lxPlanPickBtn.is-on,
html[data-theme] body.cabinet .lxPlanPickBtn[aria-pressed="true"] {
  color: #ffffff !important;
  background: #2f5bd3 !important;
  border-color: #527cf0 !important;
  box-shadow: 0 5px 14px rgba(47, 91, 211, .25), inset 0 1px 0 rgba(255,255,255,.16) !important;
}
html[data-theme] body.cabinet .lxPlanPickBtn.is-on::after,
html[data-theme] body.cabinet .lxPlanPickBtn[aria-pressed="true"]::after {
  content: "✓";
  margin-left: 7px;
  font-weight: 900;
}
html[data-theme="light"] body.cabinet .lxPlanPickBar { background: #f6f8fc !important; }
html[data-theme="dark"] body.cabinet .lxPlanPickBar { background: #0d1523 !important; }

/* Lifetime card has legacy OS-colour fallbacks; pin every visible layer to dark mode. */
html[data-theme="dark"] body.cabinet .lxForeverCard {
  background: linear-gradient(135deg, #172945 0%, #101a2b 56%, #0c1422 100%) !important;
  border-color: #2b4b76 !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.07) !important;
}
html[data-theme="dark"] body.cabinet .lxForeverCard::before {
  background: linear-gradient(115deg, rgba(104, 155, 255, .11), transparent 43%) !important;
}
html[data-theme="dark"] body.cabinet .lxForeverGlow { background: rgba(56, 189, 248, .16) !important; }
html[data-theme="dark"] body.cabinet .lxForeverIcon {
  color: #b9d7ff !important;
  background: linear-gradient(145deg, #254b7d, #1c2947) !important;
  border-color: #4c75ad !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.cabinet .lxForeverEyebrow { color: #72ddb0 !important; }
html[data-theme="dark"] body.cabinet .lxForeverCopy h3,
html[data-theme="dark"] body.cabinet .lxForeverSupportCopy b { color: #f2f6ff !important; }
html[data-theme="dark"] body.cabinet .lxForeverCopy p,
html[data-theme="dark"] body.cabinet .lxForeverSupportCopy small { color: #acbbd1 !important; }
html[data-theme="dark"] body.cabinet .lxForeverMeta > span {
  color: #c9d8ed !important;
  background: rgba(8, 15, 27, .58) !important;
  border-color: #2d476c !important;
}
html[data-theme="dark"] body.cabinet .lxForeverMeta svg { color: #7dc9ff !important; }
html[data-theme="dark"] body.cabinet .lxForeverSupport { border-top-color: #2a405f !important; }
html[data-theme="dark"] body.cabinet .lxForeverHeart { color: #ffadba !important; background: #3a2130 !important; }
html[data-theme="dark"] body.cabinet .lxForeverSupportBtn {
  color: #d7ebff !important;
  background: #173a61 !important;
  border-color: #3e6fa8 !important;
}
html[data-theme="dark"] body.cabinet .lxForeverSupportBtn:hover { color: #ffffff !important; background: #215085 !important; }

/* Compact, purposeful support callout below the dashboard shortcuts. */
html[data-theme] body.cabinet .cxHelpStrip {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px !important;
  min-height: 104px;
  margin: 20px 0 0 !important;
  padding: 18px 20px !important;
  border-radius: 18px !important;
}
html[data-theme] body.cabinet .cxHelpStrip > svg {
  width: 44px !important;
  height: 44px !important;
  padding: 11px;
  color: #8fb3ff !important;
  background: #20385e;
  border-radius: 13px;
}
html[data-theme] body.cabinet .cxHelpStrip b { display: block; font-size: 15px !important; line-height: 1.3; }
html[data-theme] body.cabinet .cxHelpStrip p { margin: 4px 0 0 !important; line-height: 1.45; }
html[data-theme] body.cabinet .cxHelpStrip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-left: 0 !important;
  padding: 0 15px;
  border: 1px solid currentColor;
  border-radius: 11px;
  font-size: 13px !important;
}
html[data-theme="dark"] body.cabinet .cxHelpStrip {
  background: linear-gradient(100deg, #152644, #111c30 72%) !important;
  border-color: #35527e !important;
}
html[data-theme="dark"] body.cabinet .cxHelpStrip b { color: #eef4ff !important; }
html[data-theme="dark"] body.cabinet .cxHelpStrip p { color: #aabbd4 !important; }
html[data-theme="dark"] body.cabinet .cxHelpStrip a { color: #9bbcff !important; background: #172f53 !important; border-color: #395f96 !important; }
html[data-theme="dark"] body.cabinet .cxHelpStrip a:hover { color: #ffffff !important; background: #234774 !important; }
html[data-theme="light"] body.cabinet .cxHelpStrip {
  background: linear-gradient(100deg, #edf5ff, #f8fbff 72%) !important;
  border-color: #c9daef !important;
}
html[data-theme="light"] body.cabinet .cxHelpStrip b { color: #17314f !important; }
html[data-theme="light"] body.cabinet .cxHelpStrip p { color: #61728b !important; }
html[data-theme="light"] body.cabinet .cxHelpStrip a { color: #215dcc !important; background: #ffffff !important; border-color: #b8d0f3 !important; }
@media (max-width: 640px) {
  html[data-theme] body.cabinet .cxHelpStrip { grid-template-columns: 42px minmax(0, 1fr) !important; min-height: 0; }
  html[data-theme] body.cabinet .cxHelpStrip a { grid-column: 1 / -1; width: 100%; }
}

/* Theme parity: identical controls and states, with palette as the only difference. */
html[data-theme] body.cabinet .cxPayNav { display: flex !important; gap: 6px !important; padding: 5px !important; border: 1px solid var(--cx-line) !important; border-radius: 12px !important; }
html[data-theme] body.cabinet .cxPayNav button { min-height: 42px !important; padding: 9px 18px !important; border: 0 !important; border-radius: 8px !important; box-shadow: none !important; }
html[data-theme="dark"] body.cabinet .cxPayNav { background: #111b2c !important; }
html[data-theme="dark"] body.cabinet .cxPayNav button { color: #9daec8 !important; background: transparent !important; }
html[data-theme="dark"] body.cabinet .cxPayNav button.is-active { color: #edf3ff !important; background: #223758 !important; box-shadow: inset 0 0 0 1px #365685 !important; }
html[data-theme="light"] body.cabinet .cxPayNav { background: #edf2f8 !important; }
html[data-theme="light"] body.cabinet .cxPayNav button { color: #607087 !important; background: transparent !important; }
html[data-theme="light"] body.cabinet .cxPayNav button.is-active { color: #173b5c !important; background: #ffffff !important; box-shadow: 0 1px 5px rgba(36, 62, 91, .12) !important; }
html[data-theme] body.cabinet .lxDeviceBadge { min-height: 28px; padding: 0 10px !important; border-radius: 999px !important; }
html[data-theme="dark"] body.cabinet .lxDeviceBadge--ok { color: #78e2b0 !important; background: #102f29 !important; border-color: #286b58 !important; }
html[data-theme="light"] body.cabinet .lxDeviceBadge--ok { color: #187b58 !important; background: #edf9f2 !important; border-color: #cce9db !important; }

/* Server flashes and instant toasts keep readable contrast in both palettes. */
html[data-theme="light"] .flash { color: #126344 !important; background: #ecfbf4 !important; border-color: #9fe0c6 !important; }
html[data-theme="light"] .flash.err { color: #9c2638 !important; background: #fff1f3 !important; border-color: #f1b7c0 !important; }
html[data-theme="dark"] .flash { color: #b9f3d6 !important; background: #113a30 !important; border-color: #2f735f !important; }
html[data-theme="dark"] .flash.err { color: #ffc0c8 !important; background: #3d2029 !important; border-color: #7b3d4a !important; }

/* Account edit actions have one layout in both themes. */
@media (min-width: 701px) {
  html[data-theme] body.cabinet .cxSettingCard .lxNameForm .lxNameInputRow {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  html[data-theme] body.cabinet .cxSettingCard .cxSettingsCancel {
    flex: 0 0 auto !important;
    align-self: auto !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 8px 13px !important;
    border: 1px solid var(--cx-line) !important;
    border-radius: 11px !important;
    background: var(--cx-soft) !important;
    color: var(--cx-muted) !important;
    text-align: center !important;
  }
}
