/* src/assets/tugas-aktif.css */

/* --- General Layout & Responsiveness (Consistent Across Admin Pages) --- */
#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; /* A consistent, slightly cooler light gray background */
  padding: 1.5rem; /* Consistent padding around the content */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Ensure the main content is visible once loaded (for development) */
#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-header.bg-secondary {
  background: linear-gradient(
    135deg,
    #6c757d,
    #5a6268
  ) !important; /* Secondary gray gradient */
}

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

/* --- Specific styles for active assignments list --- */
#activeAssignmentsList .list-group-item {
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  margin-bottom: 0.75rem; /* More spacing between items */
  border-radius: 0.75rem; /* Slightly more rounded */
  padding: 1.25rem; /* More internal padding */
  transition: all 0.2s ease-in-out;
}

#activeAssignmentsList .list-group-item:hover {
  background-color: #f5f8fc; /* Subtle background change on hover */
  transform: translateY(-3px); /* Lift effect on hover */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Soft shadow on hover */
}

#activeAssignmentsList .list-group-item .assignment-details {
  flex-grow: 1; /* Allow details to take available space */
  margin-right: 15px; /* Space between details and actions */
}

#activeAssignmentsList .list-group-item .assignment-meta {
  font-size: 0.85em;
  color: #6c757d;
}

#activeAssignmentsList .list-group-item .assignment-status-badge {
  font-size: 0.9em;
  padding: 0.4em 0.8em;
  border-radius: 0.5rem;
  font-weight: 600;
}

/* Style for filter bar */
.filter-bar-active-assignments {
  background-color: #e9ecef;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.filter-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #495057;
}

/* Form controls consistency */
.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

/* Buttons consistency */
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.3rem;
}
.btn-info {
  background-color: #17a2b8;
  border-color: #17a2b8;
}
.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}
.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
}
.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: #fff;
}

/* Enhancements for task details */
.assignment-details p.mb-1,
.assignment-details p.mb-0 {
  margin-top: 0.5rem; /* Space after title */
  color: #5a6268;
  line-height: 1.5;
  font-size: 0.95em; /* Slightly smaller text for meta info */
}

/* No active assignments alert */
.alert.alert-info {
  border-radius: 0.5rem;
  background-color: #e0f7fa; /* Light cyan for info alerts */
  color: #00796b; /* Darker green-blue text */
  border-color: #b2ebf2;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  #sidebar-wrapper {
    width: 0; /* Collapse sidebar on smaller screens */
    overflow: hidden;
    position: absolute; /* Take out of flow */
    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 */
  }

  #activeAssignmentsList .list-group-item {
    flex-direction: column; /* Stack details and actions vertically */
    align-items: flex-start; /* Align items to the start (left) */
    padding: 1rem;
  }
  #activeAssignmentsList .list-group-item .assignment-details {
    margin-right: 0; /* Remove margin when stacked */
    width: 100%; /* Take full width */
    margin-bottom: 10px; /* Space between details and actions */
  }
  #activeAssignmentsList .list-group-item .assignment-actions {
    width: 100%; /* Make actions take full width */
    display: flex; /* Re-enable flex for buttons within actions */
    flex-wrap: wrap; /* Allow buttons to wrap if needed */
    justify-content: stretch; /* Stretch buttons to fill width */
    margin-top: 0; /* Remove extra margin */
  }
  #activeAssignmentsList .list-group-item .assignment-actions .btn {
    flex-grow: 1; /* Allow buttons to grow equally */
    margin-left: 0 !important; /* Remove ms-md-2 on small screens */
    margin-right: 0 !important; /* Remove ms-md-2 on small screens */
    margin-bottom: 0.5rem; /* Space between stacked buttons */
  }
  #activeAssignmentsList .list-group-item .assignment-actions .btn:last-child {
    margin-bottom: 0; /* No margin after the last button */
  }
  #activeAssignmentsList .list-group-item .assignment-status-badge {
    margin-top: 10px;
    align-self: flex-start; /* Align badge to the left or center if preferred */
    margin-left: 0; /* Remove ms-2 when stacked */
  }

  .filter-bar-active-assignments .row > div {
    margin-bottom: 1rem; /* Space between filter dropdowns */
  }
  .filter-bar-active-assignments .row > div:last-child {
    margin-bottom: 0; /* No extra margin after the last filter */
  }
  .filter-bar-active-assignments .row.mt-3 {
    margin-top: 0 !important; /* Remove extra top margin if it conflicts */
  }
}

/* --- 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-lightblue {
  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 */
}
