﻿/* Tailwind Preflight is off for this build and _Layout-NoNav.cshtml never
   loads Bootstrap's reboot.css (the only place a body{margin:0} reset used
   to live) - the browser's default ~8px body margin was left untouched,
   showing as a dark border around the page around .login-page. */
/* Same dark navy as .login-page itself: if min-height:100vh ever comes up a
   hair short of the real viewport (address-bar resize, subpixel rounding),
   the browser's own background used to show through as a stray black line
   along the top/bottom edge instead of blending in. */
html, body { margin: 0; padding: 0; background: #0b1118; }
.login-page { display: block; width: 100%; max-width: none; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0; overflow: hidden; background: #0b1118; color: #f7f9fc; font-family: var(--ds-font-family); }
/* .login-shell carries "no-gutters" (Bootstrap's remove-the-grid-gutter
   utility) but it was never defined in this design system - the base
   ".ds-grid > [class*=ds-col-] { padding: 0 15px }" gutter stayed in place,
   leaving a 30px seam between the two panels' backgrounds where the page's
   own darker background showed through as a stray vertical black line. */
.login-page .login-shell.no-gutters {
    margin-left: 0;
    margin-right: 0;
}
.login-page .login-shell.no-gutters > [class*="ds-col-"] {
    padding-left: 0;
    padding-right: 0;
}
.account-state-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 2rem 1rem; background: linear-gradient(145deg, #101923 0%, #172638 100%); color: #f7f9fc; font-family: var(--ds-font-family); }
.account-state-card { width: min(100%, 34rem); padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid #354356; border-radius: .8rem; background: #16212f; box-shadow: 0 1.8rem 4.5rem rgba(0,0,0,.26); }
.account-state-card h1 { margin: 0 0 .6rem; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; }
.account-state-message { margin: .6rem 0 0; color: #aebaca; font-size: .9rem; line-height: 1.6; }
.account-state-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.account-state-actions .login-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.account-validation { margin: 0 0 1rem; padding: .7rem .85rem; border: 1px solid rgba(239,119,119,.45); border-radius: .5rem; background: rgba(239,119,119,.1); color: #ffb0b0; font-size: .78rem; }
@media (max-width: 430px) { .account-state-page { align-items: flex-start; padding-top: 12vh; } }
.login-page .full-height { min-height: 100vh; height: 100vh; }
.login-brand-panel { position: relative; overflow: hidden; background: linear-gradient(145deg, #101923, #172638) !important; }
.login-brand-panel:before { content: ''; position: absolute; inset: 0; opacity: .5; background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.04) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: auto, 48px 48px, 48px 48px; }
/* Bigger and pushed off the top-left corner on purpose now that
   border-radius:50% actually survives (see the .ds-auth-shell exception
   below) - reads as ambient light bleeding in from outside the panel
   rather than an isolated circle floating in the middle of it. */
.login-brand-glow { position: absolute; width: 34rem; height: 34rem; left: -14rem; top: -11rem; border-radius: 50%; background: rgba(30,91,130,.28); filter: blur(35px); animation: login-glow-drift 14s ease-in-out infinite; }
@keyframes login-glow-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .85; }
    50% { transform: translate(2.5rem, 1.75rem) scale(1.15); opacity: 1; }
}
/* "ds-col-md-6" (meant to split this shell into two 50% panels on desktop,
   like Bootstrap's grid) was never actually generated by this design
   system's Tailwind build - the base ".ds-col-* { width:100% }" rule was
   left standing at every width, so both panels always rendered full-width
   and stacked instead of side-by-side, and the brand text's own
   left-alignment (meant to read as "left-aligned within its own half") sat
   pinned to the left edge of the *entire* screen with a huge dead gap on
   the right. Give the shell a real 50/50 split above the stacked-mobile
   breakpoint (@media max-width:1199px, further up in this file). */
@media (min-width: 1200px) {
    .login-page .login-shell {
        flex-wrap: nowrap;
    }
    .login-page .login-shell > .login-brand-column,
    .login-page .login-shell > .login-form-column {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }
}
.login-brand-content { z-index: 1; top: 50%; transform: translateY(-50%); padding-left: clamp(2rem, 8vw, 8rem) !important; padding-right: clamp(2rem, 5vw, 5rem) !important; }
.login-brand-kicker, .login-eyebrow { margin: 0 0 1.4rem; color: #f5901e; font-size: .68rem; font-weight: 800; letter-spacing: .2em; }
.login-brand-kicker span { margin-left: .35rem; color: rgba(255,255,255,.45); }
.login-brand-content img { max-width: min(26rem, 100%); max-height: 3.8rem; object-fit: contain; object-position: left center; }
.login-brand-content h1 { max-width: 34rem; margin-top: 2.5rem !important; color: #fff; font-size: clamp(2.6rem, 4vw, 4.4rem); font-weight: 300; line-height: 1.08; letter-spacing: -.04em; }
.login-brand-description { max-width: 24rem; margin-top: 1.4rem; color: rgba(255,255,255,.58); font-size: .95rem; line-height: 1.6; }
.login-form-panel { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(145deg, #101923 0%, #172638 100%) !important; }
.login-form-panel:before { content: ''; position: absolute; inset: 0; opacity: .5; background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.04) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: auto, 48px 48px, 48px 48px; }
.login-form-panel:before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0, rgba(245,144,30,.1), transparent 35%), linear-gradient(180deg, rgba(255,255,255,.015), transparent 50%); }
.login-form-panel .account-form-container { position: relative; z-index: 1; top: auto; right: auto; bottom: auto; left: auto; width: min(100%, 31rem); padding: 0 2rem; transform: none; }
.login-card { overflow: visible; padding: 2.6rem; border: 1px solid rgba(255,255,255,.09); border-radius: 1.15rem; background: rgba(22,33,47,.92); box-shadow: 0 1.8rem 4.5rem rgba(0,0,0,.26); }
.login-flow { position: relative; transition: height .28s ease; }
.login-panel { display: none; transform: translateX(2rem); opacity: 0; }
.login-panel.is-active { display: block; animation: login-slide-in .28s ease forwards; }
.login-panel[data-direction="back"].is-active { animation-name: login-slide-back .28s ease forwards; }

/* Sets a class-based "display" back to none whenever the native [hidden]
   attribute is present - .ds-button (design-system) declares its own
   "display: inline-flex" unconditionally, which (author rule vs. the
   browser's own [hidden] default) wins the cascade and kept "Voltar"
   visible on the e-mail step despite hidden being set correctly in markup
   and in the DOM the whole time ("não faz sentido no primeiro step
   aparecer o botão voltar"). Scoped broadly to the login page rather than
   just this one button, since any other control here could hit the same
   clash later. */
.login-page [hidden] {
    display: none !important;
}

/* Slide+fade between the credentials panel's email and password steps,
   matching the existing .login-panel transition language above. Both
   steps share .login-credentials-step; JS toggles direction-specific
   leave/enter classes around the hidden-attribute swap instead of an
   instant cut. */
.login-credentials-step.is-leaving-forward { animation: login-step-out-forward .18s ease forwards; }
.login-credentials-step.is-entering-forward { animation: login-step-in-forward .22s ease forwards; }
.login-credentials-step.is-leaving-back { animation: login-step-out-back .18s ease forwards; }
.login-credentials-step.is-entering-back { animation: login-step-in-back .22s ease forwards; }
@keyframes login-step-out-forward { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-1rem); } }
@keyframes login-step-in-forward { from { opacity: 0; transform: translateX(1rem); } to { opacity: 1; transform: translateX(0); } }
@keyframes login-step-out-back { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(1rem); } }
@keyframes login-step-in-back { from { opacity: 0; transform: translateX(-1rem); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
    .login-credentials-step.is-leaving-forward,
    .login-credentials-step.is-entering-forward,
    .login-credentials-step.is-leaving-back,
    .login-credentials-step.is-entering-back {
        animation: none;
    }
}

.login-card h2 { margin: 0 0 .45rem; color: #fff; font-size: 1.85rem; font-weight: 700; letter-spacing: -.025em; }
.login-card-intro { margin: 0 0 1.5rem; color: #8794a7; font-size: .88rem; line-height: 1.55; }
.login-passkey-hint { display:flex; align-items:center; gap:.55rem; margin:0 0 1rem; padding:.65rem .75rem; border:1px solid rgba(245,144,30,.35); border-radius:.6rem; background:rgba(245,144,30,.08); color:#f6c27b; font-size:.78rem; line-height:1.4; }
.login-passkey-hint .material-icons { color:#f5901e; font-size:1.1rem; }
.login-field { margin-bottom: 1.15rem; }
.login-field label { display: block; margin-bottom: .4rem; color: #c4cfdd; font-size: .78rem; font-weight: 700; }
.login-field input { width: 100%; height: 3.2rem; padding: .85rem 1rem; border: 1px solid #354356; border-radius: .6rem; background: #1c2938; color: #fff; }
.login-field input:focus { border-color: #f5901e; box-shadow: 0 0 0 3px rgba(245,144,30,.16); outline: none; }
.login-field input::placeholder { color: #8995a7; }
.login-password-field { position: relative; display: block; width: 100%; }
.login-password-field > input { display: block; box-sizing: border-box; width: 100%; padding-right: 3.2rem; }
.login-password-toggle { position: absolute; z-index: 2; top: 50%; right: .65rem; display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: .4rem; background: transparent; color: #8995a7; cursor: pointer; transform: translateY(-50%); outline: 0; box-shadow: none; }
.login-password-toggle:hover { color: #f5901e; background: rgba(245,144,30,.08); }
.login-password-toggle:focus,
.login-password-toggle:active { outline: 0; box-shadow: none; }
.login-password-toggle:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px rgba(245,144,30,.7); }
.login-password-icon { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.login-password-icon--hide { display: none; }
.login-password-toggle.is-visible .login-password-icon--show { display: none; }
.login-password-toggle.is-visible .login-password-icon--hide { display: block; }
.login-inline-error { margin: 0 0 1rem; padding: .7rem .8rem; border: 1px solid rgba(239,119,119,.45); border-radius: .55rem; background: rgba(239,119,119,.1); color: #ffb0b0; font-size: .78rem; line-height: 1.4; }
/* Chrome/Edge/Safari force a light yellow/blue background on autofilled
   inputs that plain background/color rules can't override - only this
   inset-box-shadow trick can. Without it, a saved e-mail/password made the
   field render pale/light instead of matching the dark theme. */
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus,
.login-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #1c2938 inset;
    box-shadow: 0 0 0 1000px #1c2938 inset;
    caret-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}
.login-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.6rem; }
.login-button { min-height: 2.9rem; padding: .8rem 1.1rem; border-radius: .58rem; font-size: .7rem; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.login-button:focus-visible, .login-link:focus-visible { outline: 3px solid rgba(245,144,30,.55); outline-offset: 2px; }
.login-button--primary { border: 1px solid #f5901e; background: #f5901e; color: #fff; box-shadow: 0 .45rem 1.1rem rgba(245,144,30,.2); }
.login-button--secondary { border: 1px solid #354356; background: transparent; color: #c4cfdd; }
.login-button:disabled { cursor: wait; opacity: .55; }
.login-button[aria-busy="true"] { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; }
.login-button-spinner { width: .9rem; height: .9rem; flex: 0 0 .9rem; border: 2px solid rgba(255,255,255,.38); border-top-color: currentColor; border-radius: 50%; animation: login-spin .7s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-link { margin-top: 1rem; padding: 0; border: 0; background: transparent; color: #f5a64d; font-size: .77rem; cursor: pointer; }
.login-passkey-fallback { margin: 1.15rem 0 0; color: #8794a7; font-size: .78rem; }
.login-link--inline { margin-top: 0; padding: 0; border: 0; background: transparent; color: #f5a64d; font-size: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Ícone da passkey: marca o painel visualmente sem competir com o título. */
.login-passkey-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1.1rem; border: 1px solid rgba(245,144,30,.35); border-radius: .75rem; background: rgba(245,144,30,.1); color: #f5901e; }
.login-passkey-icon svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Conta memorizada neste dispositivo (cookie de passkey). */
.login-passkey-account { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.5rem; padding: .7rem .8rem; border: 1px solid #354356; border-radius: .6rem; background: #1c2938; }
.login-passkey-account__avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; flex: 0 0 1.9rem; border-radius: 50%; background: rgba(245,144,30,.16); color: #f5901e; font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.login-passkey-account__email { min-width: 0; color: #fff; font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
.login-button--back { min-width: 6rem; border-color: #354356; background: #1c2938; color: #c4cfdd; box-shadow: none; }
.login-eyebrow--error { color: #ef7777; }
.login-info-grid { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem 1rem; margin: 1rem 0; padding: 1rem; border: 1px solid #354356; border-radius: .6rem; background: #1c2938; font-size: .78rem; }
.login-info-grid span { color: #8995a7; }.login-info-grid strong { min-width: 0; color: #fff; overflow-wrap: anywhere; word-break: break-word; }
.login-phone-field { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: .55rem; align-items: start; }
.login-phone-field > input[type="tel"] { min-width: 0; width: 100%; }
.login-country-picker { position: relative; z-index: 5; }
.login-country-picker select { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login-country-trigger { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto .8rem; align-items: center; gap: .3rem; width: 100%; height: 3.2rem; padding: .65rem .55rem; border: 1px solid #354356; border-radius: .6rem; background: #1c2938; color: #fff; text-align: left; cursor: pointer; }
.login-country-trigger:focus-visible, .login-country-option:focus-visible, .login-country-search:focus-visible { border-color: #f5901e; box-shadow: 0 0 0 3px rgba(245,144,30,.16); outline: none; }
.login-country-flag { flex: 0 0 16px; width: 16px; height: 11px; }
.login-country-name, .login-country-code { overflow: hidden; font-size: .78rem; white-space: nowrap; text-overflow: ellipsis; }
.login-country-code { color: #c4cfdd; font-weight: 700; }
.login-country-chevron { color: #8995a7; font-size: 1rem; text-align: center; }
.login-country-menu { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 20; width: min(19rem, calc(100vw - 2rem)); max-height: min(19rem, calc(100vh - 2rem)); padding: .45rem; overflow: hidden; border: 1px solid #354356; border-radius: .65rem; background: #16212f; box-shadow: 0 .8rem 1.8rem rgba(0,0,0,.32); }
.login-country-menu.is-open-up { top: auto; bottom: calc(100% + .35rem); }
.login-country-search-label { display: block; margin: 0 0 .25rem; color: #8995a7; font-size: .65rem; font-weight: 700; }
.login-country-search { width: 100%; height: 2.15rem; padding: .4rem .55rem; border: 1px solid #354356; border-radius: .4rem; background: #1c2938; color: #fff; font-size: .75rem; }
.login-country-options { max-height: 11.25rem; margin-top: .35rem; overflow-x: hidden; overflow-y: auto; }
.login-country-option { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: .5rem; width: 100%; min-height: 2rem; padding: .35rem .45rem; border: 0; border-radius: .35rem; background: transparent; color: #e8edf4; text-align: left; cursor: pointer; }
.login-country-option:hover, .login-country-option:focus-visible, .login-country-option[aria-selected="true"] { background: rgba(245,144,30,.1); }
.login-country-option-name { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.login-country-option-code { color: #aebaca; font-size: .75rem; font-variant-numeric: tabular-nums; }
.login-field-help { margin: .45rem 0 0; padding-left: .1rem; color: #8995a7; font-size: .72rem; line-height: 1.4; }
.login-qr-wrap { display: flex; flex-direction: column; align-items: center; margin: 1rem 0 1.15rem; padding: 1rem 1rem .8rem; border: 1px solid #354356; border-radius: .8rem; background: linear-gradient(145deg, #1c2938, #172433); }
.login-qr-frame { position: relative; display: flex; align-items: center; justify-content: center; padding: .9rem; border-radius: .65rem; background: #fff; box-shadow: 0 .7rem 1.4rem rgba(0,0,0,.2); }
.login-qr-frame img { display: block; width: 14rem; height: 14rem; image-rendering: pixelated; }
.login-qr-corner { position: absolute; width: .85rem; height: .85rem; border-color: #f5901e; border-style: solid; }
.login-qr-corner--tl { top: .4rem; left: .4rem; border-width: 2px 0 0 2px; }.login-qr-corner--tr { top: .4rem; right: .4rem; border-width: 2px 2px 0 0; }
.login-qr-corner--bl { bottom: .4rem; left: .4rem; border-width: 0 0 2px 2px; }.login-qr-corner--br { right: .4rem; bottom: .4rem; border-width: 0 2px 2px 0; }
.login-qr-caption { margin: .7rem 0 0; color: #aebaca; font-size: .7rem; text-align: center; }
.login-manual-key { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 1rem; color: #8995a7; font-size: .72rem; text-align: center; }.login-manual-key code { color: #fff; font-size: .72rem; letter-spacing: .08em; overflow-wrap: anywhere; }
.login-code-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; }
.login-code-digit { width: 100% !important; height: 2.65rem !important; padding: 0 !important; border-color: #46566a !important; font-size: 1rem; font-weight: 800; text-align: center; }
.login-code-digit:focus { border-color: #f5901e !important; box-shadow: 0 0 0 3px rgba(245,144,30,.16) !important; }
.login-loading, .login-status { color: #c4cfdd; font-size: .85rem; }.login-live-region { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Only meant to show below the 1199px breakpoint (see the @media block
   further down, which sets display:block there) - without a display:none
   default it rendered on every width, duplicating the desktop brand panel's
   logo/title next to it. */
.login-mobile-welcome-message { display: none; position: relative; z-index: 1; padding-top: 2rem; text-align: center; }.login-mobile-welcome-message img { max-width: 14rem; }.login-mobile-welcome-message h2 { color: #fff !important; }
@keyframes login-slide-in { from { transform: translateX(2rem); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes login-slide-back { from { transform: translateX(-2rem); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .login-flow, .login-panel.is-active, .login-button-spinner, .login-brand-glow { animation: none; transition: none; } }
@media (max-width: 767px) { .login-page .full-height { min-height: auto; height: auto; }.login-page { overflow: auto; }.login-form-panel { min-height: 100vh !important; align-items: flex-start; padding: 2.5rem 0; }.login-form-panel .account-form-container { padding: 0 1rem; }.login-card { padding: 1.6rem; }.login-card h2 { font-size: 1.55rem; }.login-actions { display: grid; grid-template-columns: 1fr; }.login-button { width: 100%; } }
@media (max-width: 430px) { .login-phone-field { grid-template-columns: 8.75rem minmax(0, 1fr); gap: .4rem; }.login-country-trigger { padding-left: .45rem; padding-right: .35rem; }.login-country-name { font-size: .7rem; }.login-country-code { font-size: .68rem; }.login-country-menu { width: min(19rem, calc(100vw - 2rem)); max-height: min(17rem, calc(100vh - 1.5rem)); }.login-country-options { max-height: min(10rem, calc(100vh - 8rem)); }.login-code-inputs { gap: .35rem; }.login-code-digit { height: 3rem !important; font-size: 1.15rem; } }

/* O shell de autenticação tem um breakpoint próprio para não ficar dependente
   dos breakpoints/visibilidade do Bootstrap global. */
/* Em janelas móveis redimensionadas pelo Chrome, o viewport CSS pode ser
   maior do que a largura física. 1199px evita que o shell fique comprimido. */
@media (max-width: 1199px) {
    .login-page {
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Header (compact brand column) and card (form column) used to be
       centered independently of each other - the panel claimed a full
       100dvh box of its own *below* the header, so the two read as two
       separately-floating blocks with dead space around each, and their
       combined height (header + panel's own 100dvh) overflowed the
       viewport, forcing a scrollbar even though the actual content was
       shorter than one screen. Make the shell itself the single flex
       column that centers header+card together as one group. */
    .login-page .login-shell {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100dvh;
    }

    .login-page .login-shell > .mobile-hidden,
    .login-page .login-shell > div:first-child {
        /* A later rule in this same file re-shows both columns with
           "display: block !important" (for an older, abandoned "compact
           stacked header" layout) - !important always wins over a plain
           declaration regardless of source order, so the brand panel kept
           showing full-width instead of staying hidden here. */
        display: none !important;
    }

    .login-page .login-shell > .ds-col-12:last-child {
        display: block;
        width: 100%;
        max-width: none;
        padding: 0;
    }

    /* No longer needs its own 100dvh - .login-shell above now centers the
       header+card as one group, so this panel just sizes to its content
       (the card). Keeping height:auto lets its own :before grid texture
       hug the card's actual size instead of a fixed box taller than it. */
    .login-page .login-form-panel {
        display: flex;
        min-height: 0 !important;
        height: auto;
        align-items: center;
        justify-content: center;
        padding: clamp(1.5rem, 5vw, 2rem) 1rem 2rem;
        overflow: visible;
    }

    .login-page .login-mobile-welcome-message {
        display: block;
        width: min(100%, 28rem);
        margin: 0 auto 1.5rem;
        padding: 0;
    }

    .login-page .login-mobile-welcome-message img {
        display: block;
        width: min(100%, 14rem);
        max-width: 100%;
        margin: 0 auto .75rem;
        padding: 0;
    }

    .login-page .login-mobile-welcome-message h2 {
        max-width: 18rem;
        margin: 0 auto;
        font-size: .95rem !important;
        font-weight: 500 !important;
        line-height: 1.4;
        text-align: center;
    }

    .login-page .login-form-panel .account-form-container {
        width: min(100%, 31rem);
        margin: 0 auto;
        padding: 0;
    }

    .login-page .login-card {
        width: 100%;
        max-width: 28.75rem;
        margin: 0 auto;
        padding: clamp(1.5rem, 6vw, 1.75rem);
        border-radius: 1rem;
    }

    .login-page .login-card h2 {
        font-size: clamp(1.75rem, 7vw, 2rem);
    }

    .login-page .login-card-intro {
        line-height: 1.65;
    }

    .login-page .login-field input,
    .login-page .login-country-trigger,
    .login-page .login-country-search {
        font-size: 1rem;
    }

    .login-page .login-field input,
    .login-page .login-country-trigger {
        min-height: 3rem;
    }

    .login-page .login-actions {
        align-items: stretch;
    }
}

/* Keep the same visible brand effect on the form panel after all legacy
   login rules have been loaded. */
.login-page .login-form-panel:before {
    background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.04) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important;
    background-size: auto, 48px 48px, 48px 48px !important;
    opacity: .5;
}

@media (max-width: 1199px) {
    /* Use one continuous mobile background; do not paint a second gradient
       inside the form panel. */
    .login-page .login-shell,
    .login-page .login-brand-panel,
    .login-page .login-form-column,
    .login-page .login-form-panel {
        background: transparent !important;
    }

    .login-page .login-brand-panel:before,
    .login-page .login-form-panel:before {
        display: none !important;
    }
}

/* Mobile uses one continuous background layer. This prevents a visible seam
   between the branding header and the login form. */
@media (max-width: 1199px) {
    .login-page {
        position: relative;
        background-color: #14283a !important;
        background-image: radial-gradient(circle at 0% 0%, rgba(41,91,126,.22), transparent 42%), linear-gradient(145deg, #132638 0%, #142a3d 52%, #112435 100%) !important;
        background-attachment: fixed;
        background-size: cover;
    }

    .login-page:before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.035) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
        background-size: auto, 48px 48px, 48px 48px;
        opacity: .5;
    }

    .login-page .login-shell {
        position: relative;
        z-index: 1;
    }

    .login-page .login-brand-panel,
    .login-page .login-form-panel {
        background: transparent !important;
    }

    .login-page .login-brand-panel:before,
    .login-page .login-form-panel:before {
        display: none !important;
    }
}

@media (max-width: 599px) {
    .login-page .login-form-panel {
        padding-right: .75rem;
        padding-left: .75rem;
    }

    .login-page .login-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: .65rem;
    }

    .login-page .login-button,
    .login-page .login-link {
        width: 100%;
        min-height: 3rem;
    }

    .login-page .login-phone-field {
        grid-template-columns: minmax(0, 8.75rem) minmax(0, 1fr);
    }

    .login-page .login-country-menu {
        width: min(19rem, calc(100vw - 1.5rem));
    }
}

/* Responsive shell: keep the login independent from Bootstrap's global
   visibility and spacing rules. */
.login-page,
.login-page * {
    box-sizing: border-box;
}

.login-page .login-shell {
    min-height: 100dvh;
}

/* On small screens the brand is the header of the form, not a side column. */
@media (max-width: 1199px) {
    .login-page,
    .login-page .login-form-panel {
        background: linear-gradient(145deg, #101923, #172638) !important;
    }

    .login-page .login-form-panel:before {
        background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.04) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
        background-size: auto, 48px 48px, 48px 48px;
        opacity: .5;
    }

    .login-page .login-shell {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-page .login-shell .login-brand-column,
    .login-page .login-shell .login-form-column {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
    }

    .login-page .login-brand-column .login-brand-panel {
        min-height: 0 !important;
        height: auto !important;
        padding: 1.25rem 1rem 1rem;
    }

    /* Sized/positioned for the full-height desktop side panel. As a short
       compact header here it gets clipped top and bottom, so the soft blurred
       circle reads as a hard-edged rectangular smudge instead of a glow. */
    .login-page .login-brand-column .login-brand-glow {
        display: none;
    }

    .login-page .login-brand-column .login-brand-content {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        padding: 0 !important;
        text-align: center;
        transform: none !important;
    }

    .login-page .login-brand-column .login-brand-kicker {
        display: none;
    }

    .login-page .login-brand-column .login-brand-content img {
        display: block;
        width: min(15rem, 80vw);
        max-width: 100%;
        max-height: 2.5rem;
        margin: 0 auto .7rem;
    }

    .login-page .login-brand-column .login-brand-content h1 {
        max-width: none;
        margin: 0 !important;
        font-size: clamp(1.15rem, 4vw, 1.45rem);
        line-height: 1.25;
        letter-spacing: -.02em;
    }

    .login-page .login-brand-column .login-brand-description,
    .login-page .login-mobile-welcome-message {
        display: none !important;
    }
}

@media (max-width: 1199px) {
    .login-page .login-form-panel {
        min-height: 0 !important;
        height: auto;
    }

    .login-page .login-form-panel .account-form-container {
        flex: 0 1 31rem;
    }

    .login-page .login-card {
        overflow: visible;
    }
}

@media (max-width: 479px) {
    .login-page .login-form-panel {
        padding: 1.25rem .65rem 1.5rem;
    }

    .login-page .login-card {
        padding: 1.25rem;
        border-radius: .85rem;
    }

    .login-page .login-card h2 {
        font-size: 1.45rem;
    }

    .login-page .login-phone-field {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .login-page .login-country-trigger {
        min-height: 3rem;
    }

    .login-page .login-code-inputs {
        gap: .25rem;
    }

    .login-page .login-code-digit {
        height: 2.85rem !important;
        font-size: 1.05rem;
    }
}

@media (max-width: 1199px) {
    .login-page {
        background-color: #101923 !important;
        background-image: linear-gradient(145deg, #101923 0%, #172638 48%, #0f1d2a 100%) !important;
        background-attachment: fixed;
        background-size: cover;
    }

    .login-page .login-shell,
    .login-page .login-brand-panel,
    .login-page .login-form-column,
    .login-page .login-form-panel {
        background: transparent !important;
    }

    .login-page .login-form-panel {
        background: linear-gradient(145deg, #101923 0%, #172638 100%) !important;
        background-attachment: local;
        background-size: cover;
    }

    .login-page .login-brand-panel:before,
    .login-page .login-form-panel:before {
        background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.035) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
        background-size: auto, 48px 48px, 48px 48px;
        opacity: .5;
    }
}

/* Final override: the legacy form overlay must use the same visible effect
   as the MediaFoundry brand panel. */
.login-page .login-form-panel:before {
    background: linear-gradient(135deg, transparent 0 50%, rgba(245,144,30,.04) 50% 50.2%, transparent 50.2% 100%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important;
    background-size: auto, 48px 48px, 48px 48px !important;
    opacity: .5;
}

@media (max-width: 1199px) {
    /* One continuous mobile background: no second gradient inside the form. */
    .login-page {
        background-color: #142b3e !important;
        background-image: none !important;
        background-attachment: fixed;
        background-size: cover;
    }

    .login-page:before {
        background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important;
        background-size: 48px 48px, 48px 48px !important;
        opacity: 1;
    }

    .login-page .login-shell,
    .login-page .login-brand-panel,
    .login-page .login-form-column,
    .login-page .login-form-panel {
        background: transparent !important;
    }

    .login-page .login-brand-panel:before,
    .login-page .login-form-panel:before {
        display: none !important;
    }
}

/* Global border-radius unification (same 8px rule applied across the
   authenticated backoffice) - the login page sits outside .backoffice-shell
   entirely (own _Layout-NoNav layout), so it needs its own copy scoped to
   .ds-auth-shell instead. Class repeated to out-specify existing rules that
   already carry !important (e.g. circular/pill elements). */
.ds-auth-shell.ds-auth-shell.ds-auth-shell.ds-auth-shell * {
    border-radius: 8px !important;
}

/* Exception: the ambient glow behind the brand panel is a soft blurred
   circle, not a UI control - the blanket 8px above turned it into a sharp
   rounded square, which also fought its own blur() into a hard-edged block
   instead of a diffuse glow. */
.ds-auth-shell.ds-auth-shell.ds-auth-shell.ds-auth-shell .login-brand-glow {
    border-radius: 50% !important;
}

/* Size/typography unification with the rest of the backoffice's control
   spec (42px height, 14px non-uppercase text) - the login page keeps its
   own dark color scheme (that's a deliberate different visual identity
   for the auth/marketing surface, not drift), only sizing was actually
   inconsistent: .login-field input was 3.2rem (~51px), the primary/
   secondary buttons were 2.9rem (~46px) with 11.2px all-caps text, and
   the country-trigger control was a separate 3.2rem. .login-code-digit
   (the OTP box) is intentionally left alone - a larger square digit input
   is its own correct pattern, not the same control as a text field. */
.ds-auth-shell.ds-auth-shell.ds-auth-shell.ds-auth-shell .login-field input,
.ds-auth-shell.ds-auth-shell.ds-auth-shell.ds-auth-shell .login-country-trigger {
    height: 42px !important;
    font-size: 16px !important;
}
.ds-auth-shell.ds-auth-shell.ds-auth-shell.ds-auth-shell .login-button {
    min-height: 42px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* Final responsive pass for tablet and mobile. Keep the brand as a compact
   header and give the form a predictable width at every narrow viewport. */
@media (min-width: 768px) and (max-width: 1199px) {
    .login-page .login-brand-column .login-brand-panel {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .login-page .login-brand-column .login-brand-content img {
        width: min(18rem, 72vw);
        max-height: 3rem;
        margin-bottom: .75rem;
    }

    .login-page .login-brand-column .login-brand-content h1 {
        font-size: clamp(1.25rem, 3vw, 1.6rem);
    }

    .login-page .login-form-panel {
        min-height: 0 !important;
        padding: 1.75rem 1.25rem 2.5rem;
    }

    .login-page .login-form-panel .account-form-container {
        width: min(100%, 34rem);
    }

    .login-page .login-card {
        max-width: none;
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .login-page .login-brand-column .login-brand-panel {
        padding: 1rem .85rem .9rem;
    }

    .login-page .login-brand-column .login-brand-content img {
        width: min(15rem, 78vw);
        max-height: 2.5rem;
    }

    .login-page .login-brand-column .login-brand-content h1 {
        font-size: clamp(1.1rem, 5vw, 1.35rem);
    }

    .login-page .login-form-panel {
        min-height: 0 !important;
        padding: 1.25rem .75rem 1.5rem;
    }

    .login-page .login-form-panel .account-form-container {
        width: 100%;
    }

    .login-page .login-card {
        max-width: none;
        padding: 1.25rem;
    }

    .login-page .login-card h2 {
        font-size: 1.45rem;
    }

    .login-page .login-card-intro {
        margin-bottom: 1.25rem;
        font-size: .84rem;
    }

    .login-page .login-field input,
    .login-page .login-country-trigger {
        width: 100%;
        min-height: 42px;
    }
}
