/* STEAMCUBE ID — shared styles
 *
 * Four pages: sign in, callback, error, signed out. No framework.
 *
 * WHY NOT REACT
 * -------------
 * These pages run BEFORE anyone is authenticated, so they cannot reuse the
 * platform's AuthContext, its API client, or any component that assumes a
 * signed-in user. The only thing they would share with frontend-cca is this
 * palette — which is copied here directly.
 *
 * A second Vite project, its own build and its own App Service, to render a
 * form with one button, is a poor trade. The student sees the same brand
 * either way.
 *
 * Palette taken from the Future Pathways Lab work so a student never notices
 * they left the platform.
 */

:root {
  --crimson: #830218;
  --gold: #E18B06;
  --ink: #16202C;
  --muted: #5A6A78;
  --line: #E2E8F0;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --ok: #17693F;
  --stop: #A3221C;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px 36px 34px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 2px 12px rgba(22, 32, 44, .06);
  text-align: center;
}

.brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 10px;
}

h1 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .97rem;
}

p.tight { margin-bottom: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  margin-top: 8px;
  border: none;
  border-radius: 9px;
  background: var(--crimson);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: #6d0214; }
.btn:disabled { background: #cbd5e1; cursor: not-allowed; }

.btn.secondary {
  background: transparent;
  color: var(--crimson);
  border: 1.5px solid var(--line);
}
.btn.secondary:hover { background: #FBF6F7; }

/* Microsoft's logo squares. Their brand guidance asks for the four colours,
   and a school IT administrator recognises them faster than any wording. */
.ms-logo {
  display: grid;
  grid-template-columns: 9px 9px;
  grid-gap: 2px;
  flex-shrink: 0;
}
.ms-logo i { display: block; width: 9px; height: 9px; }
.ms-logo i:nth-child(1) { background: #F25022; }
.ms-logo i:nth-child(2) { background: #7FBA00; }
.ms-logo i:nth-child(3) { background: #00A4EF; }
.ms-logo i:nth-child(4) { background: #FFB900; }

.icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  font-weight: 700;
}
.icon.good { background: rgba(23,105,63,.1); color: var(--ok); }
.icon.bad  { background: rgba(163,34,28,.09); color: var(--stop); }
.icon.wait { background: rgba(225,139,6,.12); color: var(--gold); }

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  border: 3px solid var(--line);
  border-top-color: var(--crimson);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot {
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  color: var(--muted);
}

.ref {
  font-family: ui-monospace, Menlo, monospace;
  font-size: .84rem;
  background: #F1F5F9;
  padding: 3px 8px;
  border-radius: 4px;
}

.hidden { display: none !important; }

/* A spinner is decoration. Anyone who has asked their system to stop moving
   things should not have one rotating at them for the length of a sign-in. */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--line); }
  .btn { transition: none; }
}
