.login-shell {
  min-height: 100vh;
}

.login-main {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 40px 20px 70px;
}

.login-card {
  width: min(560px, 100%);
  padding: 34px;
  border-radius: 28px;
  display: grid;
  gap: 18px;
}

.login-card h2 {
  margin: 0;
}

.login-subtitle {
  margin: 0;
  color: var(--muted);
}

.role-btn {
  border: 1px solid var(--border);
  background: rgba(12, 26, 45, 0.45);
  color: var(--text-main);
  border-radius: 999px;
  min-height: 42px;
  font: 600 14px/1.1 'Manrope', system-ui, sans-serif;
  cursor: pointer;
}

.login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
}

.login-links a {
  color: var(--gold-strong);
}

.turnstile-row {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.turnstile-widget {
  min-height: 65px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.turnstile-widget iframe {
  margin-inline: auto;
}

.turnstile-widget:empty {
  min-height: 0;
}

.captcha-prompt {
  margin: 0;
  color: var(--muted);
}

.captcha-prompt:not([hidden]) {
  display: block;
}

.role-btn.is-active {
  background: linear-gradient(130deg, #f2c583 0%, #f6d9a7 100%);
  border-color: rgba(242, 197, 131, 0.8);
  color: #24180f;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form [hidden] {
  display: none !important;
}

#registerStep1 {
  display: grid;
  gap: 12px;
}

.register-code-block {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.register-code-block[hidden] {
  display: none !important;
}

.login-submit-btn,
.login-register-btn {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-sizing: border-box;
}

.login-form .login-submit-btn {
  margin-top: 4px;
}

.login-register-btn {
  margin-top: 2px;
}

.login-form input:not([type="checkbox"]):not([type="radio"]),
.login-form select,
.login-form textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(9, 22, 42, 0.72);
  color: var(--text);
  padding: 0.72rem 0.92rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-form input::placeholder,
.login-form textarea::placeholder {
  color: rgba(203, 191, 174, 0.78);
}

.login-form input:not([type="checkbox"]):not([type="radio"]):focus,
.login-form select:focus,
.login-form textarea:focus {
  border-color: rgba(244, 201, 122, 0.62);
  background: rgba(11, 26, 48, 0.84);
  box-shadow: 0 0 0 3px rgba(244, 201, 122, 0.14);
}

.login-form .generation-consent input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin-top: 0.2rem;
  padding: 0;
  flex-shrink: 0;
  border-radius: 4px;
  box-shadow: none;
  accent-color: #7a4dff;
}

.login-form .generation-consent span {
  flex: 1;
  min-width: 0;
}

.field-hint {
  margin: 4px 0 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.login-form .field-error,
body.theme-skazum .login-form .field-error {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  font-weight: 600;
  color: #dc2626;
}

.field-error[hidden] {
  display: none;
}

.login-form input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

body.theme-skazum .login-form input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 108px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: rgba(255, 247, 235, 0.08);
  color: var(--text);
  border-radius: 10px;
  min-height: 32px;
  padding: 0 10px;
  font: 600 0.8rem/1 var(--body-font);
  cursor: pointer;
}

.password-toggle:hover {
  border-color: rgba(244, 201, 122, 0.5);
  color: var(--gold-strong);
}

.login-status {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--muted);
}

@font-face {
  font-family: 'YS Text';
  src: url('https://yastatic.net/s3/home/fonts/ys/1/text-medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

.social-auth {
  margin-top: 8px;
}

.social-auth.is-unavailable {
  display: none;
}

.social-auth__lead {
  margin: 0 0 10px;
  color: var(--muted);
  font: 500 13px/16px 'Nunito', -apple-system, system-ui, 'Helvetica Neue', Roboto, sans-serif;
  text-align: center;
}

.vk-one-tap-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 320px;
  height: 44px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.vk-one-tap {
  display: none;
}

.social-auth__cell--vk {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
  position: relative;
}

.social-auth__cell--vk .social-auth__item {
  width: 100%;
  flex: 1 1 auto;
}

.social-auth__row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-height: 44px;
}

.social-auth__cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

.social-auth__row > .social-auth__item {
  flex: 1 1 0;
  min-width: 0;
}

.social-auth__item {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--su-radius-pill);
  background: #fff;
  color: #000;
  font: 500 14px/18px 'Nunito', -apple-system, system-ui, 'Helvetica Neue', Roboto, sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--su-shadow-sm);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.social-auth__item:hover:not(.is-disabled) {
  background-color: #f7f8fc;
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: var(--su-shadow-md);
}

.social-auth__item:active:not(.is-disabled) {
  transform: translateY(1px);
  box-shadow: var(--su-shadow-sm);
}

.social-auth__item:focus-visible {
  outline: 2px solid rgba(122, 77, 255, 0.35);
  outline-offset: 2px;
}

.social-auth__item[aria-busy='true'] {
  opacity: 0.7;
  pointer-events: none;
}

.social-auth__item.is-disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.social-auth__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.social-auth__icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.social-auth__text {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-left: 8px;
  font-size: 13px;
  line-height: 16px;
}

@media (max-width: 380px) {
  .social-auth__row:not([data-single-mode]) .social-auth__text {
    display: none;
  }
}
