:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #18253e;
  background: #edf1f8;
  --blue: #294bc6;
  --line: #c7d2e4;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 42px);
  background: radial-gradient(ellipse at 80% 10%, #dfe8fa, transparent 60%);
}

.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 940px);
  min-height: 530px;
  overflow: hidden;
  border: 1px solid #dae3f2;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 85px #223c6f26;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px;
  color: white;
  background: radial-gradient(ellipse at 58% 48%, #254e99, #142b5a 65%, #101d39 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.025em;
}

.brand img { flex: none; }
.brand-light { color: #d1deff; font-weight: 550; }

.brand-caption {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.046em;
}

.optics {
  position: absolute;
  z-index: -1;
  inset: 92px 0 92px;
  pointer-events: none;
}

.lens {
  position: absolute;
  top: 50%;
  left: 53%;
  width: min(58%, 265px);
  aspect-ratio: 1;
  border: 1px solid #bcd3ff82;
  border-radius: 50%;
  background: radial-gradient(circle, #90b8ff25, transparent 61%, #8caeff30 86%),
    conic-gradient(from 105deg, #60a4ec10, #9eceff74, #325aa50d 35%, #739dfd70 73%, #5f84d220);
  box-shadow: inset 0 0 32px #a0bcff4d, 0 0 32px #4d8aff40;
}

.lens::before, .lens::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid #b8ccff45;
  border-radius: inherit;
}

.lens::after { inset: 19%; }
.lens-back { transform: translate(-35%, -56%) rotate(-33deg) scaleX(.76); }
.lens-front { transform: translate(-68%, -46%) rotate(-33deg) scaleX(.81); }

.form-panel {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: clamp(24px, 5vw, 56px);
}

.form-content { width: min(100%, 360px); margin-inline: auto; }

h1 {
  margin: 0 0 28px;
  font-size: clamp(31px, 4vw, 42px);
  line-height: 1.05;
  font-weight: 730;
  letter-spacing: -.045em;
}

form { display: grid; gap: 18px; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 650; }
input, button { font: inherit; }

input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0 13px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  background: #fbfcff;
}

input:hover { border-color: #8b9fbe; }
input[aria-invalid="true"] { border-color: #b53b48; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.password-field { position: relative; }
.password-field input { padding-right: 99px; }

#toggle-password {
  position: absolute;
  top: 5px;
  right: 5px;
  min-height: 40px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  color: #334fa5;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

#toggle-password:hover { background: #eaf0ff; }

.submit-button {
  min-height: 50px;
  margin-top: 4px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 12px #294bc626;
  font-weight: 700;
  cursor: pointer;
}

.submit-button:hover { background: #213da9; }
.submit-button:disabled { opacity: .72; cursor: wait; }
.submit-arrow { font-size: 21px; line-height: 1; }

#form-error {
  margin: 0;
  padding: 9px 12px;
  color: #8f2232;
  background: #fff0f2;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 680px) {
  .login { grid-template-columns: minmax(0, 1fr); min-height: 0; max-width: 450px; border-radius: 21px; }
  .brand-panel { min-height: 118px; padding: 22px; gap: 6px; }
  .brand img { width: 36px; height: 36px; }
  .brand-caption { margin-left: 48px; font-size: 14px; line-height: 1.25; letter-spacing: 0; }
  .brand-caption br { display: none; }
  .optics { inset: 0 0 0 50%; opacity: .6; }
  .form-panel { padding: 27px 22px 30px; }
  h1 { margin-bottom: 22px; }
}
