.metric-grid {
  display: grid;
  gap: 0.75rem;
}

.metric-card {
  padding: 1rem;
  background: var(--cloud);
  border: 1px solid var(--border);
}

.metric-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.metric-name {
  color: var(--midnight);
  font-weight: 700;
}

.metric-score {
  color: var(--midnight);
  font-size: 1.45rem;
  font-weight: 700;
}

.metric-status {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-status.strong {
  color: var(--success);
  background: #e5f3eb;
}

.metric-status.adequate {
  color: var(--warning);
  background: #f7efdb;
}

.metric-status.needs-improvement {
  color: var(--danger);
  background: #f8e7e5;
}

.metric-track {
  height: 8px;
  margin-top: 0.75rem;
  background: #e1e8ee;
  border-radius: 999px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: var(--sapphire);
  border-radius: inherit;
}

.metric-explanation {
  margin: 0.65rem 0 0;
  color: var(--slate);
  font-size: 0.82rem;
  line-height: 1.5;
}

.log-list {
  display: grid;
  gap: 0.65rem;
  max-height: 360px;
  overflow: auto;
}

.log-entry {
  padding: 0.8rem;
  background: var(--cloud);
  border: 1px solid var(--border);
}

.log-entry time {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.log-entry p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.empty-state {
  padding: 1.25rem;
  color: var(--muted);
  text-align: center;
  background: var(--cloud);
  border: 1px dashed var(--border);
  border-radius: 12px;
}


/* =========================================================
   INSTRUCTOR STUDENT PERFORMANCE REPORT
   ========================================================= */

.student-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.student-performance-report {
  margin-top: 2rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 12px 32px rgba(17, 39, 61, 0.12);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem;
  background: var(--midnight);
  color: #ffffff;
  border-bottom: 4px solid #c9a227;
}

.report-header h2 {
  margin: 0.2rem 0 0.35rem;
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.report-eyebrow {
  color: #e2c75c;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-student-name {
  margin: 0.75rem 0 0.2rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.report-course {
  margin: 0;
  opacity: 0.82;
  font-size: 0.9rem;
}

.report-header-actions {
  flex: 0 0 auto;
}

.report-header-actions .dashboard-action {
  background: #ffffff;
  color: var(--midnight);
  border-color: #ffffff;
}

.report-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.report-summary-card {
  min-width: 0;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
}

.report-summary-card > span:first-child {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.report-summary-card > strong {
  display: block;
  color: var(--midnight);
  font-size: 1.05rem;
}

.report-meta-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: #f7f9fb;
  border-bottom: 1px solid var(--border);
}

.report-meta-grid div {
  min-width: 0;
}

.report-meta-grid span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-meta-grid strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.report-section {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.report-section:last-child {
  border-bottom: 0;
}

.report-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.report-section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.report-section-heading h3 {
  margin: 0;
  color: var(--midnight);
  font-size: 1.3rem;
}

.report-section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: right;
}

.report-section-number {
  color: #a88719;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.report-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  table-layout: auto;
}

.report-table th {
  padding: 0.75rem 0.85rem;
  background: #edf2f6;
  color: var(--midnight);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  white-space: normal;
  border-bottom: 1px solid var(--border);
}

.report-table td {
  padding: 0.72rem 0.85rem;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.35;
  vertical-align: top;
  border-bottom: 1px solid #e8edf1;
}

.report-table tbody tr:last-child td {
  border-bottom: 0;
}

.report-table tbody tr:hover td {
  background: #fafbfd;
}

.report-table .numeric {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.report-total-row td {
  background: #f5f8fa;
}

.report-unit-row td {
  background: #fbfcfd;
}

.report-role-row td {
  color: var(--slate);
}

.role-indent {
  display: inline-block;
  padding-left: 1.25rem;
}

.wide-report-table {
  overflow-x: auto;
}

.performance-history-table {
  min-width: 900px;
}

.report-metric-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.report-metric-card {
  min-width: 0;
  padding: 1.15rem;
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.report-metric-heading {
  min-height: 2.3em;
  color: var(--midnight);
  font-size: 0.83rem;
  font-weight: 800;
}

.report-metric-score {
  margin-top: 0.4rem;
  color: var(--midnight);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.report-metric-card p {
  margin: 0.8rem 0 0;
  color: var(--slate);
  font-size: 0.78rem;
  line-height: 1.45;
}

.stakeholder-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stakeholder-card {
  min-width: 0;
  padding: 1.1rem;
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stakeholder-name {
  min-height: 2.3em;
  color: var(--midnight);
  font-size: 0.85rem;
  font-weight: 800;
}

.stakeholder-score {
  margin-top: 0.4rem;
  color: var(--midnight);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stakeholder-card p {
  margin: 0.8rem 0 0;
  color: var(--slate);
  font-size: 0.77rem;
  line-height: 1.45;
}

.final-evaluation {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.final-outcome-card {
  min-width: 0;
  padding: 1.4rem;
  background: #f5f8fa;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.final-outcome-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.final-outcome-score {
  color: var(--midnight);
  font-size: 2.2rem;
}

.final-outcome-text {
  color: var(--midnight);
  font-size: 1.15rem;
  line-height: 1.35;
}

.final-message {
  grid-column: 1 / -1;
  padding: 1rem 1.2rem;
  color: var(--ink);
  background: #fffaf0;
  border-left: 4px solid #c9a227;
  line-height: 1.5;
}

.report-subsection {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.report-subsection h4 {
  margin: 0 0 1rem;
  color: var(--midnight);
}

.report-empty {
  padding: 1.25rem;
  color: var(--muted);
  text-align: center;
  background: #f8fafb;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.trend-positive {
  font-weight: 700;
  color: var(--success);
}

.trend-negative {
  font-weight: 700;
  color: var(--danger);
}

.trend-stable {
  font-weight: 700;
  color: var(--slate);
}


/* =========================================================
   RESPONSIVE REPORT
   ========================================================= */

@media (max-width: 1000px) {
  .report-summary-grid,
  .report-meta-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .report-metric-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .stakeholder-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .report-header {
    flex-direction: column;
    padding: 1.4rem;
  }

  .report-section {
    padding: 1.25rem;
  }

  .report-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .report-section-heading p {
    text-align: left;
  }

  .report-summary-grid,
  .report-meta-grid,
  .report-metric-grid,
  .stakeholder-grid,
  .final-evaluation {
    grid-template-columns: 1fr;
  }

  .report-meta-grid {
    padding: 1.1rem 1.25rem;
  }

  .student-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
/* =========================================================
   INSTRUCTOR REPORT — TABLE & SPACING OVERRIDES
   ========================================================= */

/* Give the report breathing room */
#student-report {
  font-size: 16px;
  line-height: 1.5;
}

#student-report .report-section {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

#student-report .report-section-heading {
  margin-bottom: 1.5rem;
}

#student-report .report-section-heading > div {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#student-report .report-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: 2rem;
  height: 2rem;

  background: var(--midnight);
  color: #ffffff;

  border-radius: 50%;

  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

#student-report .report-section-heading h3 {
  margin: 0;
  line-height: 1.2;
}


/* =========================================================
   REPORT TABLES
   ========================================================= */

#student-report .report-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;

  margin-top: 1rem;

  border: 1px solid #cbd5df;
  border-radius: 8px;

  background: #ffffff;
}

#student-report table.report-table {
  width: 100% !important;
  min-width: 650px;

  border-collapse: collapse !important;
  border-spacing: 0 !important;

  background: #ffffff;
}

#student-report table.report-table th,
#student-report table.report-table td {
  padding: 0.85rem 1rem !important;

  border-right: 1px solid #d8e0e7 !important;
  border-bottom: 1px solid #d8e0e7 !important;

  text-align: left;
  vertical-align: middle;

  line-height: 1.35;

  white-space: normal;
}

#student-report table.report-table th:last-child,
#student-report table.report-table td:last-child {
  border-right: 0 !important;
}

#student-report table.report-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

#student-report table.report-table thead th {
  background: #e9eff4 !important;

  color: var(--midnight) !important;

  font-size: 0.76rem;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.035em;

  border-bottom: 2px solid #b8c5d0 !important;
}

#student-report table.report-table tbody td {
  background: #ffffff;
  color: var(--ink);
  font-size: 0.88rem;
}

#student-report table.report-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#student-report table.report-table tbody tr:hover td {
  background: #eef4f8;
}

#student-report table.report-table .numeric {
  text-align: center !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   DEPARTMENT TABLE
   ========================================================= */

#student-report .report-total-row td {
  background: #e9eff4 !important;
  color: var(--midnight);
  font-weight: 800;
}

#student-report .report-unit-row td {
  background: #f3f6f8 !important;
  color: var(--midnight);
  font-weight: 700;
}

#student-report .report-role-row td:first-child {
  padding-left: 2rem !important;
}

#student-report .report-role-row td {
  color: var(--slate);
}

#student-report .role-indent {
  padding-left: 0;
}


/* =========================================================
   PERFORMANCE HISTORY
   ========================================================= */

#student-report .performance-history-table {
  min-width: 1000px;
}

#student-report .performance-history-table th {
  min-width: 115px;
  text-align: center;
}

#student-report .performance-history-table th:first-child {
  min-width: 75px;
}

#student-report .performance-history-table td {
  text-align: center;
}


/* =========================================================
   EXECUTIVE DECISIONS
   ========================================================= */

#student-report .report-section:nth-of-type(5) table th:first-child,
#student-report .report-section:nth-of-type(5) table td:first-child {
  width: 90px;
  text-align: center;
}

#student-report .report-section:nth-of-type(5) table th:nth-child(2),
#student-report .report-section:nth-of-type(5) table td:nth-child(2) {
  width: 34%;
}

#student-report .report-section:nth-of-type(5) table th:nth-child(3),
#student-report .report-section:nth-of-type(5) table td:nth-child(3) {
  width: auto;
}


/* =========================================================
   SUMMARY AREA
   ========================================================= */

#student-report .report-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

#student-report .report-summary-card {
  padding: 1.35rem 1.5rem !important;
}

#student-report .report-meta-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
}


/* =========================================================
   PERFORMANCE CARDS
   ========================================================= */

#student-report .report-metric-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}

#student-report .report-metric-card {
  display: block;
  padding: 1.25rem !important;

  border: 1px solid #d3dce4 !important;
  border-radius: 10px;

  background: #f8fafc !important;
}

#student-report .report-metric-heading {
  margin-bottom: 0.5rem;
}

#student-report .report-metric-score {
  margin-bottom: 0.4rem;
}


/* =========================================================
   STAKEHOLDER TABLE
   ========================================================= */

#student-report .report-section:nth-of-type(2) table th:not(:first-child),
#student-report .report-section:nth-of-type(2) table td:not(:first-child) {
  text-align: center;
}


/* =========================================================
   MOBILE / NARROW SCREENS
   ========================================================= */

@media (max-width: 900px) {

  #student-report .report-summary-grid,
  #student-report .report-meta-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
  }

  #student-report .report-metric-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {

  #student-report .report-summary-grid,
  #student-report .report-meta-grid,
  #student-report .report-metric-grid {
    grid-template-columns: 1fr !important;
  }

  #student-report table.report-table th,
  #student-report table.report-table td {
    padding: 0.7rem 0.8rem !important;
  }
}
