:root {
  color-scheme: dark;
  --auth-bg: #070b14;
  --auth-panel: rgba(15, 20, 33, .94);
  --auth-panel-soft: rgba(21, 27, 43, .78);
  --auth-text: #f8f9fd;
  --auth-muted: #aeb7ca;
  --auth-line: rgba(255,255,255,.10);
  --auth-accent: #a86cff;
  --auth-accent-2: #7240dd;
  --auth-accent-soft: rgba(168,108,255,.18);
  --auth-button-text: #ffffff;
}
html[data-auth-audience="sensei"] {
  --auth-accent: #ffd34f;
  --auth-accent-2: #b77905;
  --auth-accent-soft: rgba(255,211,79,.16);
  --auth-button-text: #191407;
}
html[data-theme="sunlit"] {
  color-scheme: light;
  --auth-bg: #f8f1e7;
  --auth-panel: rgba(255,255,255,.92);
  --auth-panel-soft: rgba(255,255,255,.68);
  --auth-text: #161228;
  --auth-muted: #69657a;
  --auth-line: rgba(46,35,65,.12);
}
html[data-theme="sunlit"][data-auth-audience="student"] {
  --auth-accent:#6d35b5;
  --auth-accent-2:#9a5fd4;
  --auth-accent-soft:rgba(109,53,181,.12);
}
html[data-theme="sunlit"][data-auth-audience="sensei"] {
  --auth-accent:#9b6810;
  --auth-accent-2:#d49b23;
  --auth-accent-soft:rgba(190,137,33,.13);
  --auth-button-text:#171006;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.dojo-auth-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, system-ui, sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--auth-accent) 20%, transparent), transparent 34%),
    radial-gradient(circle at 92% 30%, rgba(255,174,59,.12), transparent 32%),
    var(--auth-bg);
}
.auth-ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-ambient__glow { position: absolute; width: 34rem; height: 34rem; border-radius: 50%; filter: blur(90px); opacity: .12; }
.auth-ambient__glow--one { left: -16rem; top: 9rem; background: var(--auth-accent); }
.auth-ambient__glow--two { right: -18rem; bottom: -8rem; background: #ffae3b; }
.auth-ambient__wave { position: absolute; left: 50%; top: 48%; width: min(1000px, 80vw); height: 130px; transform: translate(-50%,-50%); opacity: .07; background: repeating-linear-gradient(90deg, transparent 0 10px, var(--auth-accent) 10px 12px); clip-path: polygon(0 50%,5% 42%,10% 60%,15% 31%,20% 68%,25% 44%,30% 55%,35% 20%,40% 74%,45% 38%,50% 58%,55% 26%,60% 78%,65% 20%,70% 65%,75% 35%,80% 61%,85% 24%,90% 70%,95% 42%,100% 50%,100% 52%,0 52%); }
.auth-music-note{position:absolute;color:var(--auth-accent);font-family:Georgia,serif;opacity:.18;filter:drop-shadow(0 8px 20px color-mix(in srgb,var(--auth-accent) 30%,transparent));animation:auth-note-float 8s ease-in-out infinite}.auth-music-note--one{left:7%;top:23%;font-size:3.2rem}.auth-music-note--two{right:8%;top:47%;font-size:4.5rem;animation-delay:-2.6s}.auth-music-note--three{left:46%;bottom:8%;font-size:2.7rem;animation-delay:-5s}.auth-music-ring{position:absolute;border:1px solid color-mix(in srgb,var(--auth-accent) 25%,transparent);border-radius:50%;animation:auth-ring-pulse 5s ease-out infinite}.auth-music-ring--one{width:150px;height:150px;left:1%;bottom:8%}.auth-music-ring--two{width:210px;height:210px;right:-70px;top:16%;animation-delay:-2.2s}@keyframes auth-note-float{0%,100%{transform:translate3d(0,0,0) rotate(-5deg)}50%{transform:translate3d(0,-18px,0) rotate(6deg)}}@keyframes auth-ring-pulse{0%{transform:scale(.72);opacity:0}35%{opacity:.35}100%{transform:scale(1.25);opacity:0}}
.auth-topbar,
.auth-shell,
.auth-footer { position: relative; z-index: 2; width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.auth-topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 18px; z-index:100; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.auth-brand__mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; overflow:hidden; background:#fff; border:1px solid var(--auth-line); box-shadow: 0 14px 32px color-mix(in srgb,var(--auth-accent) 15%,transparent); }
.auth-brand__mark img{width:100%;height:100%;object-fit:contain}
.auth-brand__copy { display: grid; gap: 3px; }
.auth-brand__copy strong { font-size: 1rem; letter-spacing: .04em; }
.auth-brand__copy small { color: var(--auth-muted); font-size: .61rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.auth-topbar__actions { display: flex; align-items: center; gap: 10px; }
.auth-role-switch,
.auth-theme-menu summary { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--auth-line); border-radius: 999px; color: var(--auth-muted); background: var(--auth-panel-soft); text-decoration: none; font-size: .78rem; font-weight: 750; cursor: pointer; }
.auth-role-switch:hover,
.auth-theme-menu summary:hover { color: var(--auth-text); border-color: color-mix(in srgb,var(--auth-accent) 55%,transparent); }
.auth-theme-menu { position: relative; z-index:210; }
.auth-theme-menu[open]{z-index:220}
.auth-theme-menu summary { list-style: none; }
.auth-theme-menu summary::-webkit-details-marker { display:none; }
.auth-theme-menu summary::after { content:'▾'; margin-left: 7px; opacity:.65; }
.dojo-theme-menu-panel { position:absolute; right:0; top:calc(100% + 8px); width:180px; z-index:230; display:grid; gap:6px; padding:9px; border:1px solid var(--auth-line); border-radius:14px; background:var(--auth-panel); box-shadow:0 22px 54px rgba(0,0,0,.34); }
.dojo-theme-menu-panel .jg-theme-switch__btn { width:100%; min-height:40px; display:flex; align-items:center; justify-content:flex-start; border:0; border-radius:10px; padding:0 13px; background:transparent; color:var(--auth-muted); font:inherit; font-size:.75rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; cursor:pointer; }
.dojo-theme-menu-panel .jg-theme-switch__btn:hover{background:color-mix(in srgb,var(--auth-accent) 10%,transparent);color:var(--auth-text)}
.dojo-theme-menu-panel .jg-theme-switch__btn[aria-pressed="true"]{background:color-mix(in srgb,var(--auth-accent) 18%,var(--auth-panel));color:var(--auth-text);box-shadow:0 7px 18px color-mix(in srgb,var(--auth-accent) 13%,transparent)}
.auth-shell { display: grid; grid-template-columns: minmax(0, .92fr) minmax(390px, .72fr); gap: 28px; align-items: stretch; padding: 30px 0 22px; }
.auth-story,
.auth-card { border: 1px solid var(--auth-line); border-radius: 30px; box-shadow: 0 28px 80px rgba(0,0,0,.24); }
.auth-story { position: relative; overflow: hidden; min-height: 650px; display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,6vw,72px); background: linear-gradient(145deg,var(--auth-accent-soft),transparent 58%), var(--auth-panel-soft); }
.auth-story::before{content:'𝄞';position:absolute;right:6%;top:18%;font-family:Georgia,serif;font-size:clamp(7rem,15vw,13rem);line-height:1;color:var(--auth-accent);opacity:.035;transform:rotate(8deg);pointer-events:none}
.auth-story::after { content:''; position:absolute; width:360px; height:360px; right:-160px; bottom:-170px; border-radius:50%; background:var(--auth-accent); filter:blur(30px); opacity:.12; }
.auth-story__badge { position:absolute; left:30px; top:28px; padding:8px 12px; border:1px solid color-mix(in srgb,var(--auth-accent) 45%,transparent); border-radius:999px; color:var(--auth-accent); background:color-mix(in srgb,var(--auth-accent) 10%,transparent); font-size:.65rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.auth-story__icon { width:72px; height:72px; display:grid; place-items:center; border-radius:22px; background:color-mix(in srgb,var(--auth-accent) 18%,transparent); border:1px solid color-mix(in srgb,var(--auth-accent) 38%,transparent); color:var(--auth-accent); font-size:2rem; font-weight:900; }
.auth-story__eyebrow { margin:26px 0 8px; color:var(--auth-accent); font-size:.72rem; font-weight:900; letter-spacing:.17em; text-transform:uppercase; }
.auth-story h1 { margin:0; max-width:650px; font-size:clamp(2.6rem,5vw,4.8rem); line-height:.96; letter-spacing:-.06em; }
.auth-story__copy { max-width:650px; margin:18px 0 0; color:var(--auth-muted); line-height:1.7; font-size:1rem; }
.auth-story__points { list-style:none; padding:0; margin:32px 0 0; display:grid; gap:13px; }
.auth-story__points li { display:flex; align-items:center; gap:12px; color:color-mix(in srgb,var(--auth-text) 88%,transparent); font-weight:700; }
.auth-story__points span { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:color-mix(in srgb,var(--auth-accent) 14%,transparent); color:var(--auth-accent); font-size:.72rem; }
.auth-story__quote { margin:auto 0 0; padding-top:38px; color:var(--auth-muted); font-weight:700; }
.auth-card { align-self:center; padding:clamp(28px,4vw,42px); background:var(--auth-panel); }
.auth-card__head { margin-bottom:24px; }
.auth-back { display:inline-flex; margin-bottom:24px; color:var(--auth-muted); text-decoration:none; font-size:.78rem; font-weight:750; }
.auth-back:hover { color:var(--auth-accent); }
.auth-kicker { margin:0 0 7px; color:var(--auth-accent); font-size:.68rem; font-weight:900; letter-spacing:.16em; text-transform:uppercase; }
.auth-card h2 { margin:0; font-size:clamp(2rem,4vw,2.8rem); letter-spacing:-.045em; }
.auth-card__head > p:last-child { margin:10px 0 0; color:var(--auth-muted); }
.auth-alert { margin:0 0 20px; padding:14px 16px; border:1px solid rgba(239,68,68,.28); border-radius:15px; background:rgba(239,68,68,.11); color:#fecaca; }
html[data-theme="sunlit"] .auth-alert { color:#991b1b; background:#fff0f0; }
.auth-alert strong { display:block; margin-bottom:5px; }
.auth-alert ul { margin:0; padding-left:18px; }
.auth-form { display:grid; gap:17px; }
.auth-field { display:grid; gap:8px; }
.auth-field > span:first-child { color:var(--auth-muted); font-size:.72rem; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.auth-field input { width:100%; min-height:54px; padding:0 15px; border:1px solid var(--auth-line); border-radius:14px; background:color-mix(in srgb,var(--auth-panel-soft) 88%,transparent); color:var(--auth-text); font:inherit; }
.auth-field input::placeholder { color:color-mix(in srgb,var(--auth-muted) 70%,transparent); }
.auth-field input:focus { outline:2px solid color-mix(in srgb,var(--auth-accent) 60%,transparent); outline-offset:2px; border-color:var(--auth-accent); }
.auth-password { position:relative; display:block; }
.auth-password input { padding-right:86px; }
.auth-password__toggle { position:absolute; right:8px; top:50%; transform:translateY(-50%); min-width:68px; min-height:38px; border:1px solid var(--auth-line); border-radius:999px; background:var(--auth-panel); color:var(--auth-muted); font-weight:800; cursor:pointer; }
.auth-password__toggle:hover { color:var(--auth-accent); border-color:color-mix(in srgb,var(--auth-accent) 45%,transparent); }
.auth-organization { border:1px solid var(--auth-line); border-radius:14px; background:color-mix(in srgb,var(--auth-panel-soft) 74%,transparent); }
.auth-organization summary { cursor:pointer; padding:14px 15px; color:var(--auth-muted); font-size:.8rem; font-weight:800; }
.auth-organization summary small { margin-left:6px; font-weight:600; opacity:.7; }
.auth-organization[open] { padding-bottom:14px; }
.auth-organization[open] summary { margin-bottom:4px; }
.auth-organization .auth-field { padding:0 14px; }
.auth-submit { min-height:56px; display:flex; align-items:center; justify-content:center; gap:12px; border:0; border-radius:15px; background:linear-gradient(135deg,var(--auth-accent),var(--auth-accent-2)); color:var(--auth-button-text); font:inherit; font-weight:900; cursor:pointer; box-shadow:0 16px 34px color-mix(in srgb,var(--auth-accent) 24%,transparent); }
.auth-submit:hover { transform:translateY(-1px); filter:brightness(1.06); }
.auth-submit b { font-size:1.15rem; }
.auth-help { margin:20px 0 0; text-align:center; color:var(--auth-muted); font-size:.8rem; }
.auth-help a { color:var(--auth-accent); font-weight:850; text-decoration:none; }
.auth-footer { min-height:70px; display:flex; align-items:center; justify-content:space-between; gap:16px; color:var(--auth-muted); font-size:.72rem; }
.auth-footer strong { color:color-mix(in srgb,var(--auth-accent) 80%,var(--auth-muted)); letter-spacing:.08em; text-transform:uppercase; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns:1fr; max-width:680px; }
  .auth-story { min-height:0; padding:36px; }
  .auth-story h1 { font-size:clamp(2.4rem,10vw,4rem); }
  .auth-story__quote { margin-top:32px; padding-top:0; }
}
@media (max-width: 620px) {
  .auth-topbar,.auth-shell,.auth-footer { width:min(100% - 24px,1180px); }
  .auth-topbar { min-height:72px; }
  .auth-brand__copy small,.auth-role-switch { display:none; }
  .auth-story { padding:84px 24px 28px; border-radius:24px; }
  .auth-story__badge { left:22px; top:22px; }
  .auth-story__points { margin-top:24px; }
  .auth-card { padding:25px 20px; border-radius:24px; }
  .auth-footer { flex-direction:column; justify-content:center; padding:18px 0; }
}
@media (prefers-reduced-motion:reduce) {
  .auth-submit { transition:none; }
  .auth-music-note,.auth-music-ring{animation:none}
}
