/* MTS PUTRI AT-TAHZIB KEKAIT - Custom Styles */

:root {
  --emerald: #10b981;
  --emerald-dark: #047857;
  --gold: #f59e0b;
  --gold-dark: #b45309;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.dark .glass {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(75, 85, 99, 0.3);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Islamic Pattern Background */
.islamic-pattern {
  background-color: #ecfdf5;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2310b981' fill-opacity='0.05'%3E%3Cpath d='M40 0L46 12L60 14L50 24L52 38L40 32L28 38L30 24L20 14L34 12z'/%3E%3C/g%3E%3C/svg%3E");
}

.dark .islamic-pattern {
  background-color: #022c22;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.10) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2310b981' fill-opacity='0.1'%3E%3Cpath d='M40 0L46 12L60 14L50 24L52 38L40 32L28 38L30 24L20 14L34 12z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Gradient Backgrounds */
.bg-gradient-emerald {
  background: linear-gradient(135deg, #10b981 0%, #047857 50%, #065f46 100%);
}

.bg-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.bg-mesh {
  background-color: #ecfdf5;
  background-image:
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 95, 70, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(251, 191, 36, 0.2) 0px, transparent 50%);
}

.dark .bg-mesh {
  background-color: #022c22;
  background-image:
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 95, 70, 0.3) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(251, 191, 36, 0.1) 0px, transparent 50%);
}

/* Animated Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, #10b981 0%, #f59e0b 50%, #10b981 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient 4s ease infinite;
}

@keyframes gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Smooth scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #10b981; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #047857; }
.dark ::-webkit-scrollbar-thumb { background: #047857; }

/* Card hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.3);
}

/* Button shine effect */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s;
}
.btn-shine:hover::before { left: 100%; }

/* Loader */
.loader {
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  width: 24px; height: 24px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sidebar */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.sidebar-link.active {
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.dark .sidebar-link { color: #9ca3af; }
.dark .sidebar-link:hover { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pill-success { background: #d1fae5; color: #065f46; }
.pill-warning { background: #fef3c7; color: #92400e; }
.pill-danger { background: #fee2e2; color: #991b1b; }
.pill-info { background: #dbeafe; color: #1e40af; }

.dark .pill-success { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.dark .pill-warning { background: rgba(245,158,11,0.2); color: #fcd34d; }
.dark .pill-danger { background: rgba(239,68,68,0.2); color: #fca5a5; }
.dark .pill-info { background: rgba(59,130,246,0.2); color: #93c5fd; }

/* Exam UI specific */
.exam-camera-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 200px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #10b981;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
  z-index: 9999;
}

.exam-camera-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.violation-flash {
  animation: flash 0.5s;
}
@keyframes flash {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(239, 68, 68, 0.3); }
}

/* Question card */
.question-card {
  border-left: 4px solid transparent;
  transition: all 0.2s;
}
.question-card.answered { border-left-color: #10b981; }
.question-card.current { border-left-color: #f59e0b; }

/* Floating particles */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(16,185,129,0.5) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50% { transform: translate(30px, -30px) scale(1.2); opacity: 0.8; }
}

/* Marquee for stats */
.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-content {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Print styles */
@media print {
  .no-print { display: none !important; }
}

/* Mobile bottom nav */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    z-index: 50;
    justify-content: space-around;
    padding: 0.5rem;
  }
  .dark .bottom-nav { background: #111827; border-top-color: rgba(16,185,129,0.3); }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: #6b7280;
    font-size: 0.7rem;
  }
  .bottom-nav-item.active { color: #10b981; }
}

/* Notification badge */
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Quiz timer */
.timer-warning {
  animation: pulse-red 1s ease-in-out infinite;
  color: #ef4444 !important;
}
@keyframes pulse-red {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Login animated bg */
.login-bg {
  background: linear-gradient(-45deg, #047857, #10b981, #f59e0b, #d97706);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: white;
  border-left: 4px solid #10b981;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease-out;
  max-width: 400px;
}
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.dark .toast { background: #1f2937; color: white; }

@keyframes slideIn {
  from { transform: translateX(120%); }
  to { transform: translateX(0); }
}

/* Calendar grid */
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-day:hover { background: rgba(16,185,129,0.1); }
.cal-day.active { background: #10b981; color: white; }
.cal-day.has-event { position: relative; }
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #f59e0b;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
.dark .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============= DYNAMIC UI ENHANCEMENTS ============= */

/* Ripple effect */
.btn-ripple, .ripple { position: relative; overflow: hidden; }
.ripple-ink {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transform: translate(-50%,-50%) scale(0);
  animation: ripple-anim 0.7s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: translate(-50%,-50%) scale(40); opacity: 0; }
}

/* Page enter animation */
.page-enter { opacity: 0; transform: translateY(8px); }
.page-enter-active {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Card hover lift */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(16,185,129,0.25);
}

/* Stat card with shine */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}
.stat-card:hover::before { left: 100%; }
.stat-card:hover { transform: translateY(-3px) scale(1.02); }

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 10px 25px -5px rgba(16,185,129,0.5);
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s;
  border: none;
}
.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 15px 35px -5px rgba(16,185,129,0.7);
}
.fab.fab-gold { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 10px 25px -5px rgba(217,119,6,0.5); }
@media (max-width: 768px) { .fab { bottom: 80px; } }

/* Smooth table row */
.tr-anim { transition: all 0.2s ease; }
.tr-anim:hover {
  transform: translateX(4px);
  box-shadow: -4px 0 0 0 #10b981;
}

/* Skeleton variants */
.skeleton-text { height: 14px; margin: 6px 0; }
.skeleton-title { height: 24px; width: 60%; margin: 8px 0; }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-block { height: 100px; width: 100%; }
.skeleton-row { height: 48px; margin-bottom: 8px; }

/* Modal animations */
.modal-overlay { animation: fadeIn 0.25s ease; }
.modal-content { animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Interactive form input */
.input-glow:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
  border-color: #10b981;
}

/* Progress ring */
.progress-ring { transform: rotate(-90deg); }
.progress-ring circle {
  transition: stroke-dashoffset 0.6s ease;
}

/* Dynamic gradient backgrounds for stat cards */
.bg-stat-1 { background: linear-gradient(135deg, #10b981, #059669); }
.bg-stat-2 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-stat-3 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-stat-4 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.bg-stat-5 { background: linear-gradient(135deg, #ec4899, #db2777); }
.bg-stat-6 { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Bounce in for list items */
.list-stagger > * {
  animation: slideUp 0.4s ease backwards;
}
.list-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.list-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.list-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.list-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.list-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.list-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.list-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.list-stagger > *:nth-child(8) { animation-delay: 0.4s; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab nav */
.tabs-pill {
  display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(0,0,0,0.05); border-radius: 12px;
}
.dark .tabs-pill { background: rgba(255,255,255,0.05); }
.tab-btn {
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: all 0.2s;
  cursor: pointer; border: none;
  background: transparent; color: inherit;
}
.tab-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 10px -2px rgba(16,185,129,0.4);
}

/* Pulse dot for live indicator */
.live-dot {
  position: relative; display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
}
.live-dot::after {
  content: ''; position: absolute;
  inset: -4px; border-radius: 50%;
  border: 2px solid #ef4444;
  animation: live-pulse 1.5s infinite;
}
@keyframes live-pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Stat number large */
.stat-num {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, #fff, #d1fae5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Drag-drop area */
.dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: #10b981;
  background: rgba(16,185,129,0.05);
}


/* ================================================================ */
/*  Phase 7: PREMIUM UI ENHANCEMENTS                                 */
/* ================================================================ */

/* Premium glass — stronger, with subtle gold border highlight */
.glass-strong {
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.65) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow:
    0 10px 40px -10px rgba(16,185,129,0.18),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(245,158,11,0.1);
}
.dark .glass-strong {
  background: linear-gradient(135deg, rgba(17,24,39,0.85) 0%, rgba(17,24,39,0.65) 100%);
  border: 1px solid rgba(75,85,99,0.4);
  box-shadow:
    0 10px 40px -10px rgba(16,185,129,0.2),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Neon glow on focus / hover */
.input-glow:focus {
  outline: none;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.15), 0 0 20px rgba(16,185,129,0.3);
  transition: all .25s ease;
}

/* Animated gradient text */
.gradient-text {
  background: linear-gradient(90deg, #10b981, #f59e0b, #10b981);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s linear infinite;
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Shimmering border for highlighted cards */
.shimmer-border {
  position: relative;
  overflow: hidden;
}
.shimmer-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, transparent 0%, #10b981 25%, #f59e0b 50%, #10b981 75%, transparent 100%);
  background-size: 400% 400%;
  animation: shimmer-rotate 3s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
@keyframes shimmer-rotate {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

/* Floating orbs background */
.bg-orbs {
  position: relative;
  overflow: hidden;
}
.bg-orbs::before, .bg-orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.bg-orbs::before {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #10b981, transparent 70%);
  top: -100px; left: -100px;
  animation: orb-float-1 12s ease-in-out infinite;
}
.bg-orbs::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #f59e0b, transparent 70%);
  bottom: -150px; right: -150px;
  animation: orb-float-2 15s ease-in-out infinite;
}
.dark .bg-orbs::before { opacity: 0.2; }
.dark .bg-orbs::after { opacity: 0.15; }
@keyframes orb-float-1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(60px,40px) scale(1.1); }
  66%     { transform: translate(-30px,80px) scale(0.9); }
}
@keyframes orb-float-2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-80px,-40px) scale(1.15); }
}

/* Premium card hover with 3D tilt feel */
.card-lift {
  transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .35s ease;
  will-change: transform;
}
.card-lift:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 25px 50px -15px rgba(16,185,129,0.25),
    0 10px 20px -8px rgba(0,0,0,0.1);
}

/* Premium button with ripple + sheen */
.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
}
.btn-premium::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left .6s ease;
}
.btn-premium:hover::after { left: 100%; }
.btn-premium:active { transform: scale(0.97); }

/* Pulse rings around important elements */
.pulse-ring {
  position: relative;
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid #10b981;
  animation: pulse-ring 2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse-ring {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* Enhanced stat card with gradient + shine */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 70%);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px -10px rgba(0,0,0,0.25);
}

/* Smooth fade-in for newly-rendered rows */
.tr-anim {
  animation: row-fade .35s ease-out both;
}
@keyframes row-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger animation utility */
.list-stagger > * {
  animation: list-pop .5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.list-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.list-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.list-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.list-stagger > *:nth-child(4) { animation-delay: 0.20s; }
.list-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.list-stagger > *:nth-child(6) { animation-delay: 0.30s; }
.list-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.list-stagger > *:nth-child(8) { animation-delay: 0.40s; }
@keyframes list-pop {
  from { opacity: 0; transform: translateY(15px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Pill styles (success/warning/info/danger) refresh */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill-success { background: #d1fae5; color: #065f46; border-color: rgba(16,185,129,0.3); }
.pill-warning { background: #fef3c7; color: #92400e; border-color: rgba(245,158,11,0.3); }
.pill-danger  { background: #fee2e2; color: #991b1b; border-color: rgba(239,68,68,0.3); }
.pill-info    { background: #dbeafe; color: #1e40af; border-color: rgba(59,130,246,0.3); }
.dark .pill-success { background: rgba(16,185,129,0.18); color: #6ee7b7; }
.dark .pill-warning { background: rgba(245,158,11,0.18); color: #fcd34d; }
.dark .pill-danger  { background: rgba(239,68,68,0.18); color: #fca5a5; }
.dark .pill-info    { background: rgba(59,130,246,0.18); color: #93c5fd; }

/* Premium scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10b981, #047857);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #34d399, #10b981);
  background-clip: padding-box;
}

/* Premium selection color */
::selection { background: rgba(16,185,129,0.3); color: #064e3b; }
.dark ::selection { background: rgba(16,185,129,0.4); color: #ecfdf5; }

/* Loader spinner premium */
.loader {
  width: 40px; height: 40px;
  border: 3px solid rgba(16,185,129,0.15);
  border-top-color: #10b981;
  border-right-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 37%, rgba(0,0,0,0.06) 63%);
  background-size: 400% 100%;
  animation: skeleton-wave 1.4s ease infinite;
  border-radius: 6px;
}
.skeleton-row { height: 14px; width: 100%; }
.dark .skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
}
@keyframes skeleton-wave {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Stat card color variants (premium gradients) */
.bg-stat-1 { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }
.bg-stat-2 { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.bg-stat-3 { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.bg-stat-4 { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.bg-stat-5 { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }

/* Modal premium */
.modal-overlay {
  animation: modal-fade .25s ease-out;
}
.modal-content {
  animation: modal-pop .4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-fade {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(8px); }
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Violation flash effect */
.violation-flash {
  animation: violation-flash .5s ease-out;
}
@keyframes violation-flash {
  0%, 100% { background: inherit; }
  50% { background: rgba(239,68,68,0.15); }
}

/* Dropzone style */
.dropzone {
  border: 2px dashed rgba(16,185,129,0.4);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: all .25s ease;
  background: rgba(16,185,129,0.03);
}
.dropzone:hover, .dropzone.dragover {
  border-color: #10b981;
  background: rgba(16,185,129,0.08);
  transform: scale(1.01);
}

/* Print-friendly */
@media print {
  .no-print, nav, aside, header, .sidebar, #__topbar, #__toasts { display: none !important; }
  body { background: white !important; }
  .glass, .glass-strong { background: white !important; box-shadow: none !important; border: 1px solid #e5e7eb !important; }
}

/* Mobile sidebar slide */
@media (max-width: 1024px) {
  .sidebar-mobile {
    position: fixed; inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9990;
  }
  .sidebar-mobile.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.25); }
}

/* Floating action button (FAB) */
.fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
  box-shadow: 0 10px 25px -5px rgba(16,185,129,0.5), 0 0 0 0 rgba(16,185,129,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all .25s ease;
  animation: fab-pulse 2s ease-in-out infinite;
  z-index: 100;
}
.fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 30px -5px rgba(16,185,129,0.7);
}
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 10px 25px -5px rgba(16,185,129,0.5), 0 0 0 0 rgba(16,185,129,0.4); }
  50%      { box-shadow: 0 10px 25px -5px rgba(16,185,129,0.5), 0 0 0 12px rgba(16,185,129,0); }
}

/* Confetti particles for success */
@keyframes confetti-fall {
  to { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti {
  position: fixed; top: -10px;
  width: 8px; height: 14px;
  pointer-events: none;
  z-index: 99999;
  animation: confetti-fall 3s linear forwards;
}
