:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  --eurofins-blue: #003883;
  --eurofins-orange: #ee7d11;
  --eurofins-blue-soft: #e8f0fa;
  --eurofins-orange-soft: #fff0e2;
  color: #15243a;
  background: #f4f7fb;
}

* { box-sizing: border-box; }

body {
  display: flex;
  min-height: 100vh;
  margin: 0;
  flex-direction: column;
}

header {
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  color: white;
  background: var(--eurofins-blue);
  border-bottom: 4px solid var(--eurofins-orange);
}

header h1 { margin: 0; font-size: 1.6rem; }
header h1 a { color: inherit; text-decoration: none; }
header h1 a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
header p { margin: .4rem 0 0; color: #e8f0fa; }

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-actions, .identity {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .82rem;
}

.identity { gap: .5rem; }
.identity button {
  min-height: 2rem;
  padding: .35rem .6rem;
  color: white;
  border-color: #9eb8da;
  background: transparent;
}

.auth-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  place-items: center;
  color: #536176;
  background: #f4f7fb;
}

.auth-loading-content { display: grid; place-items: center; gap: .8rem; }
.auth-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #cddbeb;
  border-top-color: var(--eurofins-blue);
  border-radius: 50%;
  animation: auth-spin .8s linear infinite;
}

.auth-pending { overflow: hidden; }
.auth-pending > header,
.auth-pending > main,
.auth-pending > footer { visibility: hidden; }
.auth-pending > .auth-loading { display: grid; visibility: visible; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  color: #5a687c;
  background: white;
  border-top: 1px solid #cddbeb;
  font-size: .75rem;
}

footer nav {
  display: flex;
  gap: .7rem;
  padding-left: .75rem;
  border-left: 1px solid #cddbeb;
}

footer a {
  color: var(--eurofins-blue);
  font-weight: 650;
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }
footer a:focus-visible {
  outline: 2px solid var(--eurofins-orange);
  outline-offset: 2px;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation: none; }
}
