/* A4Q sign-in - one stylesheet, identical in every a4qapps.com application
   (WBT Planner, ExamUnit Reports, Atlas, GSCRD), so their sign-in pages look
   like one family and like the a4qapps.com front page they link back to.
   Plain CSS: no framework, no web font, no script, nothing from another host,
   so it works under each app's Content-Security-Policy. Always dark. */

.a4q-signin {
  --s-night: #07051a;
  --s-ink: #f4f3ff;
  --s-soft: #d9dbf7;
  --s-muted: #aaa7d8;
  --s-stroke: rgba(170, 180, 255, .16);
  --s-stroke-hi: rgba(170, 180, 255, .42);
  --s-indigo: #7c8cf8;
  --s-violet: #8b5cf6;
  --s-red: #e2001a;
  --s-field: rgba(8, 6, 28, .72);
  --s-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--s-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--s-ink);
  background: var(--s-night);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
.a4q-signin *, .a4q-signin *::before, .a4q-signin *::after { box-sizing: border-box; }

/* The backdrop: the front page's night sky, still. */
.a4q-signin::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 12% 8%, rgba(102, 126, 234, .34), transparent 62%),
    radial-gradient(55vmax 45vmax at 92% 22%, rgba(118, 75, 162, .38), transparent 60%),
    radial-gradient(45vmax 35vmax at 50% 112%, rgba(226, 0, 26, .16), transparent 62%),
    linear-gradient(rgba(170, 180, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(170, 180, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--s-night);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 55%, rgba(0, 0, 0, .55));
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 55%, rgba(0, 0, 0, .55));
}

/* Top bar: the way back to a4qapps.com. */
.a4q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 40px);
}
.a4q-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px 8px 11px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--s-soft);
  text-decoration: none;
  background: rgba(18, 13, 46, .66);
  border: 1px solid var(--s-stroke);
  transition: color .2s, border-color .2s, background .2s;
}
.a4q-back svg { width: 16px; height: 16px; flex: none; }
.a4q-back:hover { color: #fff; border-color: var(--s-stroke-hi); background: rgba(40, 32, 96, .7); }
.a4q-mark { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--s-muted); }
.a4q-mark b {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  background: var(--s-red);
  box-shadow: 0 0 16px rgba(226, 0, 26, .5);
}

/* The card. */
.a4q-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 40px;
}
.a4q-card {
  position: relative;
  width: min(420px, 100%);
  padding: 34px clamp(22px, 5vw, 34px) 28px;
  border-radius: 22px;
  background: linear-gradient(158deg, rgba(40, 31, 92, .8), rgba(14, 10, 38, .9) 62%);
  border: 1px solid var(--s-stroke);
  box-shadow: 0 30px 80px -30px rgba(3, 1, 14, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  animation: a4q-rise .55s cubic-bezier(.2, .7, .3, 1) both;
}
/* A hairline of the brand across the top edge. */
.a4q-card::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--s-indigo) 22%, var(--s-violet) 60%, var(--s-red) 88%, transparent);
  opacity: .9;
}
@keyframes a4q-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .a4q-card { animation: none; } }

.a4q-app { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.a4q-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(124, 140, 248, .3), rgba(118, 75, 162, .3));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 26px -8px rgba(118, 75, 162, .7);
}
.a4q-icon svg { width: 28px; height: 28px; display: block; }
.a4q-kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--s-muted); }
.a4q-title { margin: 2px 0 0; font-size: 1.5rem; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.a4q-sub { margin: 2px 0 0; font-size: .85rem; color: var(--s-muted); }
.a4q-lede { margin: 0 0 18px; font-size: .95rem; color: var(--s-soft); }

/* Messages. */
.a4q-alert, .a4q-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.45;
}
.a4q-alert { color: #ffd9de; background: rgba(226, 0, 26, .14); border: 1px solid rgba(255, 90, 110, .38); }
.a4q-notice { color: #dfe3ff; background: rgba(124, 140, 248, .13); border: 1px solid rgba(124, 140, 248, .34); }
.a4q-alert svg, .a4q-notice svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }

/* The form. */
.a4q-form { display: grid; gap: 14px; margin: 0; }
.a4q-field { display: grid; gap: 6px; }
.a4q-field label, .a4q-label { font-size: .84rem; font-weight: 600; color: var(--s-soft); }
.a4q-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--s-ink);
  background: var(--s-field);
  border: 1px solid var(--s-stroke);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.a4q-input::placeholder { color: #7f7cab; }
.a4q-input:hover { border-color: rgba(170, 180, 255, .3); }
.a4q-input:focus { border-color: var(--s-indigo); box-shadow: 0 0 0 3px rgba(124, 140, 248, .3); background: rgba(12, 9, 38, .85); }
.a4q-input[aria-invalid="true"], .a4q-input.is-invalid { border-color: rgba(255, 90, 110, .7); }
.a4q-hint { font-size: .8rem; color: var(--s-muted); }
.a4q-error { font-size: .82rem; color: #ffb3bd; }
.a4q-check { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--s-soft); }
.a4q-check input { width: 17px; height: 17px; accent-color: var(--s-indigo); }

.a4q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  padding: 0 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  color: #fff;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #6f7ff5, var(--s-violet) 70%, #a1368f);
  box-shadow: 0 14px 30px -12px rgba(124, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: filter .2s, transform .15s, box-shadow .2s;
}
.a4q-btn svg { width: 18px; height: 18px; }
.a4q-btn:hover { filter: brightness(1.1); box-shadow: 0 18px 36px -12px rgba(124, 92, 246, .95), inset 0 1px 0 rgba(255, 255, 255, .25); }
.a4q-btn:active { transform: translateY(1px); }

.a4q-links { margin: 18px 0 0; text-align: center; font-size: .88rem; }
.a4q-signin a:not(.a4q-back):not(.a4q-btn) { color: #b9c1ff; text-decoration: none; border-bottom: 1px solid rgba(185, 193, 255, .35); }
.a4q-signin a:not(.a4q-back):not(.a4q-btn):hover { color: #fff; border-bottom-color: #fff; }
.a4q-signin :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.a4q-signin .a4q-input:focus-visible { outline: none; }

.a4q-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 0;
  max-width: 420px;
  text-align: center;
  font-size: .8rem;
  color: var(--s-muted);
}
.a4q-note svg { width: 14px; height: 14px; flex: none; }
.a4q-foot {
  padding: 14px clamp(16px, 4vw, 40px) 20px;
  text-align: center;
  font-size: .78rem;
  color: var(--s-muted);
}

@media (max-width: 480px) {
  .a4q-top { padding: 14px 14px; }
  .a4q-mark span { display: none; }
  .a4q-card { padding-top: 28px; border-radius: 20px; }
  .a4q-title { font-size: 1.35rem; }
}
