.signin { min-height: calc(100vh - var(--header-h) - 20px); display: flex; align-items: flex-start; justify-content: center; padding: 36px 16px 40px; }
.si-card { width: 100%; max-width: 440px; background: var(--pearl); border: 1px solid var(--mist); border-top: 4px solid var(--gold); border-radius: 14px; padding: 28px 28px 22px; text-align: center; }
.si-card.wide { max-width: 760px; }
.si-step { margin: 0; font-size: 0.88rem; color: #7A5A1C; font-weight: 600; }
.si-card h1 { font-family: var(--font-read); font-size: 1.9rem; margin: 6px 0 8px; line-height: 1.15; }
.si-help { color: var(--ink-soft); margin: 0 0 18px; }
.si-msg { background: var(--wrong-bg); color: #7E2A25; padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.si-alt { margin: 14px 0 0; font-size: 0.92rem; }
.si-alt a { color: var(--ink-soft); }
.link-btn { background: none; border: 0; color: #7A5A1C; text-decoration: underline; cursor: pointer; font-size: 0.92rem; padding: 4px; }
.btn.big { min-height: 52px; padding: 0 30px; font-size: 1.05rem; margin-top: 16px; }
.code-input {
  width: 100%; font-family: var(--font-read); font-size: 2.2rem; text-align: center; letter-spacing: 0.35em;
  padding: 10px 0 10px 0.35em; border: 2px solid var(--mist); border-radius: 10px; background: #fff; color: var(--navy); text-transform: uppercase;
}
.code-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(195, 149, 59, 0.25); }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 8px 0; }
.who-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; min-height: 108px;
  border: 1.5px solid var(--mist); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 500;
}
.who-btn:hover, .who-btn:focus-visible { border-color: var(--gold); background: #FBF4E4; }
.who-avatar { font-size: 2.3rem; line-height: 1; }
.who-avatar.big { font-size: 3.2rem; }
.me { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 6px 0 18px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--navy); }
.pin-dots span.on { background: radial-gradient(circle at 35% 30%, #FFF8E6 0 16%, #E8C77A 42%, #B8862E 100%); border-color: #A87A28; }
.pin-dots.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 78px); gap: 12px; justify-content: center; }
.key {
  height: 64px; border-radius: 50%; border: 1.5px solid var(--mist); background: #fff; cursor: pointer;
  font-family: var(--font-read); font-size: 1.6rem; font-weight: 600; color: var(--navy);
}
.key:hover { border-color: var(--gold); }
.key:active { background: var(--gold-soft); }
.key.del { font-size: 1.3rem; }

/* ===== Gulf Gold: sign-in ===== */
.key {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F1E4 100%); border: 1px solid #D9BD78; color: var(--navy);
  font-family: var(--font-display); font-weight: 600;
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(11, 31, 58, 0.1); transition: transform 0.12s, box-shadow 0.2s;
}
.key:hover { box-shadow: inset 0 1px 0 #fff, 0 10px 20px rgba(11, 31, 58, 0.14), 0 0 0 3px rgba(231, 200, 120, 0.25); }
.key:active { transform: translateY(2px) scale(0.97); box-shadow: inset 0 3px 6px rgba(11, 31, 58, 0.15); }

/* =====================================================================
   P22: the gilded sign-in
   A navy lacquer room with each step on a pearl folio edged in gold.
   ===================================================================== */
.signin-page {
  --folio: #FFFDF8; --folio-2: #FBF6EA;
  --gilt: rgba(201, 161, 74, 0.55); --gilt-soft: rgba(201, 161, 74, 0.28);
  background: radial-gradient(ellipse 60% 40% at 50% 10%, rgba(231, 200, 120, 0.12) 0%, rgba(231, 200, 120, 0) 70%), linear-gradient(180deg, #0B1F3A 0%, #07152A 100%);
  min-height: 100vh;
}
.signin-page .footer { background: transparent; }
.signin { padding-top: 48px; }
.si-card {
  position: relative; border: 0; border-radius: 24px; padding: 40px 38px 30px;
  background: radial-gradient(ellipse 80% 30% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, var(--folio) 0%, var(--folio-2) 100%);
  box-shadow: 0 0 0 1px var(--gilt), inset 0 0 0 9px var(--folio), inset 0 0 0 10px var(--gilt-soft), inset 0 0 0 14px var(--folio), inset 0 0 0 15px rgba(201, 161, 74, 0.14), 0 40px 90px rgba(0, 0, 0, 0.5);
}
@media (prefers-reduced-motion: no-preference) {
  .si-card { animation: si-in 0.4s cubic-bezier(.2, .9, .3, 1); }
  @keyframes si-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
/* the step marker: three pearls on a gold thread */
.si-step { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.1rem; color: var(--gold-deep); }
.si-pearls { position: relative; display: inline-flex; gap: 18px; padding: 0 4px; }
.si-pearls::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(201, 161, 74, 0), #C9A14A 20%, #C9A14A 80%, rgba(201, 161, 74, 0)); }
.si-pearls i { position: relative; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #FFFDF8 0%, #F6EEDC 58%, #EADCBC 100%); box-shadow: 0 0 0 1px #D9C592, inset 0 2px 3px rgba(11, 31, 58, 0.1); }
.si-pearls i.done { background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #F1E8D4 50%, #C9B891 100%); box-shadow: 0 0 0 1px rgba(201, 161, 74, 0.7), 0 2px 4px rgba(11, 31, 58, 0.2); }
.si-pearls i.on { width: 18px; height: 18px; margin: -2px 0; background: radial-gradient(circle at 35% 30%, #FFF8E6 0 16%, #E8C77A 42%, #B8862E 100%);
  box-shadow: 0 0 0 1px #A87A28, 0 0 12px rgba(241, 213, 138, 0.8); }
.si-card h1 { font-family: var(--font-display); font-weight: 600; font-size: 2.5rem; line-height: 1.05; margin: 14px 0 10px; }
.si-help { font-size: 1rem; }
.si-alt { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; }
.si-alt a { color: var(--navy-2); }
.si-msg { border-radius: 12px; background: #F7E4E1; color: #7E2A25; box-shadow: inset 3px 0 0 #9E3B35; text-align: left; }

/* step 1: the class code, set like an engraved plate */
.code-input {
  border: 0; border-radius: 14px; font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--navy);
  background: linear-gradient(180deg, #FFFFFF, #FBF6EA); box-shadow: 0 0 0 1px var(--gilt), inset 0 2px 6px rgba(11, 31, 58, 0.06);
}
.code-input:focus { border: 0; box-shadow: 0 0 0 2px var(--gold), 0 0 0 6px rgba(201, 161, 74, 0.2), inset 0 2px 6px rgba(11, 31, 58, 0.06); }
.code-input::placeholder { color: #D3C7AC; }

/* step 2: the class, each student a small card */
.who-grid { gap: 12px; margin: 14px 0 6px; }
.who-btn {
  border: 0; border-radius: 16px; background: linear-gradient(180deg, #FFFFFF, #FFFDF8); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--navy);
  box-shadow: 0 0 0 1px var(--gilt-soft), 0 6px 16px rgba(11, 31, 58, 0.06); transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}
.who-btn:hover, .who-btn:focus-visible { border: 0; background: #FFFBF1; transform: translateY(-2px); box-shadow: 0 0 0 1.5px var(--gold), 0 12px 24px rgba(11, 31, 58, 0.12); }
.who-avatar { filter: drop-shadow(0 3px 4px rgba(11, 31, 58, 0.18)); }

/* step 3: the PIN, dots as pearls and a keypad of pearl keys */
.me { gap: 2px; }
.who-avatar.big { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #F6ECD4 60%, #E9D9B4 100%); box-shadow: 0 0 0 1px var(--gold), 0 0 0 6px rgba(231, 200, 120, 0.18), 0 10px 22px rgba(11, 31, 58, 0.15); }
.pin-dots span { width: 20px; height: 20px; border: 0;
  background: radial-gradient(circle at 50% 38%, #FFFDF8 0%, #F6EEDC 58%, #EADCBC 100%); box-shadow: 0 0 0 1px #D9C592, inset 0 2px 3px rgba(11, 31, 58, 0.12); }
.pin-dots span.on { box-shadow: 0 0 0 1px #A87A28, 0 0 10px rgba(241, 213, 138, 0.7); }
.key {
  border: 0; font-size: 1.85rem;
  background: radial-gradient(circle at 38% 28%, #FFFFFF 0%, #FBF4E4 55%, #EFE2C4 100%);
  box-shadow: 0 0 0 1px var(--gilt), inset 0 -3px 6px rgba(142, 106, 34, 0.12), 0 6px 14px rgba(11, 31, 58, 0.1);
}
.key:hover { box-shadow: 0 0 0 1.5px var(--gold), inset 0 -3px 6px rgba(142, 106, 34, 0.12), 0 10px 20px rgba(11, 31, 58, 0.14); }
.key:active { background: var(--gold-leaf); }
.key.del { color: var(--gold-deep); }

@media (max-width: 480px) {
  .signin { padding: 18px 8px 30px; }
  .si-card { padding: 32px 20px 24px; box-shadow: 0 0 0 1px var(--gilt), inset 0 0 0 6px var(--folio), inset 0 0 0 7px var(--gilt-soft), 0 30px 60px rgba(0, 0, 0, 0.45); }
  .si-card h1 { font-size: 2.05rem; }
}
.keypad { grid-template-columns: repeat(3, 72px); gap: 14px 18px; }
.key { width: 72px; height: 72px; border-radius: 50%; }
