.my-account {
  padding: 40px 20px;
  background-color: #f9f9f9;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

/* --- التابات --- */
.nav.flex-column.nav-pills {
  position: sticky;
  top: 90px;
  /* المسافة من الأعلى لتفادي تراكب الهيدر */
  align-self: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  height: fit-content;
}

.my-account .nav-pills .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  margin-bottom: 8px;
  color: #444;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.my-account .nav-pills .nav-link i {
  font-size: 16px;
}

/* 🟢 الوضع LTR (الإنجليزي) */
html[dir="ltr"] #logout-btn i {
  transform: rotate(180deg);
}

/* 🔵 الوضع RTL (العربي) */
html[dir="rtl"] #logout-btn i {
  transform: rotate(0deg);
}

.my-account .nav-pills .nav-link.active,
.my-account .nav-pills .nav-link:hover {
  background: linear-gradient(45deg, var(--main-color), var(--secondary-color));
  color: #fff;
}

/* --- المحتوى --- */
.my-account .tab-content {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: left;
  /* افتراضي LTR */
}

.my-account h4 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #222;
}

.my-account h5 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
}

.my-account p {
  color: #555;
  margin-bottom: 10px;
}

/* --- الأزرار --- */
/* .my-account .btn {
  background: var(--primary, #007bff);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  transition: background 0.3s ease;
}

.my-account .btn:hover {
  background: var(--primary-dark, #0056b3);
} */

/* --- الإدخالات --- */
.my-account .form-control {
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 14px;
}

/* --- الجداول --- */
.my-account table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.my-account table th,
.my-account table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: center;
}

.my-account table th {
  background: #333;
  color: #fff;
  font-weight: 600;
}

.table-responsive {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.image-preview {
  position: relative;
  width: 180px;
  height: 180px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f8f9fa;
}

.image-preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.muted {
  color: var(--danger-color);
  font-size: 0.85rem;
}

/* تحسين زر الاختيار */

.upload-btn {
    position: absolute;
    bottom: 8px;
    padding: 0 !important;
    width: 40px !important;
    max-width: 40px !important;
    /* عرض ثابت */
    height: 40px !important;
    max-height: 40px !important;
    /* ارتفاع مساوي للعرض */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* دائرة */
    background: rgba(0, 0, 0, 0.6);
    /* خلفية لطيفة */
    cursor: pointer;
    z-index: 5;
    transition: 0.2s;
    backdrop-filter: blur(5px);
}

html[lang="en"] .upload-btn {
    left: 8px;
}


html[lang="ar"] .upload-btn {
    right: 8px;
}

.upload-btn i {
    font-size: 18px;
    color: #fff;
}

.upload-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* --- زر إظهار/إخفاء الباسورد --- */
.toggle-password {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  font-size: 1.1rem;
}

/* --- Animation لتغيير التاب --- */
.my-account .tab-pane {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.3s ease-in-out;
}

.my-account .tab-pane.active.show {
  opacity: 1;
  transform: translateX(0);
}

/* RTL: الحركة من اليمين */
html[dir="rtl"] .my-account .tab-pane {
  transform: translateX(-30px);
}

/* ====== LTR ====== */
html[dir="ltr"] .my-account .tab-content {
  text-align: left;
}

html[dir="ltr"] .my-account .nav-pills .nav-link {
  flex-direction: row !important;
  justify-content: flex-start;
  text-align: left;
}

html[dir="ltr"] .my-account .nav-pills .nav-link i {
  margin-right: 8px;
  margin-left: 0;
}

html[dir="ltr"] .toggle-password {
  right: 10px;
  left: auto;
}

/* ====== RTL ====== */
html[dir="rtl"] .my-account .tab-content {
  text-align: right;
}

html[dir="rtl"] .my-account .nav-pills .nav-link {
  flex-direction: row !important;
  /* أيقونة بعد النص */
  justify-content: flex-start;
  text-align: right;
}

html[dir="rtl"] .my-account .nav-pills .nav-link i {
  margin-left: 8px;
  margin-right: 0;
}

html[dir="rtl"] .toggle-password {
  left: 10px;
  right: auto;
}

/* --- موبايل --- */
@media (max-width: 991px) {
  .my-account .row {
    flex-direction: column;
  }

  .my-account .col-md-3,
  .my-account .col-md-9 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .my-account .nav-pills {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
  }

  .my-account .nav-pills .nav-link {
    margin: 5px;
    flex: 1 1 auto;
    text-align: center;
  }

  .row {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
  }
}