/* ============================================================
   JUJU Portal — login pages (parent · staff · franchise)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
.lg { --ink: #1c1930; --ink-2: #4a4659; --muted: #5f5970; --line: rgba(28,25,48,.12); --ease: cubic-bezier(.22,1,.36,1);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; background: #fff; }
.lg a { color: inherit; }
.lg svg { display: block; }

/* ---------- left scene (shared) ---------- */
.lg-scene { position: relative; overflow: hidden; min-height: 100vh; }
.lg-quote { position: absolute; left: clamp(1.6rem, 4vw, 3.4rem); right: clamp(1.6rem, 4vw, 3.4rem); bottom: clamp(1.6rem, 5vh, 3.4rem); z-index: 3; animation: lgUp 1s .6s var(--ease) both; }
.lg-quote b { display: block; max-width: 520px; font: 400 clamp(1.9rem, 3.2vw, 2.9rem)/1.1 'DM Serif Display', serif; }
.lg-quote span { display: block; margin-top: .7rem; max-width: 440px; font-weight: 600; line-height: 1.6; opacity: .85; }
@keyframes lgUp { from { opacity: 0; transform: translateY(20px); } }

/* ---------- right side (shared) ---------- */
.lg-main { position: relative; display: flex; flex-direction: column; padding: clamp(1.2rem, 3vw, 2rem) clamp(1.4rem, 5vw, 4.5rem); }
.lg-top { display: flex; justify-content: space-between; align-items: center; }
.lg-logo img { width: 92px; height: auto; }
.lg-back { font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--ink-2) !important; padding: .55rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); transition: border-color .2s, color .2s; }
.lg-back:hover { border-color: var(--c); color: var(--c) !important; }
.lg-card { width: 100%; max-width: 440px; margin: auto; padding: 2rem 0; }
.lg-switch { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px; margin-bottom: 1.8rem; border-radius: 16px; background: #f4f2f7; }
.lg-switch a { position: relative; z-index: 1; padding: .65rem .4rem; text-align: center; text-decoration: none; font-weight: 800; font-size: .86rem; color: var(--muted) !important; border-radius: 12px; transition: color .3s; }
.lg-switch a.is-on { color: #fff !important; }
.lg-switch a:not(.is-on):hover { color: var(--ink) !important; }
.lg-switch i { position: absolute; top: 5px; bottom: 5px; width: calc((100% - 10px) / 3); border-radius: 12px; background: var(--c); box-shadow: 0 10px 22px -10px var(--c); }
.lg--parent .lg-switch i { left: 5px; } .lg--staff .lg-switch i { left: calc(5px + (100% - 10px) / 3); } .lg--franchise .lg-switch i { left: calc(5px + 2 * (100% - 10px) / 3); }
.lg-kick { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--c); }
.lg h1 { margin: .5rem 0 .6rem; font: 400 clamp(2.1rem, 3.6vw, 2.8rem)/1.08 'DM Serif Display', serif; }
.lg h1 em { color: var(--c); }
.lg-sub { margin: 0 0 1.8rem; color: var(--ink-2); line-height: 1.65; }
.lg-f { position: relative; display: block; margin-bottom: .95rem; }
.lg-f input { width: 100%; height: 60px; padding: 1.35rem 3rem .4rem 3.1rem; border-radius: 16px; border: 1.5px solid #e4e0ea; background: #faf9fc; font: 600 1rem 'Plus Jakarta Sans', sans-serif; color: var(--ink); outline: none; transition: border-color .25s, box-shadow .25s, background .25s; }
.lg-f input:focus { border-color: var(--c); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 15%, transparent); }
.lg-ic { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #a39daf; transition: color .25s; }
.lg-ic svg, .lg-eye svg, .lg-submit svg, .lg-secure svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-f:focus-within .lg-ic { color: var(--c); }
.lg-l { position: absolute; left: 3.1rem; top: 50%; transform: translateY(-50%); color: #8c869a; font-weight: 600; pointer-events: none; transition: all .2s var(--ease); }
.lg-f input:focus ~ .lg-l, .lg-f input:not(:placeholder-shown) ~ .lg-l { top: .95rem; font-size: .72rem; font-weight: 800; color: var(--c); }
.lg-f.is-bad input { border-color: #e0475b; background: #fff6f7; }
.lg-eye { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: #8c869a; cursor: pointer; }
.lg-eye:hover, .lg-eye.is-on { color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.lg-caps { margin: -.4rem 0 .8rem; font-size: .8rem; font-weight: 700; color: #b7791f; }
.lg-row { display: flex; justify-content: space-between; align-items: center; margin: .2rem 0 1.3rem; font-size: .9rem; font-weight: 700; }
.lg-row a { color: var(--c) !important; text-decoration: none; filter: brightness(.85); }
.lg-check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; color: var(--ink-2); }
.lg-check input { position: absolute; opacity: 0; }
.lg-check i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #cfc9d8; display: grid; place-items: center; transition: all .2s; }
.lg-check input:checked + i { background: var(--c); border-color: var(--c); }
.lg-check input:checked + i::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.lg-check input:focus-visible + i { outline: 3px solid var(--c); outline-offset: 2px; }
.lg-err { margin: -.4rem 0 1rem; padding: .7rem .9rem; border-radius: 12px; background: #fff0f2; color: #b42339; font-weight: 700; font-size: .9rem; }
.lg-submit { position: relative; display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; height: 58px; border: 0; border-radius: 16px; background: var(--c); color: #fff; font: 800 1.05rem 'Plus Jakarta Sans', sans-serif; cursor: pointer; overflow: hidden; box-shadow: 0 16px 30px -14px var(--c); transition: transform .3s var(--ease), box-shadow .3s; }
.lg-submit::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); transition: left .7s var(--ease); }
.lg-submit:hover { transform: translateY(-2px); } .lg-submit:hover::after { left: 130%; }
.lg-submit svg { transition: transform .3s; } .lg-submit:hover svg { transform: translateX(4px); }
.lg-spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: lgSpin .8s linear infinite; }
.lg-submit.is-busy { pointer-events: none; } .lg-submit.is-busy .lg-spin { display: block; } .lg-submit.is-busy svg { display: none; }
@keyframes lgSpin { to { transform: rotate(360deg); } }
.lg-reg { margin: 1.4rem 0 0; text-align: center; color: var(--ink-2); font-weight: 600; }
.lg-reg a { color: var(--c) !important; font-weight: 800; filter: brightness(.85); }
.lg-secure { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 1rem 0 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.lg-secure svg { width: 15px; height: 15px; }
.lg-foot { text-align: center; font-size: .8rem; color: var(--muted); }

/* ================= PARENT — sky, balloons, hearts ================= */
.lg--parent .lg-scene { background: linear-gradient(170deg, #ffe3ef 0%, #fff1e2 55%, #ffd8ea 100%); color: #5a1c3d; }
.sc-sky { position: absolute; inset: 0; }
.cl { position: absolute; height: 46px; border-radius: 50px; background: #fff; opacity: .9; box-shadow: 30px -18px 0 6px #fff, 64px 2px 0 0 #fff; animation: lgCloud linear infinite; }
.cl1 { width: 110px; top: 12%; left: -20%; animation-duration: 40s; } .cl2 { width: 80px; top: 30%; left: -30%; animation-duration: 55s; animation-delay: -20s; opacity: .7; } .cl3 { width: 130px; top: 5%; left: -40%; animation-duration: 70s; animation-delay: -45s; opacity: .6; }
@keyframes lgCloud { to { transform: translateX(160vw); } }
.bl { position: absolute; width: 70px; animation: lgRise ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(192,60,125,.25)); }
.bl1 { left: 14%; bottom: 38%; width: 92px; animation-duration: 7s; } .bl2 { left: 44%; bottom: 52%; animation-duration: 8.5s; animation-delay: -2s; } .bl3 { left: 64%; bottom: 40%; width: 82px; animation-duration: 7.6s; animation-delay: -4s; } .bl4 { left: 28%; bottom: 66%; width: 56px; animation-duration: 9s; animation-delay: -1s; }
@keyframes lgRise { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-34px) rotate(3deg); } }
.ht { position: absolute; bottom: -20px; color: #ff5fa8; font-size: 22px; animation: lgHeart linear infinite; opacity: 0; }
.ht1 { left: 20%; animation-duration: 9s; } .ht2 { left: 52%; animation-duration: 11s; animation-delay: -3s; font-size: 16px; } .ht3 { left: 78%; animation-duration: 10s; animation-delay: -6s; } .ht4 { left: 36%; animation-duration: 12s; animation-delay: -8s; color: #ffb300; } .ht5 { left: 88%; animation-duration: 13s; animation-delay: -2s; color: #5cc8ff; }
@keyframes lgHeart { 0% { transform: translateY(0) scale(.6); opacity: 0; } 10% { opacity: .9; } 100% { transform: translateY(-100vh) scale(1.2) rotate(30deg); opacity: 0; } }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34%; }
.lg--parent .lg-card { animation: lgPop .9s var(--ease) both; }
@keyframes lgPop { 0% { opacity: 0; transform: scale(.92) translateY(18px); } 60% { transform: scale(1.01); } }

/* ================= STAFF — chalkboard + geometry ================= */
.lg--staff .lg-scene { background: linear-gradient(160deg, #0d2c4f, #12467a 60%, #0f5f8f); color: #fff; }
.sc-board { position: absolute; inset: 0; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle at 40% 40%, #000, transparent 75%); }
.board { position: absolute; left: 10%; right: 10%; top: 13%; z-index: 2; padding: 1.4rem; border-radius: 14px; background: #1e4d3a; border: 10px solid #8a5a2b; box-shadow: inset 0 0 40px rgba(0,0,0,.35), 0 30px 60px -20px rgba(0,0,0,.55); }
.board svg { width: 100%; height: auto; }
.ch { stroke-dasharray: 420; stroke-dashoffset: 420; animation: lgDraw 1.4s var(--ease) forwards, lgErase 1s 9s ease forwards; }
.c1 { animation-delay: .4s, 9s; } .c2 { animation-delay: 1.1s, 9s; } .c3 { animation-delay: 1.8s, 9s; } .c4 { animation-delay: 2.5s, 9s; } .c5 { animation-delay: 3.1s, 9s; } .c6 { animation-delay: 3.8s, 9s; }
@keyframes lgDraw { to { stroke-dashoffset: 0; } }
@keyframes lgErase { to { opacity: 0; } }
.chalk { position: absolute; right: 18px; bottom: -6px; width: 46px; height: 10px; border-radius: 3px; background: #f4f1e6; transform: rotate(-8deg); box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.gm { position: absolute; z-index: 1; border: 3px solid rgba(255,255,255,.35); animation: lgSpinFloat linear infinite; }
.g1 { width: 70px; height: 70px; border-radius: 50%; left: 8%; bottom: 30%; border-color: #ffd96a; animation-duration: 18s; }
.g2 { width: 60px; height: 60px; right: 12%; bottom: 36%; border-color: #7fe3c4; border-radius: 10px; animation-duration: 22s; }
.g3 { width: 0; height: 0; border: 0; border-left: 34px solid transparent; border-right: 34px solid transparent; border-bottom: 58px solid rgba(255,138,173,.55); left: 46%; bottom: 40%; animation-duration: 26s; }
.g4 { width: 18px; height: 18px; border-radius: 50%; background: #ffd96a; border: 0; right: 30%; top: 8%; animation-duration: 14s; }
.g5 { width: 120px; height: 6px; border: 0; border-radius: 3px; background: repeating-linear-gradient(90deg, #ffd96a 0 10px, transparent 10px 14px); left: 18%; top: 8%; animation-duration: 30s; }
@keyframes lgSpinFloat { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-24px) rotate(180deg); } 100% { transform: translateY(0) rotate(360deg); } }
.lg--staff .lg-card { animation: lgSlide .9s var(--ease) both; }
@keyframes lgSlide { from { opacity: 0; transform: translateX(40px); } }

/* ================= FRANCHISE — network + growth ================= */
.lg--franchise .lg-scene { background: radial-gradient(700px 500px at 30% 20%, #2a2350, transparent 70%), linear-gradient(160deg, #0f0d22, #1b1638); color: #fff; }
.sc-net { position: absolute; inset: 0; }
#lgNet { position: absolute; inset: 0; width: 100%; height: 100%; }
.bars { position: absolute; left: 10%; right: 40%; bottom: 30%; height: 28%; display: flex; align-items: flex-end; gap: 10px; }
.bars i { flex: 1; height: var(--h); border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #f3c969, rgba(243,201,105,.15)); transform-origin: bottom; animation: lgBar 1.3s var(--ease) both; }
.bars i:nth-child(2) { animation-delay: .15s; } .bars i:nth-child(3) { animation-delay: .3s; } .bars i:nth-child(4) { animation-delay: .45s; } .bars i:nth-child(5) { animation-delay: .6s; } .bars i:nth-child(6) { animation-delay: .75s; }
@keyframes lgBar { from { transform: scaleY(0); } }
.trend { position: absolute; left: 10%; width: 50%; bottom: 46%; }
.trend path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: lgDraw 2s 1.2s var(--ease) forwards; }
.trend circle { opacity: 0; animation: lgPing 2s 3s ease-out infinite; transform-origin: 295px 10px; }
@keyframes lgPing { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(3); } }
.lg--franchise .lg-quote b { background: linear-gradient(100deg, #fff, #f3c969); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg--franchise .lg-card { position: relative; animation: lgFade 1s var(--ease) both; }
@keyframes lgFade { from { opacity: 0; filter: blur(8px); } }
.lg--franchise .lg-submit { background: linear-gradient(135deg, #1b1638, #3a2f6e); box-shadow: 0 16px 30px -14px rgba(27,22,56,.7); }
.lg--franchise .lg-submit span, .lg--franchise .lg-submit svg { color: #f3c969; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; }
  .lg-scene { min-height: 300px; order: -1; }
  .lg-quote b { font-size: 1.7rem; }
  .lg-quote span { display: none; }
  .lg-quote { bottom: 44px; }
  .board { top: 8%; left: 14%; right: 14%; border-width: 7px; padding: .8rem; }
  .bars { bottom: 34%; height: 34%; }
  .trend { bottom: 54%; }
  .lg-main { margin-top: -28px; border-radius: 28px 28px 0 0; background: #fff; z-index: 2; }
  .lg-card { padding-top: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .lg *, .lg *::before, .lg *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
.lg-err.is-info { background: #eef6ff; color: #1d4f86; font-weight: 600; line-height: 1.55; }
.lg-err.is-info a { color: #0b5cad !important; font-weight: 800; }

/* ---- portal (single page, role switch) ---- */
.lg-scenewrap, .lg-copy, .lg-reg { display: none; }
.lg--parent [data-role="parent"], .lg--staff [data-role="staff"], .lg--franchise [data-role="franchise"] { display: block; }
.lg-scenewrap { position: absolute; inset: 0; }
.lg--parent { --c: #d1137d; } .lg--staff { --c: #0f6fb5; } .lg--franchise { --c: #d9a441; }
.lg-switch a { cursor: pointer; }
.lg--parent .lg-switch a[data-r="parent"], .lg--staff .lg-switch a[data-r="staff"], .lg--franchise .lg-switch a[data-r="franchise"] { color: #fff !important; }
.lg-switch i { transition: left .45s var(--ease), background .4s; }
.lg-card .lg-copy { animation: lgUp .5s var(--ease) both; }
.lg-err { margin: 0 0 1rem; }

.lg--franchise .lg-switch a.is-on{color:#1c1930!important}
