input::placeholder {
  color: #aaa !important;
  opacity: 1;
}
.mb-20 {
  margin-bottom: 20px;
}
.total-subtotal {
  border-top: 1px dashed #bdbdbd;
  padding: 15px 0 0;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination li {
  margin: 0 8px;
}
.pagination span,
.pagination a {
  font-size: 16px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc694;
  background-color: #fff;
  color: #111;
  font-weight: normal;
}
.pagination li.active span,
.pagination li a:hover {
  border-color: #ccc694;
  background-color: #f8f6b8;
  color: #111;
}
.pagination li.active a {
  pointer-events: none;
}
.blog-detail .thumb {
  margin-bottom: 30px;
}
.wrapper-news-detail {
  background: #fff;
  padding: 16px;
  margin-bottom: 20px;
}
.blog-detail h1 {
  font-size: 25px;
  font-weight: 500;
  line-height: 1.467;
  color: #005ae0;
  margin: 0 0 0;
}
.wrapper-news-detail h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.467;
  margin: 0 0 0;
}
.wrapper-news-detail h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.467;
  margin: 0 0 0;
}
.wrapper-news-detail ul {
  list-style: initial !important;
  margin: 0 0 10px;
  padding: 0 0 0 18px;
}
.sidebar-blog {
  padding: 15px;
  border-radius: 3px;
  margin-bottom: 15px;
  background: #fff;
}

.section {
  padding: 20px 0 40px;
}
.feeds-special {
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 20px;
}
.wrapper-news-box {
  background: #fff;
}
.feeds a {
  color: #010101;
  display: block;
  text-decoration: none;
  font-size: 14px;
}
.feeds-list h3 {
  font-size: 15px;
  line-height: 1.467;
}
.feeds-list li + li {
  border-top: 1px solid #ddd;
  padding-top: 12px;
  margin-bottom: 10px;
}
.news-top .img {
  margin-bottom: 10px;
}
.news-top h3 {
  font-size: 18px;
  line-height: 1.467;
}
.feeds p {
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  text-overflow: ellipsis;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 0;
}
@media screen and (min-width: 768px) {
  /* .feeds .img {
    display: block;
    padding-top: 100%;
    position: relative;
    transition: all 300ms ease;
  }
  .feeds img {
    transition: all 300ms ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    left: 0px;
    top: 0px;
  }
  .feeds a:hover img {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  } */
}
.news-gird {
  background: #fff;
  margin-bottom: 20px;
  border-radius: 5px;
}
.news-gird .desc {
  padding: 15px 15px 2px;
}
.news-gird .desc p {
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Giới hạn số dòng */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #777;
}
.news-gird h3 {
  font-size: 15px;
  line-height: 1.456;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Giới hạn số dòng */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feeds-list li {
  margin-bottom: 20px;
}
.feeds-list .img {
  width: 120px;
}
.feeds-text {
  width: calc(100% - 120px);
  padding-left: 15px;
}
.feeds-text h3 {
  margin-top: 0;
}
.main.is-gallery {
  display: block;
  overflow: hidden;
}
.main.is-gallery .gallery {
  padding-top: 40px;
  padding-bottom: 40px;
}
.main.is-gallery .gallery h2 {
  margin-bottom: 30px;
}
.gallery-box.popup-gallery {
  margin-bottom: 20px;
}

.gallery-box .row {
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -20px;
}
.gallery-box .row > div {
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: 20px;
}
.gallery-box a {
  position: relative;
  overflow: hidden;
  display: block;
}

/* Gallery layout: first image large, others square with fixed ratio */
.gallery-box a img {
  display: none; /* dùng background của .mask để hiển thị */
}

.gallery-box .row > .col-lg-8 > a::before {
  content: "";
  display: block;
  padding-top: 49%; /* cao bằng ô vuông 4/12 bên cạnh */
}

.gallery-box .row > .col-lg-4 > a::before,
.gallery-box .row > .col-6 > a::before {
  content: "";
  display: block;
  padding-top: 100%; /* hình vuông cho các hình còn lại */
}

.mask {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-position: center;
  background-size: cover;
  transition: 0.3s;
}
.gallery a:hover .mask {
  transform: scale(1.1);
}
.gallery-icon {
  background-color: rgba(0, 0, 0, 0.65);
  transition: 0.3s;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  visibility: hidden;
}
.gallery a:hover .gallery-icon {
  opacity: 1;
  visibility: visible;
}
.gallery-icon .icon {
  width: 40px;
  height: 40px;
  margin: 0px auto 10px;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  background-color: #ea030d;
  color: #fff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-icon .icon svg {
  width: 24px;
}
.gallery-icon span {
  font-size: 18px;
  text-align: center;
  font-weight: 500;
  display: block;
}
@media (max-width: 767px) {
  .gallery-icon span {
    font-size: 14px;
  }
  .talk-to-form .form-field {
    width: 100%;
  }
}
@media screen and (max-width: 767px) {
  .section {
    padding: 40px 0;
  }
  .news-top {
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
  }
}
.heading-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1875;
  margin: 0 0 20px;
}
c .blog-detail p.date {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}
.wrapper-news-detail p {
  font-size: 15px;
  line-height: 1.656;
}
.wrapper-news-detail .description p img,
.wrapper-news-detail .description img {
  display: block;
  max-width: 70% !important;
  height: auto !important;
  margin: 0 auto;
}
.news-news .sidebar li:not(:last-child) {
  padding: 0 0 10px;
  margin: 0 0 10px;
  border-bottom: 1px solid #dedcdc;
}

.news-news .sidebar {
  padding-left: 10px;
}

.news-news .sidebar h4 {
  font-size: 20px;
  margin: 0 0 20px;
  padding: 0 0 15px;
  position: relative;
}

.news-news .sidebar p {
  margin: auto;
}

.news-news .sidebar h4::before {
  content: "";
  width: 64px;
  height: 3px;
  background-color: #911439;
  position: absolute;
  left: 2px;
  bottom: 0;
}

.news-news .sidebar a {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}

.news-news .sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-news .sidebar .thumb {
  margin: 0 0 10px;
}
.breadcrumb-wrap {
  padding: 10px 0px;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
}
/*
.breadcrumb {
  padding: 10px 0;
  background: transparent;
  border-radius: 0;
  margin: 0;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  white-space: nowrap;
  overflow-x: auto;
}

.breadcrumb > li {
  padding: 3px 20px;
  position: relative;
  display: inline-block;
  line-height: 1.25;
}

.breadcrumb > li:nth-of-type(1) {
  padding-left: 10px;
}

.breadcrumb > li a {
  color: #495057;
  font-size: 16px;
  white-space: break-spaces;
}

.breadcrumb > li + li:before {
  content: "";
  width: 1px;
  height: 16px;
  background-color: #adb5bd;
  -webkit-transform: rotate(30deg);
  transform: rotate(30deg);
  display: block;
  margin-top: -8px;
  position: absolute;
  left: 0px;
  top: 50%;
}
  */
.a-link li {
  margin-bottom: 5px;
}
.a-link a {
  color: #fff;
}
.a-link li a:hover {
  color: #ff0000;
}
.copyright a {
  color: #fff;
}
.box-success {
  border-radius: 10px;
  padding: 30px;
  background: #fff;
}
.tel .iti {
  width: 100%;
}
.iti__flag {
  background-image: url("../img/flags.png") !important;
  background-size: 5652px 15px !important; /* Đảm bảo hình cờ không bị lệch */
}

.iti__selected-flag {
  padding: 5px 10px !important; /* Canh chỉnh lại khoảng cách */
}

.iti--allow-dropdown .iti__flag-container {
  margin-top: 0 !important; /* Reset margin để tránh lệch */
}
.loading-page {
  width: 100%;
  height: 100%;
  display: none;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 999;
}
.loading-spinner {
  width: 100%;
  height: 100%;
  font-size: 10vw;
  color: #0d6efd;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 99;
  top: 0;
  left: 0;
}
@media (max-width: 767px) {
  .blog-detail h1 {
    font-size: 16px;
  }
  ._buttonSubmit {
    width: 100%;
  }
  .wrapper-news-detail .description p img,
  .wrapper-news-detail .description img {
    display: block;
    max-width: 85% !important;
    height: auto !important;
    margin: 0 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-page {
    transition: none;
  }
}
.loading-page.active {
  display: block;
}
.lds-spinner {
  display: block;
  margin-left: -32px;
  margin-top: -32px;
  position: absolute;
  width: 64px;
  height: 64px;
  left: 50%;
  top: 50%;
}
.lds-spinner > div {
  transform-origin: 32px 32px;
  animation: ldSpinner 1.2s linear infinite;
}
.lds-spinner > div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 29px;
  width: 5px;
  height: 14px;
  border-radius: 20%;
  background: #fff;
}
.lds-spinner > div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner > div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner > div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner > div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner > div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner > div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner > div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner > div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner > div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner > div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner > div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner > div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@-webkit-keyframes ldSpinner {
  0% {
    filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
    opacity: 1;
  }
  100% {
    filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
  }
}
@-moz-keyframes ldSpinner {
  0% {
    filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
    opacity: 1;
  }
  100% {
    filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
  }
}
@keyframes ldSpinner {
  0% {
    filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
    opacity: 1;
  }
  100% {
    filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
  }
}

/* Contact form validation errors */
.talk-to-form .form-field {
  position: relative;
}
.talk-to-form .form-error {
  display: none;
  font-size: 12px;
  color: #c00;
  margin-top: 4px;
  line-height: 1.3;
}
.talk-to-form .form-error.is-visible {
  display: block;
}

/* ===== Affiliate Register Form (card style – Profile Detail / Payment Method) ===== */
#affiliate-register {
  background-color: #f5f5f5;
  background-image: radial-gradient(circle, #ddd 1px, transparent 1px);
  background-size: 18px 18px;
  padding-top: 20px;
  padding-bottom: 40px;
  min-height: 60vh;
}

#affiliate-register #content {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#affiliate-register .affiliate-register-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 32px 40px 40px;
  margin-top: 20px;
}

#affiliate-register h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#affiliate-register #content > p {
  margin-bottom: 0;
  font-size: 14px;
  color: #555;
}

/* Section title: centered, bold, dashed border below */
#affiliate-register .affiliate-register-card fieldset {
  border: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

#affiliate-register .affiliate-register-card fieldset > legend {
  grid-column: 1 / -1;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #ccc;
}

/* Each field row: label above input, one grid cell */
#affiliate-register .affiliate-register-card fieldset > .row.mb-3 {
  display: flex;
  flex-direction: row;
  margin: 0;
  gap: 6px;
}

#affiliate-register .affiliate-register-card fieldset > .row.mb-3 .col-sm-2,
#affiliate-register .affiliate-register-card fieldset > .row.mb-3 .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

#affiliate-register
  .affiliate-register-card
  fieldset
  > .row.mb-3
  .col-form-label {
  font-weight: normal;
  color: #111;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Required fields: red asterisk after label */
#affiliate-register
  .affiliate-register-card
  label[for="input-firstname"]::after,
#affiliate-register .affiliate-register-card label[for="input-lastname"]::after,
#affiliate-register .affiliate-register-card label[for="input-email"]::after,
#affiliate-register
  .affiliate-register-card
  label[for="input-telephone"]::after,
#affiliate-register .affiliate-register-card label[for="input-password"]::after,
#affiliate-register
  .affiliate-register-card
  .row.required
  .col-form-label::after {
  content: " *";
  color: #c00;
}

/* Inputs: rounded, light border, focus blue */
#affiliate-register .affiliate-register-card .form-control,
#affiliate-register .affiliate-register-card .form-select {
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  padding: 8px 12px;
  height: auto;
  min-height: 38px;
  width: 100%;
}

#affiliate-register .affiliate-register-card .form-control::placeholder {
  color: #aaa;
}

#affiliate-register .affiliate-register-card .form-control:focus,
#affiliate-register .affiliate-register-card .form-select:focus {
  background-color: #f0f7ff;
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Payment method row: full width, radios horizontal */
#affiliate-register
  .affiliate-register-card
  fieldset
  > .row.mb-3:has(.form-check) {
  grid-column: 1 / -1;
}

/* Country / Zone / Address (location) must take full row */
#affiliate-register .affiliate-register-card fieldset > .row.mb-3.location-row {
  grid-column: 1 / -1;
}

/* Split country & zone in the same row (2 columns) */
#affiliate-register
  .affiliate-register-card
  fieldset
  > .row.mb-3.location-split {
  display: flex;
  flex-direction: row;
  gap: 18px 24px;
}

#affiliate-register
  .affiliate-register-card
  fieldset
  > .row.mb-3.location-split
  .location-subfield {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#affiliate-register
  .affiliate-register-card
  fieldset
  > .row.mb-3.location-split
  .form-select {
  width: 100%;
}

@media (max-width: 767px) {
  #affiliate-register
    .affiliate-register-card
    fieldset
    > .row.mb-3.location-split {
    flex-direction: column;
    gap: 12px;
  }
}

#affiliate-register .affiliate-register-card .form-check {
  display: inline-block;
  margin-right: 24px;
  margin-bottom: 0;
}

#affiliate-register .affiliate-register-card .form-check-label {
  margin-left: 6px;
}

/* Payment details block (cheque / paypal / bank) full width */
#affiliate-register .affiliate-register-card #payment-cheque,
#affiliate-register .affiliate-register-card #payment-paypal,
#affiliate-register .affiliate-register-card #payment-bank {
  grid-column: 1 / -1;

  gap: 18px 24px;
}

#affiliate-register .affiliate-register-card #payment-bank .row.mb-3,
#affiliate-register .affiliate-register-card #payment-cheque .row.mb-3,
#affiliate-register .affiliate-register-card #payment-paypal .row.mb-3 {
  display: flex;
  flex-direction: column;
  margin: 0;
}

#affiliate-register .affiliate-register-card #payment-bank .row.mb-3 .col-sm-2,
#affiliate-register .affiliate-register-card #payment-bank .row.mb-3 .col-sm-10,
#affiliate-register
  .affiliate-register-card
  #payment-cheque
  .row.mb-3
  .col-sm-2,
#affiliate-register
  .affiliate-register-card
  #payment-cheque
  .row.mb-3
  .col-sm-10,
#affiliate-register
  .affiliate-register-card
  #payment-paypal
  .row.mb-3
  .col-sm-2,
#affiliate-register
  .affiliate-register-card
  #payment-paypal
  .row.mb-3
  .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Custom fields inside fieldset (affiliate) */
#affiliate-register .affiliate-register-card fieldset > .custom-field {
  display: flex;
  flex-direction: column;
  margin: 0;
}

#affiliate-register .affiliate-register-card fieldset > .custom-field .col-sm-2,
#affiliate-register
  .affiliate-register-card
  fieldset
  > .custom-field
  .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Agree + Submit: centered */
#affiliate-register .affiliate-register-card + .text-end,
#affiliate-register .affiliate-register-card .text-end {
  text-align: center !important;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed #e0e0e0;
}

#affiliate-register .affiliate-register-card .form-check-reverse {
  justify-content: center;
  margin-bottom: 16px;
}

#affiliate-register .affiliate-register-card .btn-primary {
  background-color: #d92323;
  border: none;
  color: #fff;
  padding: 10px 48px;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(217, 35, 35, 0.35);
  display: inline-block;
  width: auto !important;
}

#affiliate-register .affiliate-register-card .btn-primary:hover {
  background-color: #c01e1e;
  color: #fff;
  box-shadow: 0 3px 8px rgba(217, 35, 35, 0.4);
}

/* Error feedback */
#affiliate-register .affiliate-register-card .invalid-feedback {
  font-size: 12px;
  color: #c00;
  margin-top: 2px;
}

@media (max-width: 767px) {
  #affiliate-register .affiliate-register-card fieldset,
  #affiliate-register .affiliate-register-card #payment-cheque,
  #affiliate-register .affiliate-register-card #payment-bank {
    grid-template-columns: 1fr;
  }

  #affiliate-register .affiliate-register-card {
    padding: 20px 16px 24px;
  }
}

/* ===== Account Affiliate Form (match affiliate/register grid layout) ===== */
#account-affiliate {
  background-color: #f5f5f5;
  background-image: radial-gradient(circle, #ddd 1px, transparent 1px);
  background-size: 18px 18px;
  padding-top: 20px;
  padding-bottom: 40px;
  min-height: 60vh;
}

#account-affiliate #content {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#account-affiliate .account-affiliate-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 32px 40px 40px;
  margin-top: 20px;
}

#account-affiliate .breadcrumb {
  margin-bottom: 0.25rem;
  padding-bottom: 0;
  background: transparent;
}

#account-affiliate h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Same 2-column grid as #affiliate-register */
#account-affiliate .account-affiliate-card fieldset {
  border: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

#account-affiliate .account-affiliate-card fieldset > legend {
  grid-column: 1 / -1;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #ccc;
}

#account-affiliate .account-affiliate-card fieldset > .row.mb-3 {
  display: flex;
  flex-direction: row;
  margin: 0;
  gap: 6px;
}

#account-affiliate .account-affiliate-card fieldset > .row.mb-3 .col-sm-2,
#account-affiliate .account-affiliate-card fieldset > .row.mb-3 .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

#account-affiliate
  .account-affiliate-card
  fieldset
  > .row.mb-3
  .col-form-label {
  font-weight: normal;
  color: #111;
  margin-bottom: 0;
  padding-bottom: 0;
}

#account-affiliate .account-affiliate-card label[for="input-firstname"]::after,
#account-affiliate .account-affiliate-card label[for="input-lastname"]::after,
#account-affiliate .account-affiliate-card label[for="input-email"]::after,
#account-affiliate .account-affiliate-card label[for="input-telephone"]::after,
#account-affiliate
  .account-affiliate-card
  .row.required
  .col-form-label::after {
  content: " *";
  color: #c00;
}

#account-affiliate .account-affiliate-card .form-control,
#account-affiliate .account-affiliate-card .form-select {
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  padding: 8px 12px;
  height: auto;
  min-height: 38px;
  width: 100%;
}

#account-affiliate .account-affiliate-card .form-control[readonly] {
  background-color: #f8f9fa;
  cursor: default;
}

#account-affiliate .account-affiliate-card .form-control[readonly]:focus {
  background-color: #f8f9fa;
  border-color: #ccc;
  box-shadow: none;
}

#account-affiliate .account-affiliate-card .form-control::placeholder {
  color: #aaa;
}

#account-affiliate .account-affiliate-card .form-control:focus,
#account-affiliate .account-affiliate-card .form-select:focus {
  background-color: #f0f7ff;
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

#account-affiliate .account-affiliate-card fieldset > .row.mb-3 .form-text {
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 0;
}

#account-affiliate
  .account-affiliate-card
  fieldset
  > .row.mb-3:has(.form-check) {
  grid-column: 1 / -1;
}

#account-affiliate .account-affiliate-card fieldset > .row.mb-3.location-row {
  grid-column: 1 / -1;
}

#account-affiliate .account-affiliate-card fieldset > .row.mb-3.location-split {
  display: flex;
  flex-direction: row;
  gap: 18px 24px;
}

#account-affiliate
  .account-affiliate-card
  fieldset
  > .row.mb-3.location-split
  .location-subfield {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#account-affiliate
  .account-affiliate-card
  fieldset
  > .row.mb-3.location-split
  .form-select {
  width: 100%;
}

@media (max-width: 767px) {
  #account-affiliate
    .account-affiliate-card
    fieldset
    > .row.mb-3.location-split {
    flex-direction: column;
    gap: 12px;
  }
}

#account-affiliate .account-affiliate-card .form-check {
  display: inline-block;
  margin-right: 24px;
  margin-bottom: 0;
}

#account-affiliate .account-affiliate-card .form-check-label {
  margin-left: 6px;
}

/* #account-affiliate .account-affiliate-card #payment-cheque,
#account-affiliate .account-affiliate-card #payment-paypal,
#account-affiliate .account-affiliate-card #payment-bank {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
} */

/* Stack label / input like register; neutralise Bootstrap .row gutters inside grid */
/* Cheque / PayPal rows: stack label above input (overrides fieldset > .row.mb-3 row direction) */
#account-affiliate .account-affiliate-card fieldset > .row.mb-3.payment {
  flex-direction: column !important;
  width: 100%;
  min-width: 0;
  --bs-gutter-x: 0;
}

/* No extra flex container on #payment-bank — block flow + .row.mb-3 spacing only */
#account-affiliate .account-affiliate-card #payment-bank .row.mb-3,
#account-affiliate .account-affiliate-card #payment-cheque.row.mb-3,
#account-affiliate .account-affiliate-card #payment-paypal.row.mb-3 {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  min-width: 0;
  --bs-gutter-x: 0;
}

#account-affiliate .account-affiliate-card #payment-bank .row.mb-3 .col-sm-2,
#account-affiliate .account-affiliate-card #payment-bank .row.mb-3 .col-sm-10,
#account-affiliate .account-affiliate-card #payment-cheque.row.mb-3 .col-sm-2,
#account-affiliate .account-affiliate-card #payment-cheque.row.mb-3 .col-sm-10,
#account-affiliate .account-affiliate-card #payment-paypal.row.mb-3 .col-sm-2,
#account-affiliate .account-affiliate-card #payment-paypal.row.mb-3 .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

#account-affiliate .account-affiliate-card fieldset > .custom-field {
  display: flex;
  flex-direction: column;
  margin: 0;
}

#account-affiliate .account-affiliate-card fieldset > .custom-field .col-sm-2,
#account-affiliate .account-affiliate-card fieldset > .custom-field .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  padding-left: 0;
  padding-right: 0;
}

#account-affiliate .account-affiliate-card .text-end {
  text-align: center !important;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed #e0e0e0;
}

#account-affiliate .account-affiliate-card .form-check-reverse {
  justify-content: center;
  margin-bottom: 16px;
}

#account-affiliate .account-affiliate-card .btn-primary {
  background-color: #d92323;
  border: none;
  color: #fff;
  padding: 10px 48px;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(217, 35, 35, 0.35);
  display: inline-block;
  width: auto !important;
}

#account-affiliate .account-affiliate-card .btn-primary:hover {
  background-color: #c01e1e;
  color: #fff;
  box-shadow: 0 3px 8px rgba(217, 35, 35, 0.4);
}

#account-affiliate .account-affiliate-card .btn-light {
  border-radius: 6px;
}

#account-affiliate .account-affiliate-card .invalid-feedback {
  font-size: 12px;
  color: #c00;
  margin-top: 2px;
}

@media (max-width: 767px) {
  #account-affiliate .account-affiliate-card fieldset,
  #account-affiliate .account-affiliate-card #payment-cheque,
  #account-affiliate .account-affiliate-card #payment-bank {
    grid-template-columns: 1fr;
  }

  #account-affiliate .account-affiliate-card {
    padding: 20px 16px 24px;
  }
}

/* ===== Affiliate Login (card – match register page tone) ===== */
#affiliate-login {
  background-color: #f5f5f5;
  background-image: radial-gradient(circle, #ddd 1px, transparent 1px);
  background-size: 18px 18px;
  padding-top: 20px;
  padding-bottom: 40px;
  min-height: 60vh;
}

#affiliate-login #content {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

#affiliate-login .affiliate-login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 36px 40px 32px;
  margin-top: 16px;
}

#affiliate-login .affiliate-login-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0;
}

#affiliate-login .affiliate-login-divider {
  border: none;
  border-bottom: 1px dashed #ccc;
  margin: 16px 0 28px;
}

#affiliate-login .affiliate-login-card .col-form-label {
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
}

#affiliate-login .affiliate-login-card .form-control {
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #eef5ff;
  padding: 10px 12px;
  min-height: 42px;
  width: 100%;
}

#affiliate-login .affiliate-login-card .form-control:focus {
  background-color: #e8f2fc;
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

#affiliate-login .affiliate-login-password-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

#affiliate-login .affiliate-login-forgot {
  color: #d92323;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

#affiliate-login .affiliate-login-forgot:hover {
  color: #c01e1e;
  text-decoration: underline;
}

#affiliate-login .affiliate-login-submit {
  background-color: #d92323;
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(217, 35, 35, 0.35);
  margin-bottom: 24px;
}

#affiliate-login .affiliate-login-submit:hover {
  background-color: #c01e1e;
  color: #fff;
}

#affiliate-login .affiliate-login-footer {
  font-size: 0.95rem;
  color: #111;
}

#affiliate-login .affiliate-login-footer a {
  color: #d92323;
  font-weight: 600;
  margin-left: 4px;
  text-decoration: none;
}

#affiliate-login .affiliate-login-footer a:hover {
  color: #c01e1e;
  text-decoration: underline;
}

@media (max-width: 767px) {
  #affiliate-login .affiliate-login-card {
    padding: 24px 20px 28px;
  }
}

/* ===== Affiliate dashboard ===== */
#affiliate-dashboard.affiliate-dashboard-page {
  position: relative;
  background-color: #f8f9fa;
  padding-top: 28px;
  padding-bottom: 48px;
  min-height: 70vh;
  overflow-x: hidden;
}

#affiliate-dashboard.affiliate-dashboard-page::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  width: min(920px, 96vw);
  height: 420px;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
    circle,
    rgba(160, 175, 190, 0.45) 1px,
    transparent 1px
  );
  background-size: 12px 12px;
  -webkit-mask-image: radial-gradient(
    ellipse 72% 65% at 50% 42%,
    #000 0%,
    transparent 72%
  );
  mask-image: radial-gradient(
    ellipse 72% 65% at 50% 42%,
    #000 0%,
    transparent 72%
  );
  opacity: 0.55;
}

#affiliate-dashboard #content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

#affiliate-dashboard .affiliate-dashboard-inner {
  padding-bottom: 8px;
}

#affiliate-dashboard .affiliate-dashboard-title {
  text-align: center;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: #3a3a3a;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}

/* Top row: profile + affiliate link */
#affiliate-dashboard .affiliate-dashboard-top-row {
  margin-bottom: 22px;
}

#affiliate-dashboard .affiliate-dashboard-top-row .affiliate-link-box {
  margin-bottom: 0;
}

#affiliate-dashboard .affiliate-profile-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid #9bb8d9;
  background: linear-gradient(180deg, #f4f8fc 0%, #eaf2fa 100%);
}

#affiliate-dashboard .affiliate-profile-box__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3a5a80;
  margin: 0;
}

#affiliate-dashboard .affiliate-profile-box__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c4a6e;
  line-height: 1.35;
  word-break: break-word;
}

#affiliate-dashboard .affiliate-profile-box__edit {
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

#affiliate-dashboard .affiliate-profile-box__edit:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

/* Affiliate link strip */
#affiliate-dashboard .affiliate-link-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid #7cb87c;
  background: linear-gradient(180deg, #f0faf0 0%, #e8f6e8 100%);
  margin-bottom: 22px;
}

#affiliate-dashboard .affiliate-link-box__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2d6a2d;
  margin-bottom: 6px;
}

#affiliate-dashboard .affiliate-link-box__url {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f5c1f;
  word-break: break-all;
  line-height: 1.45;
}

#affiliate-dashboard .affiliate-link-box__copy {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: #2d6a2d;
  font-size: 1.15rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

#affiliate-dashboard .affiliate-link-box__copy:hover {
  background: #fff;
  color: #1a4a1a;
}

#affiliate-dashboard .affiliate-link-box__copy.is-copied {
  color: #1f5c1f;
  transform: scale(1.05);
}

/* Summary cards */
#affiliate-dashboard .affiliate-stat-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 20px 20px 20px 22px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#affiliate-dashboard .affiliate-stat-card--commission {
  align-items: stretch;
}

#affiliate-dashboard .affiliate-stat-card__body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

#affiliate-dashboard .affiliate-stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

#affiliate-dashboard .affiliate-stat-card__icon--balance {
  background: #fff5e6;
  color: #c97800;
  border: 1px solid #f0e0c8;
}

#affiliate-dashboard .affiliate-stat-card__icon--percent {
  background: #eef4ff;
  color: #3d5a99;
  border: 1px solid #dce6fa;
}

#affiliate-dashboard .affiliate-stat-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 6px;
}

#affiliate-dashboard .affiliate-stat-card__hint {
  font-size: 0.78rem;
  color: #888;
  margin: 0 0 8px;
  line-height: 1.4;
}

#affiliate-dashboard .affiliate-stat-card__value {
  font-size: 1.65rem;
  font-weight: 700;
  color: #b22222;
  margin: 0;
  line-height: 1.2;
}

#affiliate-dashboard .affiliate-stat-card__value--solo {
  margin-top: 4px;
}

#affiliate-dashboard .affiliate-stat-card__withdraw {
  flex-shrink: 0;
  background-color: #b22222;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(178, 34, 34, 0.35);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

#affiliate-dashboard .affiliate-stat-card__withdraw:hover:not(:disabled) {
  background-color: #951d1d;
  color: #fff;
}

#affiliate-dashboard .affiliate-stat-card__withdraw:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

#affiliate-dashboard
  .affiliate-stat-card--commission
  .affiliate-stat-card__body {
  align-items: center;
}

/* Withdraw modal (nằm ngoài #affiliate-dashboard; id để tránh clip overflow) */
#affiliate-withdraw-modal .affiliate-withdraw-modal__panel {
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 20px 22px 20px;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__condition {
  line-height: 1.45;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__rule {
  margin-top: 16px;
  border: 0;
  border-top: 1px dashed #c8c8c8;
  width: 100%;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__form-alert .alert {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__form-alert .alert:last-child {
  margin-bottom: 0;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__label {
  font-weight: 700;
  color: #1a1a1a;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__input {
  border: 1px solid #d0d0d0;
  border-radius: 6px;
}

#affiliate-withdraw-modal textarea.affiliate-withdraw-modal__note {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 100px;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__amount-readable {
  font-weight: 600;
  letter-spacing: 0.02em;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__available {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 0.95rem;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__continue {
  background-color: #b22222;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(178, 34, 34, 0.35);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__continue:hover {
  background-color: #951d1d;
  color: #fff;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__back {
  color: #b22222;
  font-weight: 600;
  font-size: 0.95rem;
}

#affiliate-withdraw-modal .affiliate-withdraw-modal__back:hover {
  color: #951d1d;
}

body.modal-open .modal-backdrop.show {
  background-image: radial-gradient(
    circle,
    rgba(160, 175, 190, 0.35) 1px,
    transparent 1px
  );
  background-size: 12px 12px;
  background-color: rgba(120, 120, 120, 0.35);
}

/* Transaction panel */
#affiliate-dashboard .affiliate-history-panel {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px 20px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

#affiliate-dashboard .affiliate-history-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 0 2px;
}

#affiliate-dashboard .affiliate-history-panel__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0;
}

#affiliate-dashboard .affiliate-history-panel__edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #b22222;
  color: #b22222;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

#affiliate-dashboard .affiliate-history-panel__edit:hover {
  background: #fff5f5;
  color: #951d1d;
}

#affiliate-dashboard .affiliate-history-table-wrap {
  margin: 0 -4px;
}
#affiliate-dashboard .affiliate-dashboard-head {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

#affiliate-dashboard .affiliate-dashboard-head .affiliate-dashboard-title {
  text-align: left;
  margin-bottom: 0;
}

#affiliate-dashboard .affiliate-dashboard-logout {
  margin-right: 0;
  border: 1px solid #d92323;
  color: #d92323;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  margin: 0;
}
#affiliate-dashboard .affiliate-dashboard-logout:hover {
  background: #fff3f3;
  color: #b61c1c;
}
#affiliate-dashboard .affiliate-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

#affiliate-dashboard .affiliate-history-table thead th {
  text-align: left;
  font-weight: 600;
  color: #6d6d6d;
  padding: 10px 12px 12px;
  border-bottom: 1px solid #e5e5e5;
  white-space: nowrap;
}

#affiliate-dashboard .affiliate-history-table tbody td {
  padding: 14px 12px;
  color: #333;
  vertical-align: middle;
  border-bottom: 1px dashed #d8d8d8;
}

#affiliate-dashboard .affiliate-history-table tbody tr:last-child td {
  border-bottom: none;
}

#affiliate-dashboard .affiliate-history-table__empty {
  text-align: center;
  color: #888;
  padding: 28px 12px !important;
}

#affiliate-dashboard .affiliate-store-transactions {
  margin-top: 8px;
}

#affiliate-dashboard .affiliate-history-table__money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#affiliate-dashboard .affiliate-tx-amount--in {
  color: #1b5e20;
  font-weight: 600;
}

#affiliate-dashboard .affiliate-tx-amount--out {
  color: #b71c1c;
  font-weight: 600;
}

#affiliate-dashboard .affiliate-tx-flow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
}

#affiliate-dashboard .affiliate-tx-flow--in {
  color: #1b5e20;
}

#affiliate-dashboard .affiliate-tx-flow--out {
  color: #b71c1c;
}

#affiliate-dashboard .affiliate-tx-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

#affiliate-dashboard .affiliate-tx-status--processing {
  background: #ffe4d0;
  color: #5c3d26;
}

#affiliate-dashboard .affiliate-tx-status--confirm {
  background: #e8f5e9;
  color: #2e5c32;
}

#affiliate-dashboard .affiliate-tx-status--reject {
  background: #ffebee;
  color: #8b1c1c;
}

#affiliate-dashboard .affiliate-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

#affiliate-dashboard .affiliate-status-badge.is-pending {
  background: #ffe4d0;
  color: #5c3d26;
}

#affiliate-dashboard .affiliate-status-badge.is-complete {
  background: #e8f5e9;
  color: #2e5c32;
}

@media (max-width: 767px) {
  #affiliate-dashboard .affiliate-stat-card {
    flex-direction: column;
    align-items: stretch;
  }

  #affiliate-dashboard .affiliate-stat-card__withdraw {
    width: 100%;
    text-align: center;
  }
}

/* ===== Header Language Dropdown (keep <a> position stable) ===== */
.lang-swicher {
  position: relative;
  display: flex;
  align-items: center;
}

#gtranslate-dropdown {
  position: absolute;
  top: 62px;
  right: 0;
  z-index: 10000;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#gtranslate-dropdown .form-select,
#gtranslate-dropdown select {
  width: 220px;
  max-width: 220px;
}

/* Ensure dropdown toggle <a> doesn't inherit unwanted sizing */
#gtranslate-toggle {
  flex: 0 0 auto;
}
