:root {
  color-scheme: light;
  --omni-blue: #1637ff;
  --omni-indigo: #756bc5;
  --omni-orange: #e88135;
  --omni-coral: #ce675d;
  --ink: #102033;
  --muted: #5f6c7a;
  --line: rgba(16, 32, 51, 0.13);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f5f6f9;
  color: var(--ink);
  font-family: "Nunito Sans", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.omni-gradient {
  position: fixed;
  inset: -12%;
  z-index: 0;
  opacity: 0.58;
  pointer-events: none;
}

.omni-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 251, 253, 0.36);
  backdrop-filter: blur(26px);
}

.omni-gradient svg { width: 100%; height: 100%; }
.orb { transform-box: fill-box; transform-origin: center; }
.orb-blue { fill: var(--omni-blue); animation: drift-a 18s ease-in-out infinite alternate; }
.orb-orange { fill: var(--omni-orange); animation: drift-b 22s ease-in-out infinite alternate; }
.orb-coral { fill: var(--omni-coral); animation: drift-c 20s ease-in-out infinite alternate; }
.orb-indigo { fill: var(--omni-indigo); animation: drift-d 24s ease-in-out infinite alternate; }

@keyframes drift-a { to { transform: translate(20%, 16%) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-24%, 20%) scale(0.94); } }
@keyframes drift-c { to { transform: translate(-18%, -24%) scale(1.16); } }
@keyframes drift-d { to { transform: translate(22%, -18%) scale(1.08); } }

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(92vw, 460px);
  padding: 28px 0;
}

.auth-card {
  padding: clamp(30px, 6vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 80px rgba(16, 32, 51, 0.16);
  backdrop-filter: blur(22px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 20px;
}

/* Prevent an oversized symbol if an older cached template is served briefly. */
.brand-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  object-fit: contain;
}

.brand-symbol {
  display: block;
  flex: 0 1 96px;
  width: 96px;
  min-width: 64px;
  height: auto;
  object-fit: contain;
}

.brand-wordmark {
  display: block;
  flex: 1 1 auto;
  width: 80%;
  max-width: 250px;
  min-width: 0;
  height: auto;
  object-fit: contain;
}

h1 { margin: 0; font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.08; letter-spacing: -0.035em; }
.intro { margin: 15px 0 28px; color: var(--muted); font-size: 1rem; line-height: 1.55; }

.microsoft-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  width: 100%;
  border: 1px solid #0f2bd7;
  border-radius: 12px;
  background: var(--omni-blue);
  color: white;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(22, 55, 255, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.microsoft-button svg { width: 20px; height: 20px; background: white; }
.microsoft-button:hover { transform: translateY(-1px); background: #102edc; box-shadow: 0 11px 28px rgba(22, 55, 255, 0.28); }
.microsoft-button:focus-visible { outline: 3px solid rgba(232, 129, 53, 0.72); outline-offset: 3px; }
.microsoft-button.is-disabled { opacity: 0.48; box-shadow: none; cursor: not-allowed; }
.microsoft-button.is-disabled:hover { transform: none; background: var(--omni-blue); }

.status {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 55, 255, 0.18);
  border-radius: 10px;
  background: rgba(22, 55, 255, 0.06);
  color: #263a68;
  font-size: 0.88rem;
  line-height: 1.45;
}

.status-error { border-color: rgba(164, 49, 41, 0.24); background: #fff1ef; color: #8b2d27; }
.privacy-note { margin: 22px 0 14px; color: var(--muted); font-size: 0.82rem; line-height: 1.48; }
.access-types { display: flex; flex-wrap: wrap; gap: 7px; }
.access-types span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.64); color: #4c5968; font-size: 0.72rem; }
.environment-note { margin: 17px 0 0; color: rgba(16, 32, 51, 0.7); font-size: 0.76rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  .microsoft-button { transition: none; }
}

@media (max-width: 480px) {
  .auth-card { border-radius: 19px; }
  .access-types { display: none; }
}
