body {
  position: relative;
  min-height: 100svh;
  background: #080a0f;
}

.login-ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.login-ambient::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, black, transparent 75%); content: ""; }
.login-ambient span { position: absolute; width: 34rem; height: 34rem; border-radius: 50%; filter: blur(90px); opacity: .16; }
.login-ambient span:first-child { top: -16rem; left: -10rem; background: #a946e8; }
.login-ambient span:last-child { right: -14rem; bottom: -17rem; background: #ff3f97; }

.login-layout { position: relative; z-index: 1; display: grid; min-height: 100svh; place-items: center; padding: 2rem; }
.login-card { width: min(100%, 432px); border: 1px solid rgba(255,255,255,.105); border-radius: 22px; padding: 2rem; background: linear-gradient(155deg, rgba(24,29,40,.97), rgba(15,18,26,.985)); box-shadow: 0 34px 100px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.025); }
.login-header, .brand, .locale-switcher, .password-field { display: flex; align-items: center; }
.login-header { justify-content: space-between; gap: 1.25rem; }
.brand { gap: .75rem; }
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { font-size: 1rem; }
.brand small { margin-top: .22rem; color: var(--color-text-muted); font-size: .68rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark { position: relative; display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border: 1px solid transparent; border-radius: 13px; background: linear-gradient(var(--color-surface-inset), var(--color-surface-inset)) padding-box, var(--gradient-brand) border-box; box-shadow: 0 10px 30px rgba(219,63,163,.14); }
.vikbot-login-mark::before, .vikbot-login-mark::after { position: absolute; width: 23px; height: 8px; border: 2px solid #ff86b8; border-right: 0; border-left: 0; border-radius: 50%; content: ""; transform: rotate(-18deg); }
.vikbot-login-mark::after { width: 14px; border-color: #b68bff; transform: rotate(-18deg) translateY(7px); }
.locale-switcher { gap: .2rem; }
.locale-switcher > span { color: var(--color-border-strong); }
.locale-switcher button { min-width: 40px; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--color-text-muted); cursor: pointer; font-size: .75rem; font-weight: 760; letter-spacing: .04em; }
.locale-switcher button:hover { color: var(--color-text); }
.locale-switcher button[aria-current="true"] { background: var(--color-accent-soft); color: #ff91bf; }
.login-copy { margin: 2.6rem 0 1.65rem; }
.login-copy h1 { margin: .4rem 0 .75rem; font-size: clamp(1.85rem, 5vw, 2.25rem); }
.login-copy > p:last-child { margin: 0; color: var(--color-text-secondary); }
#login-form { display: grid; gap: 1rem; }
#login-form label { display: grid; gap: .45rem; font-size: .88rem; font-weight: 650; }
#login-form input { min-height: 50px; }
.password-field { position: relative; }
.password-field input { padding-right: 56px; }
.password-field button { position: absolute; right: 4px; display: grid; width: 44px; height: 42px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--color-text-secondary); cursor: pointer; }
.password-field button:hover { background: var(--color-surface-hover); color: var(--color-text); }
#submit { min-height: 50px; margin-top: .25rem; border: 1px solid transparent; border-radius: var(--radius-control); background: var(--gradient-brand); color: #fff; cursor: pointer; font-weight: 760; box-shadow: 0 12px 30px rgba(226,72,150,.2); transition: transform var(--motion-fast) var(--motion-ease), filter var(--motion-fast) ease; }
#submit:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
#submit:active:not(:disabled) { transform: translateY(0); }
#submit:disabled { opacity: .7; cursor: wait; }
.login-error { margin: -.35rem 0 1.1rem; border: 1px solid rgba(255,104,125,.35); border-radius: var(--radius-control); padding: .75rem .9rem; background: var(--color-danger-soft); color: #ffb0bc; }
.telegram-note { margin: 1.35rem 0 0; color: var(--color-text-secondary); font-size: .82rem; text-align: center; }
.security-note { display: flex; justify-content: center; gap: .45rem; margin: .75rem 0 0; color: var(--color-text-muted); font-size: .72rem; }
.security-note > span:first-child { color: var(--color-success); font-size: .58rem; }
@media (max-width: 520px) { .login-layout { padding: 1rem; } .login-card { border-radius: 19px; padding: 1.5rem 1.25rem; } .login-copy { margin-top: 2.15rem; } }
@media (prefers-reduced-motion: reduce) { .login-ambient span { filter: blur(70px); } }
