/* Assignments page — scoped to .pg-assignments (also wraps modal bodies opened by this page). */

.pg-assignments .asg-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.pg-assignments .asg-span { grid-column: 1 / -1; }

.pg-assignments .asg-card {
  border-left: 4px solid var(--indigo);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.pg-assignments .asg-card:hover,
.pg-assignments .asg-card:focus-visible {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  outline: none;
}
.pg-assignments .asg-title { font-weight: 700; font-size: 15px; line-height: 1.35; }

.pg-assignments .course-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; color: var(--indigo-3);
  background: var(--accent-tint); padding: 3px 10px; border-radius: 99px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pg-assignments .course-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.pg-assignments .asg-due { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-assignments .asg-due svg { width: 14px; height: 14px; flex: none; }

.pg-assignments .asg-file {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--indigo-3);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 10px; max-width: 100%;
}
.pg-assignments .asg-file:hover { border-color: var(--indigo-3); }
.pg-assignments .asg-file svg { width: 14px; height: 14px; flex: none; }
.pg-assignments .asg-file-name,
.pg-assignments .asg-file span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px;
}

.pg-assignments .asg-desc { white-space: pre-line; }
.pg-assignments .asg-answer { white-space: pre-line; margin: 8px 0 0; }
.pg-assignments .asg-form-title { margin: 16px 0 10px; font-size: 14px; }

/* --- student: my submission / grade panel --- */
.pg-assignments .my-sub {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0;
}
.pg-assignments .grade-panel {
  background: var(--success-tint); border: 1px solid rgba(15,115,80,.22);
  border-radius: var(--radius-sm); padding: 14px 16px;
  color: var(--success); margin: 10px 0;
}
.pg-assignments .grade-panel .grade-score { font-size: 22px; font-weight: 800; line-height: 1.2; }
.pg-assignments .grade-panel .grade-feedback { margin: 8px 0 0; color: var(--success); font-size: 13px; }
.pg-assignments .deadline-note {
  background: var(--danger-tint); color: var(--danger);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-weight: 600; font-size: 12.5px; margin-top: 10px;
}

/* --- staff cards --- */
.pg-assignments .asg-actions { display: flex; gap: 6px; margin-left: auto; }
.pg-assignments .icon-act {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; width: 30px; height: 30px;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); padding: 0;
}
.pg-assignments .icon-act:hover { color: var(--indigo); border-color: var(--indigo-3); }
.pg-assignments .icon-act.danger:hover { color: var(--danger); border-color: var(--danger); }
.pg-assignments .icon-act svg { width: 15px; height: 15px; }

/* --- submissions view --- */
.pg-assignments .asg-head-card .row.spread { align-items: flex-start; }
.pg-assignments .asg-counts { display: flex; gap: 10px; flex: none; }
.pg-assignments .stat-mini {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 14px; text-align: center; min-width: 74px;
  display: flex; flex-direction: column;
}
.pg-assignments .stat-mini-val { font-size: 17px; font-weight: 800; }
.pg-assignments .stat-mini-lbl {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}

.pg-assignments .sub-student-name { font-weight: 600; white-space: nowrap; }
.pg-assignments .sub-text-preview {
  display: inline-block; max-width: 200px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle; color: var(--indigo-3); cursor: pointer; font-size: 12.5px;
}
.pg-assignments .sub-text-preview:hover { text-decoration: underline; }

.pg-assignments .grade-cell { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.pg-assignments .g-marks { width: 74px; padding: 7px 9px; }
.pg-assignments .g-feedback { min-width: 170px; padding: 7px 10px; }
.pg-assignments .graded-check { color: var(--success); display: inline-flex; flex: none; }
.pg-assignments .graded-check svg { width: 16px; height: 16px; }
.pg-assignments tr.row-graded td { background: rgba(15,115,80,.055); }

/* --- responsive --- */
@media (max-width: 760px) {
  .pg-assignments .asg-grid { grid-template-columns: 1fr; }
  .pg-assignments .asg-head-card .row.spread { flex-direction: column; }
  .pg-assignments .asg-counts { width: 100%; }
  .pg-assignments .stat-mini { flex: 1; min-width: 0; }
}
