/* Tinh chỉnh một chút cho hợp tông màu của bạn */

.swal2-confirm {
  background-color: var(--primary) !important;
}

.swal2-cancel {
  background-color: #6c757d !important;
}
.profile-container {
  max-width: 1000px;
  margin: 20px auto;
  padding-bottom: 50px;
}

/* Banner & Avatar Section */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  /* background: url("../../../assets/img/banner_fmember.jpg"); */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}

.profile-header-main {
  background: var(--bg-card);
  padding: 0 30px 30px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 30px;
  text-align: center;
}

.avatar-holder {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 5px solid var(--bg-card);
  margin: -65px auto 15px;
  position: relative;
  overflow: hidden;
  background: var(--bg-body);
}

.profile-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

.profile-handle {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 20px;
}

/* Stats */
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-value {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tabs & Content */
.content-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-link {
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 700;
  border: 1px solid var(--border);
  cursor: pointer;
}

.tab-link.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

@media (min-width: 768px) {
  .profile-header-main {
    text-align: left;
  }

  .avatar-holder {
    margin: -65px 0 15px 0;
  }

  .header-actions {
    position: absolute;
    top: 20px;
    right: 30px;
  }

  .profile-stats {
    justify-content: flex-start;
  }
}
@media (max-width: 768px) {
  .grid-layout {
    display: flex;
    flex-direction: column-reverse;
  }
  .grid-layout aside {
    margin-top: 10px;
    margin-bottom: 0;
  }
  #profile-content {
    margin-top: -20px;
  }
  .content-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.tab-content {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Container chứa ảnh upload */
.avatar-upload-box {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px auto; /* Canh giữa */
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary); /* Viền màu chủ đạo */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Ảnh hiển thị */
.avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lớp phủ mờ có icon Camera */
.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; /* Mặc định ẩn */
  transition: opacity 0.3s ease;
}

/* Hiện lớp phủ khi hover */
.avatar-upload-box:hover .avatar-overlay {
  opacity: 1;
}

.camera-icon {
  color: white;
  font-size: 1.8rem;
}

/* Label cho input */
.custom-label {
  font-weight: 600;
  color: var(--text-main);
  display: block;
  text-align: left;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
/* ================================================= */
/* FIX SWEETALERT2 CHO DARK MODE (Thêm vào cuối file) */
/* ================================================= */
.swal2-popup{
  border-radius: 12px;
}
/* 1. Đổi màu nền và màu chữ của khung thông báo */
[data-theme="dark"] .swal2-popup {
    background: var(--bg-card) !important;  /* Lấy màu nền thẻ tối */
    color: var(--text-main) !important;     /* Lấy màu chữ sáng */
    border: 1px solid var(--border);        /* Thêm viền mờ cho đẹp */
}

/* 2. Đổi màu tiêu đề và nội dung chữ bên trong */
[data-theme="dark"] .swal2-title,
[data-theme="dark"] .swal2-html-container,
[data-theme="dark"] .swal2-content {
    color: var(--text-main) !important;
}

/* 3. Đổi màu nút đóng (dấu X) */
[data-theme="dark"] .swal2-close {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .swal2-close:hover {
    color: var(--primary) !important;
}

/* 4. Đổi màu Input/Textarea (nếu bạn dùng SweetAlert để nhập liệu) */
[data-theme="dark"] .swal2-input,
[data-theme="dark"] .swal2-textarea,
[data-theme="dark"] .swal2-select {
    background: var(--bg-body) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
    box-shadow: none !important; /* Bỏ shadow mặc định xấu của SweetAlert */
}

/* 5. Fix màu nền khi Input được focus */
[data-theme="dark"] .swal2-input:focus,
[data-theme="dark"] .swal2-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important; /* Dùng màu --primary của bạn */
}