/* Base styles for desktop and tablet - Light Glassmorphism */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F5F7FA !important;
  color: #2B2B2B !important;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
  font-weight: 400;
  line-height: 1.6;
}

/* Responsive adjustments for screens smaller than 768px (smartphones) */
@media (max-width: 768px) {
  body {
    padding: 10px;
    font-size: 16px;
  }

  table, input, button {
    width: 100%;
    font-size: 16px;
  }

  .sidebar {
    width: 100%;
    position: relative;
  }

  .dashboard-content {
    padding: 10px;
  }

  /* Force chart container to be responsive on mobile */
  .chart-wrapper {
    width: 100vw !important;
    max-width: calc(100vw - 20px) !important;
    height: 40vh !important;
    min-height: 250px !important;
  }
}

/* Additional responsive enhancements for better mobile experience */
@media (max-width: 768px) {
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .btn {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }

  .card {
    margin-bottom: 15px !important;
  }

  .form-control {
    font-size: 16px !important;
  }

  .table-responsive {
    font-size: 14px;
  }

  /* Chart responsiveness for mobile devices */
  .chart-wrapper {
    position: relative;
    width: 100%;
    height: 250px; /* Smaller height for mobile */
    margin: 0 auto;
    overflow: hidden;
  }

  .chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  /* Force chart container to be responsive */
  .card-body .chart-wrapper {
    min-height: 250px !important;
    max-height: 250px !important;
  }

  /* Ensure chart cards are mobile friendly */
  .card-body {
    padding: 0.5rem !important;
  }

  /* Mobile table improvements */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Navigation improvements */
  .navbar-nav {
    text-align: center;
  }

  .navbar-nav .nav-link {
    padding: 15px !important;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    padding: 15px;
  }

  .container {
    max-width: 95%;
  }

  .btn {
    padding: 10px 15px;
  }

  /* Chart adjustments for tablets */
  .chart-wrapper {
    height: 400px !important;
  }

  .card-body .chart-wrapper {
    min-height: 400px !important;
    max-height: 400px !important;
  }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
  /* Chart adjustments for desktop */
  .chart-wrapper {
    height: 500px !important;
  }

  .card-body .chart-wrapper {
    min-height: 500px !important;
    max-height: 500px !important;
  }
}