/* ============================================================
   PNHS GRAND ALUMNI — Portal welcome + auth screens
   Clean government service portal style (eGov-style).
   Light, airy, blue ribbon. Scoped under .pga-*.
   ============================================================ */

body.portal-app {
  --pga-blue-900: #1d1d1f;
  --pga-blue-800: #0058c9;
  --pga-blue-700: #0071e3;
  --pga-blue-600: #0077ed;
  --pga-blue-500: #3d96f5;
  --pga-blue-300: #aacdfc;
  --pga-blue-100: #e8f0fc;
  --pga-blue-50:  #f5f5f7;
  --pga-gold: #fcd116;
  --pga-red: #ce1126;
  --pga-ink: #1d1d1f;
  --pga-muted: #6e6e73;
  --pga-faint: #86868b;
  --pga-border: #d2d2d7;
  --pga-card: #ffffff;
  --pga-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
              'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  background: #f5f5f7;
  font-family: var(--pga-font);
}

body.portal-app h1,
body.portal-app h2,
body.portal-app .pga-title {
  font-family: var(--pga-font);
}

/* Soft light backdrop behind the portal */
.pga-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(720px 460px at 10% -8%, rgba(0, 119, 237, .07), transparent 62%),
    radial-gradient(640px 440px at 96% 2%, rgba(0, 113, 227, .06), transparent 58%),
    radial-gradient(900px 560px at 50% 118%, rgba(0, 0, 0, .03), transparent 62%);
}

.pga-frame {
  position: relative; z-index: 1;
  width: 100%; max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 30px;
  font-family: var(--pga-font);
  color: var(--pga-ink);
  -webkit-font-smoothing: antialiased;
}

/* Screens toggle via .is-active (JS). Only one is visible at a time. */
.pga-screen { display: none; }
.pga-screen.is-active {
  display: flex;
  flex-direction: column;
  animation: pgaFade .35s ease both;
}
@keyframes pgaFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   SCREEN 1 — WELCOME
   ============================================================ */
.pga-welcome { min-height: calc(100vh - 56px); justify-content: space-between; }

/* Government blue ribbon header */
.pga-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--pga-blue-800), var(--pga-blue-600));
  border-radius: 22px;
  color: #fff;
  box-shadow: 0 18px 40px -18px rgba(11, 47, 110, .55);
  position: relative; overflow: hidden;
}
.pga-hero::after {
  content: ""; position: absolute; right: -46px; top: -70px;
  width: 210px; height: 210px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.pga-seal {
  width: 56px; height: 56px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  color: var(--pga-blue-800);
  overflow: hidden;
}
.pga-seal img { width: 100%; height: 100%; object-fit: contain; }
.pga-hero-titles { min-width: 0; }
.pga-brand { font-size: 21px; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.pga-brand-sub { font-size: 12.5px; opacity: .82; margin-top: 3px; }

/* Mini Philippine flag accent */
.pga-flagbar {
  position: relative; margin-left: auto; flex: none;
  width: 46px; height: 30px; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, #0038a8 0 33.4%, #fff 33.4% 66.6%, #ce1126 66.6% 100%);
}
.pga-flagbar::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 7px; height: 7px; background: var(--pga-gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Welcome body */
.pga-welcome-body {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 40px 0 30px; width: 100%; max-width: 780px; margin: 0 auto;
}
.pga-welcome-body h1 {
  font-size: clamp(30px, 5vw, 44px); font-weight: 800; line-height: 1.18;
  color: var(--pga-ink); margin: 0;
}
.pga-welcome-body > p {
  font-size: 15px; color: var(--pga-muted); line-height: 1.75;
  margin: 14px 0 30px; max-width: 520px;
}

/* Feature cards */
.pga-features {
  list-style: none; margin: 0 0 34px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  width: 100%;
}
.pga-features li {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--pga-card);
  border: 1px solid var(--pga-border);
  border-radius: 16px;
  padding: 16px 14px;
  box-shadow: 0 10px 26px -18px rgba(23, 35, 60, .35);
  transition: transform .3s cubic-bezier(.22, .68, .32, 1.15),
              box-shadow .3s ease, border-color .3s ease, background .3s ease;
}
.pga-features li::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--pga-blue-500), var(--pga-gold));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.pga-features li::after {
  content: ""; position: absolute; top: 0; left: -75%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: left .7s cubic-bezier(.22, .68, .32, 1);
  pointer-events: none;
}
.pga-features li:hover {
  transform: translateY(-5px);
  border-color: transparent;
  background: linear-gradient(160deg, #ffffff, #f4f8ff);
  box-shadow: 0 24px 44px -20px rgba(11, 47, 110, .45);
}
.pga-features li:hover::before { opacity: 1; }
.pga-features li:hover::after { left: 130%; }

.pga-f-icon {
  position: relative;
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--pga-blue-100); color: var(--pga-blue-700);
  overflow: hidden;
  transition: background .3s ease, color .3s ease,
              transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.pga-f-icon::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .7), transparent 55%);
  opacity: 0; transition: opacity .3s ease;
}
.pga-f-icon svg {
  width: 21px; height: 21px; position: relative;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.pga-f-icon svg path,
.pga-f-icon svg circle,
.pga-f-icon svg rect {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
.pga-features li:hover .pga-f-icon {
  transform: rotate(-6deg) scale(1.1);
  background: linear-gradient(135deg, var(--pga-blue-600), var(--pga-blue-800));
  color: #fff;
  box-shadow: 0 14px 26px -12px rgba(11, 47, 110, .6);
}
.pga-features li:hover .pga-f-icon::before { opacity: 1; }
.pga-features li:hover .pga-f-icon svg { transform: scale(1.04) rotate(6deg); }
.pga-features li:hover .pga-f-icon svg path,
.pga-features li:hover .pga-f-icon svg circle,
.pga-features li:hover .pga-f-icon svg rect {
  stroke-dashoffset: 100;
  animation: pgaIconDraw 1s cubic-bezier(.65, 0, .35, 1) forwards;
}
@keyframes pgaIconDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.pga-f-text { min-width: 0; transition: transform .3s ease; }
.pga-features li:hover .pga-f-text { transform: translateX(3px); }
.pga-f-text strong { display: block; font-size: 13px; color: var(--pga-ink); line-height: 1.3; }
.pga-f-text small { display: block; font-size: 11px; color: var(--pga-muted); margin-top: 2px; line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
  .pga-features li, .pga-features li::before, .pga-features li::after,
  .pga-f-icon, .pga-f-icon svg, .pga-f-icon svg path,
  .pga-f-icon svg circle, .pga-f-icon svg rect, .pga-f-text {
    transition: none;
  }
  .pga-features li:hover { transform: none; }
  .pga-features li:hover::after { left: -75%; }
  .pga-features li:hover .pga-f-icon svg path,
  .pga-features li:hover .pga-f-icon svg circle,
  .pga-features li:hover .pga-f-icon svg rect { stroke-dashoffset: 0; animation: none; }
}

/* Get started */
.pga-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 15px 42px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--pga-blue-600), var(--pga-blue-800));
  color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 18px 36px -14px rgba(11, 47, 110, .55);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.pga-cta:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 24px 44px -14px rgba(11, 47, 110, .6); }
.pga-cta:active { transform: translateY(0); }
.pga-cta-chev { display: inline-flex; align-items: center; }
.pga-cta-chev svg { width: 18px; height: 18px; }

.pga-footer {
  text-align: center; font-size: 11.5px; color: var(--pga-faint);
  letter-spacing: .03em; padding: 6px 0 2px;
}

/* ============================================================
   WELCOME HERO — "about alumni" ambient animations
   Entrance stagger replays every time the welcome screen shows.
   ============================================================ */
.pga-welcome.is-active .pga-hero { animation: pgaUpIn .6s cubic-bezier(.2, .7, .3, 1) both; }
.pga-welcome.is-active .pga-welcome-body h1 { animation: pgaUpIn .6s cubic-bezier(.2, .7, .3, 1) .16s both; }
.pga-welcome.is-active .pga-welcome-body > p { animation: pgaUpIn .6s cubic-bezier(.2, .7, .3, 1) .28s both; }
.pga-welcome.is-active .pga-features li { animation: pgaUpIn .55s cubic-bezier(.2, .7, .3, 1) both; }
.pga-welcome.is-active .pga-features li:nth-child(1) { animation-delay: .4s; }
.pga-welcome.is-active .pga-features li:nth-child(2) { animation-delay: .5s; }
.pga-welcome.is-active .pga-features li:nth-child(3) { animation-delay: .6s; }
.pga-welcome.is-active .pga-features li:nth-child(4) { animation-delay: .7s; }
.pga-welcome.is-active .pga-cta { animation: pgaCtaPop .7s cubic-bezier(.34, 1.4, .5, 1) .82s both; }
.pga-welcome.is-active .pga-footer { animation: pgaUpIn .6s ease .95s both; }

@keyframes pgaUpIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pgaCtaPop {
  0%   { opacity: 0; transform: scale(.92); }
  60%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

/* Light sweep across the blue ribbon header only when revealed */
.pga-hero::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-18deg);
  animation: pgaShine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pgaShine {
  0%, 55%  { left: -60%; }
  100%     { left: 135%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pga-welcome.is-active .pga-hero,
  .pga-welcome.is-active .pga-seal,
  .pga-welcome.is-active .pga-welcome-body h1,
  .pga-welcome.is-active .pga-welcome-body > p,
  .pga-welcome.is-active .pga-features li,
  .pga-welcome.is-active .pga-cta,
  .pga-welcome.is-active .pga-footer,
  .pga-hero::before { animation: none; }
}

/* ============================================================
   SCREEN 2 — AUTH
   ============================================================ */
.pga-auth { padding-top: 18px; }
.pga-auth-scroll { display: block; }

/* White service card */
.pga-auth-card {
  width: 100%; max-width: 620px; margin: 0 auto;
  background: var(--pga-card);
  border: 1px solid var(--pga-border);
  border-radius: 24px;
  padding: 34px 36px 30px;
  box-shadow: 0 24px 60px -30px rgba(23, 35, 60, .35);
}

.pga-auth-head { text-align: center; margin-bottom: 22px; }
.pga-badge-icon {
  width: 58px; height: 58px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pga-blue-700), var(--pga-blue-500));
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(11, 61, 143, .6);
}
.pga-badge-icon svg { width: 27px; height: 27px; }
.pga-badge-icon.has-logo { background: transparent; padding: 0; box-shadow: none; }
.pga-badge-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.pga-auth-head h1 { font-size: 24px; font-weight: 800; color: var(--pga-ink); margin: 0; }
.pga-auth-head p { font-size: 13.5px; color: var(--pga-muted); margin: 6px 0 0; }

/* Single login screen — the old tab row was removed in the template */
.pga-seg { display: none; }

/* Alerts */
.pga-alert {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
  background: #fff4f3; border: 1px solid #ffd7d3; color: #d70015; font-size: 12.5px; line-height: 1.6;
}
.pga-alert ul { list-style: none; margin: 0; padding: 0; }
.pga-alert li + li { margin-top: 4px; }

.pga-closed-card {
  text-align: center;
  padding: 12px 14px;
  background: #fff4f3;
  border: 1px solid #ffd7d3;
  border-radius: 10px;
  margin-top: 16px;
}
.pga-closed-title {
  font-size: 13px; font-weight: 600; color: #d70015;
  margin: 0 0 2px;
}
.pga-closed-text {
  font-size: 12px; color: #d70015; line-height: 1.5;
  margin: 0; opacity: .8;
}

/* Only the active pane is shown */
.pga-pane { display: none; }
.pga-pane.is-active { display: block; animation: pgaPaneIn .45s ease both; }
@keyframes pgaPaneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* "Create an account" trigger on the login pane (opens register in a new tab) */
#pgaPaneLogin .pga-switch-line {
  text-align: center;
  margin: 20px 0 0; font-size: 12.5px; color: var(--pga-muted);
}
#pgaPaneLogin .pga-switch-line .pga-link {
  font-size: 12.5px; font-weight: 600; color: var(--pga-blue-600);
}
#pgaPaneLogin .pga-switch-line .pga-link:hover { text-decoration: underline; }

/* Single-column form area */
.pga-split { display: block; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.pga-field { margin-bottom: 14px; }
.pga-field > label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--pga-ink);
  margin-bottom: 7px; letter-spacing: .02em;
}
.pga-input-wrap { position: relative; }
.pga-input-wrap > svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--pga-faint); pointer-events: none;
}
.pga-input {
  width: 100%; height: 48px; padding: 0 14px 0 42px;
  background: #fff;
  border: 1px solid var(--pga-border); border-radius: 12px;
  color: var(--pga-ink); font-family: inherit; font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pga-input::placeholder { color: #a3aec2; }
.pga-input:focus {
  outline: none; border-color: var(--pga-blue-600);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .14);
}
.pga-input.has-toggle { padding-right: 46px; }
select.pga-input {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select.pga-input option { color: var(--pga-ink); background: #fff; }

/* Show / hide password */
.pga-input-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--pga-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, background .15s ease;
}
.pga-input-toggle:hover { color: var(--pga-blue-700); background: var(--pga-blue-50); }
.pga-input-toggle svg { width: 18px; height: 18px; }
.pga-input-toggle .eye-closed { display: none; }
.pga-input-toggle.is-shown .eye-open { display: none; }
.pga-input-toggle.is-shown .eye-closed { display: block; }

/* Options row */
.pga-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 18px; }
.pga-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--pga-muted); cursor: pointer; user-select: none; }
.pga-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--pga-blue-600); cursor: pointer; }
.pga-link {
  background: none; border: 0; padding: 0; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--pga-blue-600);
  cursor: pointer; text-decoration: none;
}
.pga-link:hover { text-decoration: underline; }

/* Primary blue button */
.pga-btn {
  width: 100%; height: 50px; border: 0; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--pga-blue-600), var(--pga-blue-800));
  color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 16px 34px -16px rgba(11, 47, 110, .6);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.pga-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 22px 42px -16px rgba(11, 47, 110, .65); }
.pga-btn:active { transform: translateY(0); }
.pga-btn:disabled { opacity: .75; cursor: progress; }
.pga-spinner {
  width: 16px; height: 16px; border-radius: 50%; display: none;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: pgaSpin .7s linear infinite;
}
.pga-btn.is-loading .pga-spinner { display: inline-block; }
.pga-btn.is-loading .pga-btn-text { display: none; }
@keyframes pgaSpin { to { transform: rotate(360deg); } }

.pga-switch-line { margin: 16px 0 0; text-align: center; font-size: 12.5px; color: var(--pga-muted); }

/* Terms */
.pga-terms {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12px; color: var(--pga-muted); line-height: 1.65;
  margin: 2px 0 16px; cursor: pointer;
}
.pga-terms input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--pga-blue-600); cursor: pointer; }
.pga-terms-text { flex: 1; min-width: 0; }
.pga-terms a { color: var(--pga-blue-600); font-weight: 600; }

/* Password strength */
.pga-strength { margin: 8px 2px 0; display: none; }
.pga-strength.is-visible { display: block; }
.pga-strength-bars { display: flex; gap: 5px; margin-bottom: 5px; }
.pga-strength-bars i { flex: 1; height: 4px; border-radius: 99px; background: #e3e9f3; transition: background .2s ease; }
.pga-strength[data-score="1"] .pga-strength-bars i:nth-child(-n+1) { background: #ef4444; }
.pga-strength[data-score="2"] .pga-strength-bars i:nth-child(-n+2) { background: #f59e0b; }
.pga-strength[data-score="3"] .pga-strength-bars i:nth-child(-n+3) { background: #facc15; }
.pga-strength[data-score="4"] .pga-strength-bars i { background: #22c55e; }
.pga-strength-label { font-size: 11px; color: var(--pga-muted); }

/* Toast */
.pga-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  padding: 13px 20px; border-radius: 12px; z-index: 50;
  background: var(--pga-blue-900); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 18px 44px -12px rgba(23, 35, 60, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.pga-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Login error modal */
.pga-err {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  background: rgba(10, 10, 12, .45);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: pgaErrFade .3s ease both;
}
.pga-err-card {
  position: relative; width: 100%; max-width: 360px;
  background: linear-gradient(180deg, #ffffff, #f9fbfe);
  border: 1px solid var(--pga-border);
  border-radius: 22px;
  padding: 34px 26px 26px;
  text-align: center;
  box-shadow: 0 40px 90px -34px rgba(10, 10, 12, .35);
  animation: pgaErrPop .45s cubic-bezier(.22, 1.2, .36, 1) both;
}
.pga-err-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 18px 34px -14px rgba(185, 28, 28, .65);
}
.pga-err-icon svg { width: 30px; height: 30px; }
.pga-err-card h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--pga-ink); }
.pga-err-list { list-style: none; margin: 0 0 20px; padding: 0; }
.pga-err-list li { font-size: 13.5px; color: var(--pga-muted); line-height: 1.6; }
.pga-err-btn {
  width: 100%; height: 48px; border: 0; border-radius: 13px; cursor: pointer;
  background: linear-gradient(135deg, var(--pga-blue-600), var(--pga-blue-800));
  color: #fff; font-family: inherit; font-size: 14.5px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 16px 30px -14px rgba(11, 47, 110, .6);
  transition: transform .18s ease, filter .18s ease;
}
.pga-err-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pga-err-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border: 0; border-radius: 10px;
  background: var(--pga-blue-50); color: var(--pga-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.pga-err-close svg { width: 16px; height: 16px; }
.pga-err-close:hover { background: var(--pga-blue-100); color: var(--pga-blue-700); transform: rotate(90deg); }
.pga-err.is-closing { animation: pgaErrFadeOut .25s ease both; }
@keyframes pgaErrFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pgaErrFadeOut { to { opacity: 0; } }
@keyframes pgaErrPop {
  from { opacity: 0; transform: translateY(22px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Laptops / desktops */
@media (max-width: 1024px) {
  .pga-features { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets */
@media (max-width: 900px) {
  .pga-auth-card { padding: 28px 24px; }
}

/* Phones & small tablets */
@media (max-width: 760px) {
  .pga-frame { padding: 0; }
  .pga-welcome { min-height: 100vh; min-height: 100dvh; }
  .pga-hero { border-radius: 0; flex-direction: column; text-align: center; gap: 10px; padding: 22px 16px calc(16px + env(safe-area-inset-top)); }
  .pga-seal { width: 52px; height: 52px; font-size: 12px; }
  .pga-hero-titles { text-align: center; }
  .pga-brand { font-size: 18px; }
  .pga-brand-sub { font-size: 12px; margin-top: 4px; }

  .pga-welcome-body { padding: 38px 20px 24px; }
  .pga-welcome-body h1 { font-size: 32px; }
  .pga-features { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 26px; }
  .pga-features li { padding: 13px 12px; gap: 10px; }
  .pga-f-text small { display: none; }
  .pga-cta { width: 100%; }

  .pga-auth { padding: calc(10px + env(safe-area-inset-top)) 14px 26px; min-height: 100vh; min-height: 100dvh; justify-content: center; }
  .pga-auth-scroll { width: 100%; }
  .pga-auth-card { border-radius: 20px; padding: 26px 18px 24px; box-shadow: 0 18px 44px -28px rgba(23, 35, 60, .4); max-width: 420px; }
  .pga-input { font-size: 16px; }
  .pga-auth-head h1 { font-size: 21px; }
}

/* Small phones */
@media (max-width: 480px) {
  .pga-features { grid-template-columns: 1fr; }
  .pga-features li { flex-direction: row; align-items: center; }
  .pga-f-text small { display: block; }
  .pga-welcome-body h1 { font-size: 28px; }
}

/* ============================================================
   REGISTER SCREEN (standalone page — shares the portal theme)
   ============================================================ */
.pga-reg-body { display: flex; align-items: center; justify-content: center; }
.pga-reg-shell {
  position: relative; z-index: 1;
  width: 100%; max-width: 960px; margin: 0 auto;
  padding: 38px 20px 30px;
}
.pga-reg-card { max-width: 920px; }

.pga-reg-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 9px 16px;
  border-radius: 999px;
  background: var(--pga-blue-50);
  border: 1px solid var(--pga-border);
  color: var(--pga-blue-700);
  font-size: 12.5px; font-weight: 500;
}
.pga-reg-chip svg { flex: none; }
.pga-reg-chip strong { color: var(--pga-blue-700); font-weight: 700; }

.pga-alert-mb { margin-bottom: 20px; }

.pga-reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}
.pga-reg-grid .pga-field { margin-bottom: 14px; }
.pga-reg-full { grid-column: 1 / -1; }

.pga-reg-btn { height: 54px; margin-top: 2px; }

/* Field-level error highlight (red ring on marked inputs only — no red text) */
.pga-form-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; border-radius: 12px;
  margin: 16px 0 0; line-height: 1.65;
  background: var(--pga-blue-50); border: 1px solid var(--pga-border);
  color: var(--pga-muted); font-size: 13px;
}
.pga-form-note + * { margin-top: 14px; }

/* Restricted-area notice (admin login) — high visibility callout */
.pga-form-note.is-restricted {
  align-items: center;
  background: #fff9ec;
  border-color: #f2d48a;
  color: #725018;
  font-size: 13.5px;
}
.pga-form-note .pga-note-msg { flex: 1 1 auto; min-width: 0; text-wrap: balance; }
.pga-form-note.is-restricted .pga-note-ico {
  flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fcd116, #e8b50f);
  color: #4d3a00;
  box-shadow: 0 6px 14px -8px rgba(120, 84, 0, .65), inset 0 0 0 1px rgba(77, 58, 0, .15);
}
.pga-form-note.is-restricted .pga-note-ico svg { width: 19px; height: 19px; }
.pga-form-note.is-restricted strong { font-weight: 800; color: #4d3a00; }
.pga-form-note svg { flex: none; color: var(--pga-blue-600); margin-top: 1px; }
.pga-input-error,
.pga-input-error:focus {
  border-color: #ff3b30;
  box-shadow: 0 0 0 4px rgba(255, 59, 48, .15);
  background: #fffafa;
}
.pga-terms-error {
  background: #fff4f3;
  border: 1px solid #ffc9c5;
  border-radius: 12px;
  padding: 10px 12px;
  margin-left: -6px; margin-right: -6px;
}
.pga-terms-error .pga-terms-text { color: #0f172a; }

/* Email domain suggestions */
.pga-email-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 20;
  display: block;
  background: #fff;
  border: 1px solid var(--pga-border);
  border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(23, 35, 60, .4);
  overflow: hidden;
  padding: 4px;
}
.pga-email-suggest[hidden] { display: none; }
.pga-email-sug {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--pga-ink);
  font-family: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background .15s ease;
}
.pga-email-sug:hover { background: var(--pga-blue-50); }
.pga-email-sug-at {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--pga-blue-100); color: var(--pga-blue-700);
}
.pga-email-sug-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .pga-reg-shell { padding: calc(14px + env(safe-area-inset-top)) 14px 26px; }
  .pga-reg-grid { grid-template-columns: 1fr; column-gap: 0; }
}

/* ============================================================
   ADMIN AUTH (shared with the portal theme)
   Success/Info alert variants, OTP digits, back link, field errors.
   ============================================================ */
.pga-alert.is-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.pga-alert.is-info { background: var(--pga-blue-50); border-color: #bfdbfe; color: var(--pga-blue-700); }

.pga-input-error-text,
.pga-input-error-text:focus { margin: 6px 2px 0; font-size: 12px; line-height: 1.45; color: #ff3b30; }
.pga-input-error-text[hidden] { display: none; }

.pga-otp-digits {
  display: flex; gap: 10px; justify-content: center;
  margin: 8px 0 22px;
}
.pga-otp-digit {
  width: 52px; height: 60px; padding: 0; text-align: center;
  border: 1.5px solid var(--pga-border); border-radius: 12px;
  font-family: inherit; font-size: 24px; font-weight: 700;
  color: var(--pga-ink); background: #fff;
  outline: none; caret-color: var(--pga-blue-700);
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.pga-otp-digit::placeholder { color: #a3aec2; font-weight: 400; }
.pga-otp-digit:focus {
  border-color: var(--pga-blue-600);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .14);
  transform: translateY(-2px);
}
.pga-otp-digit.is-filled {
  border-color: var(--pga-blue-600);
  background: var(--pga-blue-50);
  color: var(--pga-blue-900);
}
.pga-otp-hint { text-align: center; font-size: 12.5px; color: var(--pga-muted); margin: -12px 0 20px; }
.pga-otp-masked { font-weight: 700; color: var(--pga-blue-700); }

.pga-otp-resend {
  width: 100%; height: 48px; margin-top: 14px;
  border: 1.5px solid var(--pga-border); border-radius: 12px;
  background: #fff; color: var(--pga-blue-700);
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .18s ease, background-color .18s ease;
}
.pga-otp-resend svg { width: 16px; height: 16px; }
.pga-otp-resend:hover:not(:disabled) { border-color: var(--pga-blue-600); background: var(--pga-blue-50); }
.pga-otp-resend:disabled { opacity: .55; cursor: not-allowed; color: var(--pga-faint); }
.pga-otp-timer { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--pga-muted); margin-top: 10px; }

.pga-back-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; font-size: 13px; font-weight: 600;
  color: var(--pga-blue-600); text-decoration: none;
}
.pga-back-link:hover { text-decoration: underline; }
.pga-back-link svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .pga-otp-digits { gap: 7px; }
  .pga-otp-digit { width: 46px; height: 56px; font-size: 22px; }
}
