/* =========================================================
   USER PROFILE SECTION (pusers.css)
========================================================= */
.user-profile-section {
  background: linear-gradient(180deg,#ffffffa8 0%,#f3f0ffcf 100%);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 28px rgba(110,61,233,0.07);
  max-width: 950px;
  margin: 34px auto;
  padding: 26px 22px 34px;
  position: relative;
}

@media(max-width:850px) {
  .user-profile-section {
    max-width: 90%;
    margin: 20px auto;
    padding: 18px;
  }
}

@media(max-width:600px) {
  .user-profile-section {
    max-width: 96%;
    margin: 12px auto;
    padding: 14px;
  }
}

.user-profile-row {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1.5px solid #f1edff;
  padding-bottom: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.user-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid #dcd0ff;
  box-shadow: 0 3px 12px rgba(167,119,251,0.25);
  object-fit: cover;
  cursor: pointer;
  transition: transform .2s;
}

.user-avatar:hover {
  transform: scale(1.05);
}

@media(max-width:600px) {
  .user-avatar {
    width: 75px;
    height: 75px;
    margin: 0 auto;
  }
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.user-name {
  font-size: 22px;
  font-weight: 800;
  color: #6a3eea;
}

@media(max-width:600px) {
  .user-name {
    text-align: center;
    font-size: 18px;
  }
}

.user-role-label {
  font-size: 14px;
  color: #fff;
  background: linear-gradient(90deg,#6e3de9 0%,#a777fb 100%);
  padding: 7px 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(110,61,233,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

@media(max-width:600px) {
  .user-role-label {
    font-size: 12px;
    margin: auto;
  }
}

.user-role-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(110,61,233,0.18);
  border: 1px solid #eee;
  overflow: hidden;
  display: none;
  flex-direction: column;
  min-width: 140px;
  z-index: 2200;
}

@media(max-width:600px) {
  .user-role-dropdown {
    right: 50%;
    transform: translateX(50%);
    width: 80%;
    text-align: center;
  }
}

.user-role-dropdown span {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  color: #555;
  transition: background .2s,color .2s;
}

.user-role-dropdown span:hover {
  background: linear-gradient(90deg,#f5edff,#ece9fc);
  color: #6e3de9;
}

/* زر تسجيل الخروج */
.logout-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  right: auto !important;
  background: linear-gradient(90deg,#e14b4b,#c22121);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(226,48,48,0.25);
  transition: transform .2s, box-shadow .2s;
  z-index: 10000;
  pointer-events: auto;
}

.logout-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 12px rgba(226,48,48,0.35);
}

@media(max-width:600px) {
  .logout-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 99999;
  }
}

/* بطاقات الإحصائيات */
.user-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: 14px;
  margin-top: 12px;
}

.user-stat-card {
  background: rgba(255,255,255,0.75);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 4px 20px rgba(110,61,233,0.07);
  text-align: center;
  padding: 20px 10px 16px;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  cursor: default;
}

.user-stat-card.clickable {
  cursor: pointer;
}

.user-stat-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(110,61,233,0.12);
}

.stat-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.user-stat-card .material-symbols-rounded {
  font-size: 24px;
  background: linear-gradient(135deg,#a777fb 0%,#6e3de9 100%);
  color: #fff;
  border-radius: 50%;
  padding: 6px;
}

.user-stat-card .stat-title {
  font-size: 14px;
  color: #5c4b99;
  font-weight: 600;
}

.user-stat-card .stat-num {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(90deg,#6e3de9 0%,#a777fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media(max-width:600px) {
  .user-stat-card {
    padding: 14px 8px;
  }
  .user-stat-card .stat-num {
    font-size: 22px;
  }
}

/* Banner */
/* Banner OUTSIDE the box */
.user-banner.user-banner-slider {
  width: 100%;
  max-width: 700px;
  margin: 18px auto 0;
  border-radius: 20px;
  overflow: hidden;
  display: block;
}

.user-banner.user-banner-slider img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(110,61,233,0.1);
  transition: opacity .4s;
}

@media(max-width:600px) {
  .user-banner.user-banner-slider {
    max-width: 96%;
  }
  .user-banner.user-banner-slider img {
    height: 180px;
    border-radius: 18px;
  }
}

/* بروفايل على الموبايل */
@media(max-width:600px) {
  .user-profile-row {
    flex-direction: column !important;
    text-align: center;
  }

  .user-info {
    align-items: center;
  }
}

#userBannerSliderImg {
  transition: opacity .4s ease;
}


