/* Addcomposites sign-in — Payload v3 tokens, same as apps/portal and apps/shop. */
:root {
  --paper: #fbfaf7;
  --card: #ffffff;
  --ink: #0b0d11;
  --ink-muted: #363b48;
  --ink-subtle: #545a69;
  --border: #e2dccc;
  --border-strong: #cec5ae;
  --navy: #47577c;
  --red: #bf3425;
  --red-hover: #a62e1f;
  --green: #2c6e49;
  --display: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(71, 87, 124, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(71, 87, 124, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

.wrap {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 16px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.logo { display: block; margin: 0 auto 28px; }
.logo img { display: block; height: auto; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(11, 13, 17, 0.04), 0 8px 24px rgba(11, 13, 17, 0.04);
}

.overline {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

h1 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-muted); overflow-wrap: anywhere; }
.lead strong { color: var(--ink); font-weight: 600; }

.field { display: block; margin-top: 22px; }
.field span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-subtle); margin-bottom: 6px; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(71, 87, 124, 0.15); }
.field input.code { font-size: 24px; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-hover); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--border-strong); margin-top: 10px; }
.btn.secondary:hover { border-color: var(--navy); }
.btn.secondary img { width: 18px; height: 18px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

.social { margin-top: 20px; }
.social .btn:first-child { margin-top: 0; }

.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 -6px; color: var(--ink-subtle); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.row { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--navy); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link[disabled] { color: var(--ink-subtle); cursor: default; text-decoration: none; }

.fine { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-subtle); }

.error {
  margin: 18px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--red-hover);
  background: rgba(191, 52, 37, 0.06);
  border: 1px solid rgba(191, 52, 37, 0.3);
  border-radius: 6px;
}

footer { margin-top: auto; padding-top: 28px; text-align: center; font-size: 12px; color: var(--ink-subtle); }
footer a { color: inherit; }
footer span { margin: 0 6px; }

[hidden] { display: none !important; }

@media (max-width: 420px) {
  .wrap { padding-top: 28px; }
  .card { padding: 24px 18px; }
  h1 { font-size: 34px; }
}
