:root {
  color-scheme: light;
  --navy: #061733;
  --navy-soft: #0b2854;
  --blue: #1764f5;
  --blue-dark: #1058df;
  --text: #071433;
  --muted: #60718a;
  --border: #dce5f2;
  --surface: #ffffff;
  --danger: #b42318;
  --danger-surface: #fff1f0;
  --focus: 0 0 0 4px rgba(23, 100, 245, 0.24);
}

* { box-sizing: border-box; }

html,
body { min-width: 320px; min-height: 100%; margin: 0; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f9fd;
}

button,
a { font: inherit; }

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.login-intro {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 72px);
  color: #f8fbff;
  background:
    radial-gradient(circle at 78% 24%, rgba(48, 126, 255, 0.38), transparent 22rem),
    linear-gradient(145deg, #04122b 0%, var(--navy-soft) 100%);
}

.login-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.login-brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #42a5ff;
  border-radius: 10px;
}

.login-brand-mark::before,
.login-brand-mark span {
  position: absolute;
  content: "";
  border: 3px solid #7dd3fc;
  border-radius: 50%;
}

.login-brand-mark::before {
  width: 20px;
  height: 20px;
  border-top-color: transparent;
}

.login-brand-mark span {
  width: 6px;
  height: 6px;
  background: #7dd3fc;
}

.login-copy { max-width: 720px; }

.login-copy h1 {
  max-width: 14ch;
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.login-copy p {
  max-width: 58ch;
  margin: 0;
  color: #c7d8ef;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

.login-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #c7d8ef;
  font-size: 0.88rem;
}

.login-trust svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #7dd3fc;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-action {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 6vw, 84px);
  background: var(--surface);
}

.login-action-inner {
  display: grid;
  width: min(100%, 440px);
  gap: 30px;
}

.login-action h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}

.login-action p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-button {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  color: #ffffff;
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(23, 100, 245, 0.22);
  font-weight: 800;
  transition: background 160ms ease-out, box-shadow 160ms ease-out, transform 160ms ease-out;
}

.login-button:hover {
  background: var(--blue-dark);
  box-shadow: 0 18px 36px rgba(23, 100, 245, 0.28);
  transform: translateY(-1px);
}

.login-button:active { transform: translateY(0); }

.login-button:focus-visible,
.login-brand:focus-visible { outline: none; box-shadow: var(--focus); }

.login-button-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--blue);
  border-radius: 10px;
  background: #ffffff;
  font-weight: 900;
}

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

.login-help { font-size: 0.82rem; text-align: center; }

.login-error {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  color: var(--danger);
  border: 1px solid #f3b7b2;
  border-radius: 12px;
  background: var(--danger-surface);
  line-height: 1.45;
}

.login-error span { font-size: 0.88rem; }

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 46vh; gap: 56px; padding: 28px 24px 34px; }
  .login-copy h1 { max-width: 16ch; font-size: clamp(2.35rem, 11vw, 4rem); }
  .login-action { min-height: 54vh; padding: 44px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
