/* ============================================================
   Portal form styles — the sign-in card and the form controls the portal shares.

   Tokens, base, buttons and the brand now live in site.css; this file is just the
   card/form/message layer loaded on top. The centred-card body layout below is what the
   auth pages (login, signup, …) use; the portal app page overrides it with its own shell.
   ============================================================ */

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

/* Sits above the card in the same centred grid. The body has no gap, so the spacing lives here,
   and align-self keeps it from stretching to the card's width. */
.auth-brand {
  align-self: center;
  margin-bottom: 20px;
  text-decoration: none;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--paper-2);
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--pop) var(--pop) 0 var(--shadow);
  padding: 28px;
}

.card.wide { max-width: 860px; }

h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.sub {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: .95rem;
}

label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  font-size: .9rem;
}

input[type=email],
input[type=password],
input[type=text] {
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 16px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-sm);
}

input:focus-visible {
  outline: 3px solid var(--c-grape);
  outline-offset: 2px;
}

button {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--c-grape);
  border: var(--border) solid var(--ink-fixed);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--ink-fixed);
}

button:hover:not(:disabled) { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink-fixed); }
button:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink-fixed); }
button:disabled { opacity: .55; cursor: not-allowed; }

button.secondary { background: var(--paper-2); color: var(--ink); border-color: var(--line); box-shadow: 4px 4px 0 var(--shadow); }

.providers { display: grid; gap: 10px; margin-bottom: 18px; }
.providers:empty { display: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--ink-soft);
  font-size: .85rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
  opacity: .25;
}

/* Hidden until there is something to say, so the layout doesn't reserve a gap. */
.message {
  display: none;
  padding: 11px 13px;
  margin-bottom: 16px;
  border: var(--border) solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.message.show { display: block; }
.message.error { background: color-mix(in srgb, var(--c-bubble) 18%, var(--paper-2)); }
.message.ok    { background: color-mix(in srgb, var(--c-mint) 20%, var(--paper-2)); }

.links { margin-top: 18px; font-size: .9rem; text-align: center; }
.links a { color: var(--c-grape); }
@media (prefers-color-scheme: dark) { .links a { color: var(--c-lemon); } }

.hint { font-size: .82rem; color: var(--ink-soft); margin: -10px 0 16px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row button { width: auto; }

code { font-family: var(--mono); font-size: .85em; word-break: break-all; }
