/* SHAZAM auth front door. Tokens are the marketing site design system
   (website/src/Shazam.Econometrics.Web/Styles/tailwind.css): same palette, same Inter/Sora type,
   same 0.75rem radius and card/elegant shadows, so signing in looks like the rest of the product.
   Light is the base; dark comes from the OS preference unless the visitor arrived with ?theme=,
   which the head script pins onto <html> as .light / .dark. The status pair is the one departure:
   the site fills a shape with it, these pages set text in it, so the light values are darkened to
   clear 4.5:1 against their own tint. */

:root {
  --background: 210 40% 99%;
  --foreground: 222 32% 14%;
  --card: 0 0% 100%;
  --card-foreground: 222 32% 14%;
  --primary: 221 70% 22%;
  --primary-foreground: 0 0% 100%;
  --secondary: 214 32% 96%;
  --muted-foreground: 215 18% 46%;
  --success: 152 60% 26%;
  --destructive: 0 72% 40%;
  --border: 214 30% 90%;
  --input: 214 30% 90%;
  --ring: 211 90% 52%;
  --gradient-hero: linear-gradient(180deg, hsl(210 45% 99%), hsl(214 40% 96%));
  --shadow-elegant: 0 18px 48px -24px hsl(221 70% 22% / 0.28);
  --shadow-card: 0 1px 2px hsl(222 32% 14% / 0.04), 0 8px 24px -16px hsl(222 32% 14% / 0.12);
  --radius: 0.75rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --background: 222 38% 8%;
    --foreground: 210 30% 94%;
    --card: 222 32% 11%;
    --card-foreground: 210 30% 94%;
    --primary: 211 92% 60%;
    --primary-foreground: 222 45% 8%;
    --secondary: 217 26% 17%;
    --muted-foreground: 215 20% 64%;
    --success: 152 52% 52%;
    --destructive: 0 72% 64%;
    --border: 217 22% 22%;
    --input: 217 22% 22%;
    --ring: 211 92% 60%;
    --gradient-hero: linear-gradient(180deg, hsl(222 40% 9%), hsl(222 38% 7%));
    --shadow-elegant: 0 18px 48px -24px hsl(0 0% 0% / 0.55);
    --shadow-card: 0 1px 2px hsl(0 0% 0% / 0.3), 0 10px 30px -18px hsl(0 0% 0% / 0.5);
    color-scheme: dark;
  }
}

:root.dark {
  --background: 222 38% 8%;
  --foreground: 210 30% 94%;
  --card: 222 32% 11%;
  --card-foreground: 210 30% 94%;
  --primary: 211 92% 60%;
  --primary-foreground: 222 45% 8%;
  --secondary: 217 26% 17%;
  --muted-foreground: 215 20% 64%;
  --success: 152 52% 52%;
  --destructive: 0 72% 64%;
  --border: 217 22% 22%;
  --input: 217 22% 22%;
  --ring: 211 92% 60%;
  --gradient-hero: linear-gradient(180deg, hsl(222 40% 9%), hsl(222 38% 7%));
  --shadow-elegant: 0 18px 48px -24px hsl(0 0% 0% / 0.55);
  --shadow-card: 0 1px 2px hsl(0 0% 0% / 0.3), 0 10px 30px -18px hsl(0 0% 0% / 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2.5rem 1.25rem;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: var(--gradient-hero);
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.brand img { width: 2.5rem; height: 2.5rem; }
.brand .mark-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(.light) .brand .mark-light { display: none; }
  :root:not(.light) .brand .mark-dark { display: block; }
}
:root.dark .brand .mark-light { display: none; }
:root.dark .brand .mark-dark { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: Sora, Inter, system-ui, sans-serif;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.brand-tagline {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
}

form, .card {
  width: 100%;
  max-width: 26rem;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 0.25rem);
  padding: 2rem;
  box-shadow: var(--shadow-card), var(--shadow-elegant);
}

h1 {
  font-family: Sora, Inter, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

p { margin: 0 0 0.75rem; font-size: 0.9rem; color: hsl(var(--muted-foreground)); line-height: 1.55; }
p:last-child { margin-bottom: 0; }

input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 0.25rem);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: hsl(var(--muted-foreground)); }
input:focus-visible {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.25);
}

button {
  width: 100%;
  padding: 0.65rem 1.25rem;
  margin-top: 0.25rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  border: 0;
  border-radius: calc(var(--radius) - 0.25rem);
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}
button:hover:not(:disabled) { background: hsl(var(--primary) / 0.9); box-shadow: var(--shadow-elegant); }
button:disabled { opacity: 0.6; cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

.sso {
  display: block;
  width: 100%;
  padding: 0.65rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: hsl(var(--foreground));
  background: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.25rem);
  transition: background-color 0.2s;
}
.sso:hover { background: hsl(var(--secondary)); text-decoration: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: hsl(var(--border)); }

a { color: hsl(var(--primary)); font-size: 0.85rem; }
a:hover { text-decoration: underline; }

/* Status lines carry a border and tint as well as a colour, so the meaning never rests on hue alone. */
.err, .ok {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.45;
  border: 1px solid;
  border-radius: calc(var(--radius) - 0.25rem);
}
.err { color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / 0.35); background: hsl(var(--destructive) / 0.08); }
.ok { color: hsl(var(--success)); border-color: hsl(var(--success) / 0.35); background: hsl(var(--success) / 0.1); }
.page-links { text-align: center; margin-top: 1rem; }
