/* =====================================================
   PROFILE PAGE - Sidebar trai + goal circle
   ===================================================== */

.profile-sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
  position: sticky;
  top: 80px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-dark);
  font-size: .92rem;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all .15s;
}

.profile-menu-item:hover {
  background: #f3f5f8;
  color: var(--brand-blue);
}

.profile-menu-item.active {
  background: rgba(31, 111, 235, .1);
  color: var(--brand-blue);
  font-weight: 600;
}

.profile-menu-item i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.profile-menu-item.text-danger:hover {
  background: rgba(220, 53, 69, .08);
  color: #dc3545 !important;
}

.text-orange { color: var(--brand-orange) !important; }

/* Goal circle */
.goal-circle {
  display: inline-block;
  position: relative;
}

/* Stat icon - dat lai cho dep hon trong profile */
.profile-sidebar + .col-lg-9 .stat-card { padding: 16px; }
.profile-sidebar + .col-lg-9 .stat-card .stat-value { font-size: 1.5rem; }
.profile-sidebar + .col-lg-9 .stat-card .stat-icon { font-size: 2rem; }

@media (max-width: 991px) {
  .profile-sidebar {
    position: static;
    margin-bottom: 16px;
  }
}


/* v46: avatar upload bằng file máy tính, không dán link */
.profile-avatar-upload-v46 .profile-avatar-preview-v46{width:72px;height:72px;border-radius:50%;background:#eaf2ff;color:#0f3767;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:28px;overflow:hidden;flex:0 0 72px}
.profile-avatar-upload-v46 .profile-avatar-preview-v46 img{width:100%;height:100%;object-fit:cover;display:block}
.profile-avatar-label-v46{display:inline-flex;align-items:center;gap:7px;cursor:pointer}
.profile-avatar-label-v46:hover{text-decoration:underline}
.mfa-email-only-v46{max-width:560px}

/* v48: khóa kích thước avatar hồ sơ, không cho ảnh lớn bung layout */
.profile-avatar-upload-v46{align-items:center!important;overflow:hidden!important;}
.profile-avatar-upload-v46 .profile-avatar-preview-v46{width:64px!important;height:64px!important;max-width:64px!important;max-height:64px!important;min-width:64px!important;min-height:64px!important;flex:0 0 64px!important;border-radius:50%!important;overflow:hidden!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.profile-avatar-upload-v46 .profile-avatar-preview-v46 img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:cover!important;border-radius:50%!important;display:block!important;}
@media(max-width:575.98px){.profile-avatar-upload-v46 .profile-avatar-preview-v46{width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;flex-basis:56px!important;}}

/* v263: lịch sử đơn hàng + thông báo khóa học được admin cấp */
.profile-history-page-v263 .profile-history-card-v263{border-radius:12px;overflow:hidden}
.profile-history-page-v263 .profile-course-notifications-v263{margin-top:22px}
.profile-history-head-v263{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.profile-history-head-v263 h5{color:#172033}
.profile-history-search-v263{height:42px;min-width:330px;display:flex;align-items:center;border:1px solid #cbd9ea;border-radius:9px;background:#fff;overflow:hidden}
.profile-history-search-v263>i{margin-left:13px;color:#7890ad}
.profile-history-search-v263 input{height:100%;flex:1;min-width:0;border:0;outline:0;padding:0 10px;color:#24364e;background:transparent}
.profile-history-search-v263 a{width:34px;height:100%;display:flex;align-items:center;justify-content:center;color:#7c8da5}
.profile-history-search-v263 button{height:100%;border:0;background:#2476f2;color:#fff;font-weight:800;padding:0 16px}
.profile-orders-table-v263{border:1px solid #e5edf7;border-radius:10px;overflow-x:hidden}
.profile-orders-table-v263 table{min-width:760px}
.profile-orders-table-v263 thead th{color:#111827;font-weight:900;white-space:nowrap}
.profile-orders-table-v263 tbody td{vertical-align:middle}
.profile-orders-table-v263 code{color:#ec4899;font-family:inherit;font-weight:700}
.profile-history-empty-v263{min-height:180px;border:1px dashed #cfdae8;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8797ac;text-align:center}
.profile-history-empty-v263.compact{min-height:130px}
.profile-history-empty-v263 i{font-size:36px;opacity:.45}
.profile-history-empty-v263 p{margin:10px 0 0}
.profile-history-pager-v263{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:18px}
.profile-history-pager-v263 a{min-width:34px;height:34px;padding:0 9px;border:1px solid #cbd9ea;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:#315173;background:#fff;font-weight:800;text-decoration:none}
.profile-history-pager-v263 a:hover,.profile-history-pager-v263 a.active{background:#2476f2;border-color:#2476f2;color:#fff}
.profile-history-pager-v263 a.disabled{pointer-events:none;opacity:.4}
.profile-notification-list-v263{display:flex;flex-direction:column;border:1px solid #e5edf7;border-radius:10px;overflow:hidden}
.profile-notification-item-v263{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:14px;align-items:center;padding:17px 18px;background:#fff;border-bottom:1px solid #e8eef6}
.profile-notification-item-v263:last-child{border-bottom:0}
.profile-notification-item-v263:hover{background:#f8fbff}
.profile-notification-icon-v263{width:46px;height:46px;border-radius:12px;background:#e8f2ff;color:#1668dc;display:flex;align-items:center;justify-content:center;font-size:22px}
.profile-notification-body-v263{min-width:0}
.profile-notification-body-v263 strong{display:block;color:#123761;font-size:16px;margin-bottom:5px}
.profile-notification-body-v263 p{margin:0;color:#41536e;line-height:1.45}
.profile-notification-body-v263 time{display:inline-flex;align-items:center;gap:6px;margin-top:7px;color:#8290a5;font-size:12px}
.profile-notification-action-v263{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;border:1px solid #b9d5ff;border-radius:8px;padding:8px 12px;color:#1769df;font-weight:800;text-decoration:none;background:#f4f8ff}
.profile-notification-action-v263:hover{background:#1769df;color:#fff}
@media(max-width:991.98px){
  .profile-history-head-v263{align-items:stretch;flex-direction:column}
  .profile-history-search-v263{width:100%;min-width:0}
}
@media(max-width:575.98px){
  .profile-history-page-v263 .card-body{padding:18px!important}
  .profile-notification-item-v263{grid-template-columns:42px minmax(0,1fr);padding:14px}
  .profile-notification-icon-v263{width:40px;height:40px;font-size:19px}
  .profile-notification-action-v263{grid-column:2;width:max-content;margin-top:2px}
  .profile-history-search-v263 button{padding:0 12px}
}

/* v299: thông tin tài khoản đồng bộ giao diện hồ sơ học viên */
.profile-account-page-v299{background:#eef4f8;min-height:calc(100vh - 72px)}
.profile-account-heading-v299{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.profile-account-heading-v299 h1{margin:0;color:#123761;font-size:26px;font-weight:900}
.profile-account-heading-v299 p{margin:6px 0 0;color:#70839b;font-size:14px}
.profile-account-card-v299{background:#fff;border:1px solid #e1eaf4;border-radius:14px;box-shadow:0 8px 24px rgba(15,55,103,.06);padding:26px;min-width:0}
.profile-account-card-head-v299{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.profile-account-card-head-v299 h2{margin:0;color:#123761;font-size:22px;font-weight:900}
.profile-account-avatar-v299{display:flex;align-items:center;gap:16px;padding-bottom:18px;margin-bottom:20px;border-bottom:1px solid #e6edf5}
.profile-account-avatar-v299 .profile-avatar-preview-v46{width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;max-width:68px!important;max-height:68px!important;flex:0 0 68px!important;border:1px solid #d6e4f3;background:#eaf3ff}
.profile-account-avatar-v299 .profile-avatar-label-v46{font-weight:900;color:#1769d2;text-decoration:none}
.profile-account-avatar-v299 .profile-avatar-label-v46:hover{text-decoration:underline}
.profile-account-help-v299{margin-top:4px;color:#8090a5;font-size:12px}
.profile-account-grid-v299{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px}
.profile-account-field-v299{min-width:0;display:flex;flex-direction:column;gap:7px}
.profile-account-field-v299 label{color:#243852;font-size:14px;font-weight:800}
.profile-account-field-v299 label span{color:#ef4444}
.profile-account-field-v299 input,.profile-account-field-v299 select,.profile-account-field-v299 textarea{width:100%;min-height:44px;border:1px solid #cbd9ea;border-radius:8px;background:#fff;color:#24364e;padding:10px 13px;outline:0;transition:border-color .16s ease,box-shadow .16s ease}
.profile-account-field-v299 textarea{min-height:96px;resize:vertical}
.profile-account-field-v299 input:focus,.profile-account-field-v299 select:focus,.profile-account-field-v299 textarea:focus{border-color:#2f7cf6;box-shadow:0 0 0 3px rgba(47,124,246,.12)}
.profile-account-field-v299 input.is-locked,.profile-account-field-v299 input[readonly],.profile-phone-combo-v299.is-locked{background:#f1f5f9;color:#607087}
.profile-account-field-v299 small{display:flex;align-items:center;gap:6px;color:#8a99ad;font-size:11px;line-height:1.35}
.profile-account-field-full-v299{grid-column:1/-1}
.profile-phone-combo-v299{display:grid;grid-template-columns:145px minmax(0,1fr);border:1px solid #cbd9ea;border-radius:8px;background:#fff;overflow:hidden;transition:border-color .16s ease,box-shadow .16s ease}
.profile-phone-combo-v299:focus-within{border-color:#2f7cf6;box-shadow:0 0 0 3px rgba(47,124,246,.12)}
.profile-phone-combo-v299 select,.profile-phone-combo-v299 input{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;min-height:44px}
.profile-phone-combo-v299 select{border-right:1px solid #e2eaf3!important;font-weight:700}
.profile-phone-combo-v299 select:disabled,.profile-phone-combo-v299 input[readonly]{cursor:not-allowed}
.profile-account-actions-v299{display:flex;align-items:center;justify-content:flex-start;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid #e6edf5}
.profile-account-actions-v299 .btn{min-height:42px;padding:9px 18px;font-weight:800;border-radius:8px}
@media(max-width:991.98px){
  .profile-account-heading-v299{margin-bottom:14px}
  .profile-account-heading-v299 h1{font-size:22px}
  .profile-account-card-v299{padding:20px}
}
@media(max-width:767.98px){
  .profile-account-page-v299{padding-top:14px!important}
  .profile-account-heading-v299 h1{font-size:20px}
  .profile-account-heading-v299 p{font-size:12px}
  .profile-account-card-v299{padding:16px;border-radius:12px}
  .profile-account-card-head-v299 h2{font-size:18px}
  .profile-account-avatar-v299{align-items:flex-start}
  .profile-account-grid-v299{grid-template-columns:1fr;gap:14px}
  .profile-account-field-full-v299{grid-column:auto}
  .profile-phone-combo-v299{grid-template-columns:118px minmax(0,1fr)}
  .profile-account-actions-v299 .btn{width:100%}
}

/* v301: avatar tròn nhỏ, xóa avatar và bộ chọn mã vùng có cờ đồng bộ */
.profile-account-avatar-v299.profile-avatar-upload-v46{display:flex!important;align-items:center!important;gap:16px!important;overflow:visible!important}
.profile-account-avatar-v299 .profile-avatar-preview-v46{
  width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;
  max-width:68px!important;max-height:68px!important;flex:0 0 68px!important;
  border-radius:50%!important;overflow:hidden!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important;position:relative!important;
  background:#eaf3ff!important;color:#315d91!important;font-size:24px!important;font-weight:900!important;
  border:1px solid #d6e4f3!important;box-shadow:0 5px 14px rgba(15,55,103,.08)!important;
}
.profile-account-avatar-v299 .profile-avatar-preview-v46 img{
  width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;
  max-width:100%!important;max-height:100%!important;display:block!important;object-fit:cover!important;
  object-position:center!important;border-radius:50%!important;
}
.profile-avatar-controls-v301{min-width:0;display:flex;flex-direction:column;gap:5px}
.profile-avatar-actions-v301{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.profile-avatar-remove-v301{
  border:0;background:transparent;color:#dc3545;padding:0;font-weight:800;font-size:13px;
  display:inline-flex;align-items:center;gap:6px;cursor:pointer;
}
.profile-avatar-remove-v301:hover{text-decoration:underline;color:#b91c1c}
.profile-avatar-remove-v301[hidden]{display:none!important}

.profile-phone-combo-v299.profile-phone-combo-v301{grid-template-columns:64px minmax(0,1fr);overflow:visible}
.profile-phone-country-picker-v301{position:relative;min-width:0}
.profile-phone-country-trigger-v301{
  width:64px;height:44px;border:0;border-right:1px solid #e2eaf3;border-radius:0;background:#fff;
  display:flex;align-items:center;justify-content:center;gap:7px;color:#46617f;cursor:pointer;padding:0;
}
.profile-phone-country-trigger-v301:hover{background:#f5f9ff}
.profile-phone-country-trigger-v301:disabled{cursor:not-allowed;background:#f1f5f9;opacity:.75}
.profile-phone-country-trigger-v301 img,
.profile-phone-country-option-v301 img{
  width:24px;height:18px;object-fit:cover;border-radius:2px;box-shadow:0 0 0 1px rgba(15,23,42,.12);flex:0 0 auto;
}
.profile-phone-country-trigger-v301 i{font-size:10px}
.profile-phone-country-menu-v301{
  position:absolute;z-index:1250;top:calc(100% + 8px);left:0;width:min(390px,calc(100vw - 48px));
  max-height:390px;overflow:hidden;border:1px solid #cbd9ea;border-radius:14px;background:#fff;
  box-shadow:0 18px 50px rgba(15,55,103,.22);
}
.profile-phone-country-menu-v301[hidden]{display:none!important}
.profile-phone-country-search-v301{
  position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:8px;padding:10px;
  border-bottom:1px solid #e5edf6;background:#fff;
}
.profile-phone-country-search-v301 i{color:#7890aa}
.profile-phone-country-search-v301 input{
  width:100%;height:38px;min-height:38px!important;border:1px solid #d4dfec!important;
  border-radius:9px!important;padding:0 11px!important;box-shadow:none!important;background:#fff!important;
}
.profile-phone-country-options-v301{max-height:330px;overflow:auto;padding:6px}
.profile-phone-country-option-v301{
  width:100%;min-height:43px;border:0;border-radius:9px;background:#fff;padding:7px 9px;
  display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:10px;
  text-align:left;color:#263b56;cursor:pointer;
}
.profile-phone-country-option-v301:hover,
.profile-phone-country-option-v301.active{background:#eaf3ff;color:#0f5ed7}
.profile-phone-country-option-v301 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-phone-country-option-v301 strong{font-size:12px;color:#64748b}
.profile-phone-combo-v301 #profilePhoneLocal{padding-left:13px!important}

@media(max-width:767.98px){
  .profile-account-avatar-v299.profile-avatar-upload-v46{align-items:center!important}
  .profile-account-avatar-v299 .profile-avatar-preview-v46{
    width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;
    max-width:58px!important;max-height:58px!important;flex-basis:58px!important;
  }
  .profile-avatar-actions-v301{gap:9px}
  .profile-phone-combo-v299.profile-phone-combo-v301{grid-template-columns:58px minmax(0,1fr)}
  .profile-phone-country-trigger-v301{width:58px}
  .profile-phone-country-menu-v301{
    position:fixed;left:16px;right:16px;top:50%;width:auto;max-height:min(70vh,520px);transform:translateY(-50%);
  }
  .profile-phone-country-options-v301{max-height:calc(min(70vh,520px) - 60px)}
}

/* v348: tách trang thông báo học viên và giữ nội dung thanh toán đúng hai dòng */
.profile-notifications-page-v348 .profile-course-notifications-v263{margin-top:0}
.profile-notification-message-v348{white-space:normal}
.profile-notification-message-v348 br{display:block;content:"";margin-top:2px}


/* V458: Email OTP cùng một hàng, cảnh báo luôn nằm ngay bên dưới */
.mfa-email-card-v458{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.mfa-email-title-v458{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:10px;
  min-width:0;
}
.mfa-email-title-v458 .mfa-method-icon{
  flex:0 0 auto;
}
.mfa-email-title-v458 h6{
  margin:0!important;
  white-space:nowrap;
  line-height:1.2;
  text-transform:uppercase;
}
.mfa-email-card-v458 > p{
  margin:0;
}
@media(max-width:575.98px){
  .mfa-email-card-v458{gap:10px;}
  .mfa-email-title-v458{gap:8px;}
  .mfa-email-title-v458 h6{font-size:16px;}
}


/* V459: thay cảnh báo vàng bằng dòng trạng thái mới luôn hiển thị */
.mfa-email-status-v459{
  display:flex;
  align-items:flex-start;
  gap:8px;
  width:100%;
  margin:0;
  color:#5f728b;
  font-family:Roboto,sans-serif;
  font-size:14px;
  font-weight:400;
  line-height:1.45;
}
.mfa-email-status-v459 i{
  flex:0 0 auto;
  margin-top:2px;
  color:#2563eb;
  font-size:15px;
  line-height:1;
}
.mfa-email-status-v459 span{min-width:0;}
@media(max-width:575.98px){
  .mfa-email-status-v459{font-size:13px;gap:7px;}
  .mfa-email-status-v459 i{font-size:14px;}
}

/* V596: trang thông báo user 10 mục/trang, xem chi tiết nội dung dài */
.profile-notification-item-v263.is-unread{background:#f3f8ff}
.profile-notification-item-v263.is-unread:hover{background:#edf5ff}
.profile-notification-title-row-v596{display:flex;align-items:center;gap:8px;min-width:0}
.profile-notification-title-row-v596 strong{min-width:0;margin-bottom:5px}
.profile-notification-unread-dot-v596{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#2374ec;box-shadow:0 0 0 3px rgba(35,116,236,.12)}
.profile-notification-preview-v596{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.profile-notification-full-v596{color:#41536e;line-height:1.55;overflow-wrap:anywhere}
.profile-notification-full-v596[hidden],.profile-notification-preview-v596[hidden]{display:none!important}
.profile-notification-full-v596 p{margin:0 0 7px}
.profile-notification-full-v596 p:last-child{margin-bottom:0}
.profile-notification-detail-btn-v596{display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:0;border:0;background:transparent;color:#1769d2;font:600 13px Roboto,sans-serif;cursor:pointer}
.profile-notification-detail-btn-v596:hover{text-decoration:underline}
.profile-notification-detail-btn-v596 i{font-size:12px}
.profile-notification-html-v593{margin-top:5px;color:#52657a;line-height:1.55}
.profile-notification-html-v593 p{margin:0 0 7px}
.profile-notification-html-v593 p:last-child{margin-bottom:0}
.profile-notification-html-v593 ul,.profile-notification-html-v593 ol{margin:5px 0 7px;padding-left:21px}
.profile-notification-html-v593 a{color:#1769d2;text-decoration:underline}
.profile-notification-html-v593 h3,.profile-notification-html-v593 h4{margin:5px 0 7px;color:#173b64;font-size:15px;font-weight:600}
@media(max-width:575.98px){
  .profile-notification-title-row-v596{align-items:flex-start}
  .profile-notification-detail-btn-v596{min-height:32px}
}

/* V597: liên kết hành động an toàn cho thông báo user. */
.profile-notification-action-link-v597{width:max-content;max-width:100%;display:inline-flex;align-items:center;gap:7px;margin-top:7px;padding:7px 11px;border:1px solid #b9d5f7;border-radius:9px;background:#f3f8ff;color:#1769d2;text-decoration:none;font-size:13px;font-weight:600;line-height:1.2}.profile-notification-action-link-v597:hover{border-color:#6eabf5;background:#eaf3ff;color:#0f5fc1}.profile-notification-action-link-v597 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* V598: thu gọn danh sách thông báo user, chữ nhẹ và đồng bộ. */
.profile-notifications-page-v348 .profile-notification-list-v263{border-radius:9px}
.profile-notifications-page-v348 .profile-notification-item-v263{
  grid-template-columns:36px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:10px 12px;
}
.profile-notifications-page-v348 .profile-notification-icon-v263{
  width:34px;
  height:34px;
  border-radius:9px;
  font-size:16px;
}
.profile-notifications-page-v348 .profile-notification-body-v263,
.profile-notifications-page-v348 .profile-notification-body-v263 p,
.profile-notifications-page-v348 .profile-notification-body-v263 strong,
.profile-notifications-page-v348 .profile-notification-body-v263 b{
  font-weight:400;
}
.profile-notifications-page-v348 .profile-notification-title-row-v596{
  gap:6px;
  align-items:center;
}
.profile-notifications-page-v348 .profile-notification-title-v598{
  display:block;
  min-width:0;
  margin:0 0 3px;
  color:#17385f;
  font-size:14px;
  font-weight:400;
  line-height:1.35;
}
.profile-notifications-page-v348 .profile-notification-preview-v596,
.profile-notifications-page-v348 .profile-notification-full-v596,
.profile-notifications-page-v348 .profile-notification-html-v593{
  margin-top:0;
  color:#52657a;
  font-size:13px;
  font-weight:400;
  line-height:1.4;
}
.profile-notifications-page-v348 .profile-notification-full-v596 p,
.profile-notifications-page-v348 .profile-notification-html-v593 p{
  margin:0 0 5px;
}
.profile-notifications-page-v348 .profile-notification-html-v593 h3,
.profile-notifications-page-v348 .profile-notification-html-v593 h4{
  margin:4px 0 5px;
  color:#17385f;
  font-size:13px;
  font-weight:400;
}
.profile-notifications-page-v348 .profile-notification-html-v593 ul,
.profile-notifications-page-v348 .profile-notification-html-v593 ol{
  margin:4px 0 5px;
  padding-left:18px;
}
.profile-notifications-page-v348 .profile-notification-body-v263 time{
  gap:5px;
  margin-top:4px;
  font-size:11px;
  font-weight:400;
}
.profile-notifications-page-v348 .profile-notification-detail-btn-v596{
  gap:5px;
  margin-top:5px;
  font:400 12px Roboto,sans-serif;
}
.profile-notifications-page-v348 .profile-notification-detail-btn-v596 i{font-size:11px}
.profile-notifications-page-v348 .profile-notification-action-link-v597{
  gap:6px;
  margin-top:5px;
  padding:6px 9px;
  border-radius:8px;
  font-size:12px;
  font-weight:400;
}
.profile-notifications-page-v348 .profile-notification-unread-dot-v596{
  width:6px;
  height:6px;
  flex-basis:6px;
  box-shadow:0 0 0 2px rgba(35,116,236,.12);
}
@media(max-width:575.98px){
  .profile-notifications-page-v348 .profile-notification-item-v263{
    grid-template-columns:32px minmax(0,1fr);
    gap:8px;
    padding:9px 10px;
  }
  .profile-notifications-page-v348 .profile-notification-icon-v263{
    width:30px;
    height:30px;
    border-radius:8px;
    font-size:14px;
  }
  .profile-notifications-page-v348 .profile-notification-title-v598{font-size:13px}
  .profile-notifications-page-v348 .profile-notification-preview-v596,
  .profile-notifications-page-v348 .profile-notification-full-v596,
  .profile-notifications-page-v348 .profile-notification-html-v593{font-size:12.5px}
}

/* V601: làm nổi bật đúng thông báo được mở từ popup chuông. */
.profile-notifications-page-v348 .profile-notification-item-v263.is-focused-v601{
  position:relative;
  background:#f3f8ff;
  box-shadow:inset 3px 0 0 #2f7df4,0 0 0 1px rgba(47,125,244,.14);
}
.profile-notifications-page-v348 .profile-notification-item-v263.is-focused-v601::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  animation:profileNotificationFocusV601 1.15s ease-out 1;
}
@keyframes profileNotificationFocusV601{
  0%{box-shadow:0 0 0 0 rgba(47,125,244,.28)}
  100%{box-shadow:0 0 0 10px rgba(47,125,244,0)}
}
@media(prefers-reduced-motion:reduce){
  .profile-notifications-page-v348 .profile-notification-item-v263.is-focused-v601::after{animation:none}
}


/* V602: trang thông báo user dùng chữ đen và giảm in đậm. */
.profile-notifications-page-v348,
.profile-notifications-page-v348 .card,
.profile-notifications-page-v348 input,
.profile-notifications-page-v348 button,
.profile-notifications-page-v348 a{color:#111}
.profile-notifications-page-v348 .profile-history-head-v263 h5{color:#111!important;font-weight:600!important}
.profile-notifications-page-v348 .profile-history-head-v263 small{color:#555!important;font-weight:400}
.profile-notifications-page-v348 .profile-notification-title-v598{color:#111;font-weight:400}
.profile-notifications-page-v348 .profile-notification-preview-v596,
.profile-notifications-page-v348 .profile-notification-full-v596,
.profile-notifications-page-v348 .profile-notification-html-v593,
.profile-notifications-page-v348 .profile-notification-html-v593 h3,
.profile-notifications-page-v348 .profile-notification-html-v593 h4,
.profile-notifications-page-v348 .profile-notification-html-v593 strong,
.profile-notifications-page-v348 .profile-notification-html-v593 b{color:#222;font-weight:400}
.profile-notifications-page-v348 .profile-notification-body-v263 time{color:#666;font-weight:400}
.profile-notifications-page-v348 .profile-notification-detail-btn-v596{color:#111;font-weight:400}
.profile-notifications-page-v348 .profile-notification-action-link-v597{color:#111;font-weight:400}
.profile-notifications-page-v348 .profile-history-search-v263 input{color:#111;font-weight:400}

/* V603: phân biệt rõ thao tác xem chi tiết và mở liên kết, không dùng khung. */
.profile-notifications-page-v348 .profile-notification-detail-btn-v596{
  color:#1769d2!important;
  font-weight:400!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-decoration:none;
}
.profile-notifications-page-v348 .profile-notification-detail-btn-v596:hover{
  color:#0f56ad!important;
  text-decoration:underline;
}
.profile-notifications-page-v348 .profile-notification-action-link-v597{
  color:#e45f0a!important;
  font-weight:400!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-decoration:none;
}
.profile-notifications-page-v348 .profile-notification-action-link-v597:hover{
  color:#b84600!important;
  background:transparent!important;
  text-decoration:underline;
}

/* V609: giãn cách thao tác và thời gian của thông báo trên desktop. */
@media (min-width:768px){
  .profile-notifications-page-v348 .profile-notification-detail-btn-v596{
    margin-right:18px!important;
  }
  .profile-notifications-page-v348 .profile-notification-action-link-v597{
    margin-right:18px!important;
  }
  .profile-notifications-page-v348 .profile-notification-body-v263 time{
    margin-left:2px;
  }
}

/* V679: hiển thị cờ quốc gia bằng emoji để không bị mất ảnh và làm nút xem chi tiết nổi bật */
.profile-phone-country-trigger-v301 .profile-phone-flag-emoji-v679,
.profile-phone-country-option-v301 .profile-phone-flag-emoji-v679{
  width:28px;
  min-width:28px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  line-height:1;
  border-radius:4px;
  box-shadow:0 0 0 1px rgba(15,23,42,.10);
  background:#fff;
  overflow:hidden;
}
.profile-phone-country-trigger-v301 .profile-phone-flag-emoji-v679{
  width:30px;
  min-width:30px;
  height:24px;
  font-size:25px;
}
.profile-phone-country-option-v301{
  grid-template-columns:32px minmax(0,1fr) auto!important;
}
.profile-notifications-page-v348 .profile-notification-detail-btn-v596,
.profile-notifications-page-v348 .profile-notification-action-link-v597,
.profile-notifications-page-v348 .profile-notification-full-v596 a,
.profile-notifications-page-v348 .profile-notification-html-v593 a{
  color:#1769df!important;
  font-weight:500!important;
  text-decoration:none!important;
}
.profile-notifications-page-v348 .profile-notification-detail-btn-v596:hover,
.profile-notifications-page-v348 .profile-notification-action-link-v597:hover,
.profile-notifications-page-v348 .profile-notification-full-v596 a:hover,
.profile-notifications-page-v348 .profile-notification-html-v593 a:hover{
  color:#0f55b8!important;
  text-decoration:underline!important;
}

/* V682 - dùng ảnh cờ màu thay cho chữ mã quốc gia trong ô SĐT */
.profile-phone-country-trigger-v301 .profile-phone-flag-img-v682,
.profile-phone-country-option-v301 .profile-phone-flag-img-v682{
  width:28px!important;
  min-width:28px!important;
  height:20px!important;
  object-fit:cover!important;
  border-radius:3px!important;
  box-shadow:0 0 0 1px rgba(15,23,42,.16),0 2px 5px rgba(15,23,42,.08)!important;
  background:#fff!important;
  display:block!important;
}
.profile-phone-country-trigger-v301 .profile-phone-flag-img-v682{
  width:30px!important;
  min-width:30px!important;
  height:22px!important;
}
.profile-phone-country-option-v301{grid-template-columns:34px minmax(0,1fr) auto!important;}
/* V799: mở lại đúng đơn chờ thanh toán, không tạo đơn mới */
.profile-orders-table-v263 .profile-order-code-link-v799{
  display:inline-flex;align-items:center;color:#ec4899;text-decoration:none;
}
.profile-orders-table-v263 .profile-order-code-link-v799:hover code{
  color:#d92d7a;text-decoration:underline;text-underline-offset:3px;
}
.profile-orders-table-v263 .profile-order-resume-v799{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  margin-top:7px;padding:6px 10px;border:1px solid #bfd7fb;border-radius:8px;
  background:#eef6ff;color:#1264cc;font-size:12px;font-weight:700;
  text-decoration:none;white-space:nowrap;
}
.profile-orders-table-v263 .profile-order-resume-v799:hover{
  background:#2476f2;border-color:#2476f2;color:#fff;
}
.profile-orders-table-v263 .profile-order-pending-v799 td{
  background:#fffdf7;
}
@media (max-width: 767.98px){
  .profile-orders-table-v263 .profile-order-resume-v799{
    min-height:34px;padding:6px 9px;font-size:11.5px;
  }
}

/* V818: mở rộng khung đơn hàng và loại bỏ hoàn toàn thanh cuộn ngang. */
.profile-history-page-v263>.container{
  width:100%;
  max-width:1460px;
}
.profile-orders-table-v263{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}
.profile-orders-table-v263 table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed;
}
.profile-orders-table-v263 col.profile-order-col-code-v817{width:18%}
.profile-orders-table-v263 col.profile-order-col-paid-v817{width:15%}
.profile-orders-table-v263 col.profile-order-col-courses-v817{width:37%}
.profile-orders-table-v263 col.profile-order-col-total-v817{width:12%}
.profile-orders-table-v263 col.profile-order-col-status-v817{width:18%}
.profile-orders-table-v263 thead th{
  padding:11px 9px!important;
  font-size:13px!important;
  line-height:1.25;
}
.profile-orders-table-v263 tbody td{
  min-width:0;
  padding:11px 9px!important;
  font-size:13px!important;
  line-height:1.4;
  overflow-wrap:anywhere;
  word-break:normal;
}
.profile-orders-table-v263 tbody td small,
.profile-orders-table-v263 tbody td code,
.profile-orders-table-v263 .badge{
  max-width:100%;
  font-size:12px!important;
}
.profile-orders-table-v263 tbody td code{
  display:block;
  white-space:normal;
  overflow-wrap:anywhere;
}
.profile-orders-table-v263 .profile-order-course-list-v817{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.profile-orders-table-v263 .profile-order-course-list-v817>span{
  display:block;
  min-width:0;
  color:#111827;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.profile-orders-table-v263 .profile-order-courses-cell-v817{
  vertical-align:top;
}
.profile-orders-table-v263 td:last-child .badge,
.profile-orders-table-v263 .profile-order-resume-v799{
  box-sizing:border-box;
  max-width:100%;
  white-space:normal;
  text-align:center;
}
@media(min-width:992px){
  .profile-history-page-v263>.container{max-width:min(1460px,calc(100% - 20px))}
  .profile-history-page-v263>.container>.row{--bs-gutter-x:20px}
  .profile-history-page-v263>.container>.row>.col-lg-3{flex:0 0 22%;max-width:22%}
  .profile-history-page-v263>.container>.row>.col-lg-9{flex:0 0 78%;max-width:78%}
}
@media(max-width:991.98px){
  .profile-orders-table-v263{
    border:0;
    border-radius:0;
    overflow:visible!important;
  }
  .profile-orders-table-v263 table,
  .profile-orders-table-v263 tbody{
    display:block;
    width:100%!important;
    min-width:0!important;
  }
  .profile-orders-table-v263 colgroup,
  .profile-orders-table-v263 thead{display:none}
  .profile-orders-table-v263 tbody tr{
    display:block;
    width:100%;
    margin:0 0 12px;
    border:1px solid #e1e9f3;
    border-radius:10px;
    background:#fff;
    overflow:hidden;
  }
  .profile-orders-table-v263 tbody tr:last-child{margin-bottom:0}
  .profile-orders-table-v263 tbody td{
    display:grid!important;
    grid-template-columns:138px minmax(0,1fr);
    align-items:start;
    gap:10px;
    width:100%!important;
    padding:10px 12px!important;
    border:0!important;
    border-bottom:1px solid #edf1f6!important;
    background:#fff!important;
    font-size:12.5px!important;
    text-align:left!important;
  }
  .profile-orders-table-v263 tbody td:last-child{border-bottom:0!important}
  .profile-orders-table-v263 tbody td::before{
    content:attr(data-label);
    color:#172033;
    font-size:12px;
    font-weight:700;
    line-height:1.4;
  }
  .profile-orders-table-v263 tbody td small,
  .profile-orders-table-v263 tbody td code,
  .profile-orders-table-v263 .badge{font-size:11.5px!important}
  .profile-orders-table-v263 .profile-order-course-list-v817{gap:5px}
  .profile-orders-table-v263 .profile-order-resume-v799{
    width:max-content;
    max-width:100%;
    margin-top:7px;
  }
}
@media(max-width:575.98px){
  .profile-history-page-v263>.container{padding-left:10px;padding-right:10px}
  .profile-orders-table-v263 tbody td{
    grid-template-columns:108px minmax(0,1fr);
    gap:8px;
    padding:9px 10px!important;
  }
}


/* V820: đồng bộ cố định khung menu trái và nội dung trên toàn bộ trang hồ sơ desktop. */
.profile-layout-fixed-v820>.container{
  width:100%;
  max-width:1460px;
}
.profile-layout-fixed-v820 .profile-sidebar{
  width:100%;
  min-width:0;
}
.profile-layout-fixed-v820 .profile-menu-item{
  min-height:46px;
  width:100%;
  box-sizing:border-box;
}
.profile-layout-fixed-v820 .profile-menu-item>span{
  min-width:0;
}
@media(min-width:992px){
  .profile-layout-fixed-v820>.container{max-width:min(1460px,calc(100% - 20px))}
  .profile-layout-fixed-v820>.container>.row{--bs-gutter-x:20px;flex-wrap:nowrap}
  .profile-layout-fixed-v820>.container>.row>.col-lg-3{
    flex:0 0 320px;
    width:320px;
    max-width:320px;
  }
  .profile-layout-fixed-v820>.container>.row>.col-lg-9{
    flex:1 1 auto;
    width:auto;
    max-width:none;
    min-width:0;
  }
  .profile-layout-fixed-v820 .profile-menu-item>span{
    white-space:nowrap;
  }
}
@media(max-width:991.98px){
  .profile-layout-fixed-v820>.container>.row{
    flex-wrap:wrap;
  }
}


/* V828: thêm thời gian đặt hàng, thu gọn chữ trong bảng nhưng giữ nguyên khung và menu trái. */
.profile-orders-table-v263 col.profile-order-col-code-v828{width:17%}
.profile-orders-table-v263 col.profile-order-col-created-v828{width:12%}
.profile-orders-table-v263 col.profile-order-col-paid-v828{width:12%}
.profile-orders-table-v263 col.profile-order-col-courses-v828{width:31%}
.profile-orders-table-v263 col.profile-order-col-total-v828{width:11%}
.profile-orders-table-v263 col.profile-order-col-status-v828{width:17%}
.profile-orders-table-v263 thead th{
  padding:9px 7px!important;
  font-size:11.5px!important;
  line-height:1.25;
}
.profile-orders-table-v263 tbody td{
  padding:9px 7px!important;
  font-size:11.5px!important;
  line-height:1.34;
}
.profile-orders-table-v263 tbody td small,
.profile-orders-table-v263 tbody td code{
  font-size:10.75px!important;
  line-height:1.32;
}
.profile-orders-table-v263 .profile-order-time-cell-v828,
.profile-orders-table-v263 .profile-order-time-cell-v828 small{
  font-size:10.25px!important;
  white-space:normal;
  overflow-wrap:normal;
  word-break:normal;
}
.profile-orders-table-v263 .profile-order-courses-cell-v828,
.profile-orders-table-v263 .profile-order-courses-cell-v828 .profile-order-course-list-v817>span{
  font-size:10.75px!important;
  line-height:1.34;
}
.profile-orders-table-v263 .badge{
  font-size:10px!important;
  line-height:1.15;
  padding:5px 7px;
}
.profile-orders-table-v263 .profile-order-resume-v799{
  gap:4px;
  padding:5px 7px;
  font-size:10.5px;
  line-height:1.2;
}
@media(max-width:991.98px){
  .profile-orders-table-v263 tbody td,
  .profile-orders-table-v263 .profile-order-time-cell-v828,
  .profile-orders-table-v263 .profile-order-time-cell-v828 small,
  .profile-orders-table-v263 .profile-order-courses-cell-v828,
  .profile-orders-table-v263 .profile-order-courses-cell-v828 .profile-order-course-list-v817>span{
    font-size:11.5px!important;
  }
}

/* V846: cột hủy đơn chờ thanh toán ở lịch sử đơn hàng học viên. */
.profile-orders-table-v263 col.profile-order-col-code-v828{width:16%}
.profile-orders-table-v263 col.profile-order-col-created-v828{width:11%}
.profile-orders-table-v263 col.profile-order-col-paid-v828{width:11%}
.profile-orders-table-v263 col.profile-order-col-courses-v828{width:29%}
.profile-orders-table-v263 col.profile-order-col-total-v828{width:10%}
.profile-orders-table-v263 col.profile-order-col-status-v828{width:15%}
.profile-orders-table-v263 col.profile-order-col-cancel-v846{width:8%}
.profile-order-cancel-head-v846,
.profile-order-cancel-cell-v846{text-align:center}
.profile-order-cancel-v846{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:29px;
  padding:5px 7px;
  border:1px solid #fecaca;
  border-radius:8px;
  background:#fff;
  color:#dc2626;
  font-size:10.5px;
  line-height:1.15;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,color .15s ease,opacity .15s ease;
}
.profile-order-cancel-v846:hover{background:#fff1f2;border-color:#fca5a5;color:#b91c1c}
.profile-order-cancel-v846:disabled{opacity:.6;cursor:not-allowed}
.profile-order-cancel-v846 .spinner-border{width:12px;height:12px;border-width:2px}
.profile-order-cancel-empty-v846{color:#94a3b8}
@media(max-width:991.98px){
  .profile-order-cancel-head-v846{display:none}
  .profile-order-cancel-cell-v846{text-align:right!important}
  .profile-order-cancel-v846{font-size:11.5px;padding:6px 9px}
}



/* V850: mã đơn MMO hiển thị một dòng, thu gọn riêng cột mã đơn. */
@media(min-width:992px){
  .profile-orders-table-v263 col.profile-order-col-code-v828{width:14%!important}
  .profile-orders-table-v263 td[data-label="Mã đơn"]{white-space:nowrap!important}
  .profile-orders-table-v263 td[data-label="Mã đơn"] code{
    display:inline-block;
    max-width:100%;
    white-space:nowrap!important;
    font-size:9.75px!important;
    letter-spacing:-.2px;
  }
}

/* V857: cờ quốc gia màu lưu cục bộ trên hosting + cân đều hai cột hồ sơ */
.profile-phone-flag-wrap-v857{width:30px;min-width:30px;height:22px;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:3px;background:#fff;box-shadow:0 0 0 1px rgba(15,23,42,.14)}
.profile-phone-flag-img-v857{width:30px;height:22px;display:block;object-fit:cover;border-radius:3px}
.profile-phone-flag-wrap-v857 .profile-phone-flag-emoji-v679{box-shadow:none!important;background:transparent!important;width:30px!important;min-width:30px!important;height:22px!important}
.profile-account-grid-v299>.profile-account-field-v299:last-child{grid-column:auto!important}
@media(max-width:767.98px){.profile-account-grid-v299>.profile-account-field-v299:last-child{grid-column:auto!important}}

/* V888 - hồ sơ xuất hóa đơn đồng bộ user/admin */
.profile-invoice-section-v888{margin-top:28px;padding-top:24px;border-top:1px solid #e4edf7}
.profile-invoice-head-v888{display:flex;align-items:center;gap:10px;margin:0 0 18px;color:#102f55}
.profile-invoice-head-v888 i{font-size:20px;color:#1671ee}
.profile-invoice-head-v888 h3{margin:0;font-size:22px;font-weight:900;letter-spacing:.01em}
@media(max-width:767.98px){.profile-invoice-section-v888{margin-top:22px;padding-top:20px}.profile-invoice-head-v888 h3{font-size:18px}}
