/* =================== ADVANCED AESTHETIC ENHANCEMENTS =================== */

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

html.dark-mode .glass {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

html.dark-mode .glass-strong {
  background: rgba(15, 23, 42, 0.95);
}

/* ===== ADVANCED SHADOWS & DEPTH ===== */
.shadow-neumorphic {
  box-shadow: 
    8px 8px 16px rgba(15, 23, 42, 0.1),
    -8px -8px 16px rgba(255, 255, 255, 0.8);
}

html.dark-mode .shadow-neumorphic {
  box-shadow: 
    8px 8px 16px rgba(0, 0, 0, 0.3),
    -8px -8px 16px rgba(51, 65, 85, 0.1);
}

.shadow-glow {
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.shadow-glow-green {
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.shadow-glow-purple {
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* ===== ADVANCED ANIMATIONS ===== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
  }
}

.animate-slideInUp {
  animation: slideInUp 0.5s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.5s ease-out;
}

.animate-scaleIn {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

/* ===== STAGGERED ANIMATIONS ===== */
.stagger-item {
  opacity: 0;
  animation: slideInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }

/* ===== ENHANCED BUTTONS ===== */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-gradient:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ===== ENHANCED CARDS ===== */
.card-modern {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.02),
    0 12px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  opacity: 0;
  transition: opacity 0.3s;
}

.card-modern:hover::before {
  opacity: 1;
}

.card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.05),
    0 24px 48px rgba(0, 0, 0, 0.08);
}

/* ===== ENHANCED SIDEBAR ===== */
#sidebar {
  position: relative;
  overflow: hidden;
}

#sidebar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sidebar-item {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.sidebar-item.active::before,
.sidebar-item:hover::before {
  transform: scaleY(1);
}

/* ===== ENHANCED INPUTS ===== */
.form-group input,
.form-group select,
.form-group textarea {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--border);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

/* ===== ENHANCED TABLE ===== */
table tbody tr {
  transition: all 0.2s ease;
}

table tbody tr:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

/* ===== LOADING SHIMMER ===== */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--border-light) 0%,
    var(--border) 50%,
    var(--border-light) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ===== ENHANCED BADGES ===== */
.badge {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.badge::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.5s;
}

.badge:hover::before {
  left: 100%;
}

/* ===== FLOATING ACTION BUTTON ===== */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  animation: ripple 2s infinite;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.95);
  color: white;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(15, 23, 42, 0.95);
  opacity: 0;
  transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* ===== ENHANCED MODAL ===== */
.modal {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 80px rgba(102, 126, 234, 0.2);
}

/* ===== SCROLL BAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #764ba2, #667eea);
}

/* ===== ENHANCED TOAST ===== */
.toast {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== PARTICLE BACKGROUND ===== */
.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  33% {
    transform: translateY(-100px) translateX(50px) rotate(120deg);
  }
  66% {
    transform: translateY(-50px) translateX(-50px) rotate(240deg);
  }
}

.particle:nth-child(1) { width: 60px; height: 60px; top: 10%; left: 10%; animation-duration: 15s; }
.particle:nth-child(2) { width: 40px; height: 40px; top: 60%; left: 80%; animation-duration: 20s; animation-delay: -5s; }
.particle:nth-child(3) { width: 80px; height: 80px; top: 40%; left: 50%; animation-duration: 25s; animation-delay: -10s; }

/* ===== SKELETON LOADERS - ENHANCED ===== */
.skeleton-card {
  background: linear-gradient(
    90deg,
    var(--border-light) 0%,
    var(--border) 50%,
    var(--border-light) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

/* ===== MICRO-INTERACTIONS ===== */
.micro-bounce:active {
  animation: bounce 0.3s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.95); }
}

.micro-shake:hover {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ===== GRID PATTERNS ===== */
.grid-pattern {
  background-image: 
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ===== ACCENT LINES ===== */
.accent-line {
  position: relative;
}

.accent-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 2px;
}
