@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes progressFill {
  from { width: 0; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes firework {
  0% { transform: scale(0.2); opacity: 0; }
  15% { opacity: 1; }
  60% { opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.animate-slideUp { animation: slideUp 0.6s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.4s ease-out forwards; }
.animate-progress { animation: progressFill 1s ease-out forwards; }
.animate-pulse-hover:hover { animation: pulse 0.3s ease-in-out; }
.gradient-tvs {
  background: linear-gradient(135deg, #E85D04 0%, #FAA307 50%, #DC2F02 100%);
}
.gradient-tvs-light {
  background: linear-gradient(135deg, rgba(232, 93, 4, 0.1) 0%, rgba(250, 163, 7, 0.1) 100%);
}
.card-shadow {
  box-shadow: 0 4px 20px rgba(232, 93, 4, 0.15);
}
.card-shadow-hover:hover {
  box-shadow: 0 8px 30px rgba(232, 93, 4, 0.25);
  transform: translateY(-2px);
}
.shimmer-bg {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.progress-bar {
  transition: width 1s ease-out;
}
.tab-active {
  background: linear-gradient(135deg, #E85D04 0%, #FAA307 100%);
  color: white;
}
.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
input[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(135deg, #E85D04 0%, #FAA307 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 500;
}
.celebration-card {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 9999px;
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
}
.firework-burst {
  position: absolute;
  border-radius: 9999px;
  mix-blend-mode: screen;
  opacity: 0;
  animation: firework 3.2s ease-out infinite;
}
.firework-burst-1 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.95), transparent 60%);
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.8);
  left: 18%;
  top: 26%;
  animation-delay: 0s;
}
.firework-burst-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(249, 168, 212, 0.95), transparent 60%);
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.8);
  right: 15%;
  top: 20%;
  animation-delay: 0.6s;
}
.firework-burst-3 {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.95), transparent 60%);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.8);
  left: 22%;
  bottom: 18%;
  animation-delay: 1.2s;
}
.firework-burst-4 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.95), transparent 60%);
  box-shadow: 0 0 25px rgba(45, 212, 191, 0.8);
  right: 22%;
  bottom: 15%;
  animation-delay: 1.8s;
}
.toast {
  animation: slideUp 0.3s ease-out;
}
body { box-sizing: border-box; }

/* ================== PRINT TIMETABLE PRO ================== */
@media print {

  @page {
    size: A4 landscape;   /* In ngang */
    margin: 6mm;
  }

  body {
    background: white !important;
  }

  /* Ẩn toàn bộ */
  body * {
    visibility: hidden !important;
  }

  /* Chỉ hiện bảng */
  #tkbTableWrapper,
  #tkbTableWrapper *,
  #attendanceTableWrapper,
  #attendanceTableWrapper *,
  #attendanceNkTableWrapper,
  #attendanceNkTableWrapper *,
  #attendanceBdTableWrapper,
  #attendanceBdTableWrapper *,
  #attendanceBusTableWrapper,
  #attendanceBusTableWrapper * {
    visibility: visible !important;
  }

  /* Định vị bảng */
  #tkbTableWrapper,
  #attendanceTableWrapper,
  #attendanceNkTableWrapper,
  #attendanceBdTableWrapper,
  #attendanceBusTableWrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  /* Ẩn toàn bộ button */
  button {
    display: none !important;
  }

  /* Fix bảng */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 10px;
    line-height: 1.15;
  }

  th, td {
    border: 1px solid #000 !important;
    padding: 3px !important;
    text-align: center;
    vertical-align: top;
  }

  /* Tránh vỡ hàng giữa trang */
  tr {
    page-break-inside: avoid;
  }

  /* Tắt shadow + animation khi in */
  .card-shadow,
  .shadow,
  .shadow-sm,
  .shadow-lg,
  .shadow-2xl,
  .animate-slideUp,
  .animate-fadeIn,
  .animate-progress,
  .animate-pulse-hover,
  .shimmer-bg {
    box-shadow: none !important;
    animation: none !important;
  }
}
