:root{--am-primary:#2563eb;--am-secondary:#7c3aed;--am-ink:#0f172a;--am-muted:#64748b;--am-border:#e2e8f0;--am-bg:#f8fafc;--am-ok:#16a34a;--am-danger:#dc2626;}
.auth-mobile-shell{direction:rtl;max-width:560px;margin:34px auto 44px;padding:0 14px;font-family:inherit;color:var(--am-ink)}
.auth-mobile-card{position:relative;background:rgba(255,255,255,.96);border:1px solid rgba(226,232,240,.9);border-radius:26px;box-shadow:0 22px 60px rgba(15,23,42,.11);overflow:hidden}.auth-mobile-card:before{content:"";position:absolute;inset:0 0 auto 0;height:6px;background:linear-gradient(90deg,var(--am-secondary),var(--am-primary));}.auth-mobile-body{padding:34px 36px 26px}.auth-mobile-title{font-size:28px;font-weight:900;margin:0 0 12px;text-align:center;color:var(--am-ink)}.auth-mobile-subtitle{font-size:15px;line-height:1.9;color:var(--am-muted);text-align:center;margin:0 0 24px}.auth-mobile-icon{width:72px;height:72px;margin:0 auto 18px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eff6ff,#f5f3ff);box-shadow:inset 0 0 0 1px #dbeafe;color:var(--am-primary)}.auth-mobile-icon svg{width:38px;height:38px}.auth-mobile-field{margin-bottom:18px}.auth-mobile-label{font-weight:800;margin-bottom:8px;color:#111827}.auth-mobile-input,.auth-mobile-card input[type=text],.auth-mobile-card input[type=password],.auth-mobile-card input[type=email]{width:100%;height:52px;border:1px solid #dbe3ef;border-radius:15px;padding:0 16px;background:#fff;color:#0f172a;box-shadow:none;transition:.18s ease;text-align:right}.auth-mobile-input:focus,.auth-mobile-card input:focus{outline:0;border-color:#60a5fa;box-shadow:0 0 0 4px rgba(37,99,235,.12)}.auth-mobile-btn{width:100%;min-height:54px;border:0;border-radius:15px;font-weight:900;font-size:16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;cursor:pointer;transition:.18s ease}.auth-mobile-btn-primary{color:#fff;background:linear-gradient(90deg,var(--am-primary),var(--am-secondary));box-shadow:0 12px 24px rgba(37,99,235,.22)}.auth-mobile-btn-primary:hover{transform:translateY(-1px);filter:saturate(1.08)}.auth-mobile-btn-light{background:#fff;border:1px solid #dbe3ef;color:#334155}.auth-mobile-btn[disabled]{opacity:.65;cursor:not-allowed;transform:none}.auth-mobile-alert{border-radius:15px;padding:13px 15px;margin:14px 0;line-height:1.8;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a}.auth-mobile-alert.error{border-color:#fecaca;background:#fef2f2;color:#991b1b}.auth-mobile-alert.ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.auth-mobile-code-row{direction:ltr;display:flex;gap:10px;justify-content:center;margin:16px 0}.auth-mobile-code-input{font-size:28px;font-weight:900;letter-spacing:10px;text-align:center!important;direction:ltr}.auth-mobile-timer{display:flex;align-items:center;gap:13px;margin:16px 0;padding:14px;border:1px solid #ddd6fe;border-radius:18px;background:linear-gradient(135deg,#fff,#f5f3ff)}.auth-mobile-ring{width:46px;height:46px;border-radius:50%;background:conic-gradient(var(--am-primary) var(--p,100%),#dbeafe 0);display:grid;place-items:center;flex:0 0 auto}.auth-mobile-ring:after{content:"";width:34px;height:34px;border-radius:50%;background:white}.auth-mobile-timer strong{display:block;color:#1e293b}.auth-mobile-timer small{color:#64748b}.auth-mobile-note{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:14px 16px;color:#475569;line-height:1.9;margin-top:16px}.auth-mobile-footer{border-top:1px solid #eef2f7;text-align:center;color:#94a3b8;font-size:12px;padding:16px}.auth-mobile-sep{display:flex;align-items:center;gap:12px;margin:18px 0;color:#94a3b8}.auth-mobile-sep:before,.auth-mobile-sep:after{content:"";height:1px;background:#e2e8f0;flex:1}.auth-mobile-loading:before{content:"";width:18px;height:18px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:amspin .8s linear infinite}@keyframes amspin{to{transform:rotate(360deg)}}
/* Moodle signup/forgot form polish */
body.path-login .mform,body#page-auth-mobile-forgot_password .mform{max-width:560px;margin:24px auto;background:#fff;border:1px solid #e2e8f0;border-radius:26px;padding:30px 34px;box-shadow:0 22px 60px rgba(15,23,42,.10);direction:rtl}body.path-login .mform fieldset,body#page-auth-mobile-forgot_password .mform fieldset{border:0}body.path-login .mform .fitem,body#page-auth-mobile-forgot_password .mform .fitem{margin-bottom:16px}body.path-login .mform .col-form-label,body#page-auth-mobile-forgot_password .mform .col-form-label{font-weight:800;color:#111827;text-align:right}body.path-login .mform input[type=text],body.path-login .mform input[type=password],body.path-login .mform input[type=email],body#page-auth-mobile-forgot_password .mform input[type=text],body#page-auth-mobile-forgot_password .mform input[type=password]{height:52px;border:1px solid #dbe3ef;border-radius:15px;padding:0 16px;text-align:right}body.path-login .mform #id_code,body#page-auth-mobile-forgot_password .mform #id_code{height:48px;border:0;border-radius:14px;background:#eef2ff;color:#1d4ed8;font-weight:900;padding:0 18px}body.path-login .mform #id_submitbutton,body#page-auth-mobile-forgot_password .mform #id_submitbutton{min-height:52px;border:0;border-radius:15px;background:linear-gradient(90deg,var(--am-primary),var(--am-secondary));font-weight:900;color:#fff;padding:0 28px}#auth-mobile-inline-status{max-width:560px;margin:12px auto;padding:13px 16px;border-radius:15px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;direction:rtl;text-align:right}.auth-mobile-form-loading{opacity:.75;pointer-events:none}.auth-mobile-form-loading #id_code:before{content:""}
@media(max-width:640px){.auth-mobile-shell{margin:18px auto}.auth-mobile-body{padding:26px 20px}.auth-mobile-title{font-size:23px}body.path-login .mform,body#page-auth-mobile-forgot_password .mform{margin:16px 12px;padding:24px 18px}}


/* v2.0.9 refined authentication pages */
body#page-auth-mobile-otp_login .auth-mobile-shell,
body#page-auth-mobile-forgot_password .auth-mobile-shell{max-width:590px}
.auth-mobile-card{border-radius:30px;box-shadow:0 28px 70px rgba(15,23,42,.12)}
.auth-mobile-alert.error{font-weight:800;text-align:center}
.auth-mobile-alert.ok{font-weight:800;text-align:center}
.auth-mobile-form button.auth-mobile-loading:before,
#id_code.auth-mobile-loading:before{content:"";width:18px;height:18px;border:2px solid rgba(255,255,255,.55);border-top-color:#fff;border-radius:50%;animation:amspin .75s linear infinite;display:inline-block;margin-left:8px;vertical-align:middle}
.auth-mobile-btn-light.auth-mobile-loading:before,#id_code.auth-mobile-loading:before{border-color:rgba(37,99,235,.2);border-top-color:#2563eb}
body.path-login#page-login-signup .mform{max-width:620px;margin:28px auto 44px;background:#fff;border:1px solid #e2e8f0;border-radius:30px;padding:34px 38px;box-shadow:0 28px 70px rgba(15,23,42,.12);direction:rtl;overflow:hidden;position:relative}
body.path-login#page-login-signup .mform:before,body#page-auth-mobile-forgot_password .auth-mobile-card:before{height:6px;background:linear-gradient(90deg,var(--am-secondary),var(--am-primary))}
.auth-mobile-signup-head{text-align:center;margin-bottom:10px}.auth-mobile-signup-head .auth-mobile-icon{margin-bottom:14px}
body.path-login#page-login-signup .mform legend,body#page-auth-mobile-forgot_password .mform legend{display:none}
body.path-login#page-login-signup .mform .fdescription,body#page-auth-mobile-forgot_password .mform .fdescription{display:none}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform{box-shadow:none;border:0;margin:0;padding:0;max-width:none;background:transparent;border-radius:0}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform fieldset{border:0;padding:0;margin:0}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform .fitem{margin-bottom:16px}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform #id_username,
body#page-auth-mobile-forgot_password .auth-mobile-card .mform #id_tempcode,
body#page-auth-mobile-forgot_password .auth-mobile-card .mform #id_password,
body.path-login#page-login-signup .mform input[type=text],
body.path-login#page-login-signup .mform input[type=password],
body.path-login#page-login-signup .mform input[type=email]{height:54px;border-radius:16px;border:1px solid #dbe3ef;box-shadow:none;text-align:right;background:#fff;padding:0 16px}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform #id_code,
body.path-login#page-login-signup .mform #id_code{height:52px;border-radius:16px;border:1px solid #dbe3ef;background:#fff;color:#334155;font-weight:900;width:100%}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform #id_submitbutton,
body.path-login#page-login-signup .mform #id_submitbutton{width:100%;min-height:54px;border-radius:16px;background:linear-gradient(90deg,var(--am-primary),var(--am-secondary));color:#fff;font-weight:900;border:0;box-shadow:0 12px 24px rgba(37,99,235,.22)}
body#page-auth-mobile-forgot_password .auth-mobile-card .mform .col-form-label,
body.path-login#page-login-signup .mform .col-form-label{font-weight:900;color:#111827;text-align:right}
body#page-auth-mobile-forgot_password .auth-mobile-card #auth-mobile-inline-status{margin:0 0 16px;max-width:none}
#auth-mobile-inline-status.error,#auth-mobile-inline-status.auth-mobile-alert.error{background:#fef2f2;border-color:#fecaca;color:#991b1b;font-weight:800;text-align:center}
#auth-mobile-inline-status.ok,#auth-mobile-inline-status.auth-mobile-alert.ok{background:#f0fdf4;border-color:#bbf7d0;color:#166534;font-weight:800;text-align:center}
@media(max-width:640px){body.path-login#page-login-signup .mform{margin:16px 12px;padding:26px 18px;border-radius:24px}}
.auth-mobile-hidden{display:none!important}


/* v2.0.15 advanced OTP UX */
.auth-mobile-code-boxes{direction:ltr;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:14px 0 10px}
.auth-mobile-code-boxes[data-length="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}
.auth-mobile-code-boxes[data-length="5"]{grid-template-columns:repeat(5,minmax(0,1fr))}
.auth-mobile-code-boxes[data-length="7"]{grid-template-columns:repeat(7,minmax(0,1fr))}
.auth-mobile-code-boxes[data-length="8"]{grid-template-columns:repeat(8,minmax(0,1fr))}
.auth-mobile-code-box{height:58px;border:1px solid #dbe3ef;border-radius:17px;background:linear-gradient(180deg,#fff,#f8fafc);text-align:center!important;font-size:28px;font-weight:900;color:#0f172a;box-shadow:0 8px 18px rgba(15,23,42,.05);transition:.18s ease;direction:ltr}
.auth-mobile-code-box:focus{outline:0;border-color:#60a5fa;box-shadow:0 0 0 4px rgba(37,99,235,.12),0 10px 22px rgba(15,23,42,.08);transform:translateY(-1px)}
.auth-mobile-hidden-code{position:absolute!important;opacity:.01!important;width:1px!important;height:1px!important;pointer-events:none!important;left:-9999px!important}
.auth-mobile-form .auth-mobile-field + .auth-mobile-timer{margin-top:8px}.auth-mobile-timer{position:relative;overflow:hidden}.auth-mobile-timer:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:linear-gradient(180deg,var(--am-primary),var(--am-secondary))}.auth-mobile-timer strong{font-weight:900}.auth-mobile-btn-light:not([disabled]):hover{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.auth-mobile-sep{font-weight:900}.auth-mobile-note{font-size:13px;text-align:center}.auth-mobile-card input:-webkit-autofill{box-shadow:0 0 0 1000px #fff inset!important}
body.path-login#page-login-signup .mform,body#page-auth-mobile-forgot_password .auth-mobile-card{background:radial-gradient(circle at top right,rgba(37,99,235,.08),transparent 32%),radial-gradient(circle at bottom left,rgba(124,58,237,.08),transparent 30%),#fff}
body.path-login#page-login-signup .mform .fitem,body#page-auth-mobile-forgot_password .auth-mobile-card .mform .fitem{border:1px solid #eef2f7;background:rgba(255,255,255,.74);border-radius:18px;padding:12px 14px;margin-bottom:13px}
body.path-login#page-login-signup .mform .fitem_fsubmit,body#page-auth-mobile-forgot_password .auth-mobile-card .mform .fitem_fsubmit{border:0;background:transparent;padding:0;margin-top:18px}.auth-mobile-form-loading{position:relative}.auth-mobile-form-loading:after{content:"";position:absolute;inset:0;border-radius:24px;background:rgba(255,255,255,.42);backdrop-filter:blur(1px);pointer-events:none}
@media(max-width:640px){.auth-mobile-code-boxes{gap:7px}.auth-mobile-code-box{height:50px;border-radius:14px;font-size:23px}.auth-mobile-code-boxes[data-length="7"],.auth-mobile-code-boxes[data-length="8"]{gap:5px}.auth-mobile-code-boxes[data-length="7"] .auth-mobile-code-box,.auth-mobile-code-boxes[data-length="8"] .auth-mobile-code-box{height:46px;font-size:20px}}
