:root {
  --blue: #1674ed;
  --ink: #102d61;
  --muted: #71809d;
  --line: #d2dbe9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  background: #f4f8fd;
}

body:before,
body:after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  background: #e7f0fd;
}

body:before {
  width: 260px;
  height: 260px;
  top: -150px;
  left: -110px;
}

body:after {
  width: 320px;
  height: 320px;
  right: -170px;
  bottom: -190px;
}

.auth-shell {
  width: min(960px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 42% 58%;
  overflow: hidden;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 48px #23559929;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 42px 38px 34px;
  color: #fff;
  background: linear-gradient(145deg, #1858b0, #07377f 62%, #052d70);
}

.brand-panel:before,
.brand-panel:after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50% 50% 0 0;
  transform: rotate(-18deg);
}

.brand-panel:before {
  width: 300px;
  height: 190px;
  left: -70px;
  bottom: -125px;
  background: #116de1;
}

.brand-panel:after {
  width: 340px;
  height: 140px;
  left: 35px;
  bottom: -95px;
  background: #2f7beea3;
}

.cap {
  width: 70px;
  height: 60px;
  margin-bottom: 14px;
}

.brand-panel h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.14;
}

.brand-copy {
  max-width: 270px;
  margin: 11px 0 17px;
  font-size: 15px;
  line-height: 1.55;
  color: #ffffffe8;
}

.rule {
  height: 1px;
  max-width: 250px;
  margin-bottom: 14px;
  background: #ffffff26;
}

.benefits {
  display: grid;
  gap: 13px;
}

.benefit {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  background: #2584f752;
}

.benefit strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.benefit span span {
  display: block;
  max-width: 190px;
  font-size: 12px;
  line-height: 1.35;
  color: #ffffffc7;
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 32px 42px;
}

.login-card {
  width: min(100%, 480px);
}

.login-header {
  text-align: center;
}

.login-header .cap {
  width: 54px;
  height: 46px;
  margin-bottom: 8px;
}

.login-header h2 {
  margin: 0;
  font-size: 26px;
}

.login-header p {
  margin: 6px 0 25px;
  font-size: 15px;
  color: var(--muted);
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 400;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  font-size: 19px;
  color: #71809a;
  transform: translateY(-50%);
}

.secure-note a {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
}

.back-arrow {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  vertical-align: middle;
  transform: translateY(2px);
}

.secure-note a {
  padding: 8px 14px;
  border: 1px solid #d9e0e9;
  border-radius: 18px;
  color: #27313f;
  background: #f8fafc;
  text-decoration: none;
}

.secure-note a .back-arrow {
  color: #71809a;
}

.primary-button span svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 50px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px #1674ed1f;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 17px;
  border: 0;
  color: #71809a;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 2px 0 18px;
  font-size: 13px;
}

.forgot-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #d9e0e9;
  border-radius: 18px;
  color: #27313f !important;
  background: #f8fafc;
  white-space: nowrap;
}

.forgot-link svg {
  width: 15px;
  height: 15px;
  color: #e89035;
}

.forgot-link:hover {
  color: #27313f !important;
  border-color: #b9d4f5;
  background: #eaf3ff;
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.remember input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkmark {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #bfcce0;
  border-radius: 5px;
  background: #fff;
}

.remember input:checked+.checkmark {
  background: var(--blue);
  border-color: var(--blue);
}

.remember input:checked+.checkmark:after {
  content: "✓";
  color: #fff;
}

a {
  color: #0670ed;
  font-weight: 600;
  text-decoration: none;
}

.primary-button,
.public-button {
  width: 100%;
  height: 54px;
  border-radius: 9px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(100deg, #2588f5, #0868ea);
  box-shadow: 0 8px 16px #1c77ee2e;
}

.primary-button span {
  font-size: 22px;
}

.separator {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 20px 0 16px;
  color: #71809d;
}

.separator:before,
.separator:after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dbe2ed;
}

.public-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0871f3;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
}

.secure-note {
  text-align: center;
  margin-top: 24px;
  color: #61708c;
  font-size: 13px;
}

.error-message {
  display: none;
  margin: -8px 0 12px;
  color: #c24141;
  font-size: 12px;
}

.has-error input {
  border-color: #df6262;
}

.has-error .error-message {
  display: block;
}

@media (max-width: 820px) {
  body {
    padding: 18px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .brand-panel {
    padding: 38px 34px;
  }

  .benefits {
    grid-template-columns: 1fr 1fr;
  }

  .form-panel {
    padding: 44px 32px 40px;
  }
}

@media (max-width: 520px) {
  .brand-panel {
    padding: 30px 26px;
  }

  .benefits {
    grid-template-columns: 1fr;
  }

  .form-panel {
    padding: 38px 22px 32px;
  }

  .login-header h2 {
    font-size: 26px;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
  }
}
