:root {
  color-scheme: light;
  --ink: #071238;
  --muted: #6c748c;
  --blue: #075bf0;
  --danger: #c72d3e;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #053d9c;
}

button, input { font: inherit; }

.login-page {
  display: grid;
  grid-template-columns: 50% 50%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.login-art {
  min-height: 100%;
  background-color: #032a70;
  background-image: url('login-reference.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: max(200%, 150vh) auto;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 48px) clamp(24px, 3.3vw, 52px) clamp(20px, 3vw, 48px) 0;
  background:
    linear-gradient(132deg, rgba(0, 96, 232, .15), transparent 34%),
    linear-gradient(145deg, #006cde, #06327f 70%, #08245b);
}

.login-card {
  position: relative;
  width: min(100%, 690px);
  min-height: 850px;
  padding: 34px 50px 54px;
  overflow: hidden;
  border-radius: 36px;
  background: #f8f9fd;
  box-shadow: 0 25px 60px rgba(0, 13, 60, .22);
}

.login-card::before {
  position: absolute;
  top: -56px;
  right: -86px;
  width: 225px;
  height: 255px;
  border-radius: 50%;
  background: #e2edff;
  content: '';
}

.brand-logo {
  position: relative;
  display: block;
  width: min(42%, 240px);
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border-radius: 50%;
  object-fit: cover;
}

.login-title {
  position: relative;
  margin: 0 0 28px;
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.045em;
  text-align: center;
}

.row { margin: 0 0 26px; }

.row label {
  display: block;
  margin: 0 0 9px;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.25;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 0 21px;
  border: 1px solid #cdd2df;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 2px 6px rgba(15, 27, 72, .03);
}

.input-group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 91, 240, .14);
}

.input-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #737f9e;
}

.input-icon svg, .password-toggle svg { display: block; width: 100%; height: 100%; }

.input-group input {
  width: 100%;
  min-width: 0;
  height: 72px;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 21px;
}

.input-group input::placeholder { color: #8189a2; opacity: 1; }

.password-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 0;
  color: #697693;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover, .password-toggle:focus-visible { color: var(--blue); }

.row-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  font-size: 21px;
}

.row-inline input {
  width: 29px;
  height: 29px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.row-inline label { margin: 0; font-size: inherit; font-weight: 500; cursor: pointer; }

.btn {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 80px;
  align-items: center;
  justify-content: center;
  margin-top: 25px;
  padding: 12px 58px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: #0759ea;
  box-shadow: 0 7px 14px rgba(0, 58, 169, .13);
  font-size: 29px;
  font-weight: 750;
  cursor: pointer;
}

.btn::after { position: absolute; right: 34px; content: '→'; font-size: 42px; font-weight: 300; line-height: 1; }
.btn:hover { background: #004acf; }
.btn:focus-visible { outline: 3px solid #072b81; outline-offset: 3px; }
.btn:disabled { opacity: .7; cursor: wait; }

.err { margin: 14px 0 0; color: var(--danger); font-size: 16px; white-space: pre-wrap; }
.err:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-height: 900px) and (min-width: 901px) {
  .login-card { min-height: 0; padding-top: 24px; padding-bottom: 28px; }
  .brand-logo { width: min(33%, 190px); }
  .login-title { margin-bottom: 22px; font-size: clamp(32px, 3.5vw, 52px); }
  .row { margin-bottom: 18px; }
  .input-group, .input-group input { min-height: 62px; height: 62px; }
  .btn { min-height: 68px; margin-top: 18px; }
}

@media (max-width: 1100px) {
  .login-card { min-height: 0; padding: 28px 32px 38px; border-radius: 26px; }
  .login-title { font-size: clamp(30px, 3.4vw, 45px); }
  .row label { font-size: 18px; }
  .input-group, .input-group input { min-height: 60px; height: 60px; }
  .input-group input { font-size: 17px; }
  .row-inline { font-size: 17px; }
  .btn { min-height: 66px; font-size: 22px; }
}

@media (max-width: 800px) {
  .login-page { position: relative; display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 20px 16px; }
  .login-art { position: absolute; inset: 0; width: 100%; min-height: 100%; height: 100%; max-height: none; background-size: 200% auto; background-position: left top; }
  .login-panel { position: relative; z-index: 1; width: 100%; min-height: calc(100dvh - 40px); margin: 0; padding: 0; background: transparent; }
  .login-card { width: min(100%, 540px); margin: 0; padding: 20px 24px 32px; border-radius: 24px; background: rgba(248, 249, 253, .89); backdrop-filter: blur(6px); }
  .brand-logo { display: none; }
  .login-title { margin-bottom: 22px; font-size: clamp(30px, 7vw, 42px); }
  .row { margin-bottom: 20px; }
}

@media (max-width: 420px) {
  .login-title { font-size: 30px; }
  .input-group { gap: 10px; padding: 0 13px; }
  .input-icon { width: 26px; height: 26px; }
  .input-group input { font-size: 16px; }
  .row-inline { gap: 10px; font-size: 16px; }
  .btn { padding: 12px 44px 12px 18px; font-size: 19px; }
  .btn::after { right: 18px; font-size: 30px; }
}
