:root{--auth-primary:#5148e8;--auth-ink:#182033;--auth-muted:#68738a;--auth-line:#e5e9f2;--auth-bg:#f4f6fb;--auth-danger:#b42318}
*{box-sizing:border-box}.auth-body{margin:0;background:radial-gradient(circle at 15% 10%,#e9e7ff 0,transparent 32%),radial-gradient(circle at 85% 85%,#dff4ff 0,transparent 34%),var(--auth-bg);color:var(--auth-ink)}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:76px 20px 34px;font-family:Tahoma,"Segoe UI",sans-serif}
.auth-card{width:min(620px,100%);background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.85);border-radius:28px;padding:26px 30px 22px;box-shadow:0 28px 80px rgba(43,53,86,.16);backdrop-filter:blur(12px)}
.auth-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:18px;border-bottom:1px solid var(--auth-line);font-size:12px;color:var(--auth-muted)}.auth-nav a{color:#4640bb;text-decoration:none;font-weight:800}.auth-nav a:hover{text-decoration:underline}
.auth-brand{display:flex;align-items:center;gap:12px;margin:22px 0 14px}.auth-brand>span{display:grid;place-items:center;width:46px;height:46px;border-radius:16px;color:#fff;background:linear-gradient(145deg,#625af2,#3931b8);font-size:23px;font-weight:900;box-shadow:0 10px 25px rgba(81,72,232,.28)}.auth-brand div{display:grid;gap:4px}.auth-brand strong{font-size:15px}.auth-brand small{color:var(--auth-muted);font-size:11px}
.auth-progress{display:flex;gap:7px;margin:4px 0 22px}.auth-progress i{height:5px;flex:1;border-radius:20px;background:#e9ebf3}.auth-progress i.active{background:linear-gradient(90deg,#5148e8,#817af6)}
.auth-heading{margin-bottom:20px}.auth-step{display:inline-flex;padding:5px 10px;border-radius:20px;background:#efefff;color:#4d45c9;font-weight:900;font-size:10px}.auth-heading h1{margin:10px 0 8px;font-size:27px;letter-spacing:-.6px}.auth-heading p{margin:0;color:var(--auth-muted);font-size:13px;line-height:1.9}.auth-heading p b{color:#343c52}
.auth-form{display:grid;gap:15px}.auth-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.auth-field{display:grid;gap:8px;color:#364057;font-weight:800;font-size:12px}.auth-field input,.auth-field select,.captcha-row input{width:100%;height:50px;border:1px solid #dce1eb;border-radius:14px;background:#fbfcff;padding:0 14px;font:inherit;color:#20293b;outline:none;transition:.18s}.auth-field input:focus,.auth-field select:focus,.captcha-row input:focus{border-color:#7069ea;background:#fff;box-shadow:0 0 0 4px rgba(81,72,232,.1)}.auth-field select{cursor:pointer}
.captcha-panel{padding:13px;border:1px solid var(--auth-line);border-radius:17px;background:#f9faff}.captcha-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:12px;font-weight:900}.captcha-title button{border:0;background:transparent;color:#5048cc;font:inherit;cursor:pointer}.captcha-row{display:grid;grid-template-columns:240px 1fr;gap:11px;align-items:center}.captcha-row img{display:block;width:240px;height:78px;border-radius:14px;cursor:pointer}.captcha-row input{height:58px;text-align:center;letter-spacing:3px;text-transform:uppercase}
.auth-submit{height:53px;border:0;border-radius:15px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#5c54eb,#4038c6);color:#fff;font:inherit;font-weight:900;cursor:pointer;box-shadow:0 13px 28px rgba(81,72,232,.24);transition:.18s}.auth-submit:hover{transform:translateY(-1px);box-shadow:0 16px 32px rgba(81,72,232,.3)}.auth-submit:disabled{opacity:.55;cursor:not-allowed;transform:none}.auth-submit b{font-size:21px}
.auth-alert{display:grid;gap:5px;padding:13px 15px;border-radius:14px;margin-bottom:16px;font-size:12px;line-height:1.8}.auth-alert-error{border:1px solid #f6c7c2;background:#fff3f2;color:var(--auth-danger)}.auth-alert b{font-size:13px}
.auth-details{margin-top:16px;border:1px solid var(--auth-line);border-radius:14px;background:#fafbfe;padding:11px 13px;color:#5f6a7f;font-size:11px;line-height:1.9}.auth-details summary{cursor:pointer;font-weight:900;color:#3f4960}.auth-details div{padding:3px 0;border-bottom:1px dashed #e4e7ef}.auth-details div:last-child{border:0}
.auth-footer{display:flex;justify-content:space-between;gap:16px;margin-top:20px;padding-top:16px;border-top:1px solid var(--auth-line);font-size:11px;color:#7a8395}.auth-footer a{color:#4c45c3;text-decoration:none;font-weight:800}
.password-wrap{display:grid;grid-template-columns:1fr auto;border:1px solid #dce1eb;border-radius:14px;overflow:hidden;background:#fbfcff}.password-wrap:focus-within{border-color:#7069ea;box-shadow:0 0 0 4px rgba(81,72,232,.1)}.password-wrap input{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}.password-wrap button{border:0;border-right:1px solid #e3e6ef;background:#f3f4fb;color:#4c45c3;padding:0 14px;font:inherit;font-weight:900;cursor:pointer}.password-rule{padding:10px 12px;border-radius:12px;background:#f5f7fb;color:#667188;font-size:11px}
@media(max-width:650px){.auth-page{padding:70px 10px 18px}.auth-card{border-radius:22px;padding:20px 16px}.auth-field-grid,.captcha-row{grid-template-columns:1fr}.captcha-row img{width:100%;max-width:240px;margin:auto}.auth-footer{flex-direction:column}.auth-heading h1{font-size:23px}}

/* V24: compact, readable, viewport-fitted login experience. */
.auth-body{height:100svh;min-height:560px;overflow:hidden;background:radial-gradient(circle at 12% 12%,rgba(210,169,76,.19),transparent 29%),radial-gradient(circle at 88% 88%,rgba(8,122,89,.15),transparent 31%),#eef1ed}
.auth-page{height:100svh;min-height:560px;padding:10px 16px;overflow:hidden;font-family:'Vazirmatn',Tahoma,'Segoe UI',sans-serif}
.auth-card{width:min(690px,100%);max-height:calc(100svh - 20px);padding:17px 24px 15px;border-radius:24px;overflow:auto;scrollbar-width:thin;box-shadow:0 22px 65px rgba(7,31,58,.15)}
.auth-nav{padding-bottom:10px;font-size:11px}.auth-brand{margin:12px 0 9px}.auth-brand>span{width:40px;height:40px;border-radius:13px;background:linear-gradient(145deg,#087a59,#055d45);box-shadow:0 8px 20px rgba(8,122,89,.22)}.auth-brand strong{font-size:14px}.auth-brand small{font-size:10px}.auth-progress{margin:3px 0 11px}.auth-heading{margin-bottom:11px}.auth-heading h1{margin:7px 0 5px;font-size:24px;line-height:1.5}.auth-heading p{font-size:11px;line-height:1.75}.auth-step{padding:4px 9px;background:rgba(8,122,89,.1);color:#087a59}
.auth-form{gap:10px}.auth-field-grid{gap:10px}.auth-field{gap:5px;font-size:11px}.auth-field input,.auth-field select,.captcha-row input{height:44px;border-radius:12px;font-size:13px}.auth-field input[inputmode="numeric"],.captcha-row input{direction:ltr;text-align:center;font-size:15px;font-weight:850;letter-spacing:.8px;font-variant-numeric:tabular-nums;color:#071f3a}.auth-field input::placeholder,.captcha-row input::placeholder{font-size:11px;font-weight:600;letter-spacing:0;color:#929bad}.auth-field input:focus,.auth-field select:focus,.captcha-row input:focus{border-color:#087a59;box-shadow:0 0 0 4px rgba(8,122,89,.1)}
.captcha-panel{padding:9px 10px;border-radius:14px}.captcha-title{margin-bottom:7px;font-size:11px}.captcha-title button{color:#087a59}.captcha-row{grid-template-columns:190px minmax(0,1fr);gap:9px}.captcha-row img{width:190px;height:58px;border-radius:11px}.captcha-row input{height:50px}.auth-submit{height:47px;border-radius:13px;background:linear-gradient(135deg,#087a59,#055d45);box-shadow:0 10px 24px rgba(8,122,89,.22);font-size:12px}.auth-submit:hover{box-shadow:0 13px 27px rgba(8,122,89,.28)}.auth-alert{margin-bottom:10px;padding:9px 12px;font-size:11px}.auth-details{margin-top:9px;padding:8px 11px;font-size:10px}.auth-footer{margin-top:10px;padding-top:9px;font-size:10px}.password-wrap{border-radius:12px}.password-rule{padding:8px 10px;font-size:10px}
.auth-student-entry .auth-card{border-top:4px solid #087a59}.auth-staff-entry .auth-card{border-top:4px solid #d2a94c}
@media(max-height:700px) and (min-width:651px){.auth-card{padding-top:12px;padding-bottom:11px}.auth-brand{margin:8px 0 6px}.auth-heading{margin-bottom:8px}.auth-heading p{line-height:1.55}.auth-form{gap:8px}.captcha-panel{padding:7px 9px}.auth-footer{margin-top:7px;padding-top:7px}}
@media(max-width:650px){.auth-body{min-height:520px}.auth-page{min-height:520px;padding:7px 8px}.auth-card{max-height:calc(100svh - 14px);padding:14px;border-radius:19px}.auth-field-grid{grid-template-columns:1fr 1fr}.captcha-row{grid-template-columns:minmax(135px,1fr) minmax(105px,.72fr)}.captcha-row img{width:100%;height:52px;margin:0}.captcha-row input{height:48px}.auth-footer{flex-direction:row}.auth-heading h1{font-size:21px}}
@media(max-width:390px){.auth-card{padding:12px}.auth-heading p{font-size:10px}.auth-field-grid{gap:7px}.auth-field input,.auth-field select{padding-inline:8px}.auth-footer span{display:none}}

.password-keyboard-warning{
    margin-top:7px;
    padding:8px 10px;
    border-radius:9px;
    background:#fff4e8;
    border:1px solid #efc28e;
    color:#8a4b10;
    font-size:12px;
    font-weight:800;
    line-height:1.7;
}
