/* الأنماط الحالية + إضافات جديدة */
.profile-container {
  max-width: 800px;
  margin: 100px auto;
  padding: 30px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
}

/* تنسيق الصورة الأساسي */
.profile-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #2C3E50, #4A6572);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  overflow: hidden;
  cursor: default;
}

/* زر تعديل الصورة (بجانب الصورة) */
.edit-image-btn {
  position: absolute;
  bottom: 0;
  right: -5px;
  width: 32px;
  height: 32px;
  background: #4A6572;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 14px;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

.edit-image-btn:hover {
  background: #2C3E50;
  transform: scale(1.05);
}

.edit-image-btn i {
  margin: 0;
  font-size: 14px;
}

/* إخفاء الـ overlay القديم */
.avatar-overlay {
  display: none;
}

.profile-info h2 {
  color: #2C3E50;
  margin-bottom: 5px;
}

.profile-info p {
  color: #666;
}

.profile-details {
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  border-bottom: 1px solid #f5f5f5;
}

.detail-item i {
  width: 30px;
  color: #4A6572;
  font-size: 20px;
}

.detail-item .label {
  width: 120px;
  font-weight: 600;
  color: #333;
}

.detail-item .value {
  color: #666;
  flex: 1;
}

.logout-btn {
  margin-top: 30px;
  padding: 15px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
}

.logout-btn:hover {
  background: #c82333;
}

/* الأنماط الجديدة لمنازل المستخدم */
.user-homes-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

.user-homes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.user-homes-header h2 {
  color: #2C3E50;
  font-size: 24px;
  margin: 0;
}

.add-home-btn {
  background: #4A6572;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s;
}

.add-home-btn:hover {
  background: #2C3E50;
}

.homes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.home-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.home-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.home-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.home-card .home-info {
  padding: 16px;
}

.home-card h3 {
  font-size: 18px;
  color: #2C3E50;
  margin-bottom: 8px;
}

.home-card .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.approved {
  background: #d4edda;
  color: #155724;
}

.status-badge.rejected {
  background: #f8d7da;
  color: #721c24;
}

.home-card .price {
  font-size: 16px;
  font-weight: 700;
  color: #4A6572;
  margin: 8px 0;
}

.home-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.edit-btn {
  flex: 1;
  padding: 8px;
  background: #4A6572;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.edit-btn:hover {
  background: #2C3E50;
}

.edit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.delete-btn {
  flex: 1;
  padding: 8px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.delete-btn:hover {
  background: #c82333;
}

/* Modal styles */
.modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #2C3E50;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  cursor: pointer;
  color: #999;
}

.close-modal:hover {
  color: #333;
}

.form-row {
  margin-bottom: 15px;
}

.form-row label {
  display: block;
  font-weight: 600;
  color: #2C3E50;
  margin-bottom: 5px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.form-row textarea {
  min-height: 80px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #4A6572;
  color: white;
}

.btn-primary:hover {
  background: #2C3E50;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* زر Become a Host */
.btn-host {
  background: linear-gradient(135deg, #d4af37, #e5c767);
  color: #1e3c5c;
  border: none;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-host:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e5c767, #d4af37);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-host:active {
  transform: translateY(0);
}



/* ========== Loader العالمي ========== */
.loader-global {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.loader-global.show-loader {
  display: flex;
}

.loader-global::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #d4af37;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}