/* SPA Top Progress Bar (YouTube / GitHub / NProgress style) */
#spa-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #6366f1, #06b6d4, #10b981);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: width 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 5px rgba(99, 102, 241, 0.5);
}

#spa-progress-bar.active {
  opacity: 1;
}

#spa-progress-bar.done {
  width: 100% !important;
  opacity: 0;
  transition: width 0.15s ease, opacity 0.35s ease 0.1s;
}

/* Micro-animations for instantaneous, smooth content transitions */
.spa-transitioning {
  opacity: 0.4;
  transform: translateY(2px);
  transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

.spa-page-enter {
  animation: spaFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spaFadeIn {
  from {
    opacity: 0.5;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   TATA.JS / MODERN FLOATING TOAST NOTIFICATION SYSTEM
   ========================================================================== */
#tata-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 390px;
  width: calc(100vw - 36px);
  pointer-events: none;
}

.tata-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px 16px 17px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.28), 0 8px 10px -6px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transform: translateX(120%);
  opacity: 0;
  animation: tataSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.tata-toast.tata-hide {
  animation: tataSlideOut 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.tata-toast-success {
  background: linear-gradient(135deg, #059669 0%, #047857 60%, #065f46 100%);
}

.tata-toast-warn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 60%, #92400e 100%);
}

.tata-toast-error {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #9f1239 100%);
}

.tata-toast-info {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #1e40af 100%);
}

.tata-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.tata-content {
  flex: 1;
  min-width: 0;
}

.tata-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 3px;
}

.tata-text {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  word-break: break-word;
}

.tata-close {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.tata-close:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.tata-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.75);
  width: 100%;
  transform-origin: left;
  animation: tataProgressLinear 4.5s linear forwards;
}

.tata-toast:hover .tata-progress {
  animation-play-state: paused;
}

@keyframes tataSlideIn {
  0% {
    transform: translateX(120%) scale(0.92);
    opacity: 0;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes tataSlideOut {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(120%) scale(0.92);
    opacity: 0;
  }
}

@keyframes tataProgressLinear {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

@media print {
  #tata-toast-container,
  #spa-progress-bar {
    display: none !important;
  }
}

/* ==========================================================================
   ADMIN DASHBOARD SIDEBAR & CONTENT OFFSET FIX (FOR ALL LAPTOP/DESKTOP SCREENS)
   ========================================================================== */
@media (min-width: 900px) {
  #adminSidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 16rem !important;
    transform: none !important;
    z-index: 40 !important;
  }
  #adminSidebar ~ div {
    padding-left: 16rem !important;
  }
  .lg\:pl-64 {
    padding-left: 16rem !important;
  }
}
