@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext-300-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --login-bg: #111315;
  --login-panel: rgba(29, 33, 37, 0.94);
  --login-panel-strong: #1d2125;
  --login-line: rgba(255, 255, 255, 0.11);
  --login-text: #f5f7f8;
  --login-muted: #aeb7bd;
  --login-accent: #d5ed4a;
  --login-accent-text: #181d05;
}

html {
  background: var(--login-bg);
}

body.loginPage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto;
  overflow: auto;
  background: var(--login-bg);
  color: var(--login-text);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.loginPage .topbar {
  position: relative;
  z-index: 10;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--login-line);
  background: rgba(17, 19, 21, 0.88);
  backdrop-filter: blur(14px);
}

body.loginPage .appBrand__logo {
  width: 154px;
  max-width: 42vw;
  height: auto;
}

body.loginPage .topbar__right {
  flex-wrap: nowrap;
  gap: 12px;
}

body.loginPage .topbar__login {
  padding: 8px 14px;
  border: 1px solid var(--login-line);
  border-radius: 7px;
  color: #d7dde1;
  font-size: 14px;
  font-weight: 600;
}

body.loginPage .topbar__login:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.loginLangSwitch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.loginLangSwitch button {
  min-width: 29px;
  height: 29px;
  padding: 0 6px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--login-muted);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.loginLangSwitch button:last-child { border-right: 0; }
.loginLangSwitch button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.loginLangSwitch button.is-active { background: rgba(213, 237, 74, 0.16); color: var(--login-accent); }

body.loginPage .loginPage__main {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 72px);
  padding: 64px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 34%, rgba(213, 237, 74, 0.11), transparent 30%),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.05), transparent 25%),
    linear-gradient(180deg, #15181b 0%, var(--login-bg) 100%);
}

body.loginPage .loginPage__main::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

body.loginPage .loginPage__main::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(213, 237, 74, 0.12);
  transform: translate(290px, 120px) rotate(12deg);
  box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.012), 0 0 0 84px rgba(255, 255, 255, 0.008);
}

.loginBox {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid var(--login-line);
  border-radius: 16px;
  background: var(--login-panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.loginBox::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--login-accent), rgba(213, 237, 74, 0.1) 72%, transparent);
}

.loginBox h1 {
  margin: 0 0 28px;
  color: var(--login-text);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.loginBox__teamInvite {
  margin: -10px 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(213, 237, 74, 0.24);
  border-radius: 10px;
  background: rgba(213, 237, 74, 0.06);
  color: #dbe2e6;
  font-size: 14px;
  line-height: 1.45;
}

.loginBox .formRow { margin-bottom: 18px; }

.loginBox label {
  display: block;
  margin: 0 0 7px;
  color: #d5dce0;
  font-size: 13px;
  font-weight: 600;
}

.loginBox input:not([type="checkbox"]) {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  outline: none;
  background: #15181b;
  color: var(--login-text);
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.loginBox input:not([type="checkbox"]):hover { border-color: rgba(255, 255, 255, 0.24); }

.loginBox input:not([type="checkbox"]):focus {
  border-color: rgba(213, 237, 74, 0.72);
  background: #171b1e;
  box-shadow: 0 0 0 3px rgba(213, 237, 74, 0.09);
}

.loginBox__passwordWrap { position: relative; }
.loginBox__passwordWrap input { padding-right: 48px; }

.loginBox__togglePw {
  position: absolute;
  right: 6px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--login-muted);
  cursor: pointer;
}

.loginBox__togglePw:hover,
.loginBox__togglePw:focus-visible { color: var(--login-text); }
.loginBox__togglePw svg { display: block; width: 20px; height: 20px; }
.loginBox__togglePw svg[hidden] { display: none; }

.loginBox__fieldHint {
  margin: 6px 0 0;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.4;
}

.loginBox .loginBox__submit,
.loginBox .btnContext {
  min-height: 46px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
}

.loginBox .loginBox__submit { width: 100%; margin-top: 8px; }

.loginBox .btn.btnContext.btn--primary {
  border-color: var(--login-accent);
  background: var(--login-accent);
  color: var(--login-accent-text);
}

.loginBox .btn.btnContext.btn--primary:hover:not(:disabled) {
  border-color: #e2f56b;
  background: #e2f56b;
}

.loginBox .btnContext:not(.btn--primary) {
  border-color: var(--login-line);
  background: #252a2f;
  color: var(--login-text);
}

.loginBox .error { margin-top: 8px; color: #ff8f8f; font-size: 14px; }
.loginBox .success { margin-top: 8px; color: #7de3a3; font-size: 14px; }

.loginBox__switch {
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--login-line);
  color: var(--login-muted);
  text-align: center;
  font-size: 14px;
}

.loginBox__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--login-accent);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.loginBox__link:hover { color: #e2f56b; text-decoration: underline; }
.loginBox__consent { margin-top: 8px; }

.loginBox__consentLabel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--login-muted);
  font-size: 14px;
  cursor: pointer;
}

.loginBox__consentLabel input { margin-top: 4px; flex-shrink: 0; accent-color: var(--login-accent); }
.loginBox__consentLabel a { color: var(--login-accent); text-decoration: underline; }
.loginBox__forgot { margin: 8px 0 0; text-align: right; font-size: 14px; }

.loginBox__forgotBlock {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--login-line);
}

.loginBox__forgotBlock .formRow { margin-bottom: 12px; }
.loginBox__forgotMessage { margin-top: 8px; font-size: 14px; }
.loginBox__forgotMessage.success { color: #7de3a3; }
.loginBox__forgotMessage.error { color: #ff8f8f; }

body.loginPage.i18n-pending .topbar,
body.loginPage.i18n-pending .loginPage__main { visibility: hidden; }

@media (max-width: 680px) {
  body.loginPage .topbar { min-height: 64px; padding: 0 16px; }
  body.loginPage .appBrand__logo { width: 126px; }
  body.loginPage .topbar__right { gap: 8px; }
  body.loginPage .topbar__login { padding: 6px 8px; font-size: 12px; }
  .loginLangSwitch button { min-width: 22px; height: 27px; padding: 0 3px; font-size: 9px; }
  body.loginPage .loginPage__main { align-items: flex-start; min-height: calc(100vh - 64px); padding: 30px 16px 44px; }
  .loginBox { max-width: 100%; padding: 30px 22px; border-radius: 13px; }
  .loginBox h1 { margin-bottom: 24px; font-size: 30px; }
}

@media (max-width: 390px) {
  body.loginPage .topbar__login { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .loginBox input { transition: none; }
}
