* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first: Hide sidebar by default on mobile */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 50;
    transition: transform 0.3s ease;
    height: 100vh;
    top: 0;
    left: 0;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .main-content {
    margin-left: 0 !important;
    padding: 1rem !important;
    padding-top: 4rem !important;
  }

  .mobile-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
  }

  .desktop-actions {
    display: none;
  }

  /* App-like experience */
  .card {
    border-radius: 1rem;
  }

  /* Bottom navigation for mobile */
  .bottom-nav {
    display: flex !important;
  }

  /* Full width cards on mobile */
  .grid > * {
    grid-column: span 1 !important;
  }

  /* Adjust welcome card for mobile */
  .welcome-gradient {
    padding: 1.5rem !important;
  }

  /* Touch-friendly buttons */
  button,
  .btn-primary {
    min-height: 44px;
    font-size: 1rem;
  }

  /* Overlay for sidebar */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 45;
    display: none;
  }

  .sidebar-overlay.active {
    display: block;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .mobile-header {
    display: none !important;
  }

  .bottom-nav {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

.sidebar-item {
  transition: all 0.3s ease;
}

.sidebar-item.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-left: 4px solid #ffffff;
}

.card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(34, 73, 106, 0.3);
}

.progress-bar {
  transition: width 1s ease-in-out;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  .mobile-header {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .bottom-nav {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }
}

/* Pull to refresh simulation */
.main-content {
  overscroll-behavior-y: contain;
}

/* Hide scrollbar but keep functionality */
.main-content::-webkit-scrollbar {
  display: none;
}

.main-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
