/* =========================
   Base layout & utilities
   ========================= */
body {
  background: #f8f9fa;
}

/* Sidebar */
.sidebar {
  background: #ffffff;
  border-right: 2px solid #e5e7eb;
  height: 100vh;
  overflow-y: auto;
}

/* Titles */
.title-blue {
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Action group for right-side buttons */
.action-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* make pills slightly smaller to reduce visual weight */
.action-group .btn {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
}

/* responsive: stack actions on small screens */
@media (max-width: 768px) {
  .action-group {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .action-group .btn {
    width: 100%;
  }
  #dashboard,
  .d-flex.align-items-start.justify-content-between.mb-2 {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

/* small utilities */
.hidden { display: none !important; }
.btn-rounded { border-radius: 50px; }

/* Buttons */
.btn-primary {
  background-color: #1e3a8a;
  border: none;
}
.btn-primary:hover {
  background-color: #1e40af;
}

.btn-danger {
  border-radius: 50px !important;
}

.btn-secondary {
  border-radius: 50px !important;
}

/* ---------- Lists & cards ---------- */
/* Class Items */
.class-item {
  cursor: pointer;
  transition: background 0.2s;
}
.class-item:hover {
  background: #eef2ff;
}

/* Monitor Cards */
.monitor-card {
  border-left: 5px solid #1e3a8a;
  transition: transform 0.2s;
}
.monitor-card:hover {
  transform: scale(1.01);
}

/* Student List Items */
.student-item {
  border-left: 4px solid #1e3a8a;
  font-weight: 600;
  color: #1e3a8a;
}

.student-task-row {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 10px;
  padding-bottom: 5px;
}

/* Greyed out student row */
.student-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* minor spacing */
.monitor-card { margin-bottom: 8px; }

/* =========================
   Dashboard: consolidated style
   (single definitive block)
   ========================= */
#dashboard-cards .dashboard-card,
.dashboard-card {
  background: linear-gradient(135deg, #6c5ce7 0%, #7c4dff 40%, #6f42c1 100%);
  color: #fff !important;
  padding: 26px;
  border-radius: 12px;
  min-height: 180px;
  box-shadow: 0 10px 30px rgba(20, 18, 60, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .18s ease, box-shadow .18s ease;
  border-left: none !important;
}

/* head & class title */
#dashboard-cards .dashboard-card h6,
.dashboard-card h6 {
  color: rgba(255,255,255,0.95) !important;
  font-weight: 700;
  margin-bottom: 10px;
}
#dashboard-cards .dashboard-card .class-name,
.dashboard-card .class-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

/* stats list look */
#dashboard-cards .dashboard-card .stat,
.dashboard-card .stat {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}
#dashboard-cards .dashboard-card .stat:first-of-type,
.dashboard-card .stat:first-of-type {
  border-top: 0;
}

/* stat value style */
#dashboard-cards .dashboard-card .stat span:last-child,
.dashboard-card .stat span:last-child {
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}

/* hover effect */
#dashboard-cards .dashboard-card:hover,
.dashboard-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(20, 18, 60, 0.12);
}

/* ensure grid columns behave like screenshot */
#dashboard-cards .col-md-6.col-lg-4 { display: flex; }
#dashboard-cards .col-md-6.col-lg-4 > .dashboard-card { width: 100%; }

/* keep other badge colors and text unaffected */
.dashboard-card .badge { opacity: 0.95; }

/* =========================
   Fine-tuning & legacy rules
   (non-dashboard-specific)
   ========================= */
/* keep the header tidy */
#dashboard > div, 
.monitor-detail-left {
  max-width: 70%;
}

/* page responsive niceties */
@media (max-width: 992px) {
  #dashboard > div, .monitor-detail-left { max-width: 100%; }
}
/* ---------- Mobile offcanvas / hamburger behaviour ---------- */

/* show top mobile bar only on small screens (we added a nav above) */
nav.d-md-none { display: flex; }

/* hide desktop sidebar on small screens, keep offcanvas available */
@media (max-width: 767px) {
  #sidebar-col { display: none !important; } /* hide desktop left column */
  .container-fluid { padding-top: 0; }
  .offcanvas { width: 290px; } /* comfortable width for mobile sliding panel */

  /* make main content use full width */
  .col-12.col-md-9, .col-12.col-md-9.p-4 { width: 100%; flex: 1 1 100%; padding-left: 12px; padding-right: 12px; }

  /* make action buttons less stacked */
  .action-group { gap: 8px; flex-wrap: wrap; display:flex; align-items:center; }
  .action-group .btn { min-width: 44%; }

  /* keep monitor cards full-width on phones */
  .monitor-card { width: 100%; margin-bottom: 10px; padding: 8px; }
}

/* keep desktop sidebar sticky on larger screens */
@media (min-width: 768px) {
  nav.d-md-none { display: none; }
  .sidebar { min-height: 100vh; overflow-y: auto; position: sticky; top: 0; }
}
/* ==========================
   Responsive + Mobile UI tweaks
   Appendix for offcanvas/hamburger behavior
   ========================== */

/* --- Mobile topbar action buttons spacing --- */
nav.d-md-none .btn {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  font-size: 0.82rem;
}

/* ---------- Mobile offcanvas / hamburger behaviour ---------- */

/* hide the desktop sidebar on small screens, show mobile offcanvas */
@media (max-width: 767px) {
  /* hide desktop left column */
  #sidebar-col { display: none !important; }

  /* mobile nav (already in HTML) is visible via d-md-none; ensure no overlap */
  body { padding-top: 0; }

  /* comfortable width for the offcanvas sliding panel */
  .offcanvas { width: 290px; }

  /* make main content use full width */
  .col-12.col-md-9, .col-12.col-md-9.p-4 {
    width: 100%;
    flex: 1 1 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* reduce vertical stacking: make important action groups inline */
  .action-group {
    gap: 8px;
    flex-wrap: wrap;
    display: flex;
    align-items: center;
  }
  .action-group .btn { min-width: 44%; }

  /* Monitor cards: full width, reduced padding for mobile */
  .monitor-card {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
  }
  .monitor-card .card-body {
    padding: 8px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }

  /* Assigned students list scroll-friendly on small screens */
  #assigned-students {
    max-height: 40vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* make modals comfortable on phones */
  .modal-dialog { margin: 0 12px; width: calc(100% - 24px); }

  /* ensure dashboard cards expand to single column on narrow screens */
  #dashboard-cards .col-md-6.col-lg-4 { flex: 1 1 100%; max-width: 100%; }
}

/* Desktop: keep sidebar sticky on larger screens */
@media (min-width: 768px) {
  nav.d-md-none { display: none; } /* mobile topbar hidden on desktop */
  .sidebar {
    min-height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
  }
}

/* small polish for very narrow phones */
@media (max-width: 480px) {
  .monitor-card:hover { transform: none; }
  .monitor-card { padding: 10px; font-size: 14px; }
  .title-blue { font-size: 16px; }
}

/* Accessibility/touch targets extras */
button.btn, .btn {
  min-height: 36px;
  min-width: 36px;
}

/* Optional: slightly tighten list-group items for mobile */
.list-group-item { word-break: break-word; }

/* Ensure offcanvas inner body doesn't add extra scrollbar */
.offcanvas-body { -webkit-overflow-scrolling: touch; }
/* Make Back + Assign Students look cleaner on mobile */
@media (max-width: 767px) {
  #back-to-class,
  #add-students-btn,
  #download-pdf-btn {
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
    border-radius: 12px !important;
    width: auto !important;
    min-width: 100px !important;
  }

  /* Action group cleaning */
  .action-group {
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
}


/* End of responsive CSS appendix */


/* End of file */



/* Improved Assign Modal styles (font, spacing) */
#assignPointsModal .modal-content {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  letter-spacing: 0.1px;
}
#assignPointsModal .modal-title {
  font-weight: 600;
  font-size: 1.05rem;
}
#assignPointsModal .form-label {
  font-weight: 500;
  font-size: 0.9rem;
}
#assignPointsModal .form-control {
  padding: 0.5rem 0.6rem;
}
#assignPointsModal .btn-outline-secondary {
  width: 42px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.sticky-assign-bar {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 10px;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  z-index: 20;
}
/* keeps columns spaced & readable on mobile */
.student-row { gap: 0.5rem; padding: 6px 0; }
.student-col { min-width: 0; } /* allow text-truncate to work */
.student-name { font-weight: 500; }

/* make number input full-width on tiny screens */
@media (max-width: 575.98px) {
  .student-action .student-tasks { width: 100% !important; }
  .student-action { width: 100%; }
  .student-id { text-align: left; font-size: 0.9rem; }
}

/* small touch-friendly spacing */
.student-disabled { opacity: 0.95; }
.student-row .badge { font-weight: 600; }
.student-row { gap: 0.35rem; padding: 6px 0; }
.student-col { min-width: 0; }
.student-name { font-weight: 500; }
.student-id { font-size: 0.92rem; color: #6c757d; }
@media (max-width:575.98px) {
  .student-action .student-tasks { width: 100% !important; }
  .student-id { text-align: left; }
}
/* allow more cards per column */
