/* Sign-in pages (ADR 0025). Nortia's palette, shared with the web app so both feel like one product. */
:root {
  --primary: #195f4c;
  --primary-dark: #153f38;
  --text: #182b32;
  --text-regular: #5b7069;
  --text-secondary: #60766f;
  --border: #aabdb5;
  --card-border: #dbe5e1;
  --page: #f3f6f5;
  --focus: #c08a28;
  --danger: #a33232;
  --danger-bg: #fbeaea;
  --success-bg: #e1f2e9;
  --success: #164d3d;
  --secondary-bg: #e1ebe6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.5;
}
main {
  max-width: 440px;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
}
main:has(.form-card) { max-width: 560px; }
.brand {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 750;
  color: var(--primary-dark);
}
.brand span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 2rem;
}
h1 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.eyebrow { margin: 0; font-size: 0.75rem; font-weight: 700; color: #3b7364; text-transform: uppercase; letter-spacing: 0.12em; }
.muted { color: var(--text-regular); }
.small { font-size: 0.85rem; }
label { display: block; margin: 1rem 0 0.35rem; font-size: 0.9rem; font-weight: 600; }
input, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
  color: inherit;
  background: #fff;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
fieldset { border: 1px solid var(--card-border); border-radius: 7px; margin: 1.25rem 0 0; padding: 0 1rem 1rem; }
legend { padding: 0 0.4rem; font-weight: 600; }
button, .button {
  display: inline-block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}
button:hover, .button:hover { background: var(--primary-dark); }
button.secondary { color: var(--primary); background: var(--secondary-bg); }
a { color: var(--primary); }
.errors:not(:empty), p.errors {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 7px;
  color: var(--danger);
  background: var(--danger-bg);
}
.errors ul { margin: 0; padding-left: 1.1rem; }
p[role="status"], .notice { padding: 0.75rem 1rem; border-radius: 7px; color: var(--success); background: var(--success-bg); }
.validation-summary-valid { display: none; }

/* Language switch under every sign-in page (ADR 0029). */
.languages {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.languages span {
  font-weight: 600;
  color: var(--text);
}
.errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* Plan choice when signing up (ADR 0031). */
.plans {
  display: grid;
  gap: 0.6rem;
}
.plan {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-weight: 400;
  cursor: pointer;
}
.plan input {
  width: auto;
  margin-top: 0.25rem;
}
.plan > span {
  display: grid;
  gap: 0.15rem;
}
.plan:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

/* The second step of signing in (ADR 0047): the code in large, spaced digits, and the "remember this browser" box. */
input.code { font-size: 1.5rem; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
label.check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; line-height: 1.4; }
label.check input { width: auto; margin-top: 0.15rem; flex-shrink: 0; }
/* Activating an administration-only account (ADR 0050). */
.steps { list-style: none; margin: 0.6rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.78rem; counter-reset: step; }
.steps li { counter-increment: step; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--secondary-bg); color: var(--text-regular); font-weight: 600; }
.steps li::before { content: counter(step) " · "; }
.steps li.on { background: var(--primary); color: #fff; }
.steps li.done { background: var(--success-bg); color: var(--success); }
.qr { width: 11rem; margin: 1rem auto 0.5rem; }
.qr svg { display: block; width: 100%; height: auto; }
.key { text-align: center; overflow-wrap: anywhere; }
.codes { list-style: none; padding: 0.8rem 1rem; margin: 1rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 1rem; background: var(--page); border-radius: 8px; }

/* "Protege tu cuenta" (ADR 0051): each choice is a card like the plans, one a link and one a button. */
a.plan { color: inherit; text-decoration: none; }
a.plan:hover, button.plan.choice:hover { border-color: var(--primary); }
a.plan:first-child { border-color: var(--primary); }
button.plan.choice { width: 100%; margin: 0; padding: 0.75rem 0.9rem; text-align: left; background: none; color: inherit; font: inherit; }
button.plan.choice:hover { background: none; }

/* "Recordar este navegador 30 días" (ADR 0051): the box with its title and what it means under it. */
label.check.remember { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
label.check.remember > span { display: grid; gap: 0.2rem; }

/* The first company's country on signing up (ADR 0057). */
.country { display: flex; align-items: center; gap: 0.5rem; margin: 0.3rem 0 0.2rem; font-weight: 600; }
.country .flag { width: 22px; height: 16.5px; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 10%); }
fieldset .label { display: block; font-weight: 600; font-size: 0.9rem; margin-top: 0.9rem; }
