:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.96);
  --field: #eaf1ff;
  --field-border: #dce6f7;
  --text: #17233f;
  --muted: #7084a7;
  --muted-strong: #96a6c2;
  --red: #ff2433;
  --red-strong: #eb1b2a;
  --red-soft: rgba(255, 36, 51, 0.14);
  --shadow: 0 28px 70px rgba(24, 38, 73, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(520px circle at 50% 8%, rgba(255, 255, 255, 0.92), transparent 72%),
    radial-gradient(680px circle at 50% 50%, rgba(214, 223, 240, 0.30), transparent 82%),
    linear-gradient(180deg, #f8faff 0%, #eef3fb 100%);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.login-shell {
  width: 100%;
  max-width: 640px;
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 56px;
}

.login-logo {
  display: block;
  width: auto;
  height: 54px;
  object-fit: contain;
}

.login-card {
  background: var(--surface);
  border: 1px solid rgba(212, 220, 235, 0.9);
  border-radius: 24px;
  padding: 40px 42px 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.login-header {
  margin-bottom: 28px;
}

.login-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 38px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.login-sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
}

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

.field {
  display: grid;
  gap: 10px;
}

.field > span {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.input-row {
  position: relative;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: #97a9c9;
  pointer-events: none;
}

.field-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 52px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.password-row input {
  padding-right: 54px;
}

.eye-button {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #96a7c5;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.eye-button:hover,
.eye-button:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  outline: none;
}

.eye-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye-button .eye-hide {
  display: none;
}

.eye-button[data-state="visible"] .eye-show {
  display: none;
}

.eye-button[data-state="visible"] .eye-hide {
  display: block;
}

.login-error {
  min-height: 18px;
  margin: -8px 0 0;
  padding: 0 2px;
  color: var(--red-strong);
  font-size: 13px;
  font-weight: 700;
  display: none;
}

.login-error.visible {
  display: block;
}

.login-submit {
  height: 54px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff2d3c, #f01d2c);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 16px 28px rgba(255, 36, 51, 0.22);
  transition: transform 0.18s, filter 0.18s, box-shadow 0.18s;
}

.login-submit:hover {
  filter: brightness(1.03);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  cursor: progress;
  filter: grayscale(0.25) brightness(0.92);
  box-shadow: none;
}

.login-submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.login-lang {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-lang select {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d8e1f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.login-lang option {
  color: var(--text);
  background: #fff;
}

@media (max-width: 640px) {
  .login-brand {
    margin-bottom: 34px;
  }

  .login-logo {
    height: 46px;
  }

  .login-card {
    padding: 30px 22px 20px;
    border-radius: 22px;
  }

  .login-header h1 {
    font-size: 31px;
  }

  .login-sub {
    font-size: 15px;
  }
}
