/* Sign-in, sign-up and related allauth entrance pages (anonymous visitors); scoped to body.auth.
   Same visual language as the landing page and the signed-in dashboard. Theme: data-theme on <html>
   (theme-init.js / theme.js, shared with the rest of the site). */
body.auth{
  --a-ink:#0f1b3d;--a-muted:#5b6478;--a-soft:#334155;--a-line:#e3e8f2;--a-line-strong:#d5ddec;--a-link:#2f55f0;--a-accent:#3b5bfd;
  --a-card:#fff;--a-input:#fff;--a-header:rgba(255,255,255,.82);--a-hover:#eef2ff;--a-placeholder:#94a3b8;
  --a-visual:linear-gradient(160deg,#f1f5ff 0%,#f4f1ff 100%);--a-blob:rgba(190,160,255,.22);
  --a-err-bg:#fff1f2;--a-err-line:#f6c0c5;--a-err-ink:#b91c1c;
  --a-msg-bg:#eef4ff;--a-msg-line:#c7d8fb;
  --a-grad:linear-gradient(100deg,#2f6bff 0%,#5b4cf5 58%,#8b3df0 100%);
  --a-shadow:0 1px 2px rgba(16,24,64,.04),0 18px 44px -20px rgba(16,24,64,.22);
  --a-art-filter:none;--a-art-opacity:1;
  --a-bg:
    radial-gradient(760px 420px at 62% -6%,rgba(147,180,255,.28),transparent 70%),
    radial-gradient(640px 520px at 100% 30%,rgba(190,160,255,.22),transparent 70%),
    radial-gradient(600px 420px at 0% 100%,rgba(147,180,255,.2),transparent 70%),
    #f5f7fd;
  font-family:"Inter","Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
  color:var(--a-ink);background:var(--a-bg);
  min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden
}
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] body.auth{
  --a-ink:#f1f5f9;--a-muted:#a3b1c6;--a-soft:#cbd5e1;--a-line:#2b3850;--a-line-strong:#3a4a66;--a-link:#a5b4fc;--a-accent:#818cf8;
  --a-card:#172033;--a-input:#0f172a;--a-header:rgba(13,20,36,.82);--a-hover:#1e293b;--a-placeholder:#64748b;
  --a-visual:linear-gradient(160deg,#141d33 0%,#1a1838 100%);--a-blob:rgba(124,58,237,.18);
  --a-err-bg:#2c1418;--a-err-line:#6b2631;--a-err-ink:#fca5a5;
  --a-msg-bg:#162342;--a-msg-line:#2c3f6e;
  --a-grad:linear-gradient(100deg,#5b6cff 0%,#7c5cf6 55%,#a855f7 100%);
  --a-shadow:0 1px 2px rgba(0,0,0,.3),0 20px 48px -20px rgba(0,0,0,.7);
  --a-art-filter:invert(1) hue-rotate(180deg) saturate(1.4);--a-art-opacity:.6;
  --a-bg:
    radial-gradient(760px 420px at 62% -6%,rgba(79,70,229,.18),transparent 70%),
    radial-gradient(640px 520px at 100% 30%,rgba(168,85,247,.13),transparent 70%),
    radial-gradient(600px 420px at 0% 100%,rgba(59,91,253,.12),transparent 70%),
    #0b1120;
}
body.auth a{color:var(--a-link)}

/* header */
body.auth header.top{background:var(--a-header);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--a-line);padding:.7rem max(1rem,calc((100% - 1120px)/2));flex-wrap:nowrap}
body.auth header.top .brand{display:inline-flex;align-items:center;gap:.55rem;font-size:1.2rem;font-weight:800;letter-spacing:-.02em;color:var(--a-ink)}
body.auth .brand-mark{display:block;flex:none;filter:drop-shadow(0 4px 8px rgba(91,76,245,.3))}
body.auth header.top nav{gap:.5rem;align-items:center;flex-wrap:nowrap}
body.auth header.top nav a{display:inline-flex;align-items:center;gap:.4rem;color:var(--a-soft);font-weight:500;padding:.45rem .8rem;border-radius:9px;text-decoration:none;white-space:nowrap;transition:background .15s,color .15s}
body.auth header.top nav a svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.auth header.top nav a:hover,body.auth header.top nav a:focus-visible{background:var(--a-hover);color:var(--a-accent)}
body.auth .theme-toggle{display:inline-grid;place-items:center;width:38px;height:38px;padding:0;border-radius:10px;border:1px solid var(--a-line);background:var(--a-card);color:var(--a-ink);cursor:pointer;transition:border-color .15s}
body.auth .theme-toggle:hover{border-color:var(--a-accent)}
body.auth .theme-toggle:focus-visible,body.auth header.top nav a:focus-visible{outline:2px solid var(--a-accent);outline-offset:2px}
body.auth .theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.auth .theme-toggle .i-sun{display:none}
html[data-theme="dark"] body.auth .theme-toggle .i-sun{display:block}
html[data-theme="dark"] body.auth .theme-toggle .i-moon{display:none}

/* frame */
body.auth main.auth-main{flex:1;width:100%;max-width:1120px;padding:clamp(1.5rem,5vw,3.5rem) 1rem 3rem;display:flex;flex-direction:column;justify-content:center}
.auth-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);background:var(--a-card);border:1px solid var(--a-line);border-radius:22px;box-shadow:var(--a-shadow);overflow:hidden}
.auth-visual{position:relative;display:flex;flex-direction:column;padding:2.6rem 2.6rem 0;background:var(--a-visual);border-right:1px solid var(--a-line);overflow:hidden}
.auth-visual-inner{position:sticky;top:5.5rem;z-index:1}
.auth-visual::after{content:"";position:absolute;right:-90px;top:-90px;width:300px;height:300px;border-radius:50%;background:var(--a-blob);pointer-events:none}
.auth-eyebrow{margin:0 0 .6rem;font-size:.8rem;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--a-muted)}
.auth-headline{position:relative;z-index:1;margin:0 0 .9rem;font-size:clamp(1.7rem,2.6vw,2.3rem);line-height:1.1;font-weight:800;letter-spacing:-.03em;color:var(--a-ink)}
.auth-grad{background:var(--a-grad);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.auth-note{position:relative;z-index:1;margin:0;color:var(--a-muted);font-size:1rem;line-height:1.6;max-width:30rem}
.auth-visual img{display:block;width:112%;max-width:none;height:auto;margin:.4rem -6% 0;padding-top:1.2rem;pointer-events:none;opacity:var(--a-art-opacity);filter:var(--a-art-filter);-webkit-mask-image:linear-gradient(180deg,#000 75%,transparent);mask-image:linear-gradient(180deg,#000 75%,transparent)}
.auth-card{padding:2.6rem 2.8rem 2.4rem;min-width:0;display:flex;flex-direction:column;justify-content:center}

/* allauth content inside the card */
body.auth .auth-card h1{margin:0 0 .45rem;font-size:clamp(1.7rem,2.4vw,2.1rem);line-height:1.15;font-weight:800;letter-spacing:-.025em;color:var(--a-ink)}
body.auth .auth-card h2{font-size:1.15rem;font-weight:700;color:var(--a-ink)}
body.auth .auth-card>p,body.auth .auth-card>div>p{color:var(--a-muted);margin:0 0 1.4rem;line-height:1.55}
body.auth .auth-card p.auth-sub{margin-bottom:1.6rem}
body.auth .auth-card p.auth-alt{margin:1.4rem 0 0;text-align:center;font-size:.95rem}
body.auth .auth-card p.auth-alt a{font-weight:600}
body.auth .auth-card form{margin-top:.2rem}
body.auth .auth-card form+p{margin-top:1.1rem;font-size:.9rem}
body.auth .auth-card form p{margin:0 0 1rem}
body.auth .auth-card label{display:block;font-weight:600;font-size:.9rem;margin-bottom:.4rem;color:var(--a-ink)}
body.auth .auth-card input[type=text],body.auth .auth-card input[type=email],body.auth .auth-card input[type=password],body.auth .auth-card input[type=number],body.auth .auth-card input[type=tel],body.auth .auth-card select,body.auth .auth-card textarea{
  width:100%;max-width:none;min-height:48px;padding:.65rem .9rem;border:1px solid var(--a-line-strong);border-radius:12px;background-color:var(--a-input);color:var(--a-ink);font:inherit;transition:border-color .15s,box-shadow .15s}
body.auth .auth-card input:focus,body.auth .auth-card select:focus,body.auth .auth-card textarea:focus{outline:none;border-color:var(--a-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--a-accent) 22%,transparent)}
body.auth .auth-card ::placeholder{color:var(--a-placeholder)}
/* decorative field icons (e-mail, password) */
body.auth .auth-card input[type=email],body.auth .auth-card input[type=password]{padding-left:2.75rem;background-repeat:no-repeat;background-position:.95rem 50%;background-size:18px 18px}
body.auth .auth-card input[type=email]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238592a8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 6.5 8.5 6 8.5-6'/%3E%3C/svg%3E")}
body.auth .auth-card input[type=password]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238592a8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E")}
/* checkbox rows: box first, then label */
body.auth .auth-card form p:has(>input[type=checkbox]){display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:flex-start;flex-wrap:wrap;gap:.6rem}
body.auth .auth-card form p:has(>input[type=checkbox]) label{flex:1;margin:0;font-weight:500;font-size:.92rem;line-height:1.45}
body.auth .auth-card form p:has(>input[type=checkbox]) .helptext,body.auth .auth-card form p:has(>input[type=checkbox]) .errorlist{flex-basis:100%;order:-1}
body.auth .auth-card input[type=checkbox]{width:18px;height:18px;margin:.1rem 0 0;accent-color:var(--a-accent);flex:none}
body.auth .auth-card .helptext{display:block;margin-top:.4rem;font-size:.86rem;color:var(--a-muted)}
body.auth .auth-card #id_password_helptext{text-align:right}
body.auth .auth-card #id_password_helptext a{font-weight:500;text-decoration:none}
body.auth .auth-card #id_password_helptext a:hover{text-decoration:underline}
body.auth .auth-card .helptext ul{margin:.2rem 0 0;padding-left:1.1rem}
/* errors */
body.auth .auth-card .errorlist{list-style:none;margin:.4rem 0 0;padding:.55rem .8rem;border-radius:11px;background:var(--a-err-bg);border:1px solid var(--a-err-line);color:var(--a-err-ink);font-size:.88rem;line-height:1.45}
body.auth .auth-card .errorlist.nonfield{margin:0 0 1.1rem;padding:.8rem 1rem .8rem 2.7rem;position:relative;font-size:.92rem}
body.auth .auth-card .errorlist.nonfield::before{content:"";position:absolute;left:.9rem;top:.82rem;width:20px;height:20px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 2.4 17.5A2 2 0 0 0 4.1 20.5h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 2.4 17.5A2 2 0 0 0 4.1 20.5h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat}
body.auth .auth-card .errorlist li+li{margin-top:.25rem}

/* buttons */
body.auth .auth-card button,body.auth .auth-card .btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:48px;padding:.7rem 1.3rem;border-radius:12px;border:1px solid var(--a-line-strong);background:var(--a-card);color:var(--a-ink);font:inherit;font-weight:600;cursor:pointer;text-decoration:none;transition:transform .15s,box-shadow .15s,border-color .15s}
body.auth .auth-card button:hover,body.auth .auth-card .btn:hover{border-color:var(--a-accent)}
body.auth .auth-card form button[type=submit]:first-of-type,body.auth .auth-card button.primary{width:100%;margin-top:.5rem;border:0;color:#fff;background:var(--a-grad);box-shadow:0 10px 24px -10px rgba(76,70,240,.75);font-size:1rem}
body.auth .auth-card form button[type=submit]:first-of-type:hover,body.auth .auth-card button.primary:hover{transform:translateY(-1px);box-shadow:0 14px 28px -10px rgba(76,70,240,.85)}
body.auth .auth-card button:focus-visible,body.auth .auth-card a:focus-visible{outline:2px solid var(--a-accent);outline-offset:2px}
.auth-note.contact-address{margin-top:1.2rem;color:var(--a-soft)}
body.auth .auth-card hr{border:0;border-top:1px solid var(--a-line);margin:1.4rem 0}

/* messages (e.g. after logout) */
body.auth .messages li{border-radius:12px;padding:.75rem 1rem;background:var(--a-msg-bg);border-color:var(--a-msg-line);color:var(--a-ink)}
body.auth .messages li.error{background:var(--a-err-bg);border-color:var(--a-err-line);color:var(--a-err-ink)}

/* footer */
body.auth footer.site{width:100%;max-width:1120px;padding:1.4rem 1rem 2rem;color:var(--a-muted);font-size:.86rem;align-items:center;gap:.4rem 1.25rem}
body.auth footer.site span{margin-right:auto}
body.auth footer.site a{color:var(--a-soft);text-decoration:none}
body.auth footer.site a:hover,body.auth footer.site a:focus-visible{color:var(--a-accent);text-decoration:underline}

@media (max-width:900px){
  .auth-wrap{grid-template-columns:minmax(0,1fr)}
  .auth-visual{padding:1.6rem 1.6rem 1.4rem;border-right:0;border-bottom:1px solid var(--a-line)}
  .auth-visual-inner{position:static}
  .auth-visual img{display:none}
  .auth-headline{font-size:1.45rem}
  .auth-card{padding:1.8rem 1.6rem 1.8rem}
}
@media (max-width:560px){
  body.auth main.auth-main{padding:1rem .75rem 2rem;justify-content:flex-start}
  body.auth header.top{padding:.6rem .9rem}
  body.auth header.top nav{margin-left:auto;gap:.3rem}
  body.auth header.top nav a{padding:.4rem .55rem;font-size:.92rem}
  .auth-wrap{border-radius:18px}
  .auth-visual{padding:1.2rem 1.2rem 1.1rem}
  .auth-note{font-size:.92rem}
  .auth-card{padding:1.4rem 1.2rem 1.5rem}
  body.auth footer.site span{flex-basis:100%}
}
@media (max-width:360px){
  body.auth header.top nav a.auth-home svg{display:none}
}
@media (prefers-reduced-motion:reduce){body.auth *{transition:none!important}}

/* live password hints (password-check.js) */
body.auth .pw-check{list-style:none;margin:-.3rem 0 1rem;padding:0;display:grid;gap:.3rem;font-size:.88rem;color:var(--a-muted)}
body.auth .pw-check li{display:flex;align-items:center;gap:.5rem}
body.auth .pw-check li::before{content:"";flex:none;width:16px;height:16px;border-radius:50%;border:1.5px solid var(--a-line-strong);box-sizing:border-box}
body.auth .pw-check li.ok{color:#15803d}
body.auth .pw-check li.ok::before{border:0;background:#16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/11px no-repeat}
