:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #171a20;
  background: #f4f6f9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f4f6f9;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr);
  min-height: 100vh;
}

.login-context {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(44px, 6vw, 84px);
  color: #f7f9fc;
  background: #151b26;
  box-shadow: 16px 0 48px rgba(15, 23, 42, .1);
}

.login-context::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(44px, 6vw, 84px);
  width: 64px;
  height: 3px;
  background: #3b82f6;
}

.login-brand {
  position: relative;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: 0;
}

.login-brand span {
  margin-left: 4px;
  color: #9da9ba;
  font-size: 12px;
  font-weight: 650;
}

.context-label {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-bottom: 18px;
  padding: 4px 8px;
  border: 1px solid rgba(147, 197, 253, .18);
  border-radius: 6px;
  color: #9fc5ff;
  background: rgba(37, 99, 235, .12);
  font-size: 11px;
  font-weight: 720;
}

.login-context h1 {
  max-width: 540px;
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-context p {
  max-width: 520px;
  margin: 22px 0 0;
  color: #aeb8c7;
  font-size: 14px;
  line-height: 1.8;
}

.login-context dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 44px 0 0;
}

.login-context dl div {
  padding-top: 14px;
  border-top: 1px solid rgba(203, 213, 225, .18);
}

.login-context dt {
  color: #8793a5;
  font-size: 11px;
}

.login-context dd {
  margin: 7px 0 0;
  color: #f7f9fc;
  font-size: 13px;
  font-weight: 700;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #f4f6f9;
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid #d9e0e9;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow:
    0 2px 5px rgba(18, 32, 51, .04),
    0 26px 68px rgba(18, 32, 51, .1);
}

.login-heading > span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 750;
}

.login-heading h2 {
  margin: 8px 0 0;
  color: #171a20;
  font-size: 25px;
  font-weight: 740;
  letter-spacing: 0;
}

.login-heading p,
.security-note {
  color: #778497;
  font-size: 12px;
  line-height: 1.6;
}

.login-heading p { margin: 8px 0 0; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  background: #f3f5f8;
}

.auth-tab {
  height: 34px;
  border: 0;
  border-radius: 5px;
  color: #697689;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.auth-tab:hover {
  color: #273348;
  background: rgba(255, 255, 255, .72);
  box-shadow: none;
  transform: none;
}

.auth-tab.is-active {
  color: #174bb8;
  background: #fff;
  box-shadow: 0 1px 4px rgba(18, 32, 51, .1);
}

form {
  display: grid;
  gap: 17px;
  margin-top: 20px;
}

form[hidden] { display: none; }

label {
  display: grid;
  gap: 7px;
  color: #4d596a;
  font-size: 12px;
  font-weight: 680;
}

label small {
  color: #8995a6;
  font-size: 10px;
  font-weight: 500;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #171a20;
  background: #fff;
  font: inherit;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 220ms cubic-bezier(.16, 1, .3, 1),
    background-color 180ms ease;
}

input:hover { border-color: #aebaca; }

input:focus {
  border-color: rgba(37, 99, 235, .7);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

button {
  height: 44px;
  border: 1px solid #2563eb;
  border-radius: 7px;
  color: #fff;
  background: #2563eb;
  box-shadow:
    0 1px 2px rgba(16, 48, 118, .16),
    0 9px 20px rgba(37, 99, 235, .2);
  font: 700 13px/1 inherit;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    box-shadow 220ms cubic-bezier(.16, 1, .3, 1),
    transform 260ms cubic-bezier(.16, 1, .3, 1);
}

button:hover {
  background: #174bb8;
  box-shadow:
    0 2px 4px rgba(16, 48, 118, .18),
    0 12px 26px rgba(37, 99, 235, .24);
  transform: translateY(-1px);
}

button:active {
  transform: scale(.98);
  transition-duration: 80ms;
}

button:disabled { cursor: wait; opacity: .62; }

.login-error {
  min-height: 20px;
  margin: -4px 0 0;
  color: #bd3f4b;
  font-size: 12px;
}

.security-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e5eaf0;
}

@media (prefers-reduced-motion: no-preference) {
  .login-context > * {
    animation: taste-context-enter 620ms cubic-bezier(.16, 1, .3, 1) backwards;
  }

  .login-context > div { animation-delay: 70ms; }
  .login-context > dl { animation-delay: 130ms; }

  .login-card {
    animation: taste-login-enter 560ms cubic-bezier(.16, 1, .3, 1) both;
  }

  @keyframes taste-context-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes taste-login-enter {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 860px) {
  .login-layout { grid-template-columns: 1fr; }

  .login-context {
    min-height: 300px;
    padding: 32px 24px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .12);
  }

  .login-context::before { left: 24px; }
  .login-context h1 { font-size: 31px; }
  .login-context p { margin-top: 14px; }
  .login-context dl { margin-top: 30px; }
  .login-panel { padding: 28px 16px 42px; }
}

@media (max-width: 520px) {
  .login-context { min-height: 250px; }
  .login-context dl { gap: 10px; }
  .login-context dt { font-size: 10px; }
  .login-context dd { font-size: 11px; }
  .login-card { padding: 26px 22px; }
}
