body {
    margin: 0;
    font-family: 'Qahwa Arabic';
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}


h1 {
    font-family: 'Qahwa Arabic';
    text-align: center;
    color: var(--green);
    margin-bottom: 30px;
}

.container {
    width: 100%;
    max-width: 760px;
    padding: 16px;
    box-sizing: border-box;
}

.login-box {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 0 20px 5px var(--green);
    box-sizing: border-box;
}

.login-box h2 {
    color: var(--green);
    font-size: 30px;
    margin-bottom: 25px;
    font-family: 'Qahwa Arabic';
}

#loginForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.login-box input {
    color: var(--green);
    text-align: right;
    width: 75%;
    max-width: 360px;
    padding: 10px;
    border: 2px solid var(--green);
    border-radius: 8px;
    font-family: 'IBMPlexArabic';
    font-size: 14px;
    box-sizing: border-box;
}

.login-box input::placeholder {
    color: var(--green);
    opacity: 0.3;
    font-family: 'Qahwa Arabic';
        font-size: 16px;
        font-weight: bold;
}

.login-box button {
    background-color: var(--brik);
    color: white;
    border: 2px solid var(--brik);
    padding: 10px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Qahwa Arabic';
    font-size: 18px;
}

.login-box button:hover {
background-color: transparent;
color: var(--brik);
    border: 2px solid var(--brik);
}

/* Toast Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Qahwa Arabic';
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 9999;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg,#89d6b7 0%, var(--green) 100%);
}

.toast-error {
    background: linear-gradient(135deg, #e58957 0%, #ac1c2f 100%);
}

.toast-info {
    background: linear-gradient(135deg, #65686a 0%,  var(--abyad)100%);
    color:var(--green);
}

.auth-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.signup-text {
  font-family: 'Qahwa Arabic';
  color: #38726c;
  font-size: 18px;
  margin-top: 35px;
  margin-bottom: 12px;
}
.signup-btn {
  font-family: 'Qahwa Arabic';
  display: inline-block;
  background-color: transparent;
  color: #38726c;
  border: 2px solid #38726c;
  padding: 10px 40px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.signup-btn:hover {
  background-color: #38726c;
  color: #ffffff;
}

/* ===== رابط نسيت كلمة المرور ===== */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: var(--green);
    font-size: 14px;
    text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ===== نافذة استعادة كلمة المرور ===== */
.fp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.fp-overlay[hidden] { display: none; }
.fp-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
}
.fp-box h2 { color: var(--green); margin: 0 0 10px; font-size: 20px; }
.fp-box p { color: #6c8a85; font-size: 14px; margin: 0 0 18px; }
.fp-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
}
.fp-box button {
    width: 100%;
    padding: 12px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}
.fp-box button:disabled { opacity: 0.6; cursor: not-allowed; }
.fp-close {
    position: absolute;
    top: 10px;
    left: 16px;
    font-size: 26px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}
.fp-close:hover { color: #38726c; }

/* ===== إظهار/إخفاء كلمة المرور ===== */
.fp-pass-wrap { position: relative; }
.fp-pass-wrap input { margin-bottom: 0; padding-left: 60px; }
.fp-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
/* ===== زر إعادة إرسال الرمز ===== */
.fp-resend {
    background: transparent !important;
    color: var(--green) !important;
    border: 1px solid var(--green) !important;
    margin-top: 10px;
    font-size: 14px !important;
}
.fp-resend:disabled { color: #999 !important; border-color: #ccc !important; }
.fp-pass-wrap { margin-bottom: 14px; }

/* ===== تجاوب الموبايل ===== */
@media (max-width: 600px) {
    h1 { font-size: 26px; margin-bottom: 20px; }
    .login-box { padding: 26px 18px; border-radius: 16px; box-shadow: 0 0 14px 3px var(--green); }
    .login-box h2 { font-size: 20px; line-height: 1.6; margin-bottom: 20px; }
    .login-box input { width: 100%; max-width: 100%; font-size: 15px; }
    .login-box input::placeholder { font-size: 14px; }
    .auth-buttons { flex-direction: column; width: 100%; gap: 12px; }
    .auth-buttons button,
    .signup-btn { width: 100%; box-sizing: border-box; padding: 12px; }
}

/* ===== حقل كلمة المرور مع أيقونة العين ===== */
.pw-field {
  position: relative;
  width: 75%;
  max-width: 360px;
}
.pw-field input {
  width: 100%;
  max-width: 100%;
  height: 44px;
  box-sizing: border-box;
  padding-left: 42px; /* مساحة للعين على اليسار */
}
.pw-eye {
  position: absolute;
  left: 8px;
  top: 22px; /* منتصف الحقل الثابت — لا يتأثر بالرسائل تحته */
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  padding: 4px !important;
  margin: 0 !important;
  color: var(--green) !important;
  width: auto !important;
  min-width: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: 0;
}
.pw-eye:hover { color: var(--brik) !important; background: none !important; }
@media (max-width: 600px) {
  .pw-field { width: 100%; max-width: 100%; }
}
