/* styles.css — the hosted sign-in page wears the SAME clothes as the loopback
   handoff card. Every rule below is lifted from diffalo/ui/src/login/login.css
   (the .lg-card register — the pages that live in the user's own browser),
   with the tokens it leans on copied out of diffalo/ui/src/shell/tokens.css and
   the base reset that file provided. Nothing here is new design: this page is
   a visual sibling of the confirm / all-set rooms, and the two must not drift.

   Not ported: the .lg-gate register (fork-side main view, needs the app icon),
   .install-notice, and anything React-root-shaped. */

:root {
  --m-text:   #17212b;
  --m-dim:    #46525d;
  --m-faint:  #6e7c88;
  --m-bg-2:   #f1f4f6;   /* hover */
  --m-line:   rgb(16 24 32 / 9%);
  --m-err:    #d2454f;
  --ease:     cubic-bezier(.25, .8, .3, 1);
  --accent-rgb: 76, 194, 178;
  --canvas:     #edf0f4;  /* the window canvas tint */
  --page: var(--canvas);
}

/* ---- base reset (the subset tokens.css gave the login bundle) ---- */

* { box-sizing: border-box; margin: 0; padding: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  user-select: none;
}

::selection { background: rgb(var(--accent-rgb), .28); }

html, body { height: 100%; }

body {
  background: var(--page);
  color: var(--m-text);
  font: 450 14px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.lg-page {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
}

/* ---- the card (user's browser) ------------------------------------------- */

.lg-card {
  width: 380px; max-width: 100%;
  padding: 22px 24px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgb(16 24 32 / 7%), 0 8px 24px rgb(16 24 32 / 10%);
}

.lg-mark { font-size: 15px; font-weight: 650; letter-spacing: .01em; color: var(--m-text); }

.lg-headline { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--m-text); }

.lg-copy { margin-top: 8px; font-size: 12px; line-height: 1.55; color: var(--m-dim); }

/* account chip (US7 confirm): who is Diffalo about to become? */
.lg-chip {
  display: flex; align-items: center; gap: 11px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--m-line);
  background: var(--page);
}

.lg-avatar {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgb(var(--accent-rgb), .16);
  color: var(--m-text);
  font-size: 14px; font-weight: 650;
}

.lg-who { display: flex; flex-direction: column; min-width: 0; }
.lg-name { font-size: 13px; font-weight: 600; color: var(--m-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-email { font-size: 11.5px; color: var(--m-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lg-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }

/* filled primary — the one loud element on either surface */
.lg-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 18px;
  border-radius: 8px;
  background: var(--m-text);
  color: #fff;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: opacity .12s var(--ease), transform .12s var(--ease);
}
.lg-primary:hover { opacity: 88%; }
.lg-primary:active { transform: translateY(.5px); }
.lg-primary.block { width: 100%; }
.lg-primary.grow { flex: 1; }

.lg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--m-line);
  color: var(--m-dim);
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.lg-btn:hover { background: var(--m-bg-2); color: var(--m-text); }
.lg-btn:disabled { opacity: 55%; cursor: default; }
.lg-btn:disabled:hover { background: transparent; color: var(--m-dim); }

/* quiet text-button register (use-another / try-again) */
.lg-link {
  display: inline; padding: 0;
  background: none; border: none;
  color: var(--m-dim);
  font-size: 11.5px; font-weight: 550;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgb(16 24 32 / 25%);
  cursor: pointer;
  transition: color .12s var(--ease);
}
.lg-link:hover { color: var(--m-text); }
.lg-alt { display: block; margin-top: 12px; }

/* fine print: the anti-phishing line — legible, deliberately quiet */
.lg-fine { margin-top: 14px; font-size: 11px; line-height: 1.5; color: var(--m-faint); }

/* waiting: spinner + one sentence */
.lg-wait {
  display: flex; align-items: center; gap: 9px;
  margin-top: 12px;
  font-size: 12px; color: var(--m-dim);
}

.lg-spin {
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgb(16 24 32 / 12%);
  border-top-color: var(--m-dim);
  animation: lg-spin .7s linear infinite;
}

@keyframes lg-spin { to { transform: rotate(360deg); } }

/* all set */
.lg-check {
  width: 34px; height: 34px;
  margin-top: 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgb(var(--accent-rgb), .16);
  color: #1f7f70;
  font-size: 16px; font-weight: 700;
}

/* Clerk smart-CAPTCHA mount (issue 6): clerk-js renders Turnstile here when
   bot protection wants a challenge during sign-up. Zero-cost while empty;
   centered with breathing room once populated (clerk-js drives the widget's
   own visibility via inline styles — don't fight it). */
#clerk-captcha { display: grid; place-items: center; }
#clerk-captcha:not(:empty) { margin-top: 14px; }

/* one-sentence notes: red wash for can't-reach */
.lg-err {
  margin-top: 12px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgb(210 69 79 / 9%);
  color: var(--m-err);
  font-size: 11.5px; line-height: 1.45;
}
.lg-err .lg-link { color: inherit; text-decoration-color: currentcolor; }
