/* ─── LOGIN ─────────────────────────── */
.login-page {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-page .mesh-bg { opacity: 0.6; }

.login-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  position: relative;
}
.login-form-side .top {
  position: absolute; top: 28px; left: 32px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.015em;
  cursor: pointer;
}
.login-form-side .bottom {
  position: absolute; bottom: 28px; left: 32px; right: 32px;
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--text-faint);
}
.login-form-side .bottom a:hover { color: var(--text-soft); }

.login-card {
  width: 100%;
  max-width: 380px;
  display: grid; gap: 24px;
}
.login-card .head { display: grid; gap: 8px; }
.login-card .head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.login-card .head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}
.login-card .head .switch {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}
.login-card .head .switch a {
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.login-card .head .switch a:hover { text-decoration: underline; text-underline-offset: 3px; }

.field-group { display: grid; gap: 6px; }
.field-group label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  display: flex; justify-content: space-between;
  letter-spacing: 0;
}
.field-group label a { color: var(--text-soft); }
.field-group input {
  height: 38px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.field-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.field-group .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.field-group .err { font-size: 11.5px; color: var(--accent-warm); margin-top: 2px; }

.login-card .primary-cta {
  height: 40px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.login-card .primary-cta:hover { background: #fff; }
.login-card .primary-cta:disabled { opacity: 0.4; cursor: not-allowed; }
.login-card .primary-cta.accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px rgba(var(--accent-rgb), 0.32);
}

.divider-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.divider-or::before, .divider-or::after {
  content: ""; flex: 1; height: 1px;
  background: var(--border);
}

.sso-grid {
  display: grid; gap: 8px;
}
.sso-btn {
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.sso-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.sso-btn .ic {
  width: 16px; height: 16px;
  display: grid; place-items: center;
}

.tos-note {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.55;
}
.tos-note a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

/* Right side — testimonial / graph */
.login-aside {
  position: relative;
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.login-aside canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.login-aside .aside-content {
  position: absolute; inset: 0;
  padding: 40px;
  display: flex; flex-direction: column;
  justify-content: end;
  z-index: 2;
}
.login-aside .aside-content::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}
.login-aside .quote {
  position: relative; z-index: 1;
  max-width: 420px;
}
.login-aside .quote .body {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.36;
  text-wrap: pretty;
}
.login-aside .quote .body::before {
  content: "";
  display: inline-block;
  width: 18px; height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 14px;
  margin-bottom: 4px;
}
.login-aside .quote .who {
  margin-top: 22px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
}
.login-aside .quote .who .av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: white; font-size: 11px; font-weight: 600;
}
.login-aside .quote .who strong { color: var(--text); font-weight: 500; }

.aside-topbar {
  position: absolute; top: 28px; right: 32px;
  display: flex; align-items: center; gap: 16px;
  z-index: 3;
  font-size: 12.5px;
  color: var(--text-dim);
}
.aside-topbar a { color: var(--text-soft); cursor: pointer; }
.aside-topbar a:hover { color: var(--text); }

/* Magic-link sent state */
.sent-state {
  display: grid; gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}
.sent-state .icn {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-2-rgb), 0.28);
  color: var(--accent-2);
  display: grid; place-items: center;
  margin: 0 auto;
}
.sent-state h3 { margin: 0; font-size: 16px; font-weight: 600; }
.sent-state p { margin: 0; font-size: 13px; color: var(--text-dim); }
.sent-state .resend { color: var(--text-soft); font-size: 12.5px; cursor: pointer; }
.sent-state .resend:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* Narrow viewport — fall back to single column */
@media (max-width: 920px) {
  .login-page { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}
