:root {
  --ink: #171814;
  --muted: #6d6f68;
  --line: #deddd7;
  --paper: #f5f3ee;
  --panel: #fffefb;
  --lavender: #c4b5fd;
  --purple: #8b5cf6;
  --purple-mid: #6d28d9;
  --purple-dark: #4c1d95;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
}

button, input { font: inherit; }

.shell {
  display: grid;
  grid-template-columns: minmax(420px, 0.94fr) minmax(500px, 1.06fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 100vh;
  padding: 46px 56px 52px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(139, 92, 246, .16), rgba(28, 22, 74, .5)),
    var(--purple);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.9) .65px, transparent .65px);
  background-size: 14px 14px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.brand, .mobile-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 6px);
  align-items: end;
  gap: 3px;
  width: 27px;
  height: 27px;
  padding: 5px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-mid), #c084fc);
  box-shadow: 0 7px 24px rgba(32, 26, 78, .25);
}

.brand-mark span { display: block; border-radius: 2px; background: currentColor; }
.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 10px; }

.brand-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: auto 0;
  padding: 70px 0 50px;
}

.eyebrow, .kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow { color: var(--lavender); }
.kicker { color: var(--purple); }

h1, h2 { font-family: "Manrope", sans-serif; }

h1 {
  max-width: 550px;
  margin: 0;
  font-size: clamp(44px, 5.1vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lede {
  max-width: 490px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  line-height: 1.7;
}

.system-snapshot {
  display: grid;
  gap: 16px;
  max-width: 500px;
  margin-top: 32px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(28, 22, 74, .35);
  box-shadow: 0 22px 54px rgba(32, 26, 78, .22);
}

.snapshot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.snapshot-header span {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.snapshot-header strong {
  color: #fff;
  font-size: 13px;
}

.snapshot-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.snapshot-grid::before {
  content: "";
  position: absolute;
  inset: 50% 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 181, 253, .78), transparent);
}

.snapshot-grid::after {
  content: "";
  position: absolute;
  top: 14%;
  bottom: 14%;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(196, 181, 253, .78), transparent);
}

.snapshot-grid span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-height: 60px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .09);
}

.snapshot-grid b {
  color: #fff;
  font-size: 13px;
}

.snapshot-grid small {
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  line-height: 1.3;
}

.snapshot-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.snapshot-flow span {
  display: grid;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: #ede9fe;
  background: rgba(255, 255, 255, .08);
  font-size: 11px;
  font-weight: 800;
}

.proof-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 470px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(14px);
}

.proof-card strong { display: block; font-size: 14px; }
.proof-card p { margin: 3px 0 0; color: rgba(255,255,255,.66); font-size: 12px; }

.avatar-stack { display: flex; padding-left: 8px; }
.avatar-stack span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border: 2px solid #6d61d7;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.avatar-stack span:nth-child(2) { color: var(--purple-dark); background: var(--lavender); }
.avatar-stack span:nth-child(3) { color: #fff; background: var(--purple-dark); }

.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 48px; background: var(--panel); }
.login-wrap { width: min(100%, 430px); }
.mobile-brand { display: none; margin-bottom: 64px; }

h2 { margin: 0; font-size: clamp(32px, 3vw, 43px); line-height: 1.12; letter-spacing: 0; }
.subcopy { margin: 14px 0 34px; color: var(--muted); font-size: 15px; line-height: 1.6; }

form label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.label-row label { margin-bottom: 9px; }
.password-toggle {
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  color: var(--purple-dark);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.password-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.password-toggle:focus-visible { outline: 3px solid rgba(118,104,232,.3); outline-offset: 3px; }
.input-wrap { position: relative; }
.input-wrap svg {
  position: absolute;
  top: 50%; left: 17px;
  width: 19px; height: 19px;
  transform: translateY(-50%);
  fill: none; stroke: #85877f; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

input {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 49px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
input::placeholder { color: #a5a69f; }
input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(118,104,232,.12); }
input[aria-invalid="true"] { border-color: #c8463c; box-shadow: 0 0 0 4px rgba(200,70,60,.08); }

.field-error { min-height: 20px; margin: 7px 0 5px; color: #b5352d; font-size: 12px; }
.compact-error { margin-bottom: 3px; }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  box-shadow: 0 12px 30px rgba(76, 29, 149, .18);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.primary-button:hover { transform: translateY(-1px); background: linear-gradient(135deg, #5b21b6, #a855f7); box-shadow: 0 15px 35px rgba(76, 29, 149, .25); }
.primary-button:focus-visible, .text-button:focus-visible { outline: 3px solid rgba(118,104,232,.35); outline-offset: 3px; }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.primary-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.divider { display: flex; align-items: center; gap: 13px; margin: 25px 0 17px; color: #9a9b95; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span { white-space: nowrap; }
.social-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.social-button:hover { transform: translateY(-1px); border-color: #bbb9b2; box-shadow: 0 8px 22px rgba(23,24,20,.07); }
.social-button:focus-visible, .inline-button:focus-visible { outline: 3px solid rgba(118,104,232,.3); outline-offset: 2px; }
.provider-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #fff; background: #5f6368; font-size: 10px; font-weight: 800; }
.social-button[data-provider="google"] .provider-mark { color: #4285f4; background: #f3f6ff; }
.social-button[data-provider="microsoft"] .provider-mark { color: #fff; background: #2672ec; }
.social-button[data-provider="facebook"] .provider-mark { color: #fff; background: #1877f2; }
.social-button[data-provider="github"] .provider-mark { color: #fff; background: #24292f; }
.signup-copy { margin: 24px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.inline-button { padding: 4px; border: 0; color: var(--purple-dark); background: transparent; cursor: pointer; font-weight: 700; }
.inline-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.secure-note { display: flex; justify-content: center; gap: 8px; margin-top: 19px; color: #85877f; font-size: 11px; line-height: 1.4; }
.secure-note svg { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.status { margin-top: 20px; padding: 12px 14px; border-radius: 10px; color: #8a2d26; background: #fff0ee; font-size: 13px; line-height: 1.45; }
.status.loading { color: #4d4780; background: #f0eefc; }

.account-view { text-align: center; }
.success-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 24px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--purple-mid), #c084fc); transform: rotate(-4deg); }
.success-mark svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(4deg); }
.account-view .subcopy { margin-bottom: 26px; }
.account-card { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #faf9f5; text-align: left; }
.account-card strong, .account-card span { display: block; }
.account-card strong { margin-bottom: 3px; font-size: 14px; }
.account-card span { color: var(--muted); font-size: 13px; }
.account-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: var(--purple); font-size: 13px; font-weight: 800; }
.account-actions { margin-top: 24px; }
.text-button { margin-top: 13px; padding: 9px 14px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-weight: 600; }
.text-button:hover { color: var(--ink); }

footer { display: flex; justify-content: center; gap: 9px; margin-top: 54px; color: #999a94; font-size: 11px; }
footer a { color: inherit; }
.footer-dot { color: #c7c6c0; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .shell { display: block; }
  .brand-panel { display: none; }
  .login-panel { padding: 40px 24px; }
  .mobile-brand { display: inline-flex; color: var(--ink); }
  h2 { font-size: 36px; }
}

@media (max-width: 480px) {
  .login-panel { align-items: start; padding: 28px 20px; }
  .mobile-brand { margin-bottom: 72px; }
  h2 { font-size: 32px; }
  .social-buttons { grid-template-columns: 1fr; }
  footer { margin-top: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
