/* Company accounts site only (Site:Mode = Billing; App.razor loads this file on that site alone, never on the portal).
   1. the icon rail and page layout, 2. the sign-in page and its animated scene. */

/* ── 1. Layout ─────────────────────────────────────────────────────────────── */
.page.page--rail { flex-direction: column; }
@media (min-width: 641px) {
    .page.page--rail { flex-direction: row; align-items: stretch; }
    /* The rail runs the full height of the page; its menu stays in view while the page scrolls. */
    .sidebar.sidebar--rail { width: 96px !important; flex-shrink: 0; height: auto !important; min-height: 100vh; position: relative !important; align-self: stretch; }
    .sidebar.sidebar--rail .nav-scrollable { position: sticky; top: 0; height: calc(100vh - 3.5rem) !important; }
    .rail-brand-text { display: none; }
}
@media (max-width: 640.98px) {
    .top-row.top-row--wrap { flex-wrap: wrap; height: auto !important; gap: 6px; padding-top: 8px; padding-bottom: 8px; }
    .rail { flex-direction: row !important; flex-wrap: wrap; }
    .rail-link { flex: 1 0 30%; }
    .rail-link--out { margin-top: 0 !important; border-top: 0 !important; border-radius: 14px !important; }
}
.rail { padding: 10px 8px; gap: 4px; }
.rail-link { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 4px; border-radius: 14px;
             color: #d6ebe2 !important; text-decoration: none; font-size: .72rem; font-weight: 600; transition: background .15s, color .15s; }
.rail-link i { font-size: 1.15rem; color: #B0E4CC; }
.rail-link:hover { background: rgba(255,255,255,.1); color: #fff !important; }
.rail-link.active { background: var(--secondary); color: #fff !important; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.rail-link.active i { color: #fff; }
.rail-link--out { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0 0 14px 14px; }
.rail-badge { position: absolute; top: 6px; right: 18px; background: #ef4444; color: #fff; border-radius: 999px; font-size: .62rem; padding: 1px 6px; }

/* ── 2. Sign-in ────────────────────────────────────────────────────────────── */
.login-container--billing { background: radial-gradient(760px 560px at 74% 56%, rgba(46, 170, 112, .42), transparent 70%),
                                        linear-gradient(145deg, #06110f 0%, #0b201b 45%, #0f3027 100%); }
.login-container--billing .login-shade { background: linear-gradient(90deg, rgba(6,17,15,.95) 0%, rgba(6,17,15,.78) 32%, rgba(6,17,15,0) 58%); }
.login-other-site a { color: var(--primary); font-weight: 600; }

.bscene { position: absolute; z-index: 1; right: 2%; top: 50%; transform: translateY(-50%); width: min(54vw, 760px); aspect-ratio: 1 / 1; pointer-events: none; }
.bscene svg { width: 100%; height: 100%; overflow: visible; }
.bscene * { transform-box: fill-box; transform-origin: center; }
.bs-text { fill: #b9ffd9; font: 700 12px "Segoe UI", Arial, sans-serif; letter-spacing: .12em; }
.bs-text--big { font-size: 26px; letter-spacing: 0; fill: #7dffc2; }
.bs-text--pct { font-size: 34px; letter-spacing: 0; fill: #7dffc2; }
.bs-coin { fill: #06301f; font: 800 30px "Segoe UI", Arial, sans-serif; }
.bs-coin--big { font-size: 40px; }
.bs-coin--small { font-size: 18px; }
.bs-draw { stroke: #7dffc2; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.bs-draw--line { stroke-width: 3.5; stroke-linejoin: round; }
.bs-bar { fill: url(#bsBar); transform-origin: bottom; }
.bs-twinkle { fill: #c9ffe3; }

/* Moving: every piece floats at its own pace; coins turn; bars grow; lines draw; the platform and padlock glow. */
@media (prefers-reduced-motion: no-preference) {
    .bs-float { animation: bs-bob 6s ease-in-out infinite; }
    .bs-f1 { animation-duration: 6.5s; }
    .bs-f2 { animation-duration: 7.4s; animation-delay: -2s; }
    .bs-f3 { animation-duration: 5.6s; animation-delay: -1s; }
    .bs-f4 { animation-duration: 8.2s; animation-delay: -3s; }
    .bs-f5 { animation-duration: 6.9s; animation-delay: -4s; }
    .bs-f6 { animation-duration: 5.2s; animation-delay: -2.5s; }
    @keyframes bs-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(1.2deg); } }

    .bs-spin { animation: bs-spin 5s ease-in-out infinite; }
    .bs-spin--slow { animation-duration: 7s; }
    .bs-spin--fast { animation-duration: 3.6s; }
    @keyframes bs-spin { 0%, 100% { transform: scaleX(1) rotate(-6deg); } 50% { transform: scaleX(.25) rotate(6deg); } }

    .bs-bar { animation: bs-grow 4.5s ease-in-out infinite; }
    .bs-b2 { animation-delay: .25s; } .bs-b3 { animation-delay: .5s; } .bs-b4 { animation-delay: .75s; } .bs-b5 { animation-delay: 1s; }
    @keyframes bs-grow { 0%, 12% { transform: scaleY(.15); } 55%, 85% { transform: scaleY(1); } 100% { transform: scaleY(.15); } }

    .bs-draw { animation: bs-draw 5.5s ease-in-out infinite; }
    .bs-d2 { animation-delay: .4s; } .bs-d3 { animation-delay: .8s; } .bs-d4 { animation-delay: 1.2s; }
    @keyframes bs-draw { 0% { stroke-dashoffset: 100; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }

    .bs-halo, .bs-beam { animation: bs-glow 3.8s ease-in-out infinite; }
    .bs-ring { animation: bs-ring 3.8s ease-in-out infinite; }
    .bs-ring--2 { animation-delay: -1.2s; } .bs-ring--3 { animation-delay: -2.4s; }
    @keyframes bs-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
    @keyframes bs-ring { 0%, 100% { opacity: .5; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }

    .bs-lock { animation: bs-lockglow 3.2s ease-in-out infinite; }
    .bs-pulse { animation: bs-glow 2.4s ease-in-out infinite; }
    @keyframes bs-lockglow { 0%, 100% { filter: drop-shadow(0 0 2px rgba(77,255,166,.4)); } 50% { filter: drop-shadow(0 0 14px rgba(77,255,166,.95)); } }

    .bs-twinkle { animation: bs-twinkle 2.6s ease-in-out infinite; }
    .bs-t2 { animation-delay: -.9s; } .bs-t3 { animation-delay: -1.7s; }
    @keyframes bs-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
}
/* Tab hidden (js/billing-signin-bg.js): nothing moves. */
.bscene.is-paused, .bscene.is-paused * { animation-play-state: paused !important; }

/* Phone and tablet: the scene shrinks into the top corner, faint, behind the headline and card. */
@media (max-width: 900px) {
    .bscene { top: 8px; right: -6%; transform: none; width: min(72vw, 420px); opacity: .32; z-index: 0; }
}
