/* 🌐 مودال الملف الشخصي */
#profileModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.3s ease;
}

#profileModal.active {
  display: flex;
  animation: fadeInBg 0.3s ease;
}

/* 🧩 المربع الداخلي */
.profile-modal-inner {
  background: #fff;
  border-radius: 20px;
  padding: 30px 25px;
  width: 90%;
  max-width: 620px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  animation: popUp 0.35s ease;
  font-family: "Tajawal", sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 🧭 العنوان */
.profile-modal-inner h2 {
  text-align: center;
  color: #004aad;
  margin-bottom: 20px;
  font-size: 21px;
}

/* ⚙️ الحقول */
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 26px; /* ← مسافة أفقية أكبر */
  row-gap: 18px;   /* ← مسافة عمودية لطيفة */
}

.profile-modal-inner label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 13px;
  color: #333;
}

.profile-modal-inner input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  transition: 0.3s;
}

.profile-modal-inner input:focus {
  border-color: #004aad;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 74, 173, 0.25);
}

/* 🔒 الإيميل */
.profile-modal-inner input[readonly] {
  background: #f6f6f6;
  cursor: not-allowed;
  color: #666;
}

/* 🧱 الأزرار */
.btn-group {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.save-btn {
  flex: 1;
  background: linear-gradient(90deg, #004aad, #ff9800);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}
.save-btn:hover {
  background: linear-gradient(90deg, #003a99, #ff7b00);
}

.close-btn-secondary {
  flex: 1;
  background: #e2e2e2;
  color: #333;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.close-btn-secondary:hover {
  background: #ccc;
}

/* 📱 موبايل */
@media (max-width: 640px) {
  #profileModal {
    justify-content: center;
    align-items: center; /* ← يخلي المود سنتر تمام */
  }

  .profile-modal-inner {
    padding: 22px 18px;
    width: 85%;
    max-width: 380px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }

  .profile-form-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 22px; /* ← يضيف مسافة واضحة بالموبايل */
    row-gap: 14px;
  }
}

  .profile-modal-inner input {
    font-size: 13px;
    padding: 8px;
  }

  .btn-group {
    flex-direction: row;
    gap: 10px;
  }

  .save-btn,
  .close-btn-secondary {
    padding: 9px;
    font-size: 13px;
  }
}

/* ✨ مؤثرات */
@keyframes fadeInBg {
  from {opacity: 0;}
  to {opacity: 1;}
}
@keyframes popUp {
  from {opacity: 0; transform: scale(0.9);}
  to {opacity: 1; transform: scale(1);}
}
