/* Login card shown before the PYQ pages. Uses the colours from style.css. */
html.login-open, html.login-open body { overflow: hidden; }
.login-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(245, 245, 247, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.login-card { width: 100%; max-width: 400px; padding: 28px 26px 22px; background: var(--surface); border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .18); text-align: center; }
.login-logo { width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--line); }
.login-card h2 { margin: 12px 0 4px; font: 700 24px/1.2 var(--sys); letter-spacing: -0.02em; }
.login-sub { margin: 0; color: var(--muted); font-size: 14.5px; }
.login-demo { margin: 12px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--note-soft); color: var(--note); font-size: 13px; }
.login-step { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.login-step label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.login-step input[type="text"], .login-step input[type="tel"], .login-step select {
  width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 16px var(--sys); }
.login-step input:focus, .login-step select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.phone-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.phone-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.phone-box .cc { padding: 0 10px 0 12px; color: var(--ink); font-size: 16px; font-weight: 600; border-right: 1px solid var(--line); }
.phone-box input { border: 0 !important; box-shadow: none !important; }
.consent { display: flex !important; align-items: flex-start; gap: 8px !important; font-weight: 500 !important; line-height: 1.35; }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: #25d366; }
.login-err { margin: 0; color: var(--bad); font-size: 13.5px; }
.login-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 980px; background: #25d366; color: #fff; font: 600 16px var(--sys); cursor: pointer; }
.login-btn:hover { background: #1fbe5b; }
.login-btn:disabled { opacity: .6; cursor: wait; }
#step-otp .login-btn { background: var(--accent); }
.wa-ico { width: 18px; height: 18px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0-7.7 13.6L3 21l4.5-1.2A9 9 0 1 0 12 3Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0-7.7 13.6L3 21l4.5-1.2A9 9 0 1 0 12 3Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.otp-to { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.otp-to b { color: var(--ink); }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-boxes input { min-height: 52px; padding: 0 !important; border: 1px solid var(--line); border-radius: 12px; text-align: center; font: 700 22px var(--sys) !important; color: var(--ink); background: var(--surface); }
.otp-boxes input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.resend { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.resend .link-btn { min-height: 32px; font-size: 13px; }
.resend .link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.login-home { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 13px; text-decoration: none; }
.login-home:hover { color: var(--accent); }

/* Logged-in chip in the top bar */
.user-chip { display: flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 4px 3px 3px; border-radius: 980px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 12px; }
.uc-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #6a5cff, #ff6a4d); font-weight: 700; }
.uc-out { padding: 2px 8px; border: 0; border-radius: 980px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 11px; cursor: pointer; }
@media (max-width: 420px) { .user-chip .uc-name { display: none; } .gbar a.gl.hide-sm { display: none; } }
.login-step[hidden] { display: none; }
.login-wrap { background: color-mix(in srgb, var(--bg) 72%, transparent); }
/* Phones: make room for the logged-in chip */
.gbar a.gl { white-space: nowrap; }
@media (max-width: 480px) {
  .gbar-row:has(#pc-user-chip) a.gl.hide-xs { display: none; }
  .gbar-row:has(#pc-user-chip) a.gl { padding: 8px 5px; font-size: 12px; }
  .user-chip .uc-name { display: none; }
  .user-chip { margin-left: 4px; }
}
