:root {
  --login-bg: #ffffff;
  --login-text: #000000;
  --login-accent: #18b9fa;
  --login-card-bg: #ffffff;
  --login-card-shadow: 0 4px 30px 4px rgba(0, 0, 0, 0.25);
  --login-input-border: #7a7a7a;
  --login-label-opacity: 0.5;
  --login-link: #0a6ce1;
  --login-forgot: rgba(0, 0, 0, 0.5);
  --login-button-text: #fefefe;
  --login-icon: #444444;
  --login-error: #c62828;
  --login-success: #1b5e20;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Archivo", sans-serif;
  background: var(--login-bg);
  color: var(--login-text);
}

.login-page {
  min-height: 100vh;
  overflow: hidden;
}

body[data-theme="dark"] {
  --login-bg: #003246;
  --login-text: #ffffff;
  --login-card-bg: #05668d;
  --login-input-border: #17b8f9;
  --login-label-opacity: 0.8;
  --login-link: #18b9fa;
  --login-forgot: #d5f873;
  --login-button-text: #000000;
  --login-icon: #f3f3f3;
  --login-error: #ffb4b4;
  --login-success: #b9f6ca;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
  color: inherit;
}

.login {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

.login__frame {
  position: relative;
  width: min(1440px, 100%);
  min-height: min(900px, 100vh);
  background: var(--login-bg);
  overflow: visible;
}

.auth-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(5, 102, 141, 0.25);
  background: rgba(255, 255, 255, 0.92);
  color: var(--login-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body[data-theme="dark"] .auth-theme-toggle {
  border-color: rgba(23, 184, 249, 0.35);
  background: rgba(5, 102, 141, 0.9);
}

.auth-theme-toggle svg {
  width: 20px;
  height: 20px;
}

.auth-theme-toggle .icon-sun {
  display: none;
}

body[data-theme="dark"] .auth-theme-toggle .icon-sun {
  display: block;
}

body[data-theme="dark"] .auth-theme-toggle .icon-moon {
  display: none;
}

.login__shape {
  position: fixed;
  pointer-events: none;
  z-index: 1;
}

.login__shape--corner {
  top: 0;
  right: 0;
  width: clamp(220px, 32vw, 440px);
  height: clamp(220px, 32vw, 440px);
  transform: translate(25%, -25%);
}

.login__shape--block {
  bottom: 0;
  left: 0;
  width: clamp(180px, 20vw, 320px);
  height: clamp(220px, 26vw, 360px);
  border-radius: 0 30px 0 0;
  background: var(--login-accent);
  transform: translate(-25%, 25%);
  opacity: 0.9;
}

.login__hero {
  position: absolute;
  left: 77px;
  top: 51px;
  width: 849px;
  height: 849px;
  z-index: 2;
}

.login__headline {
  position: absolute;
  left: 20px;
  top: 37px;
  width: 810.757px;
  margin: 0;
  text-align: center;
  font-size: 69.931px;
  font-weight: 600;
  line-height: normal;
  z-index: 2;
}

.login__headline-line {
  display: block;
}

.login__headline-accent {
  color: var(--login-accent);
}

.login__headline-main {
  color: var(--login-text);
}

.login__hero-image {
  position: absolute;
  inset: 5.67% 35.69% 0 5.35%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
}

.login__card {
  position: absolute;
  left: 863px;
  top: 50%;
  transform: translateY(-50%);
  width: 522px;
  min-height: 399px;
  background: var(--login-card-bg);
  border-radius: 15px;
  box-shadow: var(--login-card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.auth-card {
  width: 100%;
  height: 100%;
  padding: 27px 64px;
  display: flex;
  flex-direction: column;
}

.auth-card__title {
  margin: 0 0 28px;
  text-align: center;
  font-size: 43.381px;
  font-weight: 600;
  line-height: normal;
  color: var(--login-text);
}

.form-message {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 16px;
}

.form-message--error {
  color: var(--login-error);
  border: 1px solid rgba(198, 40, 40, 0.35);
  background: rgba(198, 40, 40, 0.08);
}

.form-message--success {
  color: var(--login-success);
  border: 1px solid rgba(27, 94, 32, 0.35);
  background: rgba(27, 94, 32, 0.08);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.form-field--compact {
  margin-bottom: 6px;
}

.form-field__label {
  font-size: 19.407px;
  font-weight: 600;
  line-height: normal;
  opacity: var(--login-label-opacity);
  color: var(--login-text);
}

.form-field__control {
  position: relative;
  height: 40.028px;
}

.form-field__control input {
  width: 100%;
  height: 100%;
  border: 1.213px solid var(--login-input-border);
  border-radius: 6.065px;
  padding: 0 12px 0 38px;
  background: transparent;
  font-size: 16px;
}

.form-field__control input:focus-visible {
  outline: 2px solid var(--login-accent);
  outline-offset: 2px;
}

.form-field__icon {
  position: absolute;
  left: 6.06px;
  top: 50%;
  transform: translateY(-50%);
  width: 29.111px;
  height: 29.111px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--login-icon);
}

.form-field__icon--small {
  left: 6.06px;
  width: 29.111px;
  height: 29.111px;
}

.form-field__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--login-icon);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.password-toggle:hover {
  opacity: 1;
}

.password-toggle .eye-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.form-field__control input {
  padding-right: 36px;
}

.auth-card__forgot {
  align-self: flex-end;
  font-size: 13px;
  font-weight: 200;
  line-height: normal;
  color: var(--login-forgot);
  margin: 0 0 14px;
}

.auth-card__submit {
  height: 40.028px;
  border-radius: 6.065px;
  border: none;
  background: var(--login-accent);
  color: var(--login-button-text);
  font-size: 19.407px;
  font-weight: 600;
  cursor: pointer;
}

.auth-card__submit:focus-visible {
  outline: 2px solid var(--login-accent);
  outline-offset: 2px;
}

.login__signup {
  position: absolute;
  left: 975px;
  top: 660px;
  width: 321px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 300;
  line-height: normal;
  z-index: 3;
}

.login__signup a {
  color: var(--login-link);
  text-decoration: underline;
  font-weight: 500;
}

.login__logo {
  position: fixed;
  right: clamp(16px, 4vw, 48px);
  bottom: clamp(16px, 4vw, 48px);
  width: clamp(72px, 6vw, 120px);
  height: auto;
  z-index: 5;
  display: block;
}

.login__logo img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-height: 820px) {
  .login__hero {
    top: 24px;
    width: 720px;
    height: 720px;
  }

  .login__headline {
    width: 700px;
    font-size: 56px;
  }
}

@media (max-width: 1200px) {
  .login {
    align-items: stretch;
  }

  .login__frame {
    min-height: auto;
    padding: 96px 24px 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .login__shape {
    opacity: 0.4;
    filter: blur(0.5px);
  }

  .login__hero,
  .login__card,
  .login__signup {
    position: static;
    transform: none;
    width: 100%;
    text-align: center;
  }

  .login__hero {
    height: auto;
    max-width: 760px;
  }

  .login__headline {
    position: static;
    width: auto;
    font-size: 52px;
    margin-bottom: 24px;
  }

  .login__hero-image {
    position: static;
    width: min(620px, 100%);
    height: auto;
    margin: 0 auto;
  }

  .login__card {
    width: min(520px, 100%);
  }

  .login__signup {
    justify-content: center;
  }
}

@media (max-width: 1200px) {
  .login__logo {
    width: clamp(64px, 10vw, 96px);
  }
}

@media (max-width: 640px) {
  .login__frame {
    padding: 72px 16px 64px;
  }

  .login__headline {
    font-size: 40px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-card__title {
    font-size: 32px;
  }

  .form-field__label {
    font-size: 16px;
  }

  .auth-card__submit {
    font-size: 16px;
  }
}
