/* Login page — 2026-11-09 founder pick "photo-glass1" (mockups/login-demos/photo-glass1.html):
 * a soft, slightly blurred classroom photo, a light teal wash, the words on the left and a glass login card.
 * The old sunrise scene is kept in mockups/login-old/. CSP: every style lives here, no inline style="".
 * Every id / class the login script uses is unchanged (.tabs button[aria-selected], .lang button[aria-pressed],
 * .msg / .msg.ok, .school, #toasts …). Text colours meet 4.5:1 (S11 WCAG rule), touch targets 44 px. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
[hidden] { display: none !important; }
body.login-page {
  --ink: #1d2433; --muted: #535c6e; --line: rgba(29, 36, 51, .13); --soft: rgba(255, 255, 255, .6);
  --acc: #0b7a6c; --acc2: #0a6f86; --accInk: #08695d; --ring: rgba(11, 122, 108, .18); --ok: #166534;
  font-family: "Poppins", var(--font); color: var(--ink); background: #eaf6f4; min-height: 100vh;
}
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== background: photo + wash + soft colour blobs ===== */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.bg .photo { position: absolute; inset: -12px; background: url("/img/login-classroom.jpg") center / cover no-repeat; filter: blur(3px) saturate(1.05); }
.bg .tint { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(240, 250, 248, .94) 0%, rgba(240, 250, 248, .82) 38%, rgba(240, 250, 248, .28) 70%, rgba(240, 250, 248, .12) 100%); }
.bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; }
.bg .b1 { width: 520px; height: 520px; background: #9be3d4; left: -120px; top: -140px; }
.bg .b2 { width: 460px; height: 460px; background: #b9d4ff; right: -100px; top: 10%; }
.bg .b3 { width: 420px; height: 420px; background: #ffd9c2; left: 30%; bottom: -200px; }

/* ===== layout ===== */
.wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 72px; align-items: center;
  max-width: 1200px; min-height: 100vh; margin: 0 auto; padding: 40px; }

/* ===== words (left) ===== */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.logo i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-style: normal; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 8px 20px rgba(10, 111, 134, .28); }
.copy h1 { font-size: clamp(38px, 4.2vw, 54px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; margin: 36px 0 16px; }
.copy h1 .g { background: linear-gradient(135deg, #0b7a6c, #1f5fbf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { color: var(--muted); font-size: 16.5px; line-height: 1.65; max-width: 480px; }
.stats { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.stat { display: flex; gap: 6px; align-items: baseline; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .95); backdrop-filter: blur(10px); font-size: 13.5px; }
.stat b { font-weight: 700; color: var(--accInk); }
.stat span { color: var(--ink); font-weight: 600; }

/* ===== live alerts (demo copy, rotate every 2.6 s; login-scene.js renderToasts) ===== */
.toasts { position: relative; width: 360px; max-width: 100%; height: 66px; margin-top: 40px; }
.toast { position: absolute; inset: 0; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .78); border: 1px solid #fff; box-shadow: 0 10px 30px rgba(29, 36, 51, .08); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(12px); transition: .5s ease; }
.toast.on { opacity: 1; transform: none; }
.toast .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; flex: none; background: #dff5ef; }
.toast .ic.t-orange { background: #fff1e0; } .toast .ic.t-pink { background: #ffeaf2; } .toast .ic.t-indigo { background: #eef0ff; }
.toast .ic.t-violet { background: #efe6fb; } .toast .ic.t-yellow { background: #fff6d6; }
.toast b { display: block; font-size: 13.5px; font-weight: 600; }
.toast span { font-size: 12px; color: var(--muted); }
.toast .live { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--ok); display: flex; align-items: center; gap: 4px; }
.toast .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ===== the glass card ===== */
.card-wrap { width: 100%; }
.card { padding: 32px; border-radius: 24px; background: rgba(255, 255, 255, .66); border: 1px solid rgba(255, 255, 255, .95);
  backdrop-filter: blur(22px); box-shadow: 0 30px 70px rgba(29, 36, 51, .14); }
.school { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .6); margin-bottom: 22px; }
.school .sl { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); flex: none; }
.school .sc { flex: 1; min-width: 0; }
.school small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.school small label { cursor: pointer; }
.school .school-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.school .other-school { margin: 2px 0 0; justify-content: flex-start; } /* MASTER LOGIN fix round 1: "Other school" under a linked code */
.school input { width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: transparent; font: 600 15px "Poppins", var(--font); color: var(--ink); outline: none; text-transform: lowercase; }
.school input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.card h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.card .hint { color: var(--muted); font-size: 14px; margin: 4px 0 20px; }
.card form .hint { margin: 0 0 12px; }

.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .55); margin-bottom: 22px; }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; padding: 8px 4px; border: 0;
  border-radius: 11px; background: none; font: 600 12.5px "Poppins", var(--font); color: #4b5466; cursor: pointer; }
.tabs .ti { display: block; width: 19px; height: 19px; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--accInk); box-shadow: 0 1px 3px rgba(20, 20, 40, .12); }
.tabs button:focus-visible, .btn:focus-visible, .alt button:focus-visible, .lang button:focus-visible, .row button.link:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.in { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .8); transition: border-color .15s, box-shadow .15s; }
.in:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px var(--ring); }
.in input { flex: 1; min-width: 0; min-height: 44px; border: 0; outline: none; background: transparent; font: 500 15px "Poppins", var(--font); color: var(--ink); }
.in input::placeholder { color: #7a8294; }
.in .eye { width: 36px; height: 36px; padding: 7px; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: -2px 0 20px; }
.row a, .row button.link { color: var(--accInk); font: 600 13px "Poppins", var(--font); text-decoration: none; border: 0; background: none; cursor: pointer; min-height: 32px; }
.btn { width: 100%; height: 50px; border: 0; border-radius: 12px; color: #fff; font: 600 15.5px "Poppins", var(--font); cursor: pointer;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 10px 24px rgba(10, 111, 134, .28); }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .65; cursor: progress; }
.alt { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.alt button { flex: 1; height: 46px; display: flex; gap: 8px; justify-content: center; align-items: center; border: 1.5px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .8); font: 600 14px "Poppins", var(--font); color: var(--ink); cursor: pointer; }
.alt .ti { display: block; width: 18px; height: 18px; }
.msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: #fdecec; color: #8f1d1d; }
.msg.ok { background: #e7f7ee; color: #0d6b36; }
.secret { font: 700 14px ui-monospace, Consolas, monospace; word-break: break-all; background: rgba(255, 255, 255, .8); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }

.foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.lang { display: flex; gap: 4px; }
.lang button { min-width: 44px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .6);
  font: 600 13px "Poppins", var(--font); color: #4b5466; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sec { font-size: 12px; font-weight: 600; color: var(--ok); }

/* Phase 1 S11: the parent tab's "Remember this phone" (a 44 px row) and "Wrong number? Change it". */
.remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 12px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.remember input { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }
.otp-change { justify-content: center; margin: 10px 0 0; }
.otp-change button { min-height: 44px; padding: 0 12px; }
/* UAT S1: "First time? Set up the school" (only while the school does not exist yet) */
.setup-link { justify-content: center; margin: 12px 0 0; }
form .row:last-child { margin-bottom: 0; }

/* ===== phone / small screens: the card first, the words above it, no photo wash on the right ===== */
@media (max-width: 980px) {
  .wrap { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px 40px; max-width: 520px; align-items: start; }
  .bg .tint { background: rgba(240, 250, 248, .86); }
  .copy h1 { font-size: 32px; margin: 22px 0 10px; }
  .tag { font-size: 15px; }
  .stats, .toasts { display: none; }
  .card { padding: 24px 18px; }
}
@media (max-width: 420px) {
  .tabs button { font-size: 11px; padding: 6px 2px; }
  .row { flex-wrap: wrap; }
  .foot { flex-wrap: wrap; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* live alert text stays on one line (long names end in …) */
.toasts { width: 400px; }
.toast > div:nth-child(2) { min-width: 0; }
.toast b, .toast span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* short laptop screens (1366 x 768): the whole card fits without scrolling */
@media (min-width: 981px) and (max-height: 820px) {
  .wrap { padding: 20px 40px; }
  .card { padding: 24px 28px; }
  .school { margin-bottom: 14px; padding: 10px 12px; }
  .card .hint { margin-bottom: 14px; }
  .tabs { margin-bottom: 14px; }
  .tabs button { min-height: 52px; }
  .fld { margin-bottom: 12px; }
  .row { margin-bottom: 14px; }
  .foot { margin-top: 14px; padding-top: 12px; }
}
/* a link row right under a main button (parent: "Got a code from the school office?") gets air */
.btn + .row, .btn ~ .row { margin-top: 14px; justify-content: center; }

/* S11 WCAG rule kept: the ONE .sec colour override (6.45:1 on the painted login background) */
.sec { color: #166534; }

/* 2026-11-09 founder (1920 px screen): "sab ek jagah likha dikh raha hai, software ka naam bahut chhota" —
   use the whole width (words on the left edge, card on the right), a bigger brand and headline, more air. */
@media (min-width: 981px) {
  .wrap { max-width: 1480px; grid-template-columns: minmax(0, 1fr) 460px; gap: clamp(56px, 7vw, 150px); padding: 48px clamp(40px, 5vw, 96px); }
  .logo { gap: 14px; font-size: 30px; letter-spacing: -.01em; }
  .logo i { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; }
  .copy h1 { font-size: clamp(44px, 4.3vw, 72px); margin: 48px 0 22px; }
  .tag { font-size: 18px; max-width: 560px; }
  .stats { margin-top: 34px; gap: 12px; }
  .stat { padding: 12px 18px; font-size: 14.5px; }
  .toasts { margin-top: 52px; width: 440px; height: 72px; }
  .card { padding: 36px; }
}
@media (min-width: 981px) and (max-height: 820px) {
  .wrap { padding: 20px clamp(32px, 4vw, 64px); }
  .logo { font-size: 26px; }
  .logo i { width: 48px; height: 48px; }
  .copy h1 { margin: 28px 0 14px; font-size: clamp(40px, 3.8vw, 56px); }
  .toasts { margin-top: 30px; }
  .card { padding: 24px 28px; }
}
@media (min-width: 981px) {
  .wrap { max-width: 1640px; }
  .copy h1 { line-height: 1.16; }
  .logo { font-size: 34px; }
  .logo i { width: 60px; height: 60px; font-size: 26px; }
}
