.grade-input {
  width: 80px !important;
  text-align: center;
}

.grade-input.saving {
  background-color: #fff3cd;
}

.grade-input.saved {
  background-color: #d4edda;
}

.grade-input.error {
  background-color: #f8d7da;
}

.grade-input::-webkit-inner-spin-button,
.grade-input::-webkit-outer-spin-button {
  opacity: 1;
}

.notification-item.notification-new {
  animation: notification-highlight 2s ease;
}

@keyframes notification-highlight {
  0% {
    background-color: rgba(70, 128, 255, 0.1);
  }
  70% {
    background-color: rgba(70, 128, 255, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

.animate-bell {
  animation: bell-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform-origin: top center;
}

@keyframes bell-shake {
  0%,
  100% {
    transform: rotate(0);
  }
  20%,
  60% {
    transform: rotate(-15deg);
  }
  40%,
  80% {
    transform: rotate(15deg);
  }
}

.welcome-banner {
  overflow: hidden;
  position: relative;
}

.welcome-banner::after {
  content: "";
  background-image: url("../images/layout/img-dropbox-bg.svg");
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  opacity: 0.5;
  background-position: bottom right;
  background-size: 100%;
  background-repeat: no-repeat;
}

.welcome-banner > * {
  position: relative;
  z-index: 5;
}

.welcome-banner .img-welcome-banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  padding-right: 64px;
}

@media (max-width: 768px) {
  .welcome-banner .img-welcome-banner {
    padding-right: 24px;
  }
}

.welcome-banner .img-welcome-banner img {
  width: 100%;
}

#nprogress .bar {
  background: #e77817 !important;
}

#nprogress .peg {
  box-shadow: 0 0 10px #e77817, 0 0 5px #e77817 !important;
}

#nprogress .spinner-icon {
  border-top-color: #e77817 !important;
  border-left-color: #e77817 !important;
}

.text-dt-responsive {
  white-space: normal;
  word-wrap: break-word;
}

.choices__list--dropdown {
  z-index: 9999 !important;
}

.choices[data-type*="select-multiple"] .choices__list--dropdown {
  z-index: 9999 !important;
}

.leaflet-control-container {
  z-index: 2;
}

#face-box {
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#face-label {
  font-weight: bold;
  white-space: nowrap;
  font-size: 12px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#video {
  background: #000;
  max-width: 100%;
  height: auto;
}

#camera-container {
  min-height: 200px;
  overflow: hidden;
}

#face-overlay {
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 768px) {
  #camera-container {
    min-height: 150px;
  }

  #video {
    max-width: 100%;
  }
}

/* Menu Lock Styles */
.menu-locked .pc-link {
  color: #dc3545 !important;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

.menu-disabled {
  color: #6c757d !important;
  opacity: 0.6;
  cursor: not-allowed;
  padding: 0.5rem 1rem;
  display: block;
  text-decoration: none;
  position: relative;
}

.menu-disabled:hover {
  color: #6c757d !important;
  text-decoration: none;
}

.menu-locked .pc-link:hover {
  color: #dc3545 !important;
  text-decoration: none;
}

/* Lock icon animation */
.menu-locked .ph-lock {
  animation: lock-pulse 2s infinite;
}

@keyframes lock-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Menu lock management page styles */
.form-check-input:checked ~ .form-check-label .menu-label {
  color: #dc3545 !important;
  font-weight: 500;
}

.card.border-success {
  border-color: #198754 !important;
}

.card.border-danger {
  border-color: #dc3545 !important;
}

.card.border-primary {
  border-color: #0d6efd !important;
}

/* QR Scanner Styling */
#qr-reader {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e9ecef;
}

#qr-reader__dashboard {
  background: transparent !important;
}

#qr-reader__dashboard_section {
  background: #f8f9fa !important;
  padding: 15px !important;
  border-radius: 6px !important;
}

#qr-reader__dashboard_section_csr button {
  background: #e77817 !important;
  border: none !important;
  color: white !important;
  padding: 8px 20px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}

#qr-reader__dashboard_section_csr button:hover {
  background: #f09846 !important;
}

#qr-reader__camera_selection select {
  padding: 8px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #dee2e6 !important;
  background: white !important;
  width: 100% !important;
}

/* #qr-reader__scan_region {
  border: 2px solid #e77817 !important;
  border-radius: 8px !important;
} */

#qr-reader__scan_region img {
  border-radius: 6px;
}

#qr-reader video {
  border-radius: 8px !important;
}

/* Scanner feedback animation */
@keyframes scan-line {
  0% {
    top: 0;
  }

  50% {
    top: 100%;
  }

  100% {
    top: 0;
  }
}

#qr-reader img[alt="Info icon"] {
  display: none !important;
}

#qr-reader > div > div[style*="position: absolute"][style*="right: 10px"] {
  display: none !important;
}

#qrcode {
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#qrcode img,
#qrcode canvas {
  max-width: 100% !important;
  height: auto !important;
}
