/*
 * signin.speck.health — Speck Health visual identity.
 * Mirrors zammad-signin/style.css and provider-portal/app/login design.
 *
 * Palette:
 *   bg     #FFFDFD   warm near-white
 *   ink    #191919   headlines
 *   text   #5F5F5F   body
 *   accent #F8A3A9   cherry-blossom pink (used sparingly — italic "back")
 *   rule   #e5e1dc   subtle borders
 *
 * Type:
 *   serif  Newsreader (headlines)
 *   sans   Jost       (body, labels, buttons)
 */

@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500&family=Newsreader:ital,wght@0,400;1,400&display=swap");

:root {
  --bg:        #FFFDFD;
  --cream:     #F1EEE9;
  --ink:       #191919;
  --text:      #5F5F5F;
  --muted:     #9a9a9a;
  --rule:      #e5e1dc;
  --accent:    #F8A3A9;
  --error-bg:  #fef2f2;
  --error-fg:  #8a2a2a;
  --info-bg:   #f1eee9;
  --info-fg:   #2a2a2a;
}

*, *::before, *::after { box-sizing: border-box; }

/* The HTML `hidden` attribute should always win — without this the
   `#signin-form { display: flex }` rule below overrides UA `[hidden]`,
   so `form.hidden = true` does nothing visible. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Jost", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}

.card {
  width: 100%;
  max-width: 26rem;
  text-align: center;
}

.brand {
  margin: 0 auto 2rem;
}
.brand img {
  display: block;
  margin: 0 auto;
  width: 9rem;
  height: auto;
}

h1 {
  font-family: "Newsreader", ui-serif, Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
h1 .accent {
  color: var(--accent);
  font-style: italic;
}

.subtitle {
  margin: 0 0 2rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

.alert {
  text-align: left;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: 2px;
  border-left: 3px solid;
}
.alert-error { background: var(--error-bg); color: var(--error-fg); border-color: var(--error-fg); }
.alert-info  { background: var(--info-bg);  color: var(--info-fg);  border-color: var(--accent); }

/* Inline action button inside the "check inbox" alert — used for the
   "send another link" affordance. Visually a subtle text link, not a
   primary button, since it's a secondary action. */
.alert-action {
  display: inline;
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--info-fg);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  cursor: pointer;
}
.alert-action:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

#signin-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  text-align: left;
}

#signin-form label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

#signin-form input[type="email"] {
  height: 3.5rem;
  padding: 0 1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.125rem;
  text-align: center;
  transition: border-color 120ms ease;
}
#signin-form input[type="email"]:focus {
  outline: none;
  border-color: var(--ink);
}
#signin-form input[type="email"]::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

#signin-form button {
  margin-top: 1rem;
  height: 3.5rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: background-color 150ms ease, color 150ms ease;
}
#signin-form button:hover:not(:disabled) {
  background: var(--ink);
  color: var(--bg);
}
#signin-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.spinner {
  display: none;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 9999px;
  animation: spin 0.7s linear infinite;
}
#signin-form button.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
  margin: 2.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.footer-note a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.footer-note a:hover { color: var(--ink); text-decoration-color: var(--ink); }
