@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0d9488;
  --accent: #f59e0b;
  --purple: #8b5cf6;
  --surface: #ffffff;
  --background: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f0f4f8;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 16:9 Aspect Ratio Desktop Framing */
@media (min-width: 1280px) {
  .dashboard-container {
    max-width: 1920px;
    margin: 0 auto;
    width: 96%;
    padding: 1rem 0;
  }
}

/* Mobile responsive padding */
@media (max-width: 768px) {
  .dashboard-container {
    width: 100%;
    padding: 0.75rem;
  }
}

/* Glass Card */
.glass-panel {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

/* Smooth Transitions */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dropdown list animation */
.dropdown-menu-anim {
  transform-origin: top center;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Pulse animation for live data status */
@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.pulse-dot {
  animation: pulseDot 2s infinite ease-in-out;
}

/* Chart Canvas Container */
.chart-container-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 220px;
}

/* Custom Tooltip Styling */
.chartjs-tooltip {
  pointer-events: none;
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
  z-index: 50;
  white-space: nowrap;
}

/* Shimmer Loading Effect */
.shimmer {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite;
}

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