/* =========================================================================
   SAYFA: Profil ve Yönetim Paneli (#profileViewSection)
   Kullanıcı profili, kredi geçmişi ve admin sekmeleri.
   Buradaki her kural #profileViewSection ile başlar.
   ========================================================================= */

/* Admin sekme çubuğu: etiketler tek satır, sığmazsa yatay kaydırılır
   (switchAdminTab sınıfları sıfırladığı için düzen burada sabitlenir) */
#profileViewSection #adminNavTabsBar .admin-tab-btn {
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 38px;
}

#profileViewSection .admin-tab-btn {
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

/* Sekme içerikleri gösterildiğinde yumuşak giriş */
#profileViewSection [id^="admin"][id$="Section"]:not(.hidden) {
  animation: fadeSlideUp 0.4s var(--ease-out) backwards;
}

/* Kartlar */
@media (hover: hover) {
  #profileViewSection .shadcn-card:hover {
    box-shadow: var(--shadow-sm);
  }
}

/* Tablolar: dar ekranda kaydırma, sayılar hizalı */
#profileViewSection table {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
  #profileViewSection .overflow-x-auto > table {
    min-width: 600px;
  }
  #profileViewSection .overflow-x-auto,
  #profileViewSection .table-responsive-wrapper {
    -webkit-overflow-scrolling: touch;
  }
}

/* Telefonda form alanları tam genişlik */
@media (max-width: 639.98px) {
  #profileViewSection input:not([type="checkbox"]):not([type="radio"]),
  #profileViewSection select,
  #profileViewSection textarea {
    max-width: 100%;
  }
}

#profileViewSection button:not(:disabled):active {
  transform: scale(0.98);
}

/* ---------- Telefon: profil başlığı ferah ve tek satırlık ---------- */
@media (max-width: 639.98px) {
  #profileViewSection #profileBackBtn {
    width: 2.5rem;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
  }
  #profileViewSection #profileBackBtn > span {
    display: none;
  }
  #profileViewSection #dashUserAvatar {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
  }
  #profileViewSection #dashUserName {
    font-size: 1.05rem;
    line-height: 1.3;
  }
  #profileViewSection #dashUserName + span {
    flex-shrink: 0;
  }
  #profileViewSection #dashUserName,
  #profileViewSection #dashUserEmail {
    overflow-wrap: anywhere;
  }
  #profileViewSection #dashUserName ~ span,
  #profileViewSection #dashUserName {
    min-width: 0;
  }
  #profileViewSection div:has(> #dashUserName) {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
  #profileViewSection #dashUserRoleBadge {
    white-space: nowrap;
  }
  #profileViewSection #dashBuyCreditActionBtn,
  #profileViewSection #dashBuyCreditActionBtn ~ button {
    flex: 1 1 0;
    justify-content: center;
  }
}
