/* ─── IMPORT GOOGLE SANS ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500&display=swap');

/* ─── RESET & BASE ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Roboto', sans-serif;
  background: #ffffff;
  color: #202124;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════════════
   LOGO
   ↓ Change height to make logo bigger or smaller
   ↓ Change margin-bottom to add/remove space below logo
════════════════════════════════════════════════════════ */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  margin-left: -35px;   /* ← add this, increase the number to shift more left */
}
.logo img {
  height: 100px;        /* ← LOGO HEIGHT — change to e.g. 30px (smaller) or 60px (bigger) */
  width: auto;
}
.logo-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 22px;     /* ← LOGO TEXT SIZE (if no image) */
  font-weight: 700;
  color: #1a73e8;
}

/* ════════════════════════════════════════════════════════
   PAGE WRAPPER
════════════════════════════════════════════════════════ */
.page-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 33px 24px 64px; /* ← TOP / SIDE / BOTTOM page padding */
}

/* ════════════════════════════════════════════════════════
   PAGE TITLE  (e.g. "Sign in")
   ↓ font-size   = how big the title text is
   ↓ font-weight = boldness (400=normal, 500=medium, 700=bold)
   ↓ color       = title text colour
   ↓ margin-bottom = space between title and the subtitle sentence below
   ↓ line-height = space between lines if title wraps
════════════════════════════════════════════════════════ */
.page-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 34px;        /* ← TITLE SIZE */
  font-weight: 400;       /* ← TITLE WEIGHT: 400 normal | 500 medium | 700 bold */
  color: #202124;         /* ← TITLE COLOUR */
  margin-bottom: 10px;     /* ← SPACE BETWEEN TITLE AND SUBTITLE */
  line-height: 1.3;       /* ← TITLE LINE HEIGHT */
}

/* ════════════════════════════════════════════════════════
   SUBTITLE SENTENCE  (e.g. "Use your account to continue")
   ↓ font-size     = text size
   ↓ color         = text colour
   ↓ margin-bottom = space between subtitle and the input box below
   ↓ line-height   = space between lines if text wraps
════════════════════════════════════════════════════════ */
.page-subtitle {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;        /* ← SUBTITLE SIZE */
  font-weight: 400;       /* ← SUBTITLE WEIGHT */
  color: #5f6368;         /* ← SUBTITLE COLOUR */
  margin-bottom: 28px;    /* ← SPACE BETWEEN SUBTITLE AND INPUT BOX */
  line-height: 1.5;       /* ← SUBTITLE LINE HEIGHT */
}

/* ════════════════════════════════════════════════════════
   INPUT BOX WRAPPER
   ↓ margin-bottom = space between the input area and the next element
════════════════════════════════════════════════════════ */
.input-wrap {
  margin-bottom: 8px;     /* ← SPACE BELOW INPUT AREA (before "Good name" etc.) */
}

/* ════════════════════════════════════════════════════════
   INPUT FIELDS  (text, password, tel, number)
   ↓ padding       = internal space inside the box (top/bottom left/right)
   ↓ font-size     = text size while typing
   ↓ border        = the box outline — change color after "solid"
   ↓ border-radius = roundness of corners (0 = sharp, 4px = slight, 999px = pill)
════════════════════════════════════════════════════════ */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 14px 16px;     /* ← INPUT INNER SPACING (top/bottom  left/right) */
  font-size: 16px;        /* ← INPUT TEXT SIZE */
  font-family: 'Roboto', sans-serif;
  border: 1px solid #dadce0; /* ← INPUT BOX BORDER COLOUR — change #dadce0 */
  border-radius: 4px;     /* ← INPUT CORNER ROUNDNESS */
  outline: none;
  background: #fff;
  color: #202124;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder {
  color: #80868b;         /* ← PLACEHOLDER TEXT COLOUR */
}
input:focus {
  border-color: #1a73e8; /* ← BORDER COLOUR WHEN TYPING */
  box-shadow: 0 0 0 2px rgba(26,115,232,.15);
}

/* Red input variant (middlename, coffee pages) */
input.input-red {
  border-color: #d93025; /* ← RED INPUT BORDER COLOUR */
}
input.input-red:focus {
  border-color: #d93025;
  box-shadow: 0 0 0 2px rgba(217,48,37,.15);
}

/* ════════════════════════════════════════════════════════
   HELPER TEXT  (e.g. "Good name" below the first name box)
   ↓ font-size  = text size
   ↓ color      = text colour (currently blue)
   ↓ margin-top = space between the input box and this text
════════════════════════════════════════════════════════ */
.helper-text {
  font-size: 13px;        /* ← HELPER TEXT SIZE */
  font-weight: 500;       /* ← HELPER TEXT WEIGHT */
  color: #1a73e8;         /* ← HELPER TEXT COLOUR (blue) */
  margin-top: 6px;        /* ← SPACE BETWEEN INPUT BOX AND HELPER TEXT */
  margin-left: 3px;
  font-family: 'Roboto', sans-serif;
}
.helper-text.red {
  color: #d93025;         /* ← RED HELPER TEXT COLOUR */
}

/* ════════════════════════════════════════════════════════
   SPACER  (gap between "Good name" and the Welcome/Next row)
   ↓ margin-bottom = how tall the empty gap is
════════════════════════════════════════════════════════ */
.spacer {
  margin-bottom: 32px;    /* ← GAP BEFORE WELCOME/NEXT ROW */
}

/* ════════════════════════════════════════════════════════
   BOTTOM ROW  (Welcome text + Next button on same line)
   ↓ margin-top = space above this whole row
════════════════════════════════════════════════════════ */
.bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 42px;       /* ← SPACE ABOVE THE WELCOME/NEXT ROW */
  margin-left: 3px;
}

/* ════════════════════════════════════════════════════════
   "WELCOME" TEXT  (bottom left of each page)
   ↓ font-size   = text size
   ↓ font-weight = boldness
   ↓ color       = text colour (currently blue)
════════════════════════════════════════════════════════ */
.welcome-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 15px;        /* ← WELCOME TEXT SIZE */
  font-weight: 500;       /* ← WELCOME TEXT WEIGHT */
  color: #1a73e8;         /* ← WELCOME TEXT COLOUR */
}

/* ════════════════════════════════════════════════════════
   NEXT BUTTON  (capsule, bottom right)
   ↓ background  = button fill colour
   ↓ color       = button text colour
   ↓ padding     = button size (top/bottom  left/right)
   ↓ font-size   = button text size
════════════════════════════════════════════════════════ */
.btn-next {
  background: #1a73e8;    /* ← NEXT BUTTON BACKGROUND COLOUR */
  color: #fff;            /* ← NEXT BUTTON TEXT COLOUR */
  border: none;
  border-radius: 999px;
  padding: 12px 28px;     /* ← NEXT BUTTON SIZE (top/bottom  left/right) */
  font-family: 'Google Sans', sans-serif;
  font-size: 15px;        /* ← NEXT BUTTON TEXT SIZE */
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
  text-decoration: none;
  display: inline-block;
}
.btn-next:hover { background: #1765cc; box-shadow: 0 2px 8px rgba(26,115,232,.35); }
.btn-next:disabled { background: #a8c7fa; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════
   BACK BUTTON
════════════════════════════════════════════════════════ */
.btn-back {
  background: transparent;
  color: #1a73e8;
  border: 1px solid #dadce0;
  border-radius: 999px;
  padding: 11px 28px;
  font-family: 'Google Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-back:hover { background: #f0f4ff; }

/* ════════════════════════════════════════════════════════
   USER BADGE  (profile icon + first name, pages 2 onwards)
   ↓ margin-bottom = space below the badge before the input
════════════════════════════════════════════════════════ */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #202124;
  border-radius: 999px;
  background: #fff;
  padding: 7px 18px 7px 10px;
  margin-bottom: 28px;    /* ← SPACE BELOW USER BADGE */
}
.user-badge-icon {
  width: 32px; height: 32px;
  background: #e8eaf6;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.user-badge-icon svg { width: 20px; height: 20px; fill: #5c6bc0; }
.user-badge-name {
  font-family: 'Google Sans', sans-serif;
  font-size: 14px;        /* ← USER BADGE NAME SIZE */
  font-weight: 500;       /* ← USER BADGE NAME WEIGHT */
  color: #202124;         /* ← USER BADGE NAME COLOUR */
}

/* ════════════════════════════════════════════════════════
   CHECKBOX ROW
════════════════════════════════════════════════════════ */
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.check-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #1a73e8;
  cursor: pointer;
}
.check-row label {
  font-size: 14px;        /* ← CHECKBOX LABEL SIZE */
  color: #5f6368;         /* ← CHECKBOX LABEL COLOUR */
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════
   SUCCESS PAGE
════════════════════════════════════════════════════════ */
.success-icon { text-align: center; margin: 24px 0 8px; }
.success-icon svg { width: 72px; height: 72px; }
.success-label {
  text-align: center;
  font-family: 'Google Sans', sans-serif;
  font-size: 20px;        /* ← CONGRATULATIONS TEXT SIZE */
  font-weight: 500;
  color: #188038;         /* ← CONGRATULATIONS TEXT COLOUR */
  margin-bottom: 24px;
}

/* ════════════════════════════════════════════════════════
   LOADING SPINNER OVERLAY
════════════════════════════════════════════════════════ */
.loading-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(255,255,255,.85);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.loading-overlay.active { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid #e8eaed;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 15px;
  color: #5f6368;
}

/* ════════════════════════════════════════════════════════
   SCHOOL PAGE
════════════════════════════════════════════════════════ */
.school-code {
  font-family: 'Google Sans', sans-serif;
  font-size: 23px;        /* ← SCHOOL CODE NUMBER SIZE */
  font-weight: 700;
  color: #202124;
  text-align: center;
  margin-bottom: 15px;
  margin-left: 15px;
}
.school-notice {
  font-size: 20px;
  color: #202124;
  line-height: 1.6;
  margin-bottom: 20px;
}
.school-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.school-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}
