.certificate-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.certificate-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
}
.certificate-popup-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: popupFadeIn 0.3s ease;
}
@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.certificate-popup-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
  z-index: 10;
}
.certificate-popup-close:hover {
  color: #333;
}
.certificate-popup-image {
  text-align: center;
  margin-bottom: 20px;
}
.certificate-popup-image img {
  max-width: 100%;
  max-height: 60vh;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
}
.certificate-popup-footer {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
}
.certificate-popup-footer p {
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
}
.btn-accept {
  padding: 12px 50px;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-accept:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}
.btn-accept:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-accept.-loading {
  opacity: 0.7;
  pointer-events: none;
}
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;
}
.toast {
  padding: 16px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  animation: slideInRight 0.4s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.toast-success {
  background: linear-gradient(135deg,#28a745,#20c997);
  border-left: 4px solid #1e7e34;
}
.toast-error {
  background: linear-gradient(135deg,#dc3545,#e74c6f);
  border-left: 4px solid #a71d2a;
}
.toast-warning {
  background: linear-gradient(135deg,#ffc107,#fd7e14);
  border-left: 4px solid #d39e00;
  color: #333;
}
.toast-info {
  background: linear-gradient(135deg,#17a2b8,#0dcaf0);
  border-left: 4px solid #0f7a8c;
}
.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.toast-content {
  flex: 1;
}
.toast-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.toast-message {
  font-size: 14px;
  opacity: 0.95;
}
.toast-close {
  cursor: pointer;
  font-size: 18px;
  opacity: 0.7;
  transition: opacity 0.3s;
  background: none;
  border: none;
  color: inherit;
  padding: 0 0 0 10px;
  flex-shrink: 0;
}
.toast-close:hover {
  opacity: 1;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,0.4);
  animation: progressBar 4s linear forwards;
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 35px 40px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalFadeIn 0.3s ease;
  text-align: center;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-icon {
  font-size: 60px;
  margin-bottom: 25px;
  margin-top: 5px;
  line-height: 100%;
}
.modal-icon.success {
  color: #28a745;
}
.modal-icon.error {
  color: #dc3545;
}
.modal-icon.warning {
  color: #ffc107;
}
.modal-icon.info {
  color: #17a2b8;
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a2e;
}
.modal-text {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 25px;
}
.modal-btn {
  padding: 12px 40px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: #fff;
  background: #000;
}
.modal-btn-primary {
  background: linear-gradient(135deg,#007bff,#0056b3);
}
.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,123,255,0.3);
}
.modal-btn-success {
  background: linear-gradient(135deg,#28a745,#1e7e34);
}
.modal-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40,167,69,0.3);
}
.modal-btn-danger {
  background: linear-gradient(135deg,#dc3545,#a71d2a);
}
.modal-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220,53,69,0.3);
}
.modal-btn-warning {
  background: linear-gradient(135deg,#ffc107,#d39e00);
  color: #333;
}
.modal-btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,193,7,0.3);
}
.modal-btn-secondary {
  background: #6c757d;
}
.modal-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108,117,125,0.3);
}
