/* Sunethix auth pages — login, login error, forgot password.
   Tokens mirror the Study Workspace shell so the auth flow and the app
   read as one product. Keep these in sync if the workspace palette moves. */

:root{
 --bg:#F6F2FD;--panel:#FFF;--border:#EAE3F7;--border-2:#DDD2F0;
 --purple:#7C3AED;--purple-d:#6425D0;--purple-l:#EDE7FB;--purple-xl:#F8F5FE;
 --ink:#2E1065;--text:#3F3060;--muted:#7A7391;--cyan:#2BB3AE;
 --red-bg:#FCE9E9;--red-tx:#C02626;--red:#D62E2E;
 --green-bg:#E1F6EC;--green-tx:#0C7346;
 --font:"Poppins","Segoe UI",system-ui,sans-serif;
 --e:cubic-bezier(.2,.7,.3,1);
}

*{box-sizing:border-box}

body{
 margin:0;
 background:var(--bg);
 color:var(--text);
 font-family:var(--font);
 font-size:14px;
 line-height:1.55;
 -webkit-font-smoothing:antialiased;
}

h1,h2{margin:0;color:var(--ink);font-weight:600;letter-spacing:-.01em}

.auth-wrap{
 min-height:100vh;
 display:flex;
 align-items:center;
 justify-content:center;
 padding:24px;
}

.auth-card{
 background:var(--panel);
 border:1px solid var(--border);
 border-radius:14px;
 padding:32px;
 width:100%;
 max-width:390px;
 box-shadow:0 12px 34px rgba(46,16,101,.08);
}

/* Brand lockup — the full Sunethix logo (shield + wordmark) from web/img. */
.auth-brand{
 display:flex;
 flex-direction:column;
 align-items:center;
 gap:10px;
 margin-bottom:14px;
}
.auth-logo{
 display:block;
 width:230px;
 max-width:100%;
 height:auto;
}

.auth-card p.sub{
 margin:0 0 24px;
 text-align:center;
 color:var(--muted);
 font-size:14px;
}

/* the calm counterpart of .auth-error: a fact, not a fault */
.auth-note{
 margin:0 0 20px;
 padding:10px 12px;
 font-size:13px;
 color:var(--purple-d,#6425D0);
 background:var(--purple-xl,#F8F5FE);
 border:1px solid var(--border,#EAE3F7);
 border-radius:10px;
}

.auth-error{
 margin:0 0 20px;
 padding:10px 12px;
 font-size:13px;
 color:var(--red-tx);
 background:var(--red-bg);
 border:1px solid rgba(214,46,46,.28);
 border-radius:10px;
}

.auth-note{
 margin:0 0 20px;
 padding:10px 12px;
 font-size:13px;
 color:var(--green-tx);
 background:var(--green-bg);
 border:1px solid rgba(22,164,106,.3);
 border-radius:10px;
}

.field{margin-bottom:16px}
.field label{
 display:block;
 font-size:13px;
 color:var(--muted);
 margin-bottom:6px;
}
.field input{
 width:100%;
 padding:10px 12px;
 font-size:15px;
 font-family:inherit;
 color:var(--text);
 background:var(--purple-xl);
 border:1px solid var(--border-2);
 border-radius:10px;
 transition:border-color .18s var(--e), box-shadow .18s var(--e);
}
.field input:focus{
 outline:none;
 border-color:var(--purple);
 box-shadow:0 0 0 3px rgba(124,58,237,.14);
}

button.submit{
 width:100%;
 padding:11px;
 font-size:15px;
 font-weight:600;
 font-family:inherit;
 color:#fff;
 background:var(--purple);
 border:none;
 border-radius:10px;
 cursor:pointer;
 transition:background .18s var(--e);
}
button.submit:hover{background:var(--purple-d)}
button.submit:disabled{opacity:.6;cursor:default}

/* Password field with a show/hide toggle. The toggle is revealed by JS only
   once the field has content, so an empty form stays uncluttered. */
.pw-wrap{position:relative}
.pw-wrap input{padding-right:40px}
.password-toggle{
 position:absolute;
 right:8px;
 top:50%;
 transform:translateY(-50%);
 background:none;
 border:none;
 cursor:pointer;
 font-size:16px;
 line-height:1;
 padding:4px;
 display:none;
}

.pw-help{
 margin:0 0 16px;
 font-size:12.5px;
 line-height:1.5;
 color:var(--muted);
}
.pw-help.is-error{color:var(--red-tx)}
.pw-help.is-ok{color:var(--green-tx)}

/* Message panel — used by the expired-link page. */
.auth-panel{
 margin-bottom:20px;
 padding:14px 16px;
 border:1px solid var(--border);
 background:var(--purple-xl);
 border-radius:12px;
 font-size:13px;
 line-height:1.55;
}
.auth-panel-title{
 font-weight:700;
 font-size:15px;
 color:var(--ink);
 margin-bottom:8px;
}
.auth-panel p{margin:0 0 8px}
.auth-panel p:last-child{margin-bottom:0}

/* Anchor styled as the primary button. */
.submit.as-link{
 display:block;
 text-align:center;
 text-decoration:none;
 line-height:normal;
}

p.alt{
 margin:18px 0 0;
 text-align:center;
 color:var(--muted);
 font-size:13px;
}
p.alt a{color:var(--purple);font-weight:600;text-decoration:none}
p.alt a:hover{text-decoration:underline}

/* What Sunethix is, under the logo: one line for someone who arrived from a
   link and has never heard of it. */
.auth-card p.tagline{
 margin:-6px 0 6px;
 text-align:center;
 color:var(--purple-d,#6425D0);
 font-size:13px;
 font-weight:500;
}

/* The password with its Show/Hide toggle inside the box. */
.pwwrap{position:relative}
.pwwrap input{padding-right:64px}
.pwshow{
 position:absolute;right:6px;top:50%;transform:translateY(-50%);
 border:none;background:transparent;color:var(--purple);
 font:600 12.5px/1 inherit;font-family:inherit;padding:8px 8px;border-radius:8px;cursor:pointer;
}
.pwshow:hover{background:var(--purple-l,#EFE7FD)}
.pwshow:focus-visible{outline:2px solid var(--purple);outline-offset:1px}

/* Where to get help, quietly, at the foot of the card. */
p.help{margin:14px 0 0;text-align:center;font-size:12.5px;color:var(--muted)}
p.help a{color:var(--purple);text-decoration:none}
p.help a:hover{text-decoration:underline}

/* The privacy policy and terms of service: the same card, wide enough to
   read, with the legal links at the foot of every auth page. */
p.legal{margin:10px 0 0;text-align:center;font-size:12px;color:var(--muted)}
p.legal a{color:var(--muted);text-decoration:none}
p.legal a:hover{color:var(--purple);text-decoration:underline}
.auth-wrap.doc{align-items:flex-start}
.auth-card.doc{max-width:760px;padding:36px 40px}
.auth-card.doc .auth-brand{align-items:flex-start}
.auth-card.doc .auth-logo{width:170px}
.auth-card.doc h1{font-size:24px;margin:6px 0 4px}
.auth-card.doc h2{font-size:16px;margin:26px 0 6px}
.auth-card.doc p,.auth-card.doc li{font-size:14px}
.auth-card.doc ul{padding-left:20px;margin:6px 0}
.auth-card.doc li{margin:3px 0}
.auth-card.doc .updated{color:var(--muted);font-size:12.5px;margin:0 0 14px}
.auth-card.doc a{color:var(--purple)}
.auth-card.doc .back{display:inline-block;margin-top:26px;font-weight:600;text-decoration:none}
.auth-card.doc .back:hover{text-decoration:underline}
@media (max-width:520px){.auth-card.doc{padding:24px 18px}}
