/* Sign-in page (PLAT-347). Untitled UI Pro v8 tokens from sdk/uui-kit
   theme.css, written as plain CSS for the Go template in
   internal/webauth/loginpage.go. login.css stays for the MFA pages. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/inter-var.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --bg-hover: #fafafa;
  --text: #171717;
  --text-2: #404040;
  --text-3: #525252;
  --placeholder: #737373;
  --border: #d4d4d4;
  --fg-4: #737373;
  --brand-solid: #0f766e;
  --brand-solid-hover: #115e59;
  --brand-text: #0f766e;
  --focus: #0d9488;
  --wm-ink: #0f172a;
  --wm-health: #0f766e;
  --err-bg: #fef3f2;
  --err-border: #fecdca;
  --err-text: #b42318;
  --err-icon: #d92d20;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --skeu: inset 0 0 0 1px rgba(0, 0, 0, .18), inset 0 -2px 0 0 rgba(0, 0, 0, .05);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-hover: #171717;
  --text: #fafafa;
  --text-2: #d4d4d4;
  --text-3: #a3a3a3;
  --placeholder: #8a8a8a;
  --border: #404040;
  --fg-4: #a3a3a3;
  --brand-text: #5eead4;
  --focus: #14b8a6;
  --wm-ink: #ececf0;
  --wm-health: #5eead4;
  --err-bg: rgba(217, 45, 32, .10);
  --err-border: rgba(240, 68, 56, .35);
  --err-text: #fda29b;
  --err-icon: #f97066;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; display: flex; justify-content: center; padding: 112px 16px 48px; }
.col { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 32px; }
.head { display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
.wordmark { display: block; height: 36px; width: auto; }
.wordmark .ink { fill: var(--wm-ink); }
.wordmark .health { fill: var(--wm-health); }
.title { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }

.form { display: flex; flex-direction: column; gap: 24px; margin: 0; }
.stack { display: flex; flex-direction: column; }
.input-wrap { position: relative; display: flex; background: var(--bg); box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--border); transition: box-shadow .1s linear; }
.input-wrap:focus-within { box-shadow: var(--shadow-xs), inset 0 0 0 2px var(--focus); z-index: 1; }
.stack .input-wrap:first-child, .stack .input-wrap:first-child .input { border-radius: 8px 8px 0 0; }
.stack .input-wrap:last-child { margin-top: -1px; }
.stack .input-wrap:last-child, .stack .input-wrap:last-child .input { border-radius: 0 0 8px 8px; }
.input { width: 100%; min-width: 0; margin: 0; border: 0; outline: 0; background: transparent; padding: 10px 14px; font: inherit; color: var(--text); }
.input::placeholder { color: var(--placeholder); }
.input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--bg) inset; caret-color: var(--text); }
.input:autofill { box-shadow: 0 0 0 40px var(--bg) inset; }
.has-toggle .input { padding-right: 48px; }
.reveal { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--fg-4); cursor: pointer; }
.reveal:hover { color: var(--text-2); }
.reveal:focus-visible { outline: 2px solid var(--focus); }
.reveal svg { width: 18px; height: 18px; }
.reveal .eye-off { display: none; }
.reveal[aria-pressed="true"] .eye { display: none; }
.reveal[aria-pressed="true"] .eye-off { display: block; }

.actions { display: flex; flex-direction: column; gap: 16px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin: 0; padding: 10px 16px; border: 0; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .1s linear; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn-primary { background: var(--brand-solid); color: #fff; box-shadow: var(--skeu), var(--shadow-xs); }
.btn-primary::before { content: ""; position: absolute; inset: 1px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); pointer-events: none; }
.btn-primary:hover { background: var(--brand-solid-hover); }
.btn-social { background: var(--bg); color: var(--text-2); box-shadow: var(--skeu), var(--shadow-xs), inset 0 0 0 1px var(--border); }
:root[data-theme="dark"] .btn-social { box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--border); }
.btn-social:hover { background: var(--bg-hover); }
.btn-social svg { width: 24px; height: 24px; flex: none; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--err-bg); box-shadow: inset 0 0 0 1px var(--err-border); color: var(--err-text); font-size: 14px; line-height: 20px; }
.alert svg { flex: none; width: 20px; height: 20px; color: var(--err-icon); }

.help { margin: 0; text-align: center; font-size: 14px; line-height: 20px; color: var(--text-3); }
.help a { color: var(--brand-text); font-weight: 600; text-decoration: none; }
.help a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot { display: flex; justify-content: center; padding: 24px 16px 32px; }
.legal { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 14px; line-height: 20px; color: var(--text-3); }
.legal a { text-decoration: none; }
.legal a:hover { color: var(--text); }

@media (max-width: 520px) { .main { padding-top: 56px; } }
