:root{color-scheme:dark;--sil-auth-red:#d62845;--sil-auth-red-hi:#ed3653;--sil-auth-bg:#000;--sil-auth-panel:#080808;--sil-auth-field:#030303;--sil-auth-line:rgba(255,255,255,.14);--sil-auth-muted:#999;--sil-auth-text:#fff}
*{box-sizing:border-box}
html.auth-page,html.auth-page body{min-height:100%;margin:0;background:var(--sil-auth-bg);color:var(--sil-auth-text);font-family:Cairo,Arial,sans-serif;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.auth-page{overflow-x:hidden}
html.auth-current-session-redirect{visibility:hidden}
.auth-page [hidden]{display:none!important}
.auth-page a{color:inherit;text-decoration:none}
.auth-page button,.auth-page input,.auth-page textarea,.auth-page select{font:inherit}
.auth-page button{touch-action:manipulation}
.auth-page input,.auth-page textarea,.auth-page select{font-size:16px!important;touch-action:auto;-webkit-user-select:text;user-select:text}

body.auth-login-body,body.auth-reset-body,body.auth-register-body{min-height:100dvh;padding:max(12px,env(safe-area-inset-top)) 12px max(18px,env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle at 88% 4%,rgba(214,40,69,.13),transparent 30%),radial-gradient(circle at 9% 94%,rgba(214,40,69,.07),transparent 34%),#000}
.auth-login-body,.auth-register-body{display:flex;align-items:center;justify-content:center}
.auth-shell,.reset-shell{width:min(100%,460px);margin:0 auto;padding:12px 0}
.auth-brand,.reset-brand{text-align:center;margin-bottom:13px}
.auth-brand img,.reset-brand img{width:clamp(76px,12dvh,100px);height:clamp(76px,12dvh,100px);padding:5px;object-fit:contain;border:1px solid rgba(214,40,69,.28);border-radius:27px;background:#050505;box-shadow:0 18px 52px rgba(0,0,0,.62)}
.auth-brand h1,.reset-brand h1{margin:7px 0 1px;color:#fff;font-size:23px;font-weight:900}
.auth-brand p,.reset-brand p{margin:0;color:#999;font-size:10px;font-weight:600}
.auth-card,.reset-card{position:relative;padding:20px;border:1px solid rgba(214,40,69,.26);border-radius:24px;background:#080808;box-shadow:0 24px 72px rgba(0,0,0,.62)}
.auth-card::before,.reset-card::before{content:'';position:absolute;top:0;right:14%;left:14%;height:1px;background:linear-gradient(90deg,transparent,var(--sil-auth-red),transparent);opacity:.72;pointer-events:none}
.login-card-kicker,.reset-kicker{width:max-content;min-height:30px;margin:0 0 7px;padding:5px 9px;border:1px solid rgba(214,40,69,.3);border-radius:999px;display:inline-flex;align-items:center;gap:6px;color:#fff;background:#0b0809;font-size:9px;font-weight:800}
.login-card-kicker i,.reset-kicker i{color:var(--sil-auth-red)}
.auth-title,.reset-title{margin:0 0 4px;color:#fff;font-size:21px;font-weight:900}
.auth-subtitle,.reset-subtitle{margin:0 0 15px;color:#aaa;font-size:10.5px;font-weight:500;line-height:1.8}
.auth-page .notice{margin:0 0 13px;padding:11px 12px;border:1px solid var(--sil-auth-line);border-radius:13px;color:#eee;background:#0a0a0a;font-size:10px;font-weight:700;line-height:1.75}
.auth-page .notice.error{border-color:rgba(214,40,69,.48);background:#100608}
.auth-page .notice.success{border-color:rgba(37,190,99,.4);background:#061008}
.auth-page .notice.info{border-color:rgba(255,255,255,.14);background:#090909}
.auth-page .field{min-width:0;display:grid;gap:6px;margin:11px 0}
.auth-page .field>span:first-child{color:#ddd;font-size:10px;font-weight:800}
.auth-page .field input,.auth-page .field textarea,.auth-page .field select{width:100%;height:49px;padding:0 13px;border:1px solid var(--sil-auth-line);border-radius:14px;color:#fff;background:var(--sil-auth-field);caret-color:var(--sil-auth-red);outline:0}
.auth-page .field input::placeholder,.auth-page .field textarea::placeholder{color:#696969}
.auth-page .field input:focus,.auth-page .field textarea:focus,.auth-page .field select:focus{border-color:rgba(214,40,69,.78);box-shadow:0 0 0 3px rgba(214,40,69,.11)}
.auth-page .password-wrap{position:relative;display:block;direction:ltr}
.auth-page .password-wrap input{padding-left:48px}
.auth-page .password-toggle{position:absolute;z-index:1;left:4px;top:4px;width:41px;height:41px;border:0;border-radius:11px;display:grid;place-items:center;color:#aaa;background:transparent;cursor:pointer}
.auth-page .password-toggle:focus-visible{outline:2px solid rgba(214,40,69,.46);color:#fff}
.primary-btn,.submit-button,.login-button{width:100%;min-height:49px;border:1px solid rgba(255,255,255,.12);border-radius:14px;display:flex;align-items:center;justify-content:center;gap:8px;color:#fff;background:linear-gradient(180deg,var(--sil-auth-red-hi),var(--sil-auth-red));font-weight:900;cursor:pointer;box-shadow:0 12px 30px rgba(214,40,69,.17)}
.primary-btn:disabled,.submit-button:disabled{opacity:.62;cursor:wait}
.primary-btn:focus-visible,.submit-button:focus-visible,.login-button:focus-visible{outline:3px solid rgba(214,40,69,.18)}
.secondary-btn{width:100%;min-height:46px;border:1px solid var(--sil-auth-line);border-radius:14px;color:#eee;background:#0b0b0b;font-weight:800;cursor:pointer}
.auth-links{margin-top:13px;display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.auth-links a{min-height:40px;padding:0 13px;border:1px solid var(--sil-auth-line);border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;color:#eee;background:#090909;font-size:10px;font-weight:700}
.auth-links a i{color:var(--sil-auth-red)}
.pair-device-toggle{width:100%;margin:0 0 10px;padding:9px 10px;border:1px dashed rgba(214,40,69,.4);border-radius:12px;color:#ddd;background:#080808;font-size:10px;font-weight:800;cursor:pointer}
.pair-code-field{margin-top:1px!important;padding:10px;border:1px solid rgba(214,40,69,.23);border-radius:13px;background:#050505}
.pair-code-field small{display:block;margin-top:4px;color:#999;font-size:8.5px;line-height:1.7}
.device-activation-panel{margin:0 0 12px;padding:12px;border:1px solid rgba(214,40,69,.4);border-radius:14px;display:grid;gap:7px;background:#0c0708}
.device-activation-panel strong{display:flex;align-items:center;gap:7px;color:#fff;font-size:11px}.device-activation-panel strong i{color:var(--sil-auth-red)}
.device-activation-panel p{margin:0;color:#c4c4c4;font-size:9.5px;line-height:1.75}.device-activation-panel small{color:#8f8f8f;font-size:8.5px;line-height:1.7}
.android-app-download{margin:0 0 12px;min-height:43px;padding:6px 9px;border:1px solid rgba(214,40,69,.32);border-radius:12px;display:grid;grid-template-columns:31px minmax(0,1fr) auto;align-items:center;gap:8px;color:#f4f4f4;background:#080808}
.android-app-download>i{width:31px;height:31px;border-radius:9px;display:grid;place-items:center;color:#fff;background:var(--sil-auth-red);font-size:15px}.android-app-download span{min-width:0;display:grid;gap:1px}.android-app-download strong{font-size:9.5px}.android-app-download small{color:#999;font-size:7.8px}.android-app-download>b{padding:3px 6px;border:1px solid var(--sil-auth-line);border-radius:7px;color:#ccc;background:#0c0c0c;font-size:7.5px;direction:ltr}
#webauthn-panel{display:grid;gap:9px}#webauthn-panel strong{font-size:14px}#webauthn-message{color:#bbb;font-size:10px;line-height:1.8}

.reset-shell{width:min(100%,470px)}
.reset-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}.reset-kicker{margin:0}
.back-button{width:36px;height:36px;border:1px solid var(--sil-auth-line);border-radius:11px;display:grid;place-items:center;color:#fff;background:#090909}
.reset-form{display:grid;gap:9px}.reset-form .field{margin:0}.identity{direction:ltr;text-align:right;font-variant-numeric:tabular-nums}
.password-guide{margin:0;padding:9px 10px;border:1px solid rgba(255,255,255,.08);border-radius:12px;display:flex;align-items:center;gap:7px;color:#8f8f8f;background:#060606;font-size:8.5px;line-height:1.65}.password-guide i{color:var(--sil-auth-red)}
.support-request-button{width:100%;min-height:46px;margin-top:11px;border:1px solid rgba(214,40,69,.4);border-radius:14px;display:flex;align-items:center;justify-content:center;gap:8px;color:#fff;background:#080808;font-size:10px;font-weight:900;cursor:pointer}.support-request-button i{color:var(--sil-auth-red)}
.security-note{margin:14px 0 0;padding-top:12px;border-top:1px solid rgba(255,255,255,.08);display:flex;align-items:flex-start;gap:8px;color:#8f8f8f;font-size:8.8px;font-weight:600;line-height:1.8}.security-note i{margin-top:4px;color:var(--sil-auth-red)}
.success-actions{display:grid;gap:10px}.success-caption{margin:0;color:#999;text-align:center;font-size:9px;line-height:1.7}
.recovery-sheet{position:fixed;inset:0;z-index:80;display:grid;align-items:end;background:rgba(0,0,0,.82)}
.recovery-panel{width:min(100%,520px);max-height:min(88dvh,760px);margin:0 auto;padding:0 max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));border:1px solid rgba(214,40,69,.38);border-bottom:0;border-radius:24px 24px 0 0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;background:#070707;box-shadow:0 -24px 80px rgba(0,0,0,.76)}
.recovery-sheet-head{min-height:61px;padding:9px 2px;display:flex;align-items:center;gap:10px;border-bottom:1px solid rgba(255,255,255,.09)}.recovery-sheet-head>div{min-width:0;flex:1}.recovery-sheet-head strong{display:block;font-size:15px}.recovery-sheet-head small{display:block;margin-top:2px;color:#999;font-size:9px}.recovery-sheet-close{width:40px;height:40px;border:1px solid var(--sil-auth-line);border-radius:13px;display:grid;place-items:center;color:#fff;background:#0e0e0e;font-size:18px;cursor:pointer}
.recovery-view{min-height:0;overflow:auto;padding:14px 2px 5px;scrollbar-width:none}.recovery-view::-webkit-scrollbar,.recovery-chat-messages::-webkit-scrollbar{display:none}.recovery-intro{margin:0 0 12px;padding:10px 11px;border:1px solid rgba(214,40,69,.24);border-radius:13px;color:#aaa;background:#0b0809;font-size:9px;line-height:1.75}.recovery-mini-form{display:grid;gap:10px}.recovery-mini-form .field{margin:0}.recovery-mini-form textarea{width:100%;min-height:86px;resize:none;padding:11px 13px;border:1px solid var(--sil-auth-line);border-radius:14px;color:#fff;background:#030303;font-size:12px;outline:0}
.recovery-chat-view{min-height:0;display:grid;grid-template-rows:auto minmax(130px,1fr) auto auto;overflow:hidden}.recovery-request-meta{padding:10px 2px;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;gap:8px}.recovery-request-meta>div{min-width:0;flex:1}.recovery-request-meta strong{display:block;font-size:12px}.recovery-request-meta small{display:block;margin-top:2px;color:#919191;font-size:8.5px}.recovery-reference{padding:4px 8px;border:1px solid rgba(214,40,69,.36);border-radius:999px;color:#ff95a8;background:#17080d;font-size:8px;font-weight:900;direction:ltr}
.recovery-chat-messages{min-height:0;overflow:auto;padding:10px 0}.recovery-msg{display:flex;margin:5px 0}.recovery-msg.requester{justify-content:flex-start}.recovery-msg.support{justify-content:flex-end}.recovery-msg.system{justify-content:center}.recovery-bubble{max-width:86%;padding:8px 10px;border:1px solid var(--sil-auth-line);border-radius:14px;background:#111;font-size:10.5px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.recovery-msg.support .recovery-bubble{border-color:rgba(214,40,69,.3);background:#160a0e}.recovery-msg.system .recovery-bubble{color:#999;background:#090909;font-size:8.5px;text-align:center}.recovery-bubble time{display:block;margin-top:4px;color:#707070;font-size:7px;direction:ltr;text-align:left}
.recovery-code-form{margin-bottom:8px;padding:10px;border:1px solid rgba(214,40,69,.35);border-radius:16px;display:grid;gap:8px;background:#0d080a}.recovery-code-title{display:flex;align-items:center;gap:7px;color:#fff;font-size:10px;font-weight:900}.recovery-code-title i{color:var(--sil-auth-red)}.recovery-code-input{height:48px;border:1px solid rgba(214,40,69,.5);border-radius:13px;color:#fff;background:#020202;text-align:center;direction:ltr;font-size:20px!important;font-weight:900;letter-spacing:5px;outline:0}.recovery-code-passwords{display:grid;grid-template-columns:1fr 1fr;gap:7px}.recovery-code-passwords input{min-width:0;height:45px;padding:0 10px;border:1px solid var(--sil-auth-line);border-radius:12px;color:#fff;background:#030303;font-size:16px!important;outline:0}
.recovery-compose{display:grid;grid-template-columns:minmax(0,1fr) 43px;gap:7px;padding-top:8px;border-top:1px solid rgba(255,255,255,.08)}.recovery-compose textarea{resize:none;min-height:43px;max-height:88px;padding:9px 10px;border:1px solid var(--sil-auth-line);border-radius:13px;color:#fff;background:#050505;font-size:16px!important;outline:0}.recovery-send{width:43px;height:43px;border:0;border-radius:13px;display:grid;place-items:center;color:#fff;background:var(--sil-auth-red);font-size:17px;cursor:pointer}.recovery-state-message{margin:8px 0 0;color:#ff9cad;text-align:center;font-size:9px;line-height:1.6}.recovery-state-message.success{color:#62d998}.recovery-cancel{margin-top:8px;border:0;color:#888;background:transparent;font-size:8.5px;font-weight:700;text-decoration:underline;cursor:pointer}
html.sil-recovery-open,html.sil-recovery-open body{overflow:hidden!important}.sil-recovery-open .reset-card{pointer-events:none}

@media(max-width:390px){.auth-card,.reset-card{padding:16px 14px;border-radius:21px}.auth-links{display:grid}.auth-links a{width:100%}.recovery-code-passwords{grid-template-columns:1fr}}
@media(max-height:700px){.auth-shell,.reset-shell{padding-top:5px}.auth-brand,.reset-brand{margin-bottom:8px}.auth-brand img,.reset-brand img{width:68px;height:68px;border-radius:20px}.auth-brand h1,.reset-brand h1{margin-top:4px;font-size:20px}.auth-card,.reset-card{padding-top:15px;padding-bottom:15px}.auth-page .field input{height:46px}.primary-btn,.submit-button{min-height:46px}}
@media(prefers-reduced-motion:reduce){.auth-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* R26: استعادة بخطوتين مع مقارنة الصلاحية بساعة قاعدة البيانات. */
.auth-recovery-v244 .reset-card{overflow:hidden}
.auth-recovery-v244 .recovery-step-form{display:grid;gap:10px}
.auth-recovery-v244 .recovery-step-form .field{margin:0}
.auth-recovery-v244 .support-request-button{margin:0;background:#030303}
.auth-recovery-v244 .support-request-button:disabled{opacity:.72;cursor:default}
.auth-recovery-v244 .recovery-request-summary{min-height:60px;padding:10px 11px;border:1px solid rgba(255,255,255,.12);border-radius:14px;display:flex;align-items:center;gap:10px;background:#050505}
.auth-recovery-v244 .recovery-request-summary>div{min-width:0;flex:1}.auth-recovery-v244 .recovery-request-summary strong{display:block;color:#fff;font-size:10.5px}.auth-recovery-v244 .recovery-request-summary small{display:block;margin-top:3px;color:#929292;font-size:8.5px;line-height:1.65}
.auth-recovery-v244 .recovery-request-summary b{flex:0 0 auto;padding:4px 7px;border:1px solid rgba(214,40,69,.45);border-radius:999px;color:#ff9caf;background:#070707;font-size:8px;direction:ltr}
.auth-recovery-v244 .recovery-support-reply{padding:11px;border:1px solid rgba(214,40,69,.42);border-radius:14px;display:flex;align-items:center;gap:9px;background:#070707}
.auth-recovery-v244 .recovery-support-reply>div{min-width:0;flex:1}.auth-recovery-v244 .recovery-support-reply span{display:block;color:#929292;font-size:8px}.auth-recovery-v244 .recovery-support-reply strong{display:block;margin-top:3px;color:#fff;font-size:10px;line-height:1.7;overflow-wrap:anywhere}
.auth-recovery-v244 .recovery-support-reply button{width:39px;height:39px;flex:0 0 auto;border:1px solid rgba(214,40,69,.42);border-radius:12px;display:grid;place-items:center;color:#fff;background:#020202;cursor:pointer}
.auth-recovery-v244 .recovery-code-field input{direction:ltr;text-align:center;font-size:21px!important;font-weight:900;letter-spacing:6px;font-variant-numeric:tabular-nums}
.auth-recovery-v244 .recovery-verified-badge{min-height:43px;padding:8px 10px;border:1px solid rgba(39,190,99,.4);border-radius:13px;display:flex;align-items:center;justify-content:center;gap:7px;color:#d8ffe5;background:#030b05;font-size:10px;font-weight:900}.auth-recovery-v244 .recovery-verified-badge i{color:#39c978}
.auth-recovery-v244 .recovery-success{text-align:center;padding:10px 0 1px}.auth-recovery-v244 .recovery-success>i{color:#3bd47c;font-size:38px}.auth-recovery-v244 .recovery-success h3{margin:9px 0 4px;font-size:19px}.auth-recovery-v244 .recovery-success p{margin:0 0 13px;color:#999;font-size:9.5px;line-height:1.75}
.auth-recovery-v244 .notice{display:block}

/* R26: إنشاء حساب موحد مع تسجيل الدخول ويقبل لوحات المفاتيح العربية. */
.auth-register-body .register-form-v244{display:grid;gap:10px}.auth-register-body .register-form-v244 .field{margin:0}
.auth-register-body .field-hint{display:block;color:#8e8e8e;font-size:8.5px;font-weight:600;line-height:1.65}
.auth-register-body .optional-security{min-height:50px;padding:9px 11px;border:1px solid rgba(255,255,255,.12);border-radius:13px;display:flex;align-items:center;gap:10px;color:#ddd;background:#050505;cursor:pointer}
.auth-register-body .optional-security>span{min-width:0;flex:1;display:flex;align-items:center;gap:7px;font-size:9.5px}.auth-register-body .optional-security i{color:var(--sil-auth-red)}.auth-register-body .optional-security input{width:18px;height:18px;flex:0 0 auto;accent-color:var(--sil-auth-red)}
.auth-register-body .register-terms{min-height:49px;padding:9px 11px;border:1px solid rgba(255,255,255,.12);border-radius:13px;display:flex;align-items:flex-start;gap:9px;color:#aaa;background:#050505;font-size:8.8px;font-weight:600;line-height:1.7;cursor:pointer}.auth-register-body .register-terms input{width:17px;height:17px;margin-top:1px;flex:0 0 auto;accent-color:var(--sil-auth-red)}
.auth-register-body .registration-security-note{margin:0;display:flex;align-items:flex-start;justify-content:center;gap:6px;color:#858585;text-align:center;font-size:8px;line-height:1.65}.auth-register-body .registration-security-note i{margin-top:3px;color:var(--sil-auth-red)}
