/* YSBot login (/users/login) — dark glass, same tokens as home.css / member.css.
   Loaded only when a template defines {% block auth_ui %} (layout/basic_login.phtml), so signup,
   find-password, portfolio, /manager and SB Admin keep their chrome. Every rule is scoped under body.login. */
body.login{--bg:#05060a;--card:rgba(255,255,255,.045);--line:rgba(255,255,255,.09);--t:#eef1f7;--m:#8a93a6;--a:#7c5cff;--b:#18e0c8;--err:#ff4d6a;
  margin:0;min-height:100vh;background:var(--bg);color:var(--t);font-family:"Pretendard Variable",Pretendard,system-ui,sans-serif;-webkit-font-smoothing:antialiased;overflow-x:hidden;line-height:1.5}
body.login *,body.login *:before,body.login *:after{box-sizing:border-box}
body.login a{color:inherit;text-decoration:none}
body.login .wrap{display:flex;flex-direction:column;min-height:100vh}
body.login .w{max-width:1200px;margin:0 auto;padding-left:24px;padding-right:24px;width:100%}
body.login .bgfx{position:fixed;inset:0;z-index:-1;background:radial-gradient(800px 500px at 15% -5%,rgba(124,92,255,.32),transparent 60%),radial-gradient(700px 500px at 90% 10%,rgba(24,224,200,.15),transparent 60%),var(--bg)}
body.login .bgfx:after{content:"";position:absolute;inset:0;background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);background-size:64px 64px;mask:radial-gradient(ellipse at 50% 0,#000 20%,transparent 70%);-webkit-mask:radial-gradient(ellipse at 50% 0,#000 20%,transparent 70%);opacity:.45}

/* minimal header (homepage nav geometry) */
body.login .anav{position:sticky;top:0;z-index:50;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);background:rgba(5,6,10,.6);border-bottom:1px solid var(--line)}
body.login .anav .bar{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
body.login .logo{font-weight:800;font-size:20px;letter-spacing:-.02em;display:flex;gap:8px;align-items:center}
body.login .logo img{height:28px;width:auto;display:block;border-radius:7px}
body.login .home{font-size:13px;color:var(--t);padding:6px 12px;border:1px solid var(--line);border-radius:99px;background:var(--card)}
body.login .home:hover{border-color:rgba(124,92,255,.5)}

/* centered card */
body.login main.auth{flex:1;display:flex;align-items:center;justify-content:center;padding:48px 16px 64px}
body.login .glass{background:linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.02));border:1px solid var(--line);border-radius:22px;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);position:relative;overflow:hidden}
body.login .glass:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(140deg,rgba(255,255,255,.22),transparent 40%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
body.login .acard{width:100%;max-width:420px;padding:36px 32px 28px}
body.login .eyebrow{color:var(--b);font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;margin:0}
body.login .acard h1{font-size:30px;letter-spacing:-.035em;font-weight:800;margin:6px 0 0;line-height:1.2}
body.login .acard .sub{color:var(--m);margin:8px 0 24px;font-size:14.5px}

/* alert */
body.login .msg{margin:0 0 18px;padding:12px 14px;border-radius:12px;font-size:14px;line-height:1.55}
body.login .msg.err{background:rgba(255,77,106,.1);border:1px solid rgba(255,77,106,.4);color:#ffb3c0}

/* fields */
body.login .fl{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}
body.login .fl label{font-size:13px;color:var(--m);font-weight:500}
body.login .field{width:100%;min-width:0;height:48px;background:rgba(255,255,255,.06);border:1px solid var(--line);color:#fff;border-radius:12px;padding:0 14px;font:inherit;font-size:16px;color-scheme:dark;transition:border-color .2s,box-shadow .2s}
body.login .field::placeholder{color:#5d6577}
body.login .field:focus{outline:none;border-color:rgba(124,92,255,.75);box-shadow:0 0 0 3px rgba(124,92,255,.25)}
body.login .field[aria-invalid="true"]{border-color:rgba(255,77,106,.5)}
body.login .row{display:flex;justify-content:flex-end;margin:-4px 0 20px;font-size:13px}
body.login .row a,body.login .alt a{color:#c9bcff}
body.login .row a:hover,body.login .alt a:hover{color:#fff;text-decoration:underline}

/* button */
body.login .btn{display:flex;align-items:center;justify-content:center;width:100%;height:50px;padding:0 22px;border-radius:12px;font-weight:700;font-size:16px;color:#fff;border:0;font-family:inherit;cursor:pointer;background:linear-gradient(135deg,var(--a),#5b8cff);box-shadow:0 10px 40px -10px rgba(124,92,255,.8);transition:transform .25s,box-shadow .25s}
body.login .btn:hover{transform:translateY(-1px)}
body.login .btn:active{transform:none}

/* focus ring for keyboard users on links/buttons */
body.login a:focus-visible,body.login .btn:focus-visible{outline:2px solid var(--b);outline-offset:3px;border-radius:8px}

body.login .alt{margin:22px 0 0;padding-top:18px;border-top:1px solid var(--line);text-align:center;font-size:14px;color:var(--m)}
body.login .back{display:block;text-align:center;margin-top:12px;font-size:13px;color:var(--m)}
body.login .back:hover{color:#fff}

/* footer */
body.login footer.af{border-top:1px solid var(--line);padding:22px 0;color:var(--m);font-size:12.5px;line-height:1.8;text-align:center}
body.login footer.af p{margin:0}
body.login footer.af .links a{margin:0 8px}
body.login footer.af a:hover{color:#fff;text-decoration:underline}

@media(max-width:600px){
  body.login .w{padding-left:16px;padding-right:16px}
  body.login .anav .bar{height:56px}
  body.login main.auth{align-items:flex-start;padding:28px 12px 44px}
  body.login .acard{padding:28px 20px 22px;border-radius:18px}
  body.login .acard h1{font-size:26px}
}
@media(prefers-reduced-motion:reduce){body.login .btn,body.login .field{transition:none}body.login .btn:hover{transform:none}}

/* header right group + theme toggle (icon-only, upper-right) */
body.login .navr{display:flex;align-items:center;gap:10px}
body.login .thm{width:36px;height:36px;flex-shrink:0;display:inline-grid;place-items:center;padding:0;border-radius:99px;border:1px solid var(--line);background:var(--card);color:var(--t);cursor:pointer;transition:border-color .2s}
body.login .thm:hover{border-color:rgba(124,92,255,.5)}
body.login .thm:focus-visible{outline:2px solid var(--b);outline-offset:2px}
body.login .thm svg{display:block}
body.login .thm .i-sun{display:none}
html[data-theme="light"] body.login .thm .i-sun{display:block}
html[data-theme="light"] body.login .thm .i-moon{display:none}
@media(max-width:600px){body.login .thm{width:32px;height:32px}}
/* <=360px (320 devices): tighter header width budget so the theme toggle is never clipped — wordmark collapses (icon stays) */
@media(max-width:360px){body.login .w{padding-left:12px;padding-right:12px}body.login .anav .bar{gap:8px}body.login .navr{gap:6px}body.login .logo{font-size:0;gap:0}body.login .home{padding:5px 10px}body.login .thm{flex-shrink:0}}

/* light companion (html[data-theme=light]); dark = body.login tokens above, unchanged */
html[data-theme="light"] body.login{--bg:#f4f6fb;--card:rgba(255,255,255,.86);--line:rgba(88,72,190,.14);--t:#141826;--m:#596175;--b:#0a8072;--err:#d3203d;color-scheme:light}
html[data-theme="light"] body.login .bgfx{background:radial-gradient(800px 500px at 15% -5%,rgba(124,92,255,.16),transparent 60%),radial-gradient(700px 500px at 90% 10%,rgba(24,224,200,.12),transparent 60%),var(--bg)}
html[data-theme="light"] body.login .bgfx:after{opacity:.35}
html[data-theme="light"] body.login .anav{background:rgba(244,246,251,.8)}
html[data-theme="light"] body.login .home,html[data-theme="light"] body.login .thm{background:#fff}
html[data-theme="light"] body.login .glass{background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.82));box-shadow:0 1px 2px rgba(30,24,80,.04),0 18px 40px -22px rgba(60,45,160,.3)}
html[data-theme="light"] body.login .glass:before{background:linear-gradient(140deg,rgba(124,92,255,.2),transparent 40%)}
html[data-theme="light"] body.login .field{background:#fff;color:var(--t);color-scheme:light}
html[data-theme="light"] body.login .field::placeholder{color:#8b93a6}
html[data-theme="light"] body.login .msg.err{background:rgba(211,32,61,.06);border-color:rgba(211,32,61,.35);color:#a8142c}
html[data-theme="light"] body.login .row a,html[data-theme="light"] body.login .alt a{color:#5235d0}
html[data-theme="light"] body.login .row a:hover,html[data-theme="light"] body.login .alt a:hover,html[data-theme="light"] body.login .back:hover,html[data-theme="light"] body.login footer.af a:hover{color:var(--t)}
