/* Original account layout; color overrides only, matching the home navigation. */
/* Provider links retain their authentication URLs; only presentation changes. */
body.login .or-text { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: #64748b; font-size: 13px; font-weight: 500; text-align: center; }
body.login .or-text::before, body.login .or-text::after { content: ""; flex: 1; height: 1px; background: #d8e2de; }
body.login .auth-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
body.login .auth-social .btn-sc { min-width: 0; }
body.login .auth-social a {
    box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 9px; width: 100%; min-height: 82px; padding: 13px 8px; border: 1px solid #d7e1dc;
    border-radius: 14px; background: #fff; color: #26352f; font-size: 13px; font-weight: 600;
    line-height: 1.3; text-decoration: none; box-shadow: 0 2px 5px rgba(20, 50, 35, .04);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}
body.login .auth-social svg, body.login .auth-social img { display: block; width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
body.login .auth-social .fa-github { font-size: 24px; line-height: 1; }
body.login .auth-social .btn-social-telegram { color: #096f9e; background: #f0f9ff; border-color: #c5e5f4; }
body.login .auth-social .btn-social-telegram svg { fill: #168ac0; }
body.login .auth-social .btn-social-github { color: #fff; background: #24292f; border-color: #24292f; }
@media (hover: hover) {
    body.login .auth-social a:hover { transform: translateY(-2px); border-color: #8ba99a; box-shadow: 0 5px 12px rgba(20, 50, 35, .1); }
    body.login .auth-social .btn-social-telegram:hover { background: #e0f2fe; border-color: #69b9df; }
    body.login .auth-social .btn-social-google:hover { background: #f8fafc; }
    body.login .auth-social .btn-social-github:hover { background: #343c45; border-color: #596775; }
}
body.login .auth-social a:focus-visible { outline: 3px solid #57aa83; outline-offset: 3px; }
body.login .auth-social a:active { transform: translateY(0); box-shadow: none; }
.dark body.login .or-text { color: #afc2b8; }
.dark body.login .or-text::before, .dark body.login .or-text::after { background: #46564f; }
@media (max-width: 359px) {
    body.login .auth-social { grid-template-columns: 1fr; }
    body.login .auth-social a { flex-direction: row; min-height: 48px; padding: 11px 16px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    body.login .auth-social a { transition: none; }
    body.login .auth-social a:hover { transform: none; }
}
body.login::before { background-image: url('/images/bg-login-page-nav.svg'); }
body.login h2 { color: #173c33; }
/* Explicit action classes keep social and passkey buttons unchanged. */
/* Keep the provider widget intact, without a second bulky card around it. */
body.login .auth-captcha {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 16px auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow-x: auto;
    scrollbar-width: thin;
    font-size: 12px;
    line-height: 1.6;
    color: #64756c;
}
body.login .auth-captcha > div { flex: 0 0 auto; max-width: 100%; }
body.login .auth-captcha .g-recaptcha { flex: 0 0 auto; }
/* The decorated flex wrapper must still respect disabled/OTP flow visibility. */
body.login .auth-captcha[hidden],
body.login .auth-captcha [hidden] {
    display: none !important;
}
.dark body.login .auth-captcha {
    color: #a4baad;
}
body.login .auth-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}
body.login .auth-actions.auth-actions-single { grid-template-columns: minmax(0, 1fr); }
body.login .auth-form-column .auth-action {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
    min-height: 48px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .15px;
    line-height: 1.4;
    padding: 13px 22px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
    -webkit-tap-highlight-color: transparent;
}
body.login .auth-form-column .auth-action-primary {
    color: #fff;
    border: 1px solid #21664f;
    background: linear-gradient(135deg, #287c5f 0%, #1b5944 55%, #173e33 100%);
    box-shadow: 0 6px 15px rgba(23, 76, 56, .2), inset 0 1px 0 rgba(255, 255, 255, .2);
}
body.login .auth-form-column .auth-action-primary:hover:not(:disabled) {
    color: #fff;
    background: linear-gradient(135deg, #30946f, #20634d 60%, #194b3b);
    border-color: #2e8e6a;
    box-shadow: 0 9px 20px rgba(23, 76, 56, .25), inset 0 1px 0 rgba(255, 255, 255, .23);
    transform: translateY(-2px);
}
body.login .auth-form-column .auth-action-secondary {
    color: #205b45;
    border: 1px solid #bdd8c9;
    background: linear-gradient(145deg, #f8fcfa, #e5f2eb);
    box-shadow: 0 3px 9px rgba(23, 76, 56, .06), inset 0 1px 0 #fff;
}
body.login .auth-form-column .auth-action-secondary:hover {
    color: #174531;
    border-color: #82b89b;
    background: linear-gradient(145deg, #eff9f3, #d7eddf);
    box-shadow: 0 6px 14px rgba(23, 76, 56, .12);
    transform: translateY(-2px);
}
body.login .auth-form-column .auth-action:focus-visible { outline: 3px solid #57aa83; outline-offset: 3px; }
body.login .auth-form-column .auth-action:active:not(:disabled) { transform: translateY(0); box-shadow: inset 0 2px 5px rgba(12, 44, 31, .12); }
body.login .auth-form-column .auth-action:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.dark body.login .auth-form-column .auth-action-secondary { color: #c7eed9; border-color: #426956; background: linear-gradient(145deg, #283f36, #20332c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.dark body.login .auth-form-column .auth-action-secondary:hover { color: #e7fff1; border-color: #6ba98a; background: linear-gradient(145deg, #335343, #284335); }
@media (prefers-reduced-motion: reduce) {
    body.login .auth-form-column .auth-action { transition: none; }
    body.login .auth-form-column .auth-action:hover { transform: none; }
}
@media (max-width: 359px) {
    body.login .auth-actions { grid-template-columns: minmax(0, 1fr); }
}
body.login .toggle-password, body.login a[href='/forgot-password'] { color: #1f6d53; }
/* Keep the eye inside the input, independent of viewport and text visibility. */
body.login .auth-form-column .password-container {
    position: relative;
    width: 100%;
    min-width: 0;
}
body.login .auth-form-column .password-container #password {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding-right: 56px;
}
body.login .auth-form-column .password-container .toggle-password {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #39775d;
    font-size: 17px;
    cursor: pointer;
}
body.login .auth-form-column .toggle-password:hover { background: rgba(45, 149, 109, .1); }
body.login .auth-form-column .toggle-password:focus-visible { outline: 2px solid #2d956d; outline-offset: -2px; }
.dark body.login .auth-form-column .toggle-password { color: #a4dabe; }
body.login .login__input:focus, body.login .password-container:focus-within { border-color: #2d956d; }
@media (max-width: 1279px) {
    body.login { background-image: linear-gradient(115deg, #173c33 0%, #1b4d40 55%, #1f6d53 100%); }
}

/* Preserve the original auth background; prevent a separate strip below the page. */
html:has(body.login) { min-height: 100%; background: #f1f5f8; }
html body.login {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding-top: 0;
}
body.login .auth-intro { padding: 28px 28px 28px 0; }
@media (min-width: 1280px) {
    body.login .auth-intro { position: relative; left: -24px; }
}
body.login .auth-intro-content { width: 100%; text-align: center; }
body.login .auth-intro-content > .text-4xl { font-size: clamp(28px, 2.5vw, 36px); line-height: 1.3; margin-top: 24px; }
body.login .auth-intro-content > .text-lg { max-width: 360px; margin-left: auto; margin-right: auto; line-height: 1.7; }
/* Keep the restored decorative background behind the logo and form. */
body.login { isolation: isolate; }
body.login::before { z-index: -1; pointer-events: none; }
body.login > .container { position: relative; z-index: 1; }
body.login .auth-brand {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
}
body.login .auth-brand img { display: block; width: 200px; height: auto; max-width: 100%; max-height: 56px; object-fit: contain; }
body.login .auth-brand-name { color: #173c33; font-size: 20px; font-weight: 700; }
body.login .auth-brand:focus-visible { outline: 2px solid #2d956d; outline-offset: 4px; }
body.login .auth-mobile-brand { display: none; }
body.login .auth-form-column { min-height: 100vh; min-height: 100dvh; height: auto; }
@media (max-width: 1279px) {
    body.login .auth-form-column { margin-top: 0; margin-bottom: 0; padding-top: 24px; padding-bottom: 24px; }
    body.login .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 26px; }
    body.login .auth-brand img { max-width: 200px; max-height: 48px; }
}
html.dark:has(body.login) { background: #232a3b; }
.dark body.login .auth-intro .text-white { color: #e2e8f0; }
.dark body.login .auth-intro .text-opacity-70 { color: #94a3b8; }
.dark body.login h2 { color: #e2e8f0; }

/* Consistent headings without changing the existing authentication controls. */
body.login .auth-bank-orbit {
    --orbit-duration: 24s;
    position: relative;
    width: min(100%, 440px);
    aspect-ratio: 1;
    margin: 0 auto;
    isolation: isolate;
    contain: layout style;
}
body.login .auth-orbit-glow {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(137, 231, 188, .22), transparent 70%);
    pointer-events: none;
}
body.login .auth-orbit-core {
    position: absolute;
    inset: 34%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
    text-align: center;
    border-radius: 50%;
    border: 1px solid rgba(204, 255, 230, .45);
    background: radial-gradient(circle at 30% 20%, rgba(171, 244, 207, .22), transparent 60%), linear-gradient(145deg, rgba(33, 105, 78, .95), rgba(14, 49, 40, .98));
    box-shadow: 0 0 0 7px rgba(158, 233, 196, .04), 0 0 0 8px rgba(179, 245, 213, .13), 0 16px 36px rgba(5, 30, 23, .3), inset 0 1px 14px rgba(213, 255, 235, .12);
    isolation: isolate;
}
body.login .auth-orbit-core::before {
    content: "";
    position: absolute;
    inset: -17px;
    border-radius: 50%;
    border: 1px solid rgba(171, 239, 206, .16);
    border-top-color: rgba(201, 255, 229, .7);
    border-bottom-color: rgba(115, 214, 169, .45);
    animation: auth-bank-spin 24s linear infinite;
    pointer-events: none;
    z-index: -1;
}
body.login .auth-orbit-core::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 1px solid rgba(208, 255, 232, .1);
    background: linear-gradient(145deg, rgba(255, 255, 255, .09), transparent 55%);
    pointer-events: none;
    z-index: -1;
}
body.login .auth-orbit-core > img { width: 74%; height: 74%; max-width: 104px; max-height: 104px; object-fit: contain; animation: auth-bank-spin 28s linear infinite; }
body.login .auth-orbit-core > span { color: #fff; font-weight: 700; font-size: 12px; overflow-wrap: anywhere; padding: 12px; }
body.login .auth-orbit-ring {
    pointer-events: none;
    position: absolute;
    inset: 20%;
    border: 1px solid rgba(201, 244, 224, .24);
    border-radius: 50%;
    animation: auth-bank-spin var(--orbit-duration, 24s) linear infinite;
    transform-origin: 50% 50%;
    will-change: transform;
}
body.login .auth-orbit-ring-1 { --orbit-duration: 36s; inset: 5%; animation-direction: reverse; }
body.login .auth-orbit-position { position: absolute; width: 0; height: 0; }
body.login .auth-orbit-bank {
    pointer-events: auto;
    position: absolute;
    top: -27px;
    left: -27px;
    width: 54px;
    height: 54px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 5px 16px rgba(0, 0, 0, .14);
    animation: auth-bank-spin var(--orbit-duration, 24s) linear infinite reverse;
    transform-origin: 50% 50%;
}
body.login .auth-orbit-bank img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
body.login .auth-orbit-ring-1 .auth-orbit-bank { animation-direction: normal; }
@keyframes auth-bank-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Keep visible orbits moving, including when a form field has focus.
   The layout hides the illustration on small screens; do not use a separate
   animation breakpoint that could disagree with the legacy xl breakpoint. */
body.login .auth-orbit-ring,
body.login .auth-orbit-bank,
body.login .auth-orbit-core > img,
body.login .auth-orbit-core::before { animation-play-state: running; }
/* Pause the entire illustration together so logo counter-rotation stays aligned.
   Transparent rings must not intercept links on the other ring. */
body.login .auth-bank-orbit:is(:hover, :focus-within) .auth-orbit-ring,
body.login .auth-bank-orbit:is(:hover, :focus-within) .auth-orbit-bank,
body.login .auth-bank-orbit:is(:hover, :focus-within) .auth-orbit-core > img,
body.login .auth-bank-orbit:is(:hover, :focus-within) .auth-orbit-core::before { animation-play-state: paused; }
body.login .auth-orbit-bank:focus-visible,
body.login .auth-orbit-core:focus-visible { outline: 3px solid #57aa83; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
    /* Reduce orbital speed without freezing the bank illustration. Keep the
       inherited duration identical for each ring and its counter-rotation. */
    body.login .auth-bank-orbit { --orbit-duration: 96s; }
    body.login .auth-orbit-ring-1 { --orbit-duration: 144s; }
    body.login .auth-orbit-core > img, body.login .auth-orbit-core::before { animation: none; will-change: auto; }
}

body.login .auth-title {
    margin: 0;
    font-size: clamp(25px, 2.3vw, 32px);
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -.6px;
    text-wrap: balance;
}
body.login .auth-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #1f6d53, #72bd98);
}
@media (min-width: 1280px) {
    body.login .auth-title::after { margin-left: 0; }
    /* Bias centering downward while allowing tall forms to scroll naturally. */
    body.login .auth-login-column { padding-top: 80px; padding-bottom: 16px; }
}
@media (max-width: 1279px) {
    body.login .auth-login-column { padding-top: 40px; }
}
