/* Login redesign — /login (RTL, desktop + mobile). Local font, page-scoped. */
@font-face{
  font-family:"Noto Kufi Arabic";
  src:url("../fonts/noto-kufi-arabic/NotoKufiArabic-Variable.ttf") format("truetype");
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
}

/* Soften global chrome on login without duplicating header HTML */
body.mohaseb-login-page #footer,
body:has(.ml-page) #footer,
body.mohaseb-login-page #sign-in-dialog,
body:has(.ml-page) #sign-in-dialog,
body.mohaseb-login-page .styleswitch,
body:has(.ml-page) .styleswitch,
body.mohaseb-login-page .cookieConsentContainer,
body:has(.ml-page) .cookieConsentContainer{
  display:none!important;
}
body.mohaseb-login-page #wrapper,
body:has(.ml-page) #wrapper{
  padding-bottom:0;
  background:transparent;
}
body.mohaseb-login-page,
body:has(.ml-page){
  background:#eef5fb;
}

@media (max-width:991px){
  body.mohaseb-login-page .mgh-nav-desktop,
  body:has(.ml-page) .mgh-nav-desktop,
  body.mohaseb-login-page .mgh-cta,
  body:has(.ml-page) .mgh-cta,
  body.mohaseb-login-page .mgh-auth,
  body:has(.ml-page) .mgh-auth,
  body.mohaseb-login-page .mgh-post-btn,
  body:has(.ml-page) .mgh-post-btn,
  body.mohaseb-login-page .mgh-actions .mgh-btn-post,
  body:has(.ml-page) .mgh-actions .mgh-btn-post{
    display:none!important;
  }
  body.mohaseb-login-page .mgh-header,
  body:has(.ml-page) .mgh-header,
  body.mohaseb-login-page .mgh-bar,
  body:has(.ml-page) .mgh-bar{
    min-height:56px;
    box-shadow:none;
    border-bottom:1px solid #e8eef5;
  }
}

.ml-page{
  --ml-ink:#0f2744;
  --ml-muted:#5b6b7c;
  --ml-line:#e2eaf3;
  --ml-bg:#eef5fb;
  --ml-white:#fff;
  --ml-blue:#2f80ed;
  --ml-blue-d:#1c6dd0;
  --ml-blue-soft:#e8f1ff;
  --ml-green:#12b886;
  --ml-green-d:#0ca678;
  --ml-green-soft:#e6faf3;
  --ml-danger:#dc3545;
  --ml-danger-bg:#fff5f5;
  --ml-radius:22px;
  --ml-shadow:0 12px 40px rgba(15,39,68,.08);
  --ml-input-bg:#f7fafc;
  position:relative;
  font-family:"Noto Kufi Arabic",Tahoma,Arial,sans-serif;
  color:var(--ml-ink);
  direction:rtl;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  min-height:70vh;
  padding:20px 0 48px;
}
.ml-page *,.ml-page *::before,.ml-page *::after{box-sizing:border-box}
.ml-page img{max-width:100%;height:auto;display:block}
.ml-page a{text-decoration:none;color:inherit}
.ml-page a:focus-visible,
.ml-page button:focus-visible,
.ml-page input:focus-visible{
  outline:3px solid rgba(47,128,237,.55);
  outline-offset:2px;
}

.ml-bg{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(47,128,237,.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(18,184,134,.07), transparent 50%),
    linear-gradient(180deg,#eef5fb 0%,#f7fbff 45%,#eef5fb 100%);
}
.ml-bg::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:.35;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c5d7ea' stroke-width='.6' opacity='.35'%3E%3Cpath d='M0 40h80M40 0v80'/%3E%3C/g%3E%3C/svg%3E");
}

.ml-wrap{
  position:relative;
  z-index:1;
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding:0 16px;
}

.ml-layout{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.ml-card{
  background:var(--ml-white);
  border-radius:var(--ml-radius);
  box-shadow:var(--ml-shadow);
  border:1px solid rgba(226,234,243,.9);
}

.ml-card--login{
  padding:28px 22px 24px;
  order:1;
}
.ml-card--agent{
  padding:22px 18px 20px;
  order:2;
  background:linear-gradient(165deg,#f3fcf8 0%,#fff 42%,#f4f9ff 100%);
}

/* Brand / headings — centered in the login card */
.ml-login-brand{
  margin-bottom:18px;
  text-align:center;
  display:flex;
  justify-content:center;
  align-items:center;
}
.ml-login-brand--desktop{display:none}
.ml-logo{max-height:48px;width:auto;margin:0 auto}
.ml-logo-text{font-size:1.25rem;font-weight:700;color:var(--ml-ink)}
.ml-desktop-copy{
  display:none;
  text-align:center;
  margin-bottom:22px;
}
.ml-desktop-copy .ml-heading,
.ml-desktop-copy .ml-subtitle{
  text-align:center;
}

.ml-mobile-intro{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:22px;
}
.ml-mobile-ill{flex:0 0 72px}
.ml-mobile-ill img,.ml-ill-doc{width:72px;height:72px}
.ml-mobile-copy{flex:1;min-width:0}
.ml-heading{
  margin:0 0 8px;
  font-size:1.55rem;
  font-weight:700;
  line-height:1.35;
  color:var(--ml-ink);
  letter-spacing:-.02em;
}
.ml-heading--mobile{font-size:1.45rem}
.ml-wave{font-size:1.1em}
.ml-subtitle{
  margin:0;
  font-size:.92rem;
  line-height:1.65;
  color:var(--ml-muted);
}

/* Alert — reserved height-ish, no giant layout jump */
.ml-alert{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:12px;
  background:var(--ml-danger-bg);
  border:1px solid #f5c2c7;
  color:#842029;
  font-size:.88rem;
  line-height:1.5;
  min-height:44px;
}
.ml-alert__icon{flex-shrink:0;margin-top:1px;color:var(--ml-danger)}

/* Form */
.ml-form{display:flex;flex-direction:column;gap:14px}
.ml-field{display:flex;flex-direction:column;gap:6px}
.ml-label{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
.ml-input-wrap{
  position:relative;
  display:flex;
  align-items:center;
}
.ml-input-icon{
  position:absolute;
  right:14px;
  color:#8aa0b5;
  pointer-events:none;
  display:flex;
  z-index:1;
}
/* Beat theme style.css: input[type=text]{border:none} (higher specificity) */
.ml-page input.ml-input,
.ml-page input.ml-input[type="text"],
.ml-page input.ml-input[type="password"]{
  width:100%;
  max-width:100%;
  height:52px;
  line-height:normal;
  margin:0;
  padding:0 46px 0 46px;
  border:1.5px solid #cfdceb !important;
  border-radius:14px !important;
  background-color:#f7fafc !important;
  box-shadow:none !important;
  font:inherit;
  font-size:1rem;
  font-weight:500;
  color:var(--ml-ink) !important;
  opacity:1;
  transition:border-color .15s,box-shadow .15s,background .15s;
  -webkit-appearance:none;
  appearance:none;
}
.ml-page input.ml-input::placeholder{color:#9aadc0;opacity:1}
.ml-page input.ml-input:hover{
  border-color:#b0c4d8 !important;
  background-color:#f3f7fb !important;
}
.ml-page input.ml-input:focus,
.ml-page input.ml-input[type="text"]:focus,
.ml-page input.ml-input[type="password"]:focus{
  outline:none;
  border-color:var(--ml-blue) !important;
  background-color:#fff !important;
  box-shadow:0 0 0 4px rgba(47,128,237,.14) !important;
  color:var(--ml-ink) !important;
}
.ml-page input.ml-input[aria-invalid="true"]{
  border-color:#f1aeb5 !important;
  background-color:#fff8f8 !important;
}
.ml-toggle-pass{
  position:absolute;
  left:8px;
  top:50%;
  transform:translateY(-50%);
  width:40px;height:40px;
  border:0;background:transparent;
  color:#8aa0b5;
  cursor:pointer;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ml-toggle-pass:hover{color:var(--ml-ink);background:rgba(15,39,68,.04)}

.ml-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:2px;
}
.ml-check{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  font-size:.9rem;
  color:var(--ml-ink);
  user-select:none;
}
.ml-check input{
  position:absolute;
  opacity:0;
  width:1px;height:1px;
}
.ml-check__box{
  width:18px;height:18px;
  border:1.5px solid #c5d3e3;
  border-radius:5px;
  background:#fff;
  position:relative;
  flex-shrink:0;
  transition:background .15s,border-color .15s;
}
.ml-check input:checked + .ml-check__box{
  background:var(--ml-blue);
  border-color:var(--ml-blue);
}
.ml-check input:checked + .ml-check__box::after{
  content:"";
  position:absolute;
  left:5px;top:1px;
  width:5px;height:10px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.ml-check input:focus-visible + .ml-check__box{
  outline:3px solid rgba(47,128,237,.55);
  outline-offset:2px;
}
.ml-link{
  color:var(--ml-blue);
  font-size:.9rem;
  font-weight:500;
}
.ml-link:hover{text-decoration:underline;color:var(--ml-blue-d)}

.ml-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  min-height:52px;
  padding:12px 20px;
  border:0;
  border-radius:14px;
  font:inherit;
  font-size:1.02rem;
  font-weight:700;
  cursor:pointer;
  transition:background .15s,transform .15s,box-shadow .15s;
  text-align:center;
}
.ml-btn--primary{
  background:var(--ml-blue);
  color:#fff;
  box-shadow:0 8px 20px rgba(47,128,237,.28);
  margin-top:6px;
}
.ml-btn--primary:hover{background:var(--ml-blue-d)}
.ml-btn--primary:active{transform:translateY(1px)}
.ml-btn--primary.is-loading{
  pointer-events:none;
  opacity:.85;
}
.ml-btn__spinner{
  width:18px;height:18px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  border-radius:50%;
  animation:ml-spin .7s linear infinite;
}
@keyframes ml-spin{to{transform:rotate(360deg)}}
.ml-btn--primary.is-loading .ml-btn__icon{display:none}
.ml-page a.ml-btn--agent,
.ml-page .ml-btn--agent{
  background:var(--ml-green);
  color:#fff !important;
  box-shadow:0 8px 20px rgba(18,184,134,.28);
  margin-top:16px;
}
.ml-page a.ml-btn--agent:hover,
.ml-page .ml-btn--agent:hover{
  background:var(--ml-green-d);
  color:#fff !important;
}
.ml-page a.ml-btn--agent .ml-btn__text,
.ml-page a.ml-btn--agent .ml-btn__icon,
.ml-page a.ml-btn--agent svg{
  color:#fff !important;
  stroke:currentColor;
}

/* Social — stacked full-width buttons (matches approved mockup) */
.ml-social{margin-top:18px}
.ml-social__sep{
  display:flex;
  align-items:center;
  gap:14px;
  color:#94a3b8;
  font-size:.9rem;
  font-weight:500;
  margin-bottom:16px;
}
.ml-social__sep::before,
.ml-social__sep::after{
  content:"";
  flex:1;
  height:1px;
  background:#e2e8f0;
}
.ml-social__btns{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ml-social-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  min-height:52px;
  padding:12px 18px;
  border:1.5px solid #d7e0ea;
  border-radius:14px;
  background:#fff;
  font:inherit;
  font-size:.95rem;
  font-weight:600;
  color:var(--ml-ink);
  cursor:pointer;
  transition:border-color .15s,background .15s,box-shadow .15s;
  box-shadow:none;
}
.ml-social-btn__icon{flex-shrink:0}
.ml-social-btn:hover{
  border-color:#c0cddc;
  background:#fafcfe;
  box-shadow:0 2px 8px rgba(15,39,68,.05);
}
.ml-social-btn--linkedin:hover{border-color:#0A66C2}

.ml-register{
  margin:18px 0 0;
  text-align:center;
  font-size:.92rem;
}
.ml-register__link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ml-blue);
  font-weight:600;
}
.ml-register__link:hover{text-decoration:underline}
.ml-phone-login{
  margin:12px 0 0;
  text-align:center;
  font-size:.88rem;
}
.ml-phone-login a{color:var(--ml-muted)}
.ml-phone-login a:hover{color:var(--ml-blue)}

/* Agent card */
.ml-agent-badge{
  display:inline-flex;
  align-items:center;
  margin:0 0 12px;
  padding:6px 12px;
  border-radius:999px;
  background:var(--ml-green-soft);
  color:var(--ml-green-d);
  font-size:.78rem;
  font-weight:600;
  line-height:1.4;
}
.ml-agent-heading{
  margin:0 0 8px;
  font-size:1.35rem;
  font-weight:700;
  color:var(--ml-ink);
  line-height:1.35;
}
.ml-agent-subtitle{
  margin:0 0 8px;
  font-size:.95rem;
  font-weight:600;
  color:var(--ml-ink);
}
.ml-agent-desc{
  margin:0 0 14px;
  font-size:.88rem;
  line-height:1.65;
  color:var(--ml-muted);
}
.ml-agent-visual{
  display:flex;
  justify-content:center;
  margin:4px 0 16px;
}
.ml-agent-photo{
  max-width:200px;
  max-height:200px;
  object-fit:contain;
  border-radius:16px;
}
.ml-agent-placeholder svg{max-width:180px;height:auto}

.ml-benefits{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.ml-benefit{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(226,234,243,.9);
  min-height:0;
}
.ml-benefit__icon{
  flex:0 0 36px;
  width:36px;height:36px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ml-benefit--chart .ml-benefit__icon{background:#e8f1ff;color:var(--ml-blue)}
.ml-benefit--target .ml-benefit__icon{background:var(--ml-green-soft);color:var(--ml-green)}
.ml-benefit--megaphone .ml-benefit__icon{background:#f3e8ff;color:#8b5cf6}
.ml-benefit--shield .ml-benefit__icon{background:#fff4e6;color:#f59e0b}
.ml-benefit__body{display:flex;flex-direction:column;gap:2px;min-width:0}
.ml-benefit__title{
  font-size:.82rem;
  font-weight:700;
  color:var(--ml-ink);
  line-height:1.35;
}
.ml-benefit__text{
  font-size:.72rem;
  line-height:1.45;
  color:var(--ml-muted);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.ml-agent-learn{
  margin:14px 0 0;
  text-align:center;
  font-size:.88rem;
}
.ml-agent-learn a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--ml-blue);
  font-weight:500;
}
.ml-agent-learn a:hover{text-decoration:underline}
.ml-agent-login{
  margin:10px 0 0;
  text-align:center;
  font-size:.85rem;
}
.ml-agent-login a{color:var(--ml-muted)}
.ml-agent-login a:hover{color:var(--ml-blue)}

/* Trust bar */
.ml-trust{
  list-style:none;
  margin:28px 0 0;
  padding:0;
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.ml-trust__item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:rgba(255,255,255,.7);
  border-radius:14px;
  border:1px solid rgba(226,234,243,.8);
}
.ml-trust__icon{
  flex:0 0 42px;
  width:42px;height:42px;
  border-radius:12px;
  background:var(--ml-blue-soft);
  color:var(--ml-blue);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ml-trust__copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  font-size:.82rem;
  color:var(--ml-muted);
}
.ml-trust__copy strong{
  font-size:.9rem;
  color:var(--ml-ink);
  font-weight:700;
}

/* Tablet+ : two columns like desktop mock */
@media (min-width:900px){
  .ml-page{padding:28px 0 56px}
  .ml-wrap{padding:0 24px}
  .ml-layout{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:24px;
    align-items:stretch;
  }
  /* RTL grid: col1 = right (login), col2 = left (agent) — matches mockup */
  .ml-card--login{order:1;padding:36px 32px 32px}
  .ml-card--agent{order:2;padding:32px 28px 28px}

  .ml-mobile-intro{display:none}
  .ml-login-brand--desktop{display:flex}
  .ml-desktop-copy{display:block;margin-bottom:22px;text-align:center}
  .ml-heading{font-size:1.75rem}
  .ml-agent-heading{font-size:1.6rem}
  .ml-agent-photo{max-width:240px;max-height:240px}
  .ml-agent-placeholder svg{max-width:220px}
  .ml-benefit__text{
    -webkit-line-clamp:3;
  }
  .ml-trust{
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-top:32px;
  }
  .ml-trust__item{
    background:transparent;
    border:0;
    padding:8px 4px;
    justify-content:flex-start;
    text-align:start;
    flex-direction:row;
    align-items:center;
    gap:12px;
  }
  .ml-trust__copy{
    align-items:flex-start;
    text-align:start;
  }
}

@media (min-width:1200px){
  .ml-layout{gap:28px}
  .ml-card--agent{padding:36px 32px}
  .ml-card--login{padding:40px 36px 36px}
}

/* Reduce motion */
@media (prefers-reduced-motion:reduce){
  .ml-btn,.ml-input,.ml-btn__spinner{transition:none;animation:none}
}
