.elementor-2150 .elementor-element.elementor-element-28c9bda{--display:flex;--flex-direction:row;--container-widget-width:initial;--container-widget-height:100%;--container-widget-flex-grow:1;--container-widget-align-self:stretch;--flex-wrap-mobile:wrap;}.elementor-2150 .elementor-element.elementor-element-28c9bda:not(.elementor-motion-effects-element-type-background), .elementor-2150 .elementor-element.elementor-element-28c9bda > .elementor-motion-effects-container > .elementor-motion-effects-layer{background-color:var( --e-global-color-astglobalcolor5 );}.elementor-2150 .elementor-element.elementor-element-e959b6b{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--justify-content:center;}.elementor-2150 .elementor-element.elementor-element-8c6d222 .elementor-heading-title{font-family:"Yekanb", yekanb;font-size:22px;}.elementor-2150 .elementor-element.elementor-element-c7528f8{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--margin-top:25px;--margin-bottom:23px;--margin-left:0px;--margin-right:0px;}.elementor-2150 .elementor-element.elementor-element-383a496{--display:flex;--flex-direction:row;--container-widget-width:initial;--container-widget-height:100%;--container-widget-flex-grow:1;--container-widget-align-self:stretch;--flex-wrap-mobile:wrap;}.elementor-2150 .elementor-element.elementor-element-3a54fc1{--display:flex;--flex-direction:row;--container-widget-width:initial;--container-widget-height:100%;--container-widget-flex-grow:1;--container-widget-align-self:stretch;--flex-wrap-mobile:wrap;}.elementor-2150 .elementor-element.elementor-element-e0e8649 .elementor-button{background-color:var( --e-global-color-astglobalcolor4 );font-family:"Yekanb", yekanb;fill:var( --e-global-color-primary );color:var( --e-global-color-primary );border-style:solid;border-width:1px 1px 1px 1px;border-color:var( --e-global-color-primary );border-radius:16px 16px 16px 16px;}.elementor-2150 .elementor-element.elementor-element-339fc5f{--display:flex;}.elementor-2150 .elementor-element.elementor-element-9f6506b .elementor-button{background-color:var( --e-global-color-primary );font-family:"Yekanb", yekanb;border-radius:16px 16px 16px 16px;}.elementor-2150 .elementor-element.elementor-element-fd2d9a3{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--margin-top:40px;--margin-bottom:0px;--margin-left:0px;--margin-right:0px;}:root{--page-title-display:none;}@media(min-width:768px){.elementor-2150 .elementor-element.elementor-element-28c9bda{--content-width:1164px;}}/* Start custom CSS for html, class: .elementor-element-c7e2d77 */<style>

/* اعمال فونت روی کل صفحه */
body, body *{
font-family: Yekanb, tahoma !important;
direction: rtl;
}

/* صفحه اصلی */
.login-wrapper{
width:100%;
display:flex;
gap:40px;
align-items:center;
justify-content:center;
padding:60px;
background:#f8f9fa;
}

/* باکس اصلی */
.login-box{
display:flex;
width:100%;
max-width:1100px;
background:#fff;
border-radius:16px;
box-shadow:0 15px 40px rgba(0,0,0,0.12);
overflow:hidden;
}

/* بنر */
.login-banner{
width:50%;
background:url('YOUR-BANNER-IMAGE.jpg') center/cover no-repeat;
min-height:420px;
}

/* فرم */
.login-form{
width:50%;
padding:60px;
}

.login-form h2{
font-size:28px;
font-weight:600;
margin-bottom:20px;
color:#333;
}

/* فیلدها */
.login-form input{
width:100%;
height:50px;
border:1px solid #ddd;
border-radius:8px;
padding:10px 12px;
font-size:15px;
margin-bottom:15px;
font-family:Yekanb !important;
}

.login-form input:focus{
border-color:#e30613;
outline:none;
}

/* دکمه ورود */
.login-btn{
width:100%;
height:52px;
background:#e30613;
border:none;
border-radius:10px;
color:#fff;
font-size:17px;
cursor:pointer;
margin-top:10px;
font-family:Yekanb !important;
}

.login-btn:hover{
background:#c30410;
}

/* دکمه ثبت‌نام */
.register-btn{
display:block;
width:100%;
height:48px;
background:#444;
color:#fff;
border:none;
border-radius:8px;
font-size:15px;
cursor:pointer;
margin-top:10px;
font-family:Yekanb !important;
}

.register-btn:hover{
background:#222;
}

/* پیام‌ها */
#login-message{
margin-top:15px;
font-size:14px;
color:#e30613;
text-align:center;
font-family:Yekanb !important;
}

/* فراموشی رمز */
.forgot-link{
margin-top:15px;
font-size:13px;
text-align:center;
}

.forgot-link a{
color:#e30613;
text-decoration:none;
font-family:Yekanb !important;
}

/* حذف عنوان صفحه وردپرس */
.page-title,
.entry-title,
h1.entry-title,
h1.page-title {
display: none !important;
}

/* --------------------------- */
/* ریسپانسیو */
/* --------------------------- */

/* تبلت */
@media(max-width:900px){
.login-box{
flex-direction:column;
}

.login-banner{
width:100%;
height:240px;
}

.login-form{
width:100%;
padding:40px;
}
}

/* موبایل */
@media(max-width:600px){
.login-wrapper{
padding:20px;
}

.login-form{
padding:25px;
}

.login-form h2{
font-size:22px;
}

.login-form input{
height:46px;
font-size:14px;
}

.login-btn{
height:46px;
font-size:15px;
}

.register-btn{
height:44px;
font-size:14px;
}

.forgot-link{
font-size:12px;
}
}

</style>



<div class="login-wrapper">
  <div class="login-box">

    <!-- بنر -->
    <div class="login-banner"></div>

    <!-- فرم -->
    <div class="login-form">

      <h2>ورود</h2>

      <form id="meliLoginForm">

        <input type="text" name="national_code" placeholder="کد ملی (۱۰ رقم)" maxlength="10" required>
        <input type="password" name="password" placeholder="رمز عبور" required>

        <button class="login-btn" type="submit">ورود</button>
        <button class="register-btn" type="button" id="meliRegister">ثبت نام</button>

        <div id="login-message"></div>

        <div class="forgot-link">
          <a href="/lost-password">رمز خود را فراموش کرده‌ام</a>
        </div>

      </form>

    </div>
  </div>
</div>



<script>
const form = document.getElementById("meliLoginForm");
const msg = document.getElementById("login-message");

form.addEventListener("submit", function(e){
  e.preventDefault();
  sendForm("login");
});

document.getElementById("meliRegister").addEventListener("click", function(){
  sendForm("register");
});

function sendForm(type){
  msg.innerHTML = "در حال پردازش...";
  const formData = new FormData(form);
  formData.append("action", "meli_ajax_login");
  formData.append("mode", type);

  fetch("/wp-admin/admin-ajax.php", {
    method: "POST",
    body: formData
  })
  .then(res => res.json())
  .then(response => {
    if(response.success){
      msg.style.color = "#28a745";
      msg.innerHTML = response.message;
      setTimeout(() => { window.location = response.redirect; }, 900);
    } else {
      msg.style.color = "#e30613";
      msg.innerHTML = response.message;
    }
  })
  .catch(() => {
    msg.innerHTML = "خطا در ارتباط با سرور!";
  });
}
</script>/* End custom CSS */
/* Start Custom Fonts CSS */@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: 100;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-Thin.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: 200;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-Light.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: normal;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-Regular.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: 500;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-SemiBold.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: bold;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-Bold.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: 700;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-ExtraBold.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: 800;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-Black.woff') format('woff');
}
@font-face {
	font-family: 'Yekanb';
	font-style: normal;
	font-weight: 900;
	font-display: auto;
	src: url('https://pishrorahbar.com/wp-content/uploads/2025/11/YekanBakhFaNum-ExtraBlack.woff') format('woff');
}
/* End Custom Fonts CSS */