#year-buttons {
  display: flex;
  gap: 10px;
  /* khoảng cách giữa các nút */
  flex-wrap: wrap;
  /* tự xuống dòng nếu dài quá */
  white-space: normal;
  /* cho phép xuống dòng */
  padding: 8px 0 12px 0;
}

#year-buttons .btn.active {
  background-color: #28a745;
  /* xanh lá */
  color: #fff;
  /* chữ trắng */
  border-color: #28a745;
}

.verified-icon {
  color: #f91075;
  /* xanh dương Bootstrap */
  margin-left: 4px;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(13, 110, 253, 0.4));
  transition: transform 0.2s ease, filter 0.3s ease;
}

/* Hiệu ứng “nhấp nháy sáng” nhẹ như badge verified Facebook */
@keyframes sparkle {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(13, 110, 253, 0.4));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 8px rgba(13, 110, 253, 0.8));
    transform: scale(1.1);
  }
}

.verified-icon:hover {
  animation: sparkle 1.5s infinite ease-in-out;
}

/* Hiệu ứng phát sáng */
.verified-icon-glow {
  filter: drop-shadow(0 0 6px currentColor);
  transition: all 0.25s ease;
}

.verified-icon-glow:hover {
  filter: drop-shadow(0 0 10px currentColor) brightness(1.2);
  transform: scale(1.2);
}

#year-buttons {
  display: flex;
  gap: 10px;
  /* khoảng cách giữa các nút */
  flex-wrap: wrap;
  /* tự xuống dòng nếu dài quá */
  white-space: normal;
  /* cho phép xuống dòng */
  padding: 8px 0 12px 0;
}

#year-buttons .btn.active {
  background-color: #28a745;
  /* xanh lá */
  color: #fff;
  /* chữ trắng */
  border-color: #28a745;
}

#month-buttons {
  display: flex;
  gap: 10px;
  /* khoảng cách giữa các nút */
  flex-wrap: wrap;
  /* tự xuống dòng nếu dài quá */
  white-space: normal;
  /* cho phép xuống dòng */
  padding: 8px 0 12px 0;
}

#month-buttons .btn.active {
  background-color: #28a745;
  /* xanh lá */
  color: #fff;
  /* chữ trắng */
  border-color: #28a745;
}

.flatpickr-calendar {
  margin-top: 45px !important;

  /* khoảng cách giữa nút và popup */
  .flatpickr-calendar {
    font-size: 11px !important;
    /* 👈 chỉnh cỡ chữ nhỏ hơn */
  }

  .flatpickr-day {
    font-size: 11px !important;
    /* 👈 chỉnh số ngày nhỏ hơn */
  }

  .flatpickr-months .flatpickr-month {
    font-size: 11px !important;
    /* 👈 chỉnh tiêu đề tháng */
  }
}

.modal-dialog {
  display: flex;
  align-items: center;
  min-height: 100vh;
  /* chiếm full chiều cao */
}

#modal-add-hmc .modal-content {
  border: 2px solid #0d6efd;
}

#modal-add-hmcon .modal-content {
  border: 2px solid #39009c;
}

#modal-add-th .modal-content {
  border: 2px solid #198754;
}

#modal-add-hmc .modal-header,
#modal-add-hmcon .modal-header,
#modal-add-th .modal-header {
  font-weight: bold;
}

/* Viền đỏ khi chưa nhập */
.is-invalid {
  border: 2px solid #dc3545 !important;
}

/* Hiệu ứng rung (shake) */
@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  50% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-4px);
  }

  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shake 0.3s ease;
}

/* Hiệu ứng fade-in nhẹ khi thanh xuất hiện */
#selected-count {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 2s ease, transform 2s ease;
}

#selected-count.show {
  opacity: 1;
  transform: translateY(0);
}

#selected-chi {
  color: #dc3545;
  /* đỏ */
  font-weight: bold;
}

#selected-thu {
  color: #198754;
  /* xanh */
  font-weight: bold;
}

/* 🔹 Hiệu ứng fade khi tăng/giảm */
.fade-green {
  animation: fadeGreen 0.8s ease-in-out;
}

.fade-red {
  animation: fadeRed 0.8s ease-in-out;
}

@keyframes fadeGreen {
  0% {
    background-color: rgba(0, 255, 0, 0.2);
  }

  100% {
    background-color: transparent;
  }
}

@keyframes fadeRed {
  0% {
    background-color: rgba(255, 0, 0, 0.2);
  }

  100% {
    background-color: transparent;
  }
}

/* 🌊 Thanh trượt xác nhận full width */
.slide-to-confirm {
  width: 100%;
  user-select: none;
}

.slider-bg {
  background: linear-gradient(to right, #f8d7da, #f1b0b7);
  border-radius: 40px;
  height: 56px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Văn bản giữa slider */
.slider-text {
  color: #842029;
  font-weight: 600;
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 1;
  pointer-events: none;
  transition: color 0.3s ease;
}

/* Nút trượt */
.slider-handle {
  width: 58px;
  height: 56px;
  border-radius: 50%;
  background-color: #dc3545;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
  color: white;
  font-size: 24px;
  z-index: 2;
  transition: background-color 0.2s ease;
}

/* Khi trượt xong */
.slider-handle.slid {
  background-color: #28a745;
}

/* 💡 Hiệu ứng sáng nhẹ khi modal mở */
#modal-canhbao-khongdangchi.show .slider-bg {
  box-shadow: 0 0 12px rgba(220, 53, 69, 0.5);
}

/* 📢 Thông báo dropdown */
.notification-item:hover {
  background-color: #f8f9fa;
  transition: background-color 0.3s ease;
}

.notification-item h6 {
  color: #0d6efd;
}

.notification-actions {
  font-size: 13px;
  background: #fafafa;
}

.view-all button {
  font-size: 13px;
  padding: 4px 12px;
}

.topbar-badge {
  animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

.alert {
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.avatar-sm {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.badge {
  font-weight: 500;
}

.pulse-once {
  animation: pulseOnce 1s ease;
}

@keyframes pulseOnce {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.alerts-scroll {
  max-height: 50vh;
  /* hoặc 80vh nếu muốn có giới hạn */
  overflow-y: auto;
}

/* 🌟 Hiệu ứng nhấp nháy nhẹ cho cảnh báo hôm nay */
.blink-today {
  animation: pulseAlert 1.6s infinite;
  border-left: 4px solid var(--bs-warning);
}

@keyframes pulseAlert {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.5);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 0 10px 4px rgba(255, 193, 7, 0.4);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.5);
  }
}

#loadingModal {
  z-index: 9999 !important;
}

#loadingModal .modal-backdrop {
  z-index: 9998 !important;
}

#searchKeyword {
  background-color: #1e1e2d;
  color: #fff;
  border: 1px solid #0dcaf0;
  box-shadow: 0 0 5px rgba(13, 202, 240, 0.5);
}

#searchKeyword:focus {
  border-color: #0dcaf0;
  box-shadow: 0 0 10px rgba(13, 202, 240, 0.8);
}

.search-glow select {
  background-color: #1e1e2d;
  /* tone tối */
  color: #fff;
  border: 1px solid #0dcaf0;
  box-shadow: 0 0 6px rgba(13, 202, 240, 0.4);
  border-radius: 6px;
  transition: all 0.3s ease-in-out;
}

.search-glow select:focus {
  border-color: #0dcaf0;
  box-shadow: 0 0 12px rgba(13, 202, 240, 0.8);
  background-color: #212f45;
  outline: none;
}

.search-glow select option {
  background-color: #1e1e2d;
  color: #fff;
}

@keyframes glowPulse {
  0% {
    text-shadow: 0 0 4px rgba(255, 193, 7, 0.6), 0 0 10px rgba(255, 193, 7, 0.4),
      0 0 20px rgba(255, 193, 7, 0.3);
  }
  50% {
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.9), 0 0 16px rgba(255, 193, 7, 0.6),
      0 0 25px rgba(255, 193, 7, 0.5);
  }
  100% {
    text-shadow: 0 0 4px rgba(255, 193, 7, 0.6), 0 0 10px rgba(255, 193, 7, 0.4),
      0 0 20px rgba(255, 193, 7, 0.3);
  }
}

.glow-warning {
  color: #ffc107 !important;
  font-weight: 600;
  animation: glowPulse 1.5s ease-in-out infinite;
}
/* 🔁 Nút gia hạn nổi bật */
.btn-renew {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  border: none;
  color: #212529;
  font-weight: 600;
  padding: 1px 5px;
  font-size: 10px;
  border-radius: 5px;
  margin-left: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-renew:hover {
  background: linear-gradient(135deg, #ffca2c, #ffc107);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.8);
}

.btn-topbar:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  transition: all 0.2s ease-in-out;
}
