/* ============================================================
   THE LOGIN PANELS (v1.99.214)

   The left-hand panel of the three sign-in screens — admin (admin.html),
   agency portal (agency.html) and learner (index.html's #authOverlay) — and
   the admin picker's preview. One copy for all of them.

   COLOURS come from the --lgp-* tokens. The defaults below are the Plum
   palette; the server's /site-palette stylesheet, linked right after
   brand.css on all three pages, redefines them on :root with the palette the
   admin picked (SiteBrand.PANEL_PALETTES, which tests/brand-colours.js holds
   these defaults equal to). An agency-branded learner box overrides them
   with today's navy and the agency's accent (index.html).

   MOTION is opt-in: every animation is inside
   @media (prefers-reduced-motion: no-preference), and every base style is a
   complete, readable still picture. Only transform and opacity move (and the
   agency lines' dash offset). Nothing starts hidden.

   PHONES (900px and narrower, where both shells stack): the panel becomes a
   short strip above the form — the small picture, the name and role, the
   heading — so the first box of the form stays near the top.
   ============================================================ */
:root{
  --lgp-bg1:#2A1038; --lgp-bg2:#4B1B47; --lgp-a:#FFD691; --lgp-n:#3A1A4A; --lgp-ink:#2A1038;
  --lgp-g1:rgba(255,214,145,0.18); --lgp-g2:rgba(236,72,153,0.20); --lgp-mu:#F3E9EF;
  --lgp-mid:#3B1640; --lgp-q:rgba(243,233,239,0.62);
}

/* ============================================================
   THE MENUS WEAR THE PALETTE TOO (v1.99.218)

   The learner's side menu (#sidebar) and phone top bar (#topbar), the
   admin's rail (#adminNav) and phone top bar (#adminTop) read only these
   --menu-* tokens; nothing in them types a colour. Two sets:

   - THE PALETTE (below, on :root and on the picker's preview box): the
     admin's choice, from the --lgp-* tokens /site-palette serves. The text
     is PANEL_MUTED and its quiet shade (--lgp-q), never a white at an
     opacity a light palette cannot carry; the glows are the palette's at
     60% (SiteBrand.MENU_GLOW); the AI tag sits on a deep ink, not the
     violet wash, so it reads on every palette.
   - TODAY'S NAVY, for an agency's learners: :root.agency-chrome, the
     mapping SiteBrand.MENU_AGENCY names (tests/brand-colours.js holds the
     two equal). v1.99.219: an agency that picked a COLOUR SET has its own
     menu put in over the navy (SiteBrand.menuSetTokens) — by the server in
     /site-palette?for=app, and by app.js's SiteBrand.applyMenuSet on the
     root when it learns the set without a reload. The labels are 52% now. The server serves the same mapping in /site-palette for a
     learner it knows is an agency's, so the first paint is already navy;
     app.js sets the class when it learns it without a reload.

   The navy is --navy-*, the ONE copy of the four stops every navy panel
   uses: the agency menus, the agency-branded sign-in box (index.html) and
   the portal's Branding preview (agency.css). Certificates and printed pages
   read none of this (tests/brand-colours.js §12).
   ============================================================ */
:root{
  --navy-1:#0E2A2E; --navy-m:#12303A; --navy-mt:#16303C; --navy-2:#1A2340;
}
:root,.lgp-preview{
  --menu-1:var(--lgp-bg1); --menu-m:var(--lgp-mid); --menu-mt:var(--lgp-mid); --menu-2:var(--lgp-bg2);
  --menu-a:var(--lgp-a); --menu-mark:var(--lgp-a); --menu-node:var(--lgp-n);
  --menu-g1:color-mix(in srgb,var(--lgp-g1) 60%,transparent); --menu-g2:color-mix(in srgb,var(--lgp-g2) 60%,transparent);
  --menu-shine:color-mix(in srgb,var(--lgp-a) 55%,transparent);
  --menu-ink-2:var(--lgp-mu); --menu-ink-3:var(--lgp-q); --menu-out:var(--lgp-a);
  --menu-tag-bg:rgba(20,9,58,.4); --menu-tag-ink:#E4DEFF; --menu-tag-line:rgba(201,192,255,.4);
}
:root.agency-chrome{
  --menu-1:var(--navy-1); --menu-m:var(--navy-m); --menu-mt:var(--navy-mt); --menu-2:var(--navy-2);
  --menu-a:var(--teal-bright); --menu-mark:#0C9B8A; --menu-node:#1E3A44;
  --menu-g1:color-mix(in srgb,var(--teal-glow) 34%,transparent); --menu-g2:rgba(106,90,224,.28);
  --menu-shine:color-mix(in srgb,var(--teal-glow) 65%,transparent);
  --menu-ink-2:rgba(242,246,245,.62); --menu-ink-3:rgba(242,246,245,.52); --menu-out:#F2A5A0;
  --menu-tag-bg:rgba(106,90,224,.28); --menu-tag-ink:#C9C0FF; --menu-tag-line:rgba(106,90,224,.4);
}

.lgp{
  position:relative;overflow:hidden;display:flex;flex-direction:column;
  padding:34px 36px 30px;color:#FFFFFF;font-family:var(--font-body);
  background:radial-gradient(420px 320px at 12% 8%, var(--lgp-g1), transparent 70%),
             radial-gradient(380px 300px at 95% 96%, var(--lgp-g2), transparent 70%),
             linear-gradient(160deg, var(--lgp-bg1) 0%, var(--lgp-bg2) 100%);
}
.lgp-head{display:flex;align-items:center;gap:10px;min-width:0;}
.lgp-head .brand-mark{width:30px;height:30px;flex-shrink:0;}
/* The built-in mark wears the panel's accent here (an agency's logo is an
   <img> and is untouched). Presentation attributes lose to CSS. */
.lgp-head svg.brand-mark rect{fill:var(--lgp-a);opacity:.16;}
.lgp-head svg.brand-mark g{stroke:var(--lgp-a);}
.lgp-head .lgp-name{font-family:var(--font-display);font-weight:900;font-size:19px;letter-spacing:-.02em;
  line-height:1.15;color:#FFFFFF;min-width:0;overflow-wrap:anywhere;}
.lgp-tag{margin-left:auto;flex-shrink:0;font-family:var(--font-mono);font-size:11px;letter-spacing:.12em;
  text-transform:uppercase;padding:4px 10px;border:1px solid rgba(255,255,255,.22);border-radius:999px;color:var(--lgp-mu);}
.lgp-title{margin:28px 0 0;font-family:var(--font-display);font-size:34px;font-weight:600;line-height:1.1;
  letter-spacing:-.01em;color:#FFFFFF;}
.lgp-line{margin:10px 0 0;font-size:15px;line-height:1.5;color:var(--lgp-mu);max-width:390px;}
.lgp-pic{display:block;width:100%;height:auto;margin-top:22px;}
.lgp-mini{display:none;}
/* The picture sits at the foot of the panel, however tall the form beside it. */
.lgp-admin .lgp-pic,.lgp-agency .lgp-pic{margin-top:auto;padding-top:22px;}
.lgp-learner .lgp-steps{margin-top:auto;padding-top:20px;}

/* ---- shared picture parts ---- */
.lgp svg text{font-family:var(--font-mono);}
.lgp-ln{stroke:rgba(255,255,255,.22);stroke-width:1.5;fill:none;}
.lgp-dash{stroke-dasharray:4 5;}
.lgp-nd{fill:var(--lgp-n);stroke:var(--lgp-a);stroke-width:1.5;}
.lgp-nd-soft{fill:var(--lgp-a);fill-opacity:.14;}
.lgp-ic{stroke:#F2F4FA;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.lgp-lb{fill:var(--lgp-mu);font-size:10px;letter-spacing:.08em;}
.lgp-sm{fill:var(--lgp-mu);font-size:9px;letter-spacing:.06em;}
.lgp-tx{fill:#FFFFFF;font-size:12px;letter-spacing:.04em;}
.lgp-hub{fill:var(--lgp-a);}
.lgp-bar{fill:var(--lgp-a);}
.lgp-on-a{stroke:var(--lgp-ink);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;fill:none;}
.lgp-ring{fill:none;stroke:var(--lgp-a);stroke-width:2;opacity:.5;transform-box:fill-box;transform-origin:center;}
/* The travelling lights. Still, they sit halfway along their line, so the
   picture says "flows from here to there" with no motion at all. */
.lgp-pk{fill:var(--lgp-a);transform:translate(calc(var(--dx, 0px) * .5), calc(var(--dy, 0px) * .5));}
.lgp-pk2{fill:#F2F4FA;transform:translate(0, calc(var(--dy, 0px) * .5));}
.lgp-dt{fill:var(--lgp-a);}

/* ---- the learner's five steps ---- */
.lgp-steps{list-style:none;margin:20px 0 0;padding:0;display:flex;flex-direction:column;gap:8px;}
.lgp-st{display:flex;align-items:center;gap:14px;padding:10px 14px;border:1px solid rgba(255,255,255,.14);
  border-radius:14px;background:rgba(255,255,255,.04);}
.lgp-st-t{display:block;font-size:14px;font-weight:600;color:#FFFFFF;}
.lgp-st-s{display:block;font-size:12px;color:var(--lgp-mu);margin-top:1px;}
.lgp-dot{width:34px;height:34px;border-radius:50%;border:1.5px solid var(--lgp-a);display:flex;
  align-items:center;justify-content:center;flex:none;}
.lgp-dot svg{width:18px;height:18px;}
.lgp-dot-on{background:var(--lgp-a);}
.lgp-bars{display:flex;align-items:center;gap:2.5px;height:16px;}
.lgp-bars i{display:block;width:3px;height:100%;border-radius:2px;background:var(--lgp-a);transform-origin:center;}
.lgp-bars i:nth-child(1),.lgp-bars i:nth-child(4){transform:scaleY(.55);}
.lgp-cert{border-color:var(--lgp-a);background:rgba(255,255,255,.07);}

@media (prefers-reduced-motion: no-preference){
  @keyframes lgpPulse{0%{transform:scale(1);opacity:.5;}100%{transform:scale(1.8);opacity:0;}}
  @keyframes lgpGo{0%{transform:translate(0,0);opacity:0;}12%{opacity:1;}78%{opacity:1;}
    100%{transform:translate(var(--dx, 0px), var(--dy, 0px));opacity:0;}}
  @keyframes lgpDash{to{stroke-dashoffset:-18;}}
  @keyframes lgpRise{0%,8%{opacity:.25;transform:translateY(6px);}20%,100%{opacity:1;transform:none;}}
  @keyframes lgpEq{0%,100%{transform:scaleY(.3);}50%{transform:scaleY(1);}}
  @keyframes lgpBlink{0%,100%{opacity:.3;}50%{opacity:1;}}
  .lgp-ring{animation:lgpPulse 3.2s ease-out infinite;}
  .lgp-pk,.lgp-pk2{animation:lgpGo 3.6s ease-in-out infinite;animation-delay:var(--d, 0s);}
  .lgp-agency .lgp-pk,.lgp-agency .lgp-pk2{animation-duration:3s;}
  .lgp-dash{animation:lgpDash 1.4s linear infinite;}
  .lgp-st{animation:lgpRise 8s ease-out infinite;animation-delay:var(--d, 0s);}
  .lgp-bars i{animation:lgpEq 1s ease-in-out infinite;animation-delay:var(--e, 0s);}
  .lgp-dt{animation:lgpBlink 3s ease-in-out infinite;animation-delay:var(--d, 0s);}
}

/* ---- phones: a short strip above the form ---- */
@media (max-width:900px){
  .lgp{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"mini head" "mini title";
    align-items:center;column-gap:14px;row-gap:6px;padding:16px 20px;min-height:0;}
  .lgp-mini{display:block;grid-area:mini;width:96px;height:96px;}
  .lgp-head{grid-area:head;align-self:end;gap:8px;flex-wrap:wrap;}
  .lgp-head .brand-mark{width:22px;height:22px;}
  .lgp-head .brand-img{max-width:22px;max-height:22px;}
  .lgp-head .lgp-name{font-size:15px;}
  .lgp-tag{margin-left:0;font-size:9.5px;padding:2px 7px;}
  .lgp-title{grid-area:title;align-self:start;margin:0;font-size:20px;line-height:1.15;}
  .lgp-line,.lgp-pic,.lgp-steps{display:none;}
  /* the learner box's ✕ sits in the strip's top-right corner */
  .auth-aside.lgp{padding-right:54px;}
}
@media (max-width:380px){
  .lgp{column-gap:12px;padding:14px 16px;}
  .lgp-mini{width:76px;height:76px;}
  .lgp-title{font-size:18px;}
  .auth-aside.lgp{padding-right:50px;}
}

/* ---- the admin picker's preview (admin.html, System Settings) ---- */
.lgp-preview{display:grid;gap:10px;margin-top:12px;}
.lgp-preview .lgp{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"mini head" "mini title";
  align-items:center;column-gap:14px;row-gap:6px;padding:14px 16px;border-radius:14px;}
.lgp-preview .lgp-mini{display:block;grid-area:mini;width:80px;height:80px;}
.lgp-preview .lgp-head{grid-area:head;align-self:end;}
.lgp-preview .lgp-title{grid-area:title;align-self:start;margin:0;font-size:18px;line-height:1.15;}
.lgp-preview .lgp-tag{margin-left:0;}
