/* Sign-in page: white, centred, DM Sans, navy action. Same tokens as the dashboards. */
body.ln-body { background: #fff; }
body.ln-body main.page { max-width: none; padding: 0; }
.ln {
  --t: #222; --m: #717171; --line: #b0b0b0; --soft: #ebebeb; --navy: #142e40; --navy-hi: #1d3f57; --bad: #b34035; --bad-bg: #fbeceb;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 48px 24px; font: 400 16px/1.45 'DM Sans', system-ui, sans-serif; color: var(--t); background: #fff;
}
.ln *, .ln *::before, .ln *::after { box-sizing: border-box; }
.ln-box { width: 100%; max-width: 420px; }
.ln-logo { display: flex; justify-content: center; margin-bottom: 36px; color: var(--navy); text-decoration: none; }
.ln-logo .sx-logo { flex-direction: column; gap: 12px; color: var(--navy); }
.ln-logo .sx-emblem { width: 52px; height: 52px; }
.ln-logo .sx-word { justify-items: center; }
.ln-logo .sx-word-main { font-size: 26px; }
.ln-logo .sx-word-sub { font-size: 8px; opacity: .75; }
.ln h1 { margin: 0; font: 600 28px/1.2 'DM Sans', system-ui, sans-serif; letter-spacing: -0.02em; color: var(--t); text-align: center; }
.ln-sub { margin: 6px 0 28px; color: var(--m); text-align: center; }

.ln-error { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; border: 1px solid #efc9c5; border-radius: 12px; background: var(--bad-bg); color: var(--bad); }
.ln-error svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ln-error p { margin: 0; color: var(--t); font-size: 15px; }
.ln-check { margin: 8px 2px 0; color: var(--bad); font-size: 14px; font-weight: 500; }

.ln-group { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ln-group.is-error { border-color: var(--bad); }
.ln-field { position: relative; }
.ln-field + .ln-field { border-top: 1px solid var(--line); }
.ln-group.is-error .ln-field + .ln-field { border-top-color: #e3b4ae; }
.ln-field label { position: absolute; left: 14px; top: 9px; font-size: 12px; color: var(--m); pointer-events: none; }
.ln-field input {
  display: block; width: 100%; height: 58px; padding: 26px 14px 8px; border: 0; border-radius: 12px; background: transparent;
  font: 400 16px/1.2 'DM Sans', system-ui, sans-serif; color: var(--t); outline: none; box-shadow: none;
}
.ln-field:first-child input { border-radius: 11px 11px 0 0; }
.ln-field:last-child input { border-radius: 0 0 11px 11px; }
.ln-field input:focus { box-shadow: inset 0 0 0 2px var(--t); }
.ln-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; -webkit-text-fill-color: var(--t); }
.ln-field input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px #fff inset, inset 0 0 0 2px var(--t); }
.ln-field--pw input { padding-right: 72px; }
.ln-show {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--t); font: 600 14px 'DM Sans', system-ui, sans-serif; text-decoration: underline; cursor: pointer;
}
.ln-show:hover { background: #f7f7f7; }

.ln-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 16px;
  border: 0; border-radius: 12px; background: var(--navy); color: #fff; font: 600 16px 'DM Sans', system-ui, sans-serif; cursor: pointer;
}
.ln-btn:hover { background: var(--navy-hi); }
.ln-btn.is-busy { cursor: progress; background: var(--navy-hi); }
.ln-spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: ln-spin .8s linear infinite; }
.ln-btn.is-busy .ln-spin { display: block; }
@keyframes ln-spin { to { transform: rotate(360deg); } }

.ln-help { margin: 20px 0 0; text-align: center; color: var(--m); font-size: 15px; }
.ln-help a, .ln-back { color: var(--t); font-weight: 600; }
.ln-back { font-size: 14px; color: var(--m); font-weight: 500; }
.ln-back:hover, .ln-help a:hover { color: var(--navy); }

.ln :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.ln-field input:focus-visible { outline: none; }

@media (max-width: 480px) {
  .ln { justify-content: flex-start; padding: 40px 24px 32px; gap: 32px; }
  .ln-logo { margin-bottom: 28px; }
  .ln h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .ln-spin { animation-duration: 2.4s; } }
