/* src/assets/dashboard.css */

/* --- General Layout & Responsiveness --- */
#wrapper {
  display: flex; /* Make the wrapper a flex container */
  min-height: 100vh; /* Ensure it takes full viewport height */
  padding-top: 56px; /* Space for the fixed navbar */
}

#sidebar-wrapper {
  width: 250px; /* Fixed width for the sidebar */
  flex-shrink: 0; /* Prevent sidebar from shrinking */
  background-color: #f8f9fa; /* Light background for sidebar */
}

#page-content-wrapper {
  flex-grow: 1; /* Allow main content to grow and fill available space */
  background-color: #ffffff; /* Changed to white */
  padding: 1.5rem; /* Consistent padding around the content */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Custom light blue for navbar - KEEP THIS IF IT'S FOR NON-NAVBAR ELEMENTS THAT SHOULD BE LIGHT BLUE */
/* If this was intended *only* for the navbar, it should be replaced by .bg-custom-primary */
.bg-lightblue {
  background-color: #1c78b2 !important; /* A common light blue color */
}

/* Ensure the main content is visible once loaded (for development, remove d-none from HTML for production after integration with JS) */
#mainContent {
  display: block !important; /* Override d-none for demonstration */
}

/* Headings and Horizontal Rule consistency */
h1 {
  color: #343a40; /* Darker text for main headings */
  font-weight: 700; /* Bolder headings */
  margin-bottom: 1.5rem; /* Consistent spacing below headings */
}

hr {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* --- Card Base Styling Consistency --- */
.card {
  border-radius: 0.75rem; /* Rounded corners */
  border: 1px solid #e9ecef; /* Light gray border */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
  overflow: hidden; /* Ensures header and body corners are rounded properly */
  transition: all 0.2s ease-in-out; /* Smooth transition for hover effects */
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Slightly more prominent shadow on hover */
}

/* Card Header Styling */
.card-header {
  color: #ffffff; /* White text for headers */
  padding: 1.25rem 1.5rem; /* Ample padding */
  border-bottom: 1px solid rgba(0, 0, 0, 0.125); /* Subtle separator */
  display: flex;
  align-items: center; /* Align icon and title vertically */
  font-weight: 600; /* Bolder header text */
}

.card-header h5 {
  margin-bottom: 0;
  font-weight: 600;
}

/* Specific Card Header Gradients */
.card.border-primary .card-header {
  background: linear-gradient(
    135deg,
    #3498db,
    #2980b9
  ) !important; /* Primary blue gradient */
}

.card.border-success .card-header {
  background: linear-gradient(
    135deg,
    #2ecc71,
    #27ae60
  ) !important; /* Green gradient */
}

/* Card Body Styling */
.card-body {
  background-color: #ffffff; /* White background for card content */
  padding: 1.5rem; /* Consistent padding */
}

.card-body p.card-text {
  color: #495057; /* Darker text for readability */
  margin-bottom: 0.5rem; /* Spacing between text lines */
  font-size: 0.95rem; /* Slightly smaller text for info */
}

.card-body strong {
  color: #343a40; /* Stronger color for bold text */
  font-weight: 700;
}

/* --- Quick Links Card Styling (card-link-dashboard) --- */
.card-link-dashboard {
  text-decoration: none; /* Remove underline from links */
  color: inherit; /* Inherit text color by default */
  border: 1px solid #e9ecef; /* Light border */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Consistent shadow */
  border-radius: 0.75rem; /* Match general card radius */
  transition: all 0.3s ease-in-out; /* Smooth transitions */
}

.card-link-dashboard:hover {
  transform: translateY(-5px); /* Lift effect on hover */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
  /* If you want the pulse animation, define it in a general style.css or here */
  animation: pulse 1.5s infinite ease-in-out;
}

/* Define pulse animation if not in a global style.css */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

.card-link-dashboard .card-body {
  background-color: #fcfdff; /* Off-white for quick links for subtle distinction */
  border-radius: 0.75rem; /* Match parent card border-radius */
  padding: 2.5rem 1.5rem; /* Ample padding */
  min-height: 180px; /* Consistent height for all quick links */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center; /* Center align text inside quick links */
}

.card-link-dashboard .card-body i {
  font-size: 4.5em; /* Large icons */
  margin-bottom: 0.8rem;
  transition: color 0.3s ease, transform 0.3s ease; /* Smooth color and transform transition for icons */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); /* Subtle icon shadow */
}

.card-link-dashboard:hover .card-body i {
  transform: scale(1.05); /* Slightly enlarge icon on hover */
}

.card-link-dashboard .card-title {
  font-weight: 700; /* Bolder titles for quick links */
  margin-bottom: 0.5rem;
  color: #343a40; /* Default title color */
}

.card-link-dashboard .card-text {
  font-size: 0.9em;
  color: #6c757d; /* Muted text for descriptions */
}

/* Specific Icon Colors and Hover States */
.card-link-dashboard .text-primary {
  color: #3498db !important;
}
.card-link-dashboard:hover .text-primary {
  color: #2980b9 !important;
}

.card-link-dashboard .text-warning {
  color: #f39c12 !important;
}
.card-link-dashboard:hover .text-warning {
  color: #e67e22 !important;
}

.card-link-dashboard .text-info {
  color: #17a2b8 !important;
}
.card-link-dashboard:hover .text-info {
  color: #148c9e !important;
}

.card-link-dashboard .text-secondary {
  color: #6c757d !important;
}
.card-link-dashboard:hover .text-secondary {
  color: #5a6268 !important;
}

.card-link-dashboard .text-dark {
  color: #343a40 !important;
}
.card-link-dashboard:hover .text-dark {
  color: #23272b !important;
}

.card-link-dashboard .text-success {
  color: #2ecc71 !important;
}
.card-link-dashboard:hover .text-success {
  color: #27ae60 !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
  .card-link-dashboard .card-body {
    min-height: 150px; /* Adjust height on smaller screens */
    padding: 2rem 1.25rem;
  }
  .card-link-dashboard .card-body i {
    font-size: 3.5em; /* Adjust icon size */
  }
}

@media (max-width: 768px) {
  #sidebar-wrapper {
    width: 0; /* Collapse sidebar on smaller screens */
    overflow: hidden;
    position: absolute; /* Take out of flow to prevent content shifting */
    height: 100%;
    z-index: 1000;
    transition: width 0.3s ease;
  }

  #page-content-wrapper {
    margin-left: 0; /* Remove margin when sidebar is collapsed */
    padding-left: 1rem; /* Smaller padding on mobile */
    padding-right: 1rem; /* Smaller padding on mobile */
    padding-top: calc(
      56px + 1rem
    ); /* Adjust for fixed navbar height + smaller padding */
  }

  .card {
    margin-bottom: 1rem; /* Slightly less space between cards on mobile */
  }

  /* Adjust column spacing if needed, Bootstrap's default should be okay */
  .row > div[class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* --- Loading Indicator Consistency --- */
#loadingIndicator {
  margin-top: 5rem !important; /* Ensure it's visually centered */
  color: #0d6efd; /* Bootstrap primary blue */
}

#loadingIndicator .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

#loadingIndicator p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-top: 1rem;
}

/* Custom Primary Color for Navbar */
.bg-custom-primary {
  background-color: #1c78b2 !important; /* Your desired blue color */
}

/* Ensure navbar brand and links are white */
.navbar-brand,
.navbar-nav .nav-link,
.navbar-nav .dropdown-toggle {
  color: #fff !important; /* White color for all primary navbar text */
}

/* Sidebar active item styling to keep dark text and blue border */
.list-group-item.active {
  background-color: #e9ecef !important; /* Keep a light background for active state */
  color: #212529 !important; /* Force text color to black/dark gray for active item */
  border-color: #1c78b2 !important; /* Explicitly set border color to the navbar blue */
  border-left: 5px solid #1c78b2 !important; /* Thicker left border for emphasis */
}

.list-group-item.active .fas {
  color: #212529 !important; /* Ensure icon color is also dark */
}

/* Adjust hover state for consistent visual feedback */
.list-group-item.bg-light:hover {
  background-color: #e2e6ea !important; /* Slightly darker hover for light background */
}
