/* ====== عنوان الصفحة ====== */
.auth-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

/* ====== صندوق النموذج ====== */
.auth-box {
    background: #fff;
    padding: 20px 18px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ====== اللابل ====== */
.auth-label {
    font-size: 15px;
    font-weight: 600;
}

/* ====== حقول الإدخال ====== */
.auth-input {
    width: 100%;
    padding: 10px;
    margin: 4px 0 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: #6C1B8C;
    outline: none;
}

/* ====== لينك نسيان الباسورد ====== */
/* .forgot-link {
    font-size: 15px;
    color: #6C1B8C;
    text-decoration: none;
} */
.forgot-link{
  display: inline-block;
  margin-top: 6px;

  font-size: 14px;
  font-weight: 600;

  color: #6C1B8C;
  text-decoration: none;

  opacity: 0.85;
  transition: color .2s ease, opacity .2s ease, transform .2s ease;
}

/* Hover */
.forgot-link:hover{
  color: #8C28B7;
  opacity: 1;
  transform: translateX(-2px);
}

/* Active (mobile click) */
.forgot-link:active{
  opacity: 0.75;
}

/* إزالة أي outline */
.forgot-link:focus,
.forgot-link:focus-visible{
  outline: none;
}

/* ====== زر الدخول / التسجيل ====== */
.auth-btn{
  width: 100%;
  padding: 14px 16px;
  margin-top: 18px;

  border: none;
  border-radius: 999px;

  background: linear-gradient(135deg, #6C1B8C, #8C28B7);
  color: #fff;

  font-size: 17px;
  font-weight: 800;
  letter-spacing: .3px;

  cursor: pointer;

  position: relative;
  overflow: hidden;

  box-shadow:
    0 8px 20px rgba(108, 27, 140, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.25);

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

/* ✨ لمعة متحركة */
.auth-btn::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,.35) 45%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform .6s ease;
}

.auth-btn:hover::before{
  transform: translateX(120%);
}

/* Hover */
.auth-btn:hover{
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 14px 30px rgba(108, 27, 140, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.35);

  background: linear-gradient(135deg, #7a239c, #9c34c8);
}

/* Active (ضغط) */
.auth-btn:active{
  transform: translateY(0) scale(.98);
  box-shadow:
    0 5px 12px rgba(108, 27, 140, 0.3),
    inset 0 1px 2px rgba(0,0,0,0.25);
}

/* Focus */
.auth-btn:focus,
.auth-btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(108, 27, 140, 0.35),
    0 8px 20px rgba(108, 27, 140, 0.35);
}

/* ====== رسالة خطأ ====== */
/* .auth-error {
    color: red;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
} */
/* ====== رسالة خطأ (Deluxe) ====== */
.auth-error{
  margin-top: 14px;
  padding: 12px 12px;

  border-radius: 12px;
  border: 1px solid rgba(220, 53, 69, 0.28);
  background: rgba(220, 53, 69, 0.08);

  display: flex;
  align-items: flex-start;
  gap: 10px;

  color: #b42318; /* أحمر غامق شيك */
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;

  box-shadow: 0 8px 18px rgba(0,0,0,0.06);

  animation: errorPop .25s ease;
}

.auth-error-icon{
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.2;
  margin-top: 1px;
}

.auth-error-text{
  flex: 1;
}

/* أنيميشن ظهور لطيف */
@keyframes errorPop{
  from { transform: translateY(-6px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
/* ====== Hide Error Animation ====== */
.auth-error.hide{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s ease;
}
/* =========================================================== */
/* ====== رابط أسفل النموذج ====== */
.auth-bottom-text {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.auth-bottom-text a {
    color: #6C1B8C;
    font-weight: 700;
    text-decoration: none;
}
.auth-input[type="password"]{
  direction: ltr;
  text-align: left;
}

/* ================= PAGE CONTAINER size ================= */

.orders-container{
  width: 80%;
  max-width: 700px;   /* ✅ ده اللي هيظبط الشاشات الكبيرة */
  margin: 0 auto;
  padding: 0 12px;
}
@media (max-width: 768px){
  .orders-container{
    width: 100%;
    max-width: 100%;
  }
}
/* =============================== */
/* ================= Loading / Spinner ================= */

.auth-btn{
  /* مهم عشان السبانر يتظبط */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* السبانر مخفي افتراضياً */
.auth-btn .btn-spinner{
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: rgba(255,255,255,1);
  animation: spin .8s linear infinite;
}

/* وضع اللودينج */
.auth-btn.is-loading{
  pointer-events: none;
  opacity: .92;
  cursor: not-allowed;
  transform: none !important;
}

.auth-btn.is-loading::before{
  /* اقفل حركة اللمعة وقت اللودينج */
  transform: translateX(-120%) !important;
  transition: none !important;
}

.auth-btn.is-loading .btn-spinner{
  display: inline-block;
}

.auth-btn.is-loading .btn-text{
  opacity: .95;
}

/* Animation */
@keyframes spin{
  to { transform: rotate(360deg); }
}

/* ================= Shake on Error ================= */

.auth-btn.shake{
  animation: shakeX .45s ease;
}

@keyframes shakeX{
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
  90% { transform: translateX(3px); }
}
/* =========================ليس لديك حساب وانشاء حساب=============== */
/* ====== Bottom Register Section ====== */
.auth-bottom-text{
  margin-top: 18px;
  text-align: center;

  font-size: 15px;
  font-weight: 800;
  color: #6b7280; /* رمادي شيك */

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.auth-bottom-hint{
  opacity: .9;
}

/* رابط إنشاء حساب */
.auth-register-link{
  position: relative;

  color: #6C1B8C;
  font-weight: 800;
  text-decoration: none;

  padding: 2px 4px;
  border-radius: 6px;

  transition:
    color .2s ease,
    background .2s ease,
    transform .2s ease;
}

/* خط سفلي متحرك */
.auth-register-link::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;

  height: 2px;
  background: linear-gradient(90deg, #6C1B8C, #8C28B7);
  border-radius: 2px;

  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.auth-register-link:hover::after{
  transform: scaleX(1);
  transform-origin: left;
}

/* Hover */
.auth-register-link:hover{
  color: #8C28B7;
  background: rgba(108,27,140,.08);
  transform: translateY(-1px);
}

/* Active (موبايل) */
.auth-register-link:active{
  transform: scale(.96);
}

/* Focus */
.auth-register-link:focus,
.auth-register-link:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(108,27,140,.25);
}
/* ======================================== */
/* =====================علاممه الاخفاء والاظهار=================== */
/* ===== Password Toggle (Login) ===== */
.password-field{
  position: relative;
}

.password-field .auth-input{
  padding-left: 44px; /* مساحة للأيقونة */
}

/* الأيقونة */
.toggle-password{
  position: absolute;
  left: 12px;         /* لأن اتجاه الصفحة RTL */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  opacity: .85;
  transition: opacity .2s ease, transform .2s ease;
}

.toggle-password:hover{
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
}

.toggle-password:active{
  opacity: .75;
}
/* ======================================== */
/* خلي حقل الباسورد دايمًا LTR حتى عند إظهار كلمة المرور */
#passwordInput{
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}
