/* Base Layout */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', sans-serif;
  background-color: #f8f9fa;
}

/* Container Layout */
.container-fluid {
  flex: 1 0 auto;
  overflow: hidden;
}

/* Main Content Scroll */
#mainContent {
  overflow-y: auto;
  max-height: calc(100vh - 56px - 60px); /* navbar height + footer height */
}

/* Footer Styling */
footer {
  position: static;
  width: 100%;
  text-align: center;
  padding: 10px;
  flex-shrink: 0;
  height: 60px;
  text-align: center;
  font-size: 0.85rem;
  color: #6c757d;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

/* Chart Wrappers */
.chart-wrapper {
  overflow-x: auto;
  padding-bottom: 1rem;
  text-align: center;
}

.chart-wrapper canvas {
  max-width: 100%;
  height: auto !important;
}
.card-custom {
  margin-left: auto;
  margin-right: auto;
  max-width: 1000px;
}


/* Mobile Optimization */
@media (max-width: 768px) {
  html, body {
    display: block;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  #mainContent {
    flex-grow: 1;
    overflow-y: auto;
  }

  footer {
    flex-shrink: 0;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  h5 {
    font-size: 1rem;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.5rem;
  }
  
  .chart-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    height: 320px;
    width: 100%;
    padding-bottom: 1rem;
  }
  
  .chart-wrapper canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
  }  
  .container-fluid {
    padding: 0 10px;
  }

  .card-custom {
    padding: 1rem;
    margin: 10px 0;
  }

  .sidebar-collapse {
    position: fixed;
    z-index: 1050;
    background: white;
    height: 100%;
    top: 0;
    left: 0;
    width: 250px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar-collapse.show {
    transform: translateX(0);
  }

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
  }

  .overlay.show {
    display: block;
  }
}



/* Sidebar & Nav */
.nav-pills .nav-link {
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: #495057;
  transition: all 0.2s ease-in-out;
}
.nav-pills .nav-link:hover {
  background-color: #f1f3f5;
  color: #0d6efd;
}
.nav-pills .nav-link.active {
  background-color: #0d6efd;
  color: #fff;
}
.nav-pills .nav-link i {
  font-size: 1.1rem;
}

.sidebar {
  background-color: #ffffff;
  border-right: 1px solid #dee2e6;
}

/* Cards & Content */
.section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.section.active {
  display: block;
}

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

.card-custom {
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

/* Login Page */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-container {
  width: 350px;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
  margin: auto; /* Center vertically */
}


.navbar-brand img {
  max-height: 32px;
}

#recentAccounts {
  display: block;
}
