/* Static /recovery page: the SAME rules as app/globals.css (T-026). Look of auth.speelje.com = the app's look. Values are written out by
   hand from the app's tokens: src/theme/palette.ts, colors.ts, gradients.ts,
   typography.ts, shape.ts (DESIGN_SYSTEM.md §2-§4). System font (K10), no
   external font, image or script (the CSP stays as it is). No Tailwind.
   app/globals.css holds the same rules for the React pages: when you
   change one, copy the change to the other.
   Contrast: text pairs are >= 4.5:1. The primary button uses the app's
   "pressed" gradient (amber-700 -> orange-700, white text 5.0-5.2:1) instead of
   the resting one (amber-600 -> orange-600, 3.2-3.6:1, a listed exception in
   the app's themeContrast.test.ts). To match the app exactly, change
   --button-from/--button-to (and the -hover pair) below. */

:root {
  /* bg / border / text roles (colors.ts §2.1) */
  --canvas: #f8fafc;          /* bg.page = slate-50 */
  --surface: #ffffff;         /* bg.surface */
  --subtle: #f1f5f9;          /* bg.subtle = slate-100 (inputs, secondary buttons, segmented control) */
  --pressed: #e2e8f0;         /* bg.pressed = slate-200 */
  --border: #e2e8f0;          /* border.default = slate-200 */
  --ink: #0f172b;             /* text.primary = slate-900 */
  --ink-strong: #1d293d;      /* text.strong = slate-800 */
  --ink-body: #314158;        /* text.body = slate-700 */
  --ink-muted: #45556c;       /* text.bodySoft = slate-600 */
  --ink-faint: #62748e;       /* text.muted = slate-500 (labels, footer) */
  /* brand (colors.ts §2.2) */
  --brand: #fe9a00;           /* brand.primary = amber-500 */
  --brand-text: #bb4d00;      /* brand.text = amber-700 (small text on white, 5.0:1) */
  --brand-tint: #fffbeb;      /* brand.tint.50 = amber-50 */
  --brand-tint-200: #fee685;  /* brand.tint.200 */
  --brand-tint-300: #ffd230;  /* brand.tint.300: selected segment border */
  --brand-on-tint: #973c00;   /* brand.onTintSoft = amber-800 */
  --accent-orange: #ff6900;   /* accent.orange = orange-500 (form focus) */
  /* gradients (gradients.ts) */
  --gradient-brand: linear-gradient(90deg, #fe9a00, #ff6900, #ff2056);   /* brand */
  --gradient-community: linear-gradient(90deg, #009966, #009689);        /* community */
  --button-from: #bb4d00;       /* primaryButtonPressed: amber-700 */
  --button-to: #ca3500;         /* orange-700 */
  --button-from-hover: #973c00; /* amber-800 */
  --button-to-hover: #9f2d00;   /* orange-800 */
  /* success (live tones) */
  --success-on-tint: #006045; /* live.textStrong = emerald-800 */
  --success-soft: #ecfdf5;    /* live.tint.50 */
  --success-border: #a4f4cf;  /* live.tint.200 */
  /* error (rose) */
  --danger: #ec003f;          /* danger.text = rose-600 */
  --danger-soft: #fff1f2;     /* danger.tint = rose-50 */
  --danger-border: #ffccd3;   /* rose-200 */
  /* shape (shape.ts) */
  --radius-sm: 12px;          /* button, input, chip */
  --radius-md: 16px;          /* pill, inner card */
  --radius-lg: 24px;          /* main card */
  --shadow: 15 23 43;         /* shadow = slate-900 (rgb) */
  --content: 480px;           /* narrow centred column (card, top bar, footer) */
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.375;
}

h1, p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(225 113 0 / 45%);
  outline-offset: 3px;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Top bar: white, full width, hairline border (the app's header). Its content
   lines up with the card below. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px max(16px, calc((100% - var(--content)) / 2));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.page,
.footer {
  width: min(var(--content), calc(100% - 32px));
  margin-inline: auto;
}

/* Logo: the app icon in a rounded square + lowercase "speelje", 900 weight. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--brand) url("/logo.png") center / cover no-repeat;
  box-shadow: 0 1px 3px rgb(var(--shadow) / 10%);
}

.brand-label {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
}

/* Language switch: the app's segmented control. */
.language-switcher {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--subtle);
}

.language-button {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.language-button:hover {
  background: var(--pressed);
}

.language-button[aria-pressed='true'] {
  border-color: var(--brand-tint-300);
  background: var(--surface);
  color: var(--brand-text);
  box-shadow: 0 1px 2px rgb(var(--shadow) / 8%);
}

.page {
  display: grid;
  align-items: start;
  padding-block: clamp(24px, 7vh, 64px);
}

/* Card: radius 24, 1px border, md shadow; a 4px colour strip on top says which
   state it is in (brand gradient / live green / rose). */
.status-card {
  position: relative;
  overflow: hidden;
  padding: 32px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 4px 6px rgb(var(--shadow) / 8%), 0 1px 3px rgb(var(--shadow) / 6%);
}

.status-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient-brand);
}

.status-card[data-status='success']::before {
  background: var(--gradient-community);
}

.status-card[data-status='error']::before {
  background: var(--danger);
}

/* Status tile: -50 background, -200 border, strong glyph (the app's badges). */
.status-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--brand-tint-200);
  border-radius: var(--radius-md);
  background: var(--brand-tint);
  color: var(--brand-on-tint);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

[data-status='success'] .status-icon {
  border-color: var(--success-border);
  background: var(--success-soft);
  color: var(--success-on-tint);
}

[data-status='error'] .status-icon {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger);
}

/* Small section label: UPPERCASE, wide letter spacing, slate-500. */
.eyebrow {
  margin: 0 0 8px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 16px;
  text-transform: uppercase;
}

/* Title: 24 px on phones, 28 px from 561 px up (typography.ts heading2/heading1). */
.status-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.body-copy {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.5;
}

.action-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 24px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.primary-action {
  border: 0;
  background: linear-gradient(90deg, var(--button-from), var(--button-to));
  color: #ffffff;
  box-shadow: 0 6px 16px rgb(202 53 0 / 22%), 0 1px 3px rgb(var(--shadow) / 10%);
}

.primary-action:hover {
  background: linear-gradient(90deg, var(--button-from-hover), var(--button-to-hover));
}

.secondary-action {
  border: 1px solid var(--border);
  background: var(--subtle);
  color: var(--ink-strong);
}

.secondary-action:hover {
  background: var(--pressed);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.recovery-form {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.recovery-form label {
  margin-top: 8px;
  color: var(--ink-body);
  font-size: 14px;
  font-weight: 700;
}

.recovery-form input,
.recovery-form select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  color: var(--ink);
  font-size: 16px;
}

.recovery-form input:focus,
.recovery-form select:focus {
  border-color: var(--accent-orange);
  background: var(--surface);
  outline: 3px solid rgb(255 105 0 / 18%);
}

.recovery-form .primary-action {
  margin-top: 8px;
}

.form-error {
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.action-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* The help line at the end of every card: legible on its own, visibly a
   link, and a hit area of 46px. */
.support-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.5;
}

.support-note a {
  display: inline-block;
  padding-block: 11px;
  color: var(--brand-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.support-note a:hover {
  color: var(--ink);
}

.footer {
  padding-block: 8px 32px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

@media (min-width: 561px) {
  .status-card {
    padding: 40px 32px 28px;
  }

  .status-card h1 {
    font-size: 28px;
  }
}

/* Phones: brand on its own row, the language switch under it, full width. */
@media (max-width: 560px) {
  .topbar {
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .language-switcher {
    width: 100%;
  }

  .language-button {
    flex: 1;
    padding-inline: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
