* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #101217;
  color: #fff;
  font: 400 16px/1.55 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1, h2, p { margin: 0; }
#sideField { position: fixed; z-index: 0; inset: 0; width: 100vw; height: 100vh; }

.login-shell { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); min-height: 100vh; }
.brand-plane { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 32px clamp(24px, 5vw, 64px); }
.login-brand { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-weight: 600; letter-spacing: -.01em; }
.login-brand img { width: 26px; height: 26px; }
.brand-copy { max-width: 32em; }
.overline, .step-label { font-size: 12.5px; letter-spacing: .12em; color: rgba(255, 255, 255, .55); }
.brand-copy h1 { margin-top: 14px; font-size: clamp(34px, 3.8vw, 52px); font-weight: 500; line-height: 1.06; letter-spacing: -.028em; }
.brand-copy p:last-child { margin-top: 16px; font-size: 18px; color: rgba(255, 255, 255, .72); }
.brand-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: rgba(255, 255, 255, .55); }
.brand-foot i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #2fb36a; }
.brand-foot b { font-weight: 400; }

.access-plane { display: flex; flex-direction: column; padding: 28px clamp(24px, 5vw, 64px); background: linear-gradient(90deg, rgba(16, 18, 23, 0), rgba(16, 18, 23, .7) 20%); }
.access-topbar { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: rgba(255, 255, 255, .72); }
.access-topbar a:hover { color: #fff; }
.login-language { display: flex; align-items: center; gap: 4px; }
.login-language span { width: 1px; height: 14px; background: rgba(255, 255, 255, .2); }
.login-language button { padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: rgba(255, 255, 255, .6); cursor: pointer; }
.login-language button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.access-content { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(100%, 440px); margin-inline: auto; padding: 32px 0; }
.access-content h2 { margin-top: 10px; font-size: clamp(30px, 3vw, 40px); font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
.access-intro { margin-top: 10px; color: rgba(255, 255, 255, .72); }
#loginForm, .reset-request, #resetForm {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(26, 29, 36, .82);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
}
#loginForm label, .reset-request label, #resetForm label { display: grid; gap: 6px; font-size: 14px; color: rgba(255, 255, 255, .72); }
#loginForm input, .reset-request input, #resetForm input { width: 100%; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; outline: 0; background: rgba(16, 18, 23, .72); color: #fff; }
#loginForm input:focus, .reset-request input:focus, #resetForm input:focus { border-color: #d9481c; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 76px; }
.password-control button { position: absolute; top: 50%; right: 8px; padding: 4px 8px; border: 0; background: none; color: rgba(255, 255, 255, .72); cursor: pointer; transform: translateY(-50%); }
.password-control button:hover { color: #fff; }
.login-error { min-height: 0; font-size: 14px; color: #ff9478; }
.login-error:empty { display: none; }
.password-help { margin: 14px 0 0; font-size: 13px; color: rgba(255, 255, 255, .64); }
.password-help a { color: #fff; }
.login-submit { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; padding: 13px 22px; border: 0; border-radius: 999px; background: #d9481c; color: #fff; font-weight: 500; cursor: pointer; transition: background .15s; }
.login-submit:hover { background: #f05a2b; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-submit i { font-style: normal; }
.login-submit.loading i { animation: nudge .8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.access-note { margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, .55); }
.access-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: rgba(255, 255, 255, .55); }
.access-footer nav { display: flex; gap: 18px; }
.access-footer a:hover { color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid #d9481c; outline-offset: 2px; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-plane { padding: 20px; }
  .brand-copy, .brand-foot { display: none; }
  .access-plane { padding: 4px 20px 20px; background: rgba(16, 18, 23, .35); }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit, .login-submit.loading i { transition: none; animation: none; }
}

/* Remember me + forgot password, reset request */
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; font-size: 13.5px; }
.remember { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 0 !important; color: rgba(255, 255, 255, .72); cursor: pointer; }
.text-link { padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-link:hover { color: #ffb59c; }
.reset-request[hidden], #loginForm[hidden] { display: none; }
.reset-lead { margin: 0 0 16px; color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1.55; }
.reset-message { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.reset-message:empty { display: none; }
.reset-message.is-ok { color: #8fe0b9; }
.reset-message.is-warn { color: #ff9478; }
.text-link.back { display: block; margin: 16px auto 0; }
.signup-note { margin: 18px 0 0; font-size: 14px; color: rgba(255, 255, 255, .64); }
.signup-note a { color: #fff; }
#loginForm .remember, #loginForm label.remember { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
/* Remember me: native box hidden (still focusable for keyboard/screen readers), drawn as a soft tick box */
#loginForm .remember { gap: 10px; user-select: none; }
#loginForm .remember input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.remember .check { position: relative; flex: none; width: 18px; height: 18px; border: 1.5px solid rgba(255, 255, 255, .34); border-radius: 5px; background: rgba(255, 255, 255, .04); transition: background .15s, border-color .15s; }
.remember .check::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.6); opacity: 0; transition: opacity .15s, transform .15s; }
.remember:hover .check { border-color: rgba(255, 255, 255, .6); }
.remember input:checked + .check { background: #d9481c; border-color: #d9481c; }
.remember input:checked + .check::after { opacity: 1; transform: rotate(45deg) scale(1); }
.remember input:focus-visible + .check { outline: 2px solid #d9481c; outline-offset: 2px; }
.reset-request .reset-lead { margin: 0; }
.reset-request .text-link.back { margin-top: 2px; }
.reset-done { display: grid; gap: 16px; margin-top: 24px; }
.reset-done .login-submit { text-decoration: none; }
.reset-done[hidden] { display: none; }
