/* v5.4: native menu portals, two complete palettes and an orderly neon hero. */
html[data-theme="dark"] { color-scheme:dark; }
html[data-theme="light"] {
 color-scheme:light;
 --surface-base:#f5f7fc; --surface-sunken:#edf1f8; --surface-raised:#fff;
 --surface-overlay:#fff; --surface-hover:#edf0fa; --surface-active:#e5e9f6;
 --border-subtle:#dce2ef; --border-default:#b8c4d8; --border-strong:#8090ab;
 --text-primary:#17233a; --text-secondary:#455570; --text-muted:#52647d;
 --text-disabled:#64748b; --text-inverse:#fff; --color-action:#4e34ca;
 --color-action-hover:#4026b2; --color-money:#925500; --color-accent:#6335df;
 --color-error:#b52235; --color-delivered:#087447;
}
html[data-theme="light"] .sb-panel,html[data-theme="light"] .sb-public {
 color-scheme:light; --text-muted:#52647d; color:var(--text-primary); background:var(--surface-base);
}
.sb-theme-toggle { display:inline-flex; flex:0 0 40px; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid var(--border-default); border-radius:12px; color:var(--text-primary); background:var(--surface-raised); cursor:pointer; vertical-align:middle; }
.sb-theme-toggle:hover { border-color:#9272ff; }
.sb-theme-toggle:focus-visible { outline:2px solid #9272ff; outline-offset:3px; }
.sb-theme-toggle svg { width:20px; height:20px; }
.sb-theme-moon,html[data-theme="light"] .sb-theme-sun { display:none; }
html[data-theme="light"] .sb-theme-moon { display:block; }
.sb-panel .sb54-menu.dropdown-menu {
 position:fixed!important; inset:auto; transform:none!important; margin:0!important;
 z-index:1090; width:20rem; min-width:0; max-width:calc(100vw - 16px);
 overflow:auto; overscroll-behavior:contain; box-sizing:border-box;
 box-shadow:0 16px 48px #0005; border:1px solid var(--border-default); border-radius:14px;
 direction:inherit; text-align:start;
}
.sb-panel .sb54-menu.dropdown-menu.show { display:block; }
.sb-panel .sb54-menu.dropdown-menu[hidden] { display:none!important; }
.sb-panel .sb54-menu a { white-space:normal; overflow-wrap:anywhere; }
.sb-panel .sb54-menu .media-body { min-width:0; }
.sb-panel .sb54-menu a:focus-visible { outline:2px solid #a58aff; outline-offset:-3px; }
.sb-public .bm-lp__nav-inner > .sb-theme-toggle { margin-inline-start:auto; }
.sb-public .bm-lp__links { margin-inline-start:0; }
.sb-public .bm-brand__logo { object-fit:contain; }
/* True grid placement, not coordinates tied to an unrelated ancestor. */
.sb-public .bm-lp__hero { position:relative; isolation:isolate; padding-block:3rem 4rem; }
.sb-public .bm-lp__hero::before,.sb-public .bm-lp__hero::after { content:none!important; }
.sb-public .bm-lp__hero-grid { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 100px minmax(320px,30rem); gap:clamp(1.25rem,2.5vw,3rem); align-items:start; }
.sb-public .bm-lp__hero-copy { padding:1.5rem 0 0; position:relative; min-width:0; }
.sb-public .bm-lp__hero-copy::before,.sb-public .bm-lp__hero-copy::after { content:none!important; }
.sb-public .bm-lp__orbit {
 position:relative!important; inset:auto!important; display:grid!important; grid-template-columns:1fr;
 align-content:space-evenly; justify-items:center; gap:24px; width:100%!important;
 height:auto!important; min-height:580px; padding:1.25rem 0; transform:none!important;
 background:none!important; border:0!important; box-shadow:none!important; z-index:0;
}
.sb-public .bm-lp__orbit::before,.sb-public .bm-lp__orbit::after { content:none!important; }
.sb-public .bm-lp__orb {
 position:relative!important; inset:auto!important; width:64px!important; height:64px!important;
 inline-size:64px!important; block-size:64px!important; transform:none;
 animation:sb54-float 6s ease-in-out infinite; animation-delay:var(--orb-delay,0s); margin:0!important;
}
.sb-public .bm-lp__orb:nth-child(even) { translate:10px 0; }
.sb-public .bm-lp__orb:nth-child(odd) { translate:-10px 0; }
@keyframes sb54-float { 0%,100% { transform:translateY(-4px); } 50% { transform:translateY(4px); } }
.sb-public .bm-lp__hero-form { min-width:0; align-self:start; z-index:1; }
.sb-public .bm-lp__chips { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.65rem; margin-block:1.8rem; }
.sb-public .bm-lp__chip { flex-direction:column; justify-content:center; gap:.7rem; padding:1.15rem .5rem; min-width:0; white-space:normal; text-align:center; border-radius:14px; }
.sb-public .bm-lp__chip svg { width:26px; height:26px; color:#a68bff; }
.sb54-hero-actions { display:flex; flex-wrap:wrap; gap:.85rem; margin-block:1.5rem; }
.sb54-hero-notes { display:flex; flex-wrap:wrap; gap:.6rem 1.2rem; padding:0; list-style:none; color:var(--text-secondary); font-size:.875rem; }
.sb54-hero-notes li::before { content:'✓'; color:#a68bff; margin-inline-end:.4rem; }
.sb54-neon { position:absolute; inset:-2rem -2vw 0; z-index:-1; overflow:hidden; pointer-events:none; opacity:.8; background:radial-gradient(ellipse at 35% 25%,#6e2aff16,transparent 62%),radial-gradient(ellipse at 90% 85%,#ff8a0012,transparent 55%); }
.sb54-neon svg { width:100%; height:100%; min-height:600px; }
.sb54-neon .sb54-line { fill:none; stroke:#734df0; stroke-width:1; opacity:.35; }
.sb54-neon .sb54-pulse { fill:none; stroke:#b08dff; stroke-width:2; stroke-dasharray:90 900; animation:sb54-line 16s linear infinite; filter:drop-shadow(0 0 5px #8142ff); }
.sb54-neon .sb54-pulse:nth-of-type(even) { stroke:#ff9d23; animation-delay:-8s; animation-duration:21s; }
@keyframes sb54-line { to { stroke-dashoffset:-1980; } }
.sb54-usecases { margin-block:2rem 4rem; }
.sb54-usecases > h2 { margin-bottom:.65rem; font-size:clamp(1.6rem,3vw,2.3rem); }
.sb54-usecases > p { color:var(--text-secondary); max-width:50rem; }
.sb54-usecase-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.25rem; margin-top:1.5rem; }
.sb54-usecase { padding:1.75rem; border:1px solid var(--border-subtle); border-radius:20px; background:var(--surface-raised); }
.sb54-usecase > span { color:#a68bff; font:600 .9rem var(--font-ui,sans-serif); }
.sb54-usecase h3 { margin:1rem 0 .6rem; font-size:1.2rem; }
.sb54-usecase p { color:var(--text-secondary); line-height:1.75; margin:0; }
/* Explicit pairs override legacy Bootstrap/Dashmix dark-only literals. */
html[data-theme="light"] .sb-panel :is(.block,.card,.modal-content,.block-header,.block-content,.bm-page-head,.bm-order-summary,.sb-traffic-stat,#sidebar,#page-header,.content-header,.bm-sidebar-copy,.sb-sidebar-identity,.dropdown-menu,.list-group-item) { color:var(--text-primary)!important; background-color:var(--surface-raised)!important; border-color:var(--border-subtle)!important; }
html[data-theme="light"] .sb-panel :is(#page-container,#main-container,.bg-body-dark,.bg-body-light) { background-color:var(--surface-base)!important; color:var(--text-primary)!important; }
html[data-theme="light"] .sb-panel :is(h1,h2,h3,h4,h5,h6,.font-size-h3,.font-size-h4,.dropdown-item,.nav-main-link,.text-dark,.form-control-plaintext) { color:var(--text-primary)!important; }
html[data-theme="light"] .sb-panel :is(.text-muted,.text-secondary,.nav-main-link-icon,.nav-main-heading,.bm-page-head__copy) { color:var(--text-secondary)!important; }
html[data-theme="light"] .sb-panel :is(.form-control,.custom-select,textarea,select,.select2-selection,.select2-dropdown,.select2-search__field,.select2-selection__rendered) { color:#17233a!important; -webkit-text-fill-color:#17233a!important; caret-color:#17233a; background-color:#fff!important; border-color:#8c9db7!important; }
html[data-theme="light"] .sb-panel :is(.form-control[readonly],.form-control:disabled,textarea:disabled,select:disabled,.input-group-text) { color:#455570!important; -webkit-text-fill-color:#455570!important; background-color:#edf1f8!important; opacity:1; }
html[data-theme="light"] .sb-panel :is(input,textarea)::placeholder { color:#52647d!important; -webkit-text-fill-color:#52647d!important; opacity:1; }
html[data-theme="light"] .sb-panel input:-webkit-autofill { -webkit-text-fill-color:#17233a!important; -webkit-box-shadow:0 0 0 1000px #fff inset!important; }
html[data-theme="light"] .sb-panel select option { color:#17233a; background:#fff; }
html[data-theme="light"] .sb-panel :is(.table,td,th,.table-striped tbody tr:nth-of-type(odd)) { color:var(--text-primary)!important; border-color:var(--border-subtle)!important; }
html[data-theme="light"] .sb-panel .table-striped tbody tr:nth-of-type(odd),html[data-theme="light"] .sb-panel .table .thead-light th { background-color:#edf1f8!important; }
html[data-theme="light"] .sb-panel :is(.btn-dual,.btn-light,.btn-alt-secondary) { color:#263752!important; background:#edf1f8!important; border-color:#bcc8dc!important; }
html[data-theme="light"] .sb-panel :is(.nav-main-link.active,.nav-main-link:hover,.dropdown-item:hover,.list-group-item-action:hover) { color:#4125ae!important; background-color:#ece7fb!important; }
html[data-theme="light"] .sb-panel .sb-notification { background:#fff!important; }
html[data-theme="light"] .sb-panel .sb-notification.is-unread { background:#efebfc!important; }
html[data-theme="light"] .sb-panel .sb-notification > a { color:#17233a!important; }
html[data-theme="light"] .sb-panel .sb-notification .text-muted { color:#52647d!important; }
html[data-theme="light"] .sb-panel .modal-header .close { color:#17233a!important; }
html[data-theme="light"] .sb-public :is(.bm-lp,.bm-lp__nav,.bm-auth,.bm-auth__main,.bm-auth__aside) { background-color:var(--surface-base)!important; color:var(--text-primary); }
html[data-theme="light"] .sb-public :is(.bm-brand__1,.bm-brand__2) { color:var(--text-primary)!important; }
html[data-theme="light"] .sb-public :is(.bm-lp__h1,.bm-auth__title,.bm-auth__headline) { color:#17233a!important; }
html[data-theme="light"] .sb-public :is(.bm-lp__lede,.bm-auth__lead,.bm-label,.bm-auth__meta,.bm-auth__benefit-copy) { color:#455570; }
html[data-theme="light"] .sb-public .bm-input { color:#17233a!important; background:#fff!important; -webkit-text-fill-color:#17233a!important; border-color:#8c9db7!important; }
html[data-theme="light"] .sb-public .bm-input::placeholder { color:#52647d; -webkit-text-fill-color:#52647d; }
html[data-theme="light"] .sb-public input:-webkit-autofill { -webkit-text-fill-color:#17233a!important; -webkit-box-shadow:0 0 0 1000px #fff inset!important; }
html[data-theme="light"] .sb-public .bm-lp__chip svg,html[data-theme="light"] .sb54-usecase > span { color:#6035c6; }
html[data-theme="light"] .sb54-neon { opacity:.4; }
html[data-theme="light"] .sb-legacy :is(.hero,.bg-white-95,.bg-black-90,#page-container) { background:var(--surface-base)!important; color:var(--text-primary)!important; }
html[data-theme="light"] .sb-legacy :is(.text-white,.text-white-75,.text-muted) { color:var(--text-primary)!important; }
html[data-theme="dark"] .sb-legacy .bg-white-95 { background:var(--surface-raised)!important; color:var(--text-primary)!important; }
html[data-theme="light"] .sb-privacy-manage { color:#455570; }
/* The white login card stays a white card in both palettes. */
.sb-public .bm-lp__hero-form .bm-lp__card { background:#fff; color:#17233a; }
.sb-public .bm-lp__hero-form :is(.bm-label,.bm-auth__meta,.bm-lp__card-sub) { color:#455570!important; }
.sb-public .bm-lp__hero-form .bm-input { color:#17233a!important; -webkit-text-fill-color:#17233a!important; background:#f8fafc!important; }
@media(max-width:1199px) and (min-width:992px) {
 .sb-public .bm-lp__hero-grid { grid-template-columns:minmax(0,1fr) 64px minmax(300px,26rem); gap:1rem; }
 .sb-public .bm-lp__orb { width:48px!important; height:48px!important; inline-size:48px!important; block-size:48px!important; }
 .sb-public .bm-lp__chips { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:991.98px) {
 .sb-public .bm-lp__hero-grid { grid-template-columns:minmax(0,1fr); gap:1.25rem; }
 .sb-public .bm-lp__hero-copy { padding:0; }
 .sb-public .bm-lp__orbit { grid-template-columns:repeat(6,minmax(0,1fr)); min-height:0; gap:.5rem; padding:.75rem 0; max-width:30rem; margin:auto; }
 .sb-public .bm-lp__orb { width:40px!important; height:40px!important; inline-size:40px!important; block-size:40px!important; translate:none!important; }
 .sb-public .bm-lp__orb svg { width:22px; height:22px; }
 .sb-public .bm-lp__chips { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .sb-public .bm-lp__hero-form { margin:auto; }
 .sb-public .bm-lp__nav-inner { gap:.6rem; }
 .sb-public .bm-lp__nav-toggle { margin-left:0; }
 .sb-public .bm-lp__brand { max-width:calc(100% - 105px); }
 .sb-public .bm-lp__brand .bm-brand__text { font-size:clamp(1rem,4vw,1.6rem)!important; }
 .sb-public .bm-lp__brand .bm-brand__logo { max-height:40px; }
 .sb54-hero-actions,.sb54-hero-notes { justify-content:center; }
 .sb54-usecase-grid { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { .sb54-neon .sb54-pulse,.sb-public .bm-lp__orb { animation:none!important; } }
