/* Custom Premium Styles for Campus Sarpras Dashboard */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  --font-primary: "Poppins", sans-serif;
  --font-display: "Poppins", sans-serif;
}

body {
  font-family: var(--font-primary);
  background-color: #f8fafc; /* Slate 50 */
  overflow-x: hidden;
  font-size: 14px; /* Medium sizing */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark-glass-panel {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Slide-over Drawers and Panels */
.drawer-transition {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Gradients */
.gradient-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}
.gradient-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
.gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}
.gradient-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.gradient-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}
.gradient-slate {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Glowing Effects */
.glow-primary {
  box-shadow:
    0 10px 25px -5px rgba(99, 102, 241, 0.4),
    0 8px 10px -6px rgba(99, 102, 241, 0.4);
}

/* Scrollbar Hide Utility */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Ensure Camera Viewer stays contained */
#interactive-reader {
  width: 100% !important;
  max-width: 100% !important;
}
#interactive-reader video {
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
}
.glow-success {
  box-shadow:
    0 10px 25px -5px rgba(16, 185, 129, 0.3),
    0 8px 10px -6px rgba(16, 185, 129, 0.3);
}

/* Simulated QR Scanner Scanline Animation */
.scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    to bottom,
    rgba(99, 102, 241, 0),
    rgba(99, 102, 241, 0.8) 50%,
    rgba(99, 102, 241, 0)
  );
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% {
    top: 0%;
  }
  50% {
    top: 100%;
  }
  100% {
    top: 0%;
  }
}

/* Animated Cart Pulse */
@keyframes cart-bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
.cart-pulse {
  animation: cart-bounce 0.4s ease-out;
}

/* Interactive Role Banner styling */
.role-banner-glow {
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

/* QR Code Grid Printing */
@media print {
  body * {
    visibility: hidden;
  }
  .print-area,
  .print-area * {
    visibility: visible;
  }
  .print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .no-print {
    display: none !important;
  }
}

/* Shimmer loading effect */
.shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Sidebar Custom Hover and Transition */
.sidebar-link {
  transition: all 0.2s ease-in-out;
}
.sidebar-link:hover {
  transform: translateX(4px);
}
.sidebar-active {
  background-color: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  border-left: 4px solid #4f46e5;
}

/* Premium Login Cards Design */
.demo-user-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.demo-user-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 25px -5px rgba(99, 102, 241, 0.1),
    0 10px 10px -5px rgba(99, 102, 241, 0.04);
}

/* Interactive Top bar user menu animation */
.profile-dropdown-transition {
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}

/* Tab settings styling */
.settings-tab-btn {
  transition: all 0.2s ease;
}

/* Global Premium Select Styling */
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 1rem !important;
  padding-right: 2.5rem !important;
  cursor: pointer;
}

select::-ms-expand {
  display: none;
}

/* Global rule for table rows to stay compact and scroll horizontally */
table th,
table td {
  white-space: nowrap;
}
