:root {
  color-scheme: light;
  --bg: oklch(97.8% 0.006 255);
  --surface: oklch(100% 0 0);
  --ink: oklch(22% 0.025 255);
  --ink-soft: oklch(40% 0.025 255);
  --muted: oklch(50% 0.022 255);
  --line: oklch(88.5% 0.012 255);
  --accent: oklch(55% 0.18 255);
  --accent-strong: oklch(45% 0.18 255);
  --danger: oklch(52% 0.18 25);
  --danger-soft: oklch(96% 0.025 25);
  --radius: 14px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in oklch, var(--accent) 70%, white); outline-offset: 3px; }

.login-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr); }
.login-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 64px);
  background: oklch(23% 0.032 258);
  color: white;
}
.story-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  background-image: linear-gradient(to right, rgb(255 255 255 / 45%) 1px, transparent 1px), linear-gradient(to bottom, rgb(255 255 255 / 45%) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom right, black, transparent 90%);
}
.login-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -190px;
  bottom: 8%;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 38%, transparent);
  filter: blur(1px);
}
.story-brand, .mobile-brand { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 750; }
.story-mark, .mobile-brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 850;
  letter-spacing: -0.04em;
}
.story-brand strong, .story-brand small { display: block; }
.story-brand small { margin-top: 2px; color: oklch(76% 0.014 255); font-size: 11px; font-weight: 500; }
.story-content { width: min(100%, 520px); }
.story-context { margin: 0 0 12px; color: oklch(77% 0.08 255); font-size: 13px; font-weight: 750; }
.story-content h1 { margin: 0; max-width: 10ch; font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
.story-copy { margin: 22px 0 0; max-width: 47ch; color: oklch(79% 0.018 255); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.story-benefits { margin: 34px 0 0; padding: 0; display: grid; gap: 15px; list-style: none; }
.story-benefits li { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 12px; color: oklch(90% 0.01 255); font-size: 14px; }
.story-benefits span { color: oklch(69% 0.11 255); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.story-footer { margin: 0; color: oklch(67% 0.014 255); font-size: 12px; }

.login-form-side { min-height: 100dvh; padding: 44px 32px; display: grid; place-items: center; }
.login-card { width: min(100%, 410px); }
.mobile-brand { display: none; }
.login-card header { margin-bottom: 28px; }
.login-card h2 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; }
.login-card header p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.login-error { margin-bottom: 18px; padding: 13px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 650; }
.login-form { display: grid; gap: 18px; }
.login-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.login-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(22 35 56 / 4%);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.login-form input::placeholder { color: oklch(56% 0.018 255); }
.login-form input:hover { border-color: oklch(79% 0.025 255); }
.login-form input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 14%, transparent); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 96px; }
.password-field button {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 82px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.password-field button:hover { background: var(--bg); color: var(--ink); }
.password-field button:active, .login-submit:active { transform: scale(0.96); }
.login-submit {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 8px rgb(37 99 235 / 13%);
  transition: background-color 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
}
.login-submit:hover { background: var(--accent-strong); box-shadow: 0 4px 7px rgb(37 99 235 / 18%); }
.login-help { margin: 26px 0 0; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-form-side { min-height: 100dvh; padding: 32px 20px; }
  .mobile-brand { display: flex; margin-bottom: 56px; }
}

@media (max-width: 480px) {
  .login-form-side { align-items: start; padding-top: 24px; }
  .mobile-brand { margin-bottom: 48px; }
  .login-card h2 { font-size: 27px; }
}

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