:root{
  --green:#166B45;
  --green-mid:#1F8058;
  --green-dark:#0B2F22;
  --green-deeper:#071F17;
  --green-soft:#E8F4ED;
  --ink:#14261d;
  --muted:#66766e;
  --line:#dbe6e0;
  --cream:#f4f6f2;
  --danger:#b74444;
  --white:#fff;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{min-height:100%;margin:0}
body{
  min-height:100svh;
  padding:clamp(14px,2.2vw,34px);
  color:var(--ink);
  background:
    radial-gradient(circle at 10% 8%,color-mix(in srgb,var(--green) 12%,transparent),transparent 28%),
    linear-gradient(145deg,#eef3ee 0%,#fbfcfa 52%,#edf3ee 100%);
  font-family:"Tajawal","Noto Sans Arabic",Tahoma,Arial,sans-serif;
  display:grid;
  place-items:center;
}
button,input{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}
.auth-shell{
  width:min(1180px,100%);
  min-height:min(760px,calc(100svh - clamp(28px,4.4vw,68px)));
  display:grid;
  grid-template-columns:minmax(360px,.88fr) minmax(470px,1.12fr);
  overflow:hidden;
  border:1px solid rgba(21,69,47,.13);
  border-radius:28px;
  background:var(--white);
  box-shadow:0 26px 80px rgba(18,55,38,.15);
}
.auth-brand{
  position:relative;
  overflow:hidden;
  padding:48px;
  color:#fff;
  background:linear-gradient(145deg,var(--green-deeper),var(--green-dark) 47%,var(--green) 78%,var(--green-mid));
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.auth-brand::before,.auth-brand::after{content:"";position:absolute;border-radius:50%;pointer-events:none}
.auth-brand::before{width:430px;height:430px;inset:-210px auto auto -210px;border:74px solid rgba(255,255,255,.055)}
.auth-brand::after{width:310px;height:310px;inset:auto -145px -155px auto;background:rgba(255,255,255,.045)}
.auth-brand-top,.auth-brand-copy,.auth-brand-foot{position:relative;z-index:1}
.auth-logo{display:flex;align-items:center;gap:14px;direction:ltr;color:#fff;text-decoration:none;width:max-content}
.auth-logo img{width:64px;height:64px;display:block;overflow:hidden;flex:0 0 64px;border-radius:15px;border:1px solid rgba(255,255,255,.24);background:var(--green);filter:var(--auth-logo-filter,none);box-shadow:0 8px 24px rgba(4,30,17,.22)}
.auth-logo strong{display:block;font-size:25px;letter-spacing:.18em;line-height:1}
.auth-logo>span:not(.auth-logo-mark){display:block}.auth-logo>span>span{display:block;margin-top:7px;font-size:8px;letter-spacing:.15em;opacity:.76}.auth-logo-mark{margin-top:0!important;opacity:1!important}
.auth-brand-copy{margin-block:64px 40px}
.auth-brand-copy small{display:inline-flex;padding:7px 11px;border:1px solid rgba(255,255,255,.24);border-radius:99px;font-size:12px;font-weight:800}
.auth-brand-copy h1{margin:18px 0 12px;font-size:clamp(30px,3.1vw,44px);line-height:1.35}
.auth-brand-copy p{max-width:430px;margin:0;color:rgba(255,255,255,.8);font-size:15px;line-height:1.9}
.auth-points{display:grid;gap:12px;margin-top:28px}
.auth-point{display:flex;align-items:center;gap:11px;color:rgba(255,255,255,.88);font-size:14px}
.auth-point i{width:30px;height:30px;display:grid;place-items:center;flex:none;border-radius:9px;background:rgba(255,255,255,.11);font-style:normal;font-weight:900}
.auth-brand-foot{font-size:11px;letter-spacing:.12em;opacity:.62;direction:ltr;text-align:left}
.auth-panel{padding:clamp(44px,5vw,76px);display:flex;align-items:center}
.auth-form-wrap{width:min(480px,100%);margin:auto}
.auth-kicker{display:inline-flex;align-items:center;gap:8px;margin-bottom:24px;padding:8px 12px;border-radius:999px;background:var(--green-soft);color:var(--green);font-size:12px;font-weight:900}
.auth-kicker::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.auth-header h2{margin:0 0 10px;font-size:clamp(28px,3vw,38px);line-height:1.35;color:#111d17}
.auth-header p{margin:0 0 30px;color:var(--muted);font-size:15px;line-height:1.85}
.auth-form{display:grid;gap:19px}
.auth-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.auth-field label{display:block;margin-bottom:9px;font-size:14px;font-weight:900;color:#294137}
.auth-control-wrap{position:relative}
.auth-control-wrap>svg{position:absolute;inset-inline-start:17px;top:50%;transform:translateY(-50%);width:21px;height:21px;fill:none;stroke:var(--green);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.auth-control{
  width:100%;height:58px;padding:0 52px 0 50px;
  border:1px solid var(--line);border-radius:14px;outline:0;background:#fbfcfb;color:var(--ink);
  font-size:16px;direction:rtl;
}
.auth-control::placeholder{color:#9aa7a0}
.auth-control:focus{border-color:var(--green);background:#fff;box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 10%,transparent)}
.auth-eye{position:absolute;inset-inline-end:8px;top:8px;width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:#73837b;cursor:pointer}
.auth-eye:hover{background:var(--green-soft);color:var(--green)}
.auth-eye svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.auth-row{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:14px}
.auth-check{display:flex;align-items:center;gap:8px;color:#51635a;cursor:pointer}
.auth-check input{width:19px;height:19px;accent-color:var(--green)}
.auth-link{color:var(--green);font-weight:900;text-decoration:none}
.auth-link:hover{text-decoration:underline}
.auth-hint{display:block;margin-top:7px;color:#76867e;font-size:12px;line-height:1.6}
.auth-terms{align-items:flex-start;padding:13px 14px;border:1px solid var(--line);border-radius:13px;background:#f8faf8;font-size:12px;line-height:1.75}
.auth-terms input{margin-top:2px;flex:none}
.auth-submit,.auth-secondary{
  width:100%;min-height:58px;border-radius:14px;padding:13px 18px;font-weight:900;cursor:pointer;text-decoration:none;display:flex;align-items:center;justify-content:center;gap:9px;
}
.auth-submit{border:1px solid var(--green);background:var(--green);color:#fff;box-shadow:0 11px 23px color-mix(in srgb,var(--green) 22%,transparent)}
.auth-submit:hover{background:var(--green-dark)}
.auth-submit:disabled{opacity:.62;cursor:wait}
.auth-submit svg,.auth-secondary svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.auth-secondary{border:1px solid var(--line);background:#fff;color:var(--green)}
.auth-secondary:hover{border-color:#adc7b9;background:#f7faf8}
.auth-divider{position:relative;margin:22px 0;text-align:center;color:#91a097;font-size:12px}
.auth-divider::before{content:"";position:absolute;inset:50% 0 auto;height:1px;background:#e6ece8}
.auth-divider span{position:relative;padding:0 12px;background:#fff}
.auth-message{display:none;padding:13px 15px;border-radius:12px;font-size:13px;line-height:1.75;font-weight:700}
.auth-message.show{display:block}
.auth-message.error{color:#8d3030;background:#fff2f2;border:1px solid #f0caca}
.auth-message.success{color:#155f3d;background:#edf8f2;border:1px solid #bfe0cf}
.auth-help{margin:22px 0 0;padding-top:20px;border-top:1px solid #edf1ef;text-align:center;color:#7a8881;font-size:13px;line-height:1.7}
.password-rules{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;padding:14px;border-radius:13px;background:#f6f8f6;border:1px solid #e5ece8}
.password-rule{font-size:12px;color:#87948d}
.password-rule::before{content:"○";margin-inline-end:7px}
.password-rule.ok{color:var(--green);font-weight:800}
.password-rule.ok::before{content:"✓"}
.auth-email-display{display:block;margin-top:5px;color:var(--green);font-size:15px;direction:ltr;overflow-wrap:anywhere}
.auth-otp{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}
.auth-otp-input{width:100%;min-width:0;height:62px;border:1px solid var(--line);border-radius:14px;background:#fbfcfb;color:var(--ink);outline:0;text-align:center;font-size:27px;font-weight:900;caret-color:var(--green)}
.auth-otp-input:focus{border-color:var(--green);background:#fff;box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 10%,transparent)}
.auth-resend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;margin-top:22px;color:var(--muted);font-size:13px}
.auth-resend button{padding:4px;border:0;background:transparent;color:var(--green);font-weight:900;cursor:pointer}
.auth-resend button:disabled{color:#9aa7a0;cursor:not-allowed}
.auth-resend #authResendTimer{width:100%;text-align:center;color:#8b9992;font-size:11px}
.auth-result{text-align:center}
.auth-result-icon{width:78px;height:78px;margin:0 auto 22px;display:grid;place-items:center;border-radius:24px;background:var(--green-soft);color:var(--green)}
.auth-result-icon.danger{background:#fff1f1;color:var(--danger)}
.auth-result-icon svg{width:38px;height:38px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.auth-result h2{margin:0 0 12px;font-size:34px}
.auth-result p{margin:0 0 27px;color:var(--muted);font-size:15px;line-height:1.9}
.auth-result .auth-secondary{margin-top:11px}
.auth-spinner{width:19px;height:19px;border:2px solid rgba(255,255,255,.38);border-top-color:#fff;border-radius:50%;animation:auth-spin .7s linear infinite}
@keyframes auth-spin{to{transform:rotate(360deg)}}
@media(max-width:900px){
  body{padding:12px}
  .auth-shell{width:100%;min-height:calc(100svh - 24px);grid-template-columns:minmax(270px,.68fr) minmax(430px,1.32fr);border-radius:22px}
  .auth-brand{padding:32px}.auth-brand-copy{margin-block:44px 30px}.auth-brand-copy h1{font-size:30px}.auth-brand-copy p{font-size:14px}
  .auth-logo img,.auth-logo-mark{width:54px;height:54px;flex-basis:54px}.auth-panel{padding:38px}.auth-control,.auth-submit,.auth-secondary{min-height:56px}
}
@media(max-width:700px){
  body{padding:0;background:#fff;display:block}
  .auth-shell{min-height:100svh;border:0;border-radius:0;grid-template-columns:1fr;box-shadow:none}
  .auth-brand{padding:24px;min-height:220px;justify-content:flex-start}
  .auth-brand-copy{margin:28px 0 0}.auth-brand-copy small,.auth-points,.auth-brand-foot{display:none}.auth-brand-copy h1{margin:0 0 7px;font-size:26px}.auth-brand-copy p{font-size:13px;line-height:1.65}
  .auth-logo img,.auth-logo-mark{width:48px;height:48px;flex-basis:48px}.auth-logo strong{font-size:21px}
  .auth-panel{padding:34px 22px 46px;align-items:flex-start}.auth-kicker{margin-bottom:18px}.auth-header h2{font-size:29px}.auth-header p{margin-bottom:24px}
  .auth-form-grid{grid-template-columns:1fr}
}
@media(max-width:420px){.auth-row{align-items:flex-start;flex-direction:column}.password-rules{grid-template-columns:1fr}.auth-panel{padding-inline:18px}.auth-otp{gap:6px}.auth-otp-input{height:52px;border-radius:11px;font-size:23px}}
@media(prefers-reduced-motion:reduce){.auth-spinner{animation:none}}
