/* Enhanced glass effect with better browser support */
.glass-effect { 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.85); 
  border: 1px solid rgba(255,255,255,0.2);
}

/* Custom scrollbar with enhanced styling */
.custom-scrollbar { 
  scrollbar-width: thin; 
  scrollbar-color: #a5b4fc transparent; 
}
.custom-scrollbar::-webkit-scrollbar { height: 8px; width: 8px; }
.custom-scrollbar::-webkit-scrollbar-thumb { 
  background: linear-gradient(45deg, #a5b4fc, #8b5cf6); 
  border-radius: 8px; 
  border: 1px solid rgba(255,255,255,0.3);
}
.custom-scrollbar::-webkit-scrollbar-track { 
  background: rgba(0,0,0,0.05); 
  border-radius: 8px; 
}

/* Modal and animation classes */
.modal-open { overflow: hidden; }

/* Enhanced animations */
.fade-in { animation: fadeIn 0.3s ease-out; }
.slide-up { animation: slideUp 0.4s ease-out; }
.bounce-in { animation: bounceIn 0.5s ease-out; }
.pulse-subtle { animation: pulseSubtle 2s infinite; }

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Enhanced card 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 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient backgrounds */
.gradient-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-success { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.gradient-warning { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.gradient-info { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

/* Button enhancements */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 15px 0 rgba(116, 75, 162, 0.3);
  transition: all 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(116, 75, 162, 0.4);
}

/* Status indicators */
.status-positive { color: #10b981; }
.status-negative { color: #ef4444; }
.status-neutral { color: #6b7280; }

/* Loading spinner */
.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

/* Progress bar */
.progress-bar {
  background: linear-gradient(90deg, #667eea, #764ba2);
  height: 4px;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Enhanced tooltips for minimize buttons */
.minimize-btn .group-hover\:opacity-100 {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.minimize-btn:hover > div {
  z-index: 1050;
}

/* Mobile-first responsive classes */
@media (max-width: 640px) {
  .mobile-card { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
    padding: 1.25rem; 
    border-bottom: 1px solid #e5e7eb; 
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  .mobile-card:last-child { border-bottom: none; }
  .mobile-row-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-weight: 600; 
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
  }
  .mobile-row-data { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 0.75rem; 
    font-size: 0.875rem; 
  }
  .mobile-data-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 0.5rem 0; 
    border-radius: 6px;
    background: rgba(255,255,255,0.5);
    padding: 0.5rem;
  }
  .mobile-actions { 
    display: flex; 
    gap: 0.5rem; 
    justify-content: flex-end; 
    margin-top: 0.75rem; 
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
  }
}

/* Hide table on mobile, show mobile cards */
@media (max-width: 640px) {
  .desktop-table { display: none; }
  .mobile-list { display: block; }
}

@media (min-width: 641px) {
  .desktop-table { display: block; }
  .mobile-list { display: none; }
}

/* Enhanced table styling */
.table-row {
  transition: all 0.2s ease;
}
.table-row:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transform: scale(1.002);
}

/* Form enhancements */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
}
.form-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

/* Notification styles */
.notification {
  border-radius: 12px;
  padding: 16px 20px;
  margin: 8px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-left: 4px solid;
}
.notification.success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left-color: #10b981;
  color: #047857;
}
.notification.error {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-left-color: #ef4444;
  color: #dc2626;
}
.notification.warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left-color: #f59e0b;
  color: #d97706;
}
.notification.info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-left-color: #3b82f6;
  color: #1d4ed8;
}

/* Universal Panel Minimization System - Mobile First */
.panel-minimized {
  transform: scale(0.95) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced Panel Animation States */
.panel-expanding {
  transform: scale(0.98) translateY(-5px);
  opacity: 0.3;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel-expanded {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile-First Floating Panel Icons */
.floating-panel-icon {
  position: fixed;
  z-index: 1000;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
  /* Mobile first sizing */
  width: 52px;
  height: 52px;
  bottom: 20px;
  right: 20px;
}

/* Tablet and desktop sizing */
@media (min-width: 768px) {
  .floating-panel-icon {
    width: 60px;
    height: 60px;
    top: 20px;
    bottom: auto;
  }
}

.floating-panel-icon.visible {
  transform: scale(1) rotate(0deg);
  animation: floatBounce 3s ease-in-out infinite;
}

.floating-panel-icon:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.floating-panel-icon:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

@keyframes floatBounce {
  0%, 100% { 
    transform: scale(1) translateY(0); 
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
  }
  50% { 
    transform: scale(1.05) translateY(-3px); 
    box-shadow: 0 15px 45px rgba(59, 130, 246, 0.4);
  }
}

.floating-panel-icon.dragging {
  transform: scale(1.2) rotate(10deg) !important;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.6) !important;
  z-index: 1001;
  animation: none;
}

/* Enhanced Minimize/Maximize Buttons */
.minimize-btn {
  opacity: 0.8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.minimize-btn::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;
}

.minimize-btn:hover {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.minimize-btn:hover::before {
  left: 100%;
}

.minimize-btn:active {
  transform: scale(0.95);
}

/* Mobile-specific button sizing */
@media (max-width: 640px) {
  .minimize-btn {
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Panel header visibility - Enhanced Mobile First */
.minimizable-panel-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  position: relative;
  overflow: hidden;
}

.minimizable-panel-header.visible {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  animation: slideDownFade 0.5s ease-out;
}

@keyframes slideDownFade {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Enhanced Tooltip System - Mobile Friendly */
.floating-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1002;
  /* Mobile positioning */
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
}

/* Desktop positioning */
@media (min-width: 768px) {
  .floating-tooltip {
    top: -45px;
    bottom: auto;
    transform: translateX(-50%) translateY(-5px);
  }
}

.floating-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* Desktop arrow */
@media (min-width: 768px) {
  .floating-tooltip::after {
    top: 100%;
    border-top-color: rgba(0, 0, 0, 0.9);
    border-bottom-color: transparent;
  }
}

/* Mobile arrow */
@media (max-width: 767px) {
  .floating-tooltip::after {
    top: 100%;
    border-top-color: rgba(0, 0, 0, 0.9);
    border-bottom-color: transparent;
  }
}

.floating-panel-icon:hover .floating-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Enhanced Premium Tooltip for Side Tab */
.panel-toggle-tab .floating-tooltip {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 200px;
}

.panel-toggle-tab:hover .floating-tooltip {
  opacity: 1;
  visibility: visible;
  right: 55px;
  transform: translateY(-50%) scale(1.02);
}

.panel-toggle-tab .floating-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-left-color: rgba(15, 23, 42, 0.95);
  filter: drop-shadow(2px 0 4px rgba(0, 0, 0, 0.2));
}

.panel-toggle-tab .floating-tooltip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    transparent 25%, 
    transparent 75%, 
    rgba(139, 92, 246, 0.1) 100%);
  border-radius: 12px;
  opacity: 0.5;
}

/* Enhanced Modern Offcanvas Panel - Mobile First */
.offcanvas-panel {
  position: fixed;
  top: 0;
  right: -100vw;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Tablet and desktop sizing */
@media (min-width: 768px) {
  .offcanvas-panel {
    right: -420px;
    width: 400px;
  }
}

@media (min-width: 1024px) {
  .offcanvas-panel {
    width: 450px;
    right: -470px;
  }
}

.offcanvas-panel.visible {
  right: 0;
  animation: slideInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInBounce {
  0% {
    right: -100%;
    opacity: 0;
  }
  70% {
    right: 2%;
    opacity: 0.9;
  }
  100% {
    right: 0;
    opacity: 1;
  }
}

.offcanvas-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Mobile header adjustments */
@media (max-width: 640px) {
  .offcanvas-header {
    padding: 1rem;
  }
}

.offcanvas-content {
  padding: 1.5rem;
  height: calc(100vh - 140px);
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #a5b4fc transparent;
}

/* Mobile content adjustments */
@media (max-width: 640px) {
  .offcanvas-content {
    padding: 1rem;
    height: calc(100vh - 120px);
  }
}

.offcanvas-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Mobile footer adjustments */
@media (max-width: 640px) {
  .offcanvas-footer {
    padding: 1rem;
  }
}

/* Enhanced Panel Toggle Tab - Premium Design */
.panel-toggle-tab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1000;
  background: linear-gradient(145deg, #1e293b 0%, #334155 50%, #475569 100%);
  color: white;
  border: none;
  border-radius: 16px 0 0 16px;
  padding: 16px 10px;
  cursor: pointer;
  box-shadow: 
    -8px 0 32px rgba(0, 0, 0, 0.3),
    -4px 0 16px rgba(59, 130, 246, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-height: 120px;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.panel-toggle-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    rgba(139, 92, 246, 0.1) 50%, 
    rgba(59, 130, 246, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.panel-toggle-tab:hover::before {
  opacity: 1;
}

.panel-toggle-tab:hover {
  right: -3px;
  transform: translateY(-50%) scale(1.02);
  box-shadow: 
    -12px 0 40px rgba(0, 0, 0, 0.4),
    -6px 0 24px rgba(59, 130, 246, 0.3),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, #334155 0%, #475569 50%, #64748b 100%);
}

.panel-toggle-tab:active {
  right: 1px;
  transform: translateY(-50%) scale(0.98);
  transition: all 0.1s ease;
}

.panel-toggle-tab.hidden {
  right: -60px;
  opacity: 0;
  pointer-events: none;
}

.panel-toggle-tab.visible {
  right: 0;
  opacity: 1;
}

/* Tab Icon Styling */
.tab-icon {
  color: #60a5fa;
  filter: drop-shadow(0 2px 4px rgba(96, 165, 250, 0.3));
  transition: all 0.3s ease;
}

.panel-toggle-tab:hover .tab-icon {
  color: #93c5fd;
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(147, 197, 253, 0.4));
}

/* Enhanced Count Badge */
.tab-count-display {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  color: white;
  border-radius: 12px;
  min-width: 28px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 4px 12px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tab-count-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.panel-toggle-tab:hover .tab-count-display::before {
  opacity: 1;
  transform: rotate(45deg) translate(100%, 100%);
}

.panel-toggle-tab:hover .tab-count-display {
  transform: scale(1.05);
  box-shadow: 
    0 6px 16px rgba(239, 68, 68, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Tab Title */
.tab-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #cbd5e1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.panel-toggle-tab:hover .tab-title {
  color: #f1f5f9;
  letter-spacing: 1.2px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .panel-toggle-tab {
    width: 42px;
    min-height: 100px;
    padding: 14px 8px;
    border-radius: 14px 0 0 14px;
  }
  
  .tab-count-display {
    min-width: 24px;
    height: 20px;
    font-size: 11px;
  }

  .tab-title {
    font-size: 10px;
    letter-spacing: 0.8px;
  }
}

/* Pulse animation for new notifications */
@keyframes tabPulse {
  0%, 100% {
    box-shadow: 
      -8px 0 32px rgba(0, 0, 0, 0.3),
      -4px 0 16px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 
      -12px 0 40px rgba(0, 0, 0, 0.4),
      -6px 0 24px rgba(59, 130, 246, 0.4);
  }
}

.panel-toggle-tab.pulse {
  animation: tabPulse 2s ease-in-out infinite;
}

/* Enhanced Count Badge - Mobile First */
.count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  animation: bounceIn 0.5s ease-out;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  border: 2px solid white;
}

/* Desktop sizing */
@media (min-width: 768px) {
  .count-badge {
    min-width: 24px;
    height: 24px;
    font-size: 12px;
    top: -8px;
    right: -8px;
  }
}

/* Minimized Panel Cards - Enhanced Mobile First */
.minimized-panel-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.minimized-panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.6s ease;
}

.minimized-panel-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: #3b82f6;
}

.minimized-panel-card:hover::before {
  left: 100%;
}

.minimized-panel-card:active {
  transform: translateY(0) scale(0.98);
  transition: transform 0.1s ease;
}

/* Mobile touch improvements */
@media (max-width: 640px) {
  .minimized-panel-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    min-height: 60px;
  }
  
  .minimized-panel-card:active {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  }
}

/* Enhanced Backdrop - Mobile Optimized */
.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.offcanvas-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

/* Panel transition states */
.panel-transitioning {
  pointer-events: none;
}

/* Loading states for panels */
.panel-loading {
  position: relative;
  overflow: hidden;
}

.panel-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced button interactions */
.panel-action-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.panel-action-btn:active::after {
  width: 200px;
  height: 200px;
}

/* Success/Error states for panel operations */
.panel-success {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  animation: successPulse 0.6s ease-out;
}

.panel-error {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  animation: errorShake 0.6s ease-out;
}

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

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

/* Mobile Touch Improvements */
@media (max-width: 768px) {
  /* Larger touch targets */
  .minimize-btn, .panel-action-btn {
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0.75rem 1rem !important;
  }
  
  /* Floating icons positioning for mobile and desktop */
  .floating-panel-icon, .floating-toggle-btn {
    bottom: 20px !important;
    top: auto !important;
    right: 20px !important;
  }
  
  /* Specific positioning for toggle button */
  #minimizedPanelsToggle {
    top: 50% !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    position: fixed !important;
    z-index: 1001 !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px 0 0 12px !important;
    padding: 12px 8px !important;
    cursor: pointer !important;
    box-shadow: -4px 0 20px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    min-height: 100px !important;
    width: 36px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    bottom: auto !important;
  }
  
  #floatingAssetsTableIcon {
    bottom: 100px !important;
    right: 20px !important;
  }
  
  #floatingDrillIcon {
    bottom: 180px !important;
    right: 20px !important;
    top: auto !important;
  }
  
  /* Better mobile panel headers */
  .minimizable-panel-header {
    padding: 1rem !important;
    border-radius: 20px !important;
  }
  
  /* Enhanced mobile tooltips */
  .floating-tooltip {
    bottom: 120% !important;
    top: auto !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    max-width: 120px !important;
    text-align: center !important;
  }
  
  /* Mobile-optimized offcanvas */
  .offcanvas-panel {
    width: 100vw !important;
    right: -100vw !important;
  }
  
  .offcanvas-panel.visible {
    right: 0 !important;
  }
}

/* High DPI and Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2) {
  .floating-panel-icon, .floating-toggle-btn {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .panel-minimized,
  .floating-panel-icon,
  .minimize-btn,
  .offcanvas-panel {
    transition: none !important;
    animation: none !important;
  }
}

/* Focus improvements for keyboard navigation */
.minimize-btn:focus-visible,
.panel-action-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.floating-panel-icon:focus-visible,
.floating-toggle-btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* Legacy floating button styles for compatibility */
.legacy-floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0);
}

.floating-toggle-btn.visible {
  transform: scale(1);
  animation: floatPulse 2s infinite;
}

.floating-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

/* Minimized Panel Cards in Offcanvas */
.minimized-panel-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.minimized-panel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.minimized-panel-card.active {
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
  border-color: #3b82f6;
}

.minimized-panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.minimized-panel-card:hover::before,
.minimized-panel-card.active::before {
  transform: scaleY(1);
}

/* Offcanvas Backdrop */
.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.offcanvas-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

/* Keyboard shortcuts info */
.keyboard-shortcut {
  font-size: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: auto;
}

/* Chart Enhancement Styles */
.chart-type-selector {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s ease;
  outline: none;
}

.chart-type-selector:hover {
  border-color: #d1d5db;
}

.chart-type-selector:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Fullscreen modal styles */
#fullscreenModal {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#fullscreenModal .bg-white {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

#fullscreenChartCanvas {
  border-radius: 0.75rem;
  background: white;
}

/* Responsive fullscreen modal */
@media (max-width: 768px) {
  #fullscreenModal .max-w-7xl {
    max-width: 95vw;
  }
  
  #fullscreenModal .p-6 {
    padding: 1rem;
  }
  
  #fullscreenChartCanvas {
    height: 60vh !important;
  }
}

/* Chart control buttons enhanced */
.panel-action-btn {
  position: relative;
  overflow: hidden;
}

.panel-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.panel-action-btn:hover::before {
  left: 100%;
}

/* Symbol Chart Styles */
.symbol-chart-type-btn {
  color: #6b7280;
  transition: all 0.2s ease;
}

.symbol-chart-type-btn:hover {
  color: #1f2937;
  background-color: rgba(255, 255, 255, 0.5);
}

.symbol-chart-type-btn.active {
  background-color: white;
  color: #ea580c;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

#symbolChartLegend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

#symbolChartLegend .legend-item:hover {
  border-color: #fed7aa;
}

#symbolChartLegend .legend-color {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#symbolChartLegend .legend-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

#symbolChartLegend .legend-value {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 700;
  margin-left: auto;
}

/* Fullscreen Table Modal Styles */
#fullscreenTableModal {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#fullscreenTableModal .bg-white {
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

#fullscreenTableContainer table {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#fullscreenTableContainer th {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-weight: 600;
  color: #374151;
  padding: 12px 16px;
  border-bottom: 2px solid #e5e7eb;
}

#fullscreenTableContainer td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

#fullscreenTableContainer tbody tr:hover {
  background-color: #f8fafc;
}

#fullscreenTableContainer tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

/* Search and filter controls */
#fullscreenTableSearch {
  min-width: 250px;
}

#fullscreenTableFilter {
  min-width: 150px;
}

/* Export buttons */
.export-btn {
  transition: all 0.2s ease;
  transform: translateY(0);
}

.export-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive fullscreen table modal */
@media (max-width: 768px) {
  #fullscreenTableModal .modal-container {
    max-width: 98vw;
  }
  
  #fullscreenTableModal .modal-content {
    padding: 1rem;
  }
  
  #fullscreenTableModal .controls-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #fullscreenTableContainer {
    font-size: 0.875rem;
  }
  
  #fullscreenTableContainer th,
  #fullscreenTableContainer td {
    padding: 8px 12px;
  }
}

/* Responsive adjustments for symbol chart */
@media (max-width: 1280px) {
  #chartsSection {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #symbolChartPanel {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  #chartsSection {
    grid-template-columns: 1fr;
  }
  
  #symbolChartPanel {
    grid-column: span 1;
  }
}

/* P/L Color Animations */
.pl-card-transition {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pl-positive {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #0d9488 100%);
}

.pl-negative {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}

.pl-neutral {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
}

/* Enhanced P/L table styling */
.pl-cell-positive {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
  color: #059669;
}

.pl-cell-negative {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-color: #fca5a5;
  color: #dc2626;
}

.pl-icon-positive {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.pl-icon-negative {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Mobile P/L card enhancements */
.mobile-pl-positive {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}

.mobile-pl-negative {
  background: linear-gradient(135deg, #fef2f2 0%, #fde8e8 100%);
  border-color: #fbb6ce;
}

/* Pulse animation for P/L changes */
@keyframes pl-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.pl-pulse {
  animation: pl-pulse 0.6s ease-in-out;
}
