/* Responsive utilities */

:root {
  --page-shell: min(100%, 100vw);
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  width: 100%;
}

img,
canvas,
svg {
  max-width: 100%;
  display: block;
}

#main-content,
#sidebar-container,
main,
section,
article,
form {
  min-width: 0;
}

#main-content {
  width: 100%;
  max-width: 100%;
}

.glass-card,
.glass-card-strong,
.glass-nav,
.sidebar-link {
  max-width: 100%;
}

.chart-container {
  position: relative;
  width: 100%;
  min-height: 220px;
  height: 280px;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 1024px) {
  .lg-main-offset {
    margin-left: 0 !important;
  }

  #sidebar {
    width: min(82vw, 18rem);
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #main-content {
    padding: 1rem !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-container {
    height: 220px;
  }

  .glass-card,
  .glass-card-strong {
    padding: 1rem !important;
  }

  .widget-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 560px) {
  #main-content {
    padding: 0.875rem !important;
  }

  .dashboard-grid,
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    height: 200px;
  }

  .glass-card,
  .glass-card-strong {
    border-radius: 1rem !important;
  }

  .text-4xl {
    font-size: 2rem;
  }

  .text-3xl {
    font-size: 1.75rem;
  }

  .text-2xl {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .glass-card,
  .glass-card-strong {
    padding: 0.9rem !important;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
