/* Ensure padding and borders do not cause horizontal overflow */
*, *::before, *::after {
  box-sizing: border-box;
}
/* PROaCTiVE-specific styles */
html {
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ecf0f1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.proactive-hero {
  background: linear-gradient(135deg, #28537b, #86a2a4);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
}

.proactive-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.proactive-hero h3 {
  font-size: 1rem;
  font-weight: normal;
  opacity: 0.9;
  margin: 0;
}

.proactive-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
}

.proactive-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.proactive-nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.proactive-nav a.current {
  background-color: rgba(255, 255, 255, 0.3);
  font-weight: bold;
}

.faculty-content-wrapper {
  display: flex;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 20px;
}

/* Use same sidebar styling as GBA */
.faculty-content-wrapper .sidebar {
  min-width: 280px;
  max-width: 320px;
  flex: 0 0 auto;
  background-color: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: fit-content;
}

.faculty-content-wrapper .sidebar h3 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  text-align: center;
  font-weight: bold;
}

/* Center labels like GBA */
.faculty-content-wrapper .select-container label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  text-align: center;
}

.main-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  overflow-x: auto;
}

.viz-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.viz-container h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.3em;
}

.viz-container p {
  color: #666;
  margin-bottom: 15px;
}

.student-placeholder {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 8px;
  margin: 20px auto;
  width: 100%;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.student-placeholder h2 {
  color: #333;
  margin-bottom: 15px;
}

.student-placeholder p {
  color: #666;
  font-size: 16px;
}

.faculty-subtabs {
  display: flex;
  gap: 5px;
  background: #f8f9fa;
  padding: 10px 20px 0 20px;
  width: 100%;
  margin: 0;
  overflow-x: auto;
}

.faculty-subtab {
  padding: 12px 20px;
  background: #e9ecef;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  transition: all 0.3s ease;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  white-space: nowrap;
}

.faculty-subtab:hover {
  background: #dee2e6;
  color: #212529;
}

.faculty-subtab.active {
  background: #fff;
  color: #28537b;
  border-bottom: 2px solid #28537b;
}

.faculty-subtab-content {
  display: none;
  padding: 20px 0;
}

.faculty-subtab-content.active {
  display: block;
}

.faculty-subtabs {
  display: flex;
  gap: 5px;
  background: #f8f9fa;
  padding: 10px 20px 0 20px;
  width: 100%;
  margin: 0;
  overflow-x: auto;
}

.faculty-subtab {
  padding: 12px 20px;
  background: #e9ecef;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  transition: all 0.3s ease;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  white-space: nowrap;
}

.faculty-subtab:hover {
  background: #dee2e6;
  color: #212529;
}

.faculty-subtab.active {
  background: #fff;
  color: #28537b;
  border-bottom: 2px solid #28537b;
}

.faculty-subtab-content {
  display: none;
  padding: 20px 0;
}

.faculty-subtab-content.active {
  display: block;
}

footer {
  margin-top: auto;
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 1.5rem;
  width: 100%;
}

/* Responsive Design - Media Queries */

/* Large tablets and small desktops (1024px and below) */
@media (max-width: 1024px) {
  .faculty-content-wrapper {
    flex-direction: column;
  }
  
  .faculty-content-wrapper .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  
  /* Make grids responsive */
  #domainSummaryCards {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  /* Cohort stats grid - 3 columns to 2 */
  .cohort-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Three column grids become two columns */
  .centrality-plots-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Two column grids stay two columns but adjust gap */
  .student-detail-grid,
  .correlation-controls-grid {
    gap: 15px !important;
  }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
  .proactive-hero {
    padding: 1rem 1rem;
  }
  
  .proactive-hero h1 {
    font-size: 1.5rem;
  }
  
  .proactive-hero h3 {
    font-size: 0.9rem;
  }
  
  .proactive-nav {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .proactive-nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  #faculty-content > div:first-child h1 {
    font-size: 1.5em !important;
  }
  
  #faculty-content > div:first-child p {
    font-size: 0.85em !important;
  }
  
  .faculty-content-wrapper {
    padding: 10px;
  }
  
  .viz-container {
    padding: 15px;
  }
  
  .faculty-subtabs {
    padding: 10px 10px 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .faculty-subtab {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  /* Two column grids become single column */
  .viz-container > div[style*="grid-template-columns: 1fr 1fr"],
  .viz-container > div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Three column grids become single column */
  .viz-container > div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Domain summary cards */
  #domainSummaryCards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Cohort statistics grid */
  .cohort-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  /* Student detail grid */
  .student-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Centrality plots grid */
  .centrality-plots-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Student detail banner - wrap text */
  .student-info-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }
  
  .student-info-content .info-separator {
    margin-left: 0 !important;
  }
  
  .student-info-banner {
    padding: 15px !important;
  }
  
  .student-info-content {
    font-size: 0.95em !important;
  }
  
  /* Tables become scrollable */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Encounter summary stats */
  .encounter-summary-stats {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .encounter-summary-stats > div {
    flex: none !important;
  }
  
  /* Correlation controls */
  .correlation-controls-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
  .proactive-hero h1 {
    font-size: 1.2rem;
  }
  
  .proactive-hero h3 {
    font-size: 0.8rem;
  }
  
  #faculty-content > div:first-child {
    padding: 0 10px !important;
  }
  
  #faculty-content > div:first-child h1 {
    font-size: 1.2em !important;
    margin-bottom: 5px !important;
  }
  
  #faculty-content > div:first-child p {
    font-size: 0.8em !important;
    margin-bottom: 10px !important;
  }
  
  .faculty-content-wrapper {
    padding: 5px;
    gap: 10px;
  }
  
  .faculty-content-wrapper .sidebar {
    padding: 15px;
  }
  
  .viz-container {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .viz-container h2 {
    font-size: 1.1em;
  }
  
  .faculty-subtab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* All grids become single column */
  #domainSummaryCards {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  /* Domain summary - smaller font */
  .domain-summary-grid {
    gap: 20px !important;
  }
  
  .domain-summary-grid > div {
    min-width: 120px !important;
  }
  
  .domain-summary-grid > div > div:first-child {
    font-size: 0.8em !important;
  }
  
  .domain-summary-grid > div > div:nth-child(2) {
    font-size: 2em !important;
  }
  
  /* Charts adjust */
  #studentTrendChart,
  #degreeCentralityChart,
  #closenessCentralityChart,
  #betweennessCentralityChart,
  #networkChart,
  #correlationChart,
  #speechQualityChart {
    height: auto !important;
    min-height: 300px !important;
  }
  
  /* Completion chart */
  #completionChart {
    min-height: 600px !important;
    padding: 10px !important;
  }
  
  /* Encounter chart */
  #encounterCompletenessChart {
    padding: 10px !important;
  }
  
  /* Threshold slider label */
  #completion-subtab label {
    font-size: 12px !important;
  }
  
  #thresholdValue {
    font-size: 20px !important;
  }
  
  /* Speech status banner */
  #speechStatusBanner,
  #encounterStatusBanner {
    flex-direction: column;
    text-align: center;
    padding: 15px !important;
  }
  
  /* Student lookup input */
  #studentIdSearch {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  /* Stats panel - smaller */
  .stats-panel {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .stat-item {
    padding: 10px !important;
  }
  
  .stat-value {
    font-size: 1.5em !important;
  }
  
  .stat-label {
    font-size: 0.75em !important;
  }
}

/* Ensure all inline styles with fixed widths are responsive */
@media (max-width: 768px) {
  /* Make sure tables don't overflow */
  table {
    width: 100% !important;
    font-size: 0.9em;
  }
  
  th, td {
    padding: 8px !important;
    font-size: 0.85em;
  }
  
  /* Adjust button sizes */
  button {
    padding: 10px 20px !important;
    font-size: 0.9em !important;
  }
  
  /* Select elements */
  select {
    font-size: 0.9em !important;
    padding: 8px !important;
  }
  
  /* Input elements */
  input[type="text"],
  input[type="range"] {
    font-size: 0.9em !important;
  }
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Ensure images and SVGs are responsive */
img, svg {
  max-width: 100%;
  height: auto;
}

/* Make sure charts container adapts */
.viz-container > div[id*="Chart"],
.viz-container > div[id*="chart"] {
  width: 100% !important;
  max-width: 100% !important;
}

/* Speech Quality Chart specific styles */
#speechQualityChart {
  width: 100%;
  min-height: 400px;
  height: auto;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

#speechQualityChart svg {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

/* Ensure chart content respects container boundaries */
#speechQualityChart > * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all main containers use full width */
#faculty-content {
  width: 100%;
}

#faculty-visualization,
#trend-visualization {
  width: 100%;
}

/* Attempt filter controls */
#attemptRangeInputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

#attemptRangeInputs input[type="number"] {
  width: 80px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
  box-sizing: border-box;
}

#attemptRangeInputs input[type="number"]:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

input[name="attemptFilter"] {
  accent-color: #3498db;
}

/* Responsive adjustments for attempt filters */
@media (max-width: 768px) {
  #trend-visualization > div:first-of-type {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 15px !important;
  }
  
  #attemptRangeInputs {
    width: 100%;
    justify-content: flex-start;
  }
  
  #attemptRangeInputs input[type="number"] {
    flex: 0 0 auto;
  }
}

/* Utility classes for inline styles */
.full-width {
  width: 100%;
}

.faculty-content-header {
  width: 100%;
  margin: 0;
  padding: 0 20px;
}

.faculty-content-header h1 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #333;
}

.faculty-content-header p {
  color: #555;
  margin-bottom: 5px;
  font-size: 0.95em;
}

.faculty-content-header p:last-of-type {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 20px;
}

.cohort-stats-section {
  width: 100%;
  margin: 0 auto 20px auto;
  padding: 0 20px;
}

.faculty-visualization-card {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 20px;
}

.cohort-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.cohort-stats-item h4 {
  margin-bottom: 15px;
  color: #333;
}

.cohort-stats-item div {
  margin-bottom: 8px;
}

.cohort-stats-subtitle {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
}

.trend-visualization-card {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  margin-top: 20px;
  padding: 20px;
}

.attempt-filter-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  flex-wrap: wrap;
}

.attempt-filter-label {
  font-weight: 600;
  color: #2c3e50;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-input {
  cursor: pointer;
}

.attempt-range-inputs {
  display: none;
  align-items: center;
  gap: 10px;
}

.attempt-range-inputs.visible {
  display: flex;
}

.attempt-range-number-input {
  width: 80px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
}

.rubric-checkbox-container {
  margin-top: 8px;
}

.rubric-checkbox-label {
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
}

.rubric-checkbox {
  margin-right: 6px;
}

.student-lookup-panel {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.student-lookup-panel h3 {
  margin-bottom: 15px;
  font-size: 1em;
  color: #333;
}

.student-lookup-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9em;
}

.lookup-button {
  width: 100%;
  padding: 10px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 15px;
  transition: background 0.3s;
}

.lookup-button:hover {
  background: #2980b9;
}

.student-display {
  display: none;
  padding: 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
}

.student-display.visible {
  display: block;
}

.student-display-info {
  font-size: 0.9em;
  color: #333;
  margin-bottom: 5px;
}

.student-display-cohort {
  font-size: 0.85em;
  color: #666;
}

.student-detail-view {
  display: none;
}

.student-detail-view.visible {
  display: block;
}

.student-detail-header {
  margin-bottom: 20px;
}

.student-info-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.student-info-content {
  font-size: 1.1em;
  font-weight: 600;
}

.info-separator {
  margin-left: 30px;
}

.student-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.student-detail-section h3 {
  margin-bottom: 15px;
  color: #333;
}

.student-trend-chart {
  height: 300px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

.student-domain-scores {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.qualitative-excerpt {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
}

.qualitative-excerpt-note {
  margin-top: 10px;
  font-size: 0.85em;
  color: #999;
  font-style: italic;
}

.attempts-summary-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.attempts-summary-table thead tr {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.attempts-summary-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
}

.attempts-summary-table td {
  padding: 12px;
  color: #495057;
}

.attempts-summary-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
}

.domain-summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.centrality-plots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.centrality-plot-section h3 {
  margin-bottom: 10px;
  color: #333;
  font-size: 1.1em;
}

.centrality-plot-description {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.9em;
}

.centrality-chart {
  height: 400px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

.network-toggle-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.network-toggle-label {
  font-weight: 600;
  color: #2c3e50;
}

.network-toggle-buttons {
  display: flex;
  gap: 10px;
}

.network-toggle-btn {
  padding: 8px 20px;
  border: 2px solid #28537b;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.network-toggle-btn.active {
  background: #28537b;
  color: white;
}

.network-toggle-btn:not(.active) {
  background: white;
  color: #28537b;
}

.network-chart {
  height: 600px;
  background: #f8f9fa;
  border-radius: 8px;
}

.correlation-controls-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.correlation-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.correlation-control-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  margin-bottom: 8px;
}

.correlation-info-icon {
  margin-left: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #95a5a6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: help;
}

.correlation-select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  background: white;
}

.correlation-p-value-display {
  font-weight: 700;
  color: #e74c3c;
  font-size: 20px;
}

.correlation-p-value-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #e74c3c 0%, #3498db 100%);
  outline: none;
  cursor: pointer;
}

.correlation-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 5px;
}

.correlation-chart {
  min-height: 500px;
  background: #f8f9fa;
  border-radius: 8px;
}

.completion-header {
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
}

.completion-threshold-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.completion-threshold-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.completion-threshold-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.completion-threshold-value {
  font-weight: 700;
  color: #e74c3c;
  font-size: 24px;
}

.completion-threshold-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #e74c3c 0%, #e74c3c 50%, #27ae60 50%, #27ae60 100%);
  outline: none;
  cursor: pointer;
}

.completion-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  color: #7f8c8d;
}

.completion-legend {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 15px;
}

.completion-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.completion-legend-color {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

.completion-legend-text {
  font-size: 14px;
  color: #2c3e50;
  font-weight: 500;
}

.completion-chart {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-height: 800px;
}

.domain-summary-header {
  margin-top: 40px;
}

.domain-summary-title {
  color: #2c3e50;
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
}

.domain-summary-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.encounter-header {
  color: #2c3e50;
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 10px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.encounter-description {
  color: #7f8c8d;
  font-size: 1.1em;
  font-weight: 400;
  margin-bottom: 25px;
}

.encounter-status-banner {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  padding: 18px 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.encounter-status-banner.excellent {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.encounter-status-banner.good {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3);
}

.encounter-status-icon {
  font-size: 1.5em;
  font-weight: bold;
}

.encounter-status-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.encounter-summary-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.encounter-stat-box {
  flex: 1;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.encounter-stat-label {
  font-size: 0.9em;
  color: #7f8c8d;
  margin-bottom: 8px;
  font-weight: 500;
}

.encounter-stat-value {
  font-size: 2em;
  font-weight: 700;
  color: #2c3e50;
}

.encounter-completeness-chart {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.encounter-details-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: background 0.3s;
}

.encounter-details-button:hover {
  background: #2980b9;
}

.encounter-details {
  display: none;
  margin-top: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.encounter-details.visible {
  display: block;
}

.speech-header {
  color: #2c3e50;
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 10px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.speech-description {
  color: #7f8c8d;
  font-size: 1.1em;
  font-weight: 400;
  margin-bottom: 25px;
}

.speech-status-banner {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: #fff;
  padding: 18px 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.speech-status-icon {
  font-size: 1.5em;
  font-weight: bold;
}

.speech-status-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.speech-average-scores {
  margin-bottom: 30px;
}

.speech-average-scores h3 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

.speech-quality-chart {
  min-height: 400px;
  height: auto;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}

.speech-descriptions-section {
  margin-top: 30px;
}

.speech-statistics-section {
  margin-top: 30px;
}

/* Additional utility classes */
.text-center {
  text-align: center;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-25 {
  margin-bottom: 25px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.mt-40 {
  margin-top: 40px;
}

.color-333 {
  color: #333;
}

.color-555 {
  color: #555;
}

.color-666 {
  color: #666;
}

.font-size-09 {
  font-size: 0.9em;
}

.font-size-095 {
  font-size: 0.95em;
}

.font-weight-600 {
  font-weight: 600;
}

.font-weight-700 {
  font-weight: 700;
}

/* Additional classes for remaining sections */
.centrality-header {
  margin-bottom: 20px;
}

.centrality-description {
  margin-bottom: 20px;
  color: #666;
}

.domain-summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.centrality-plot-section h3 {
  margin-bottom: 10px;
  color: #333;
  font-size: 1.1em;
}

.centrality-plot-description {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.9em;
}

.centrality-chart {
  height: 400px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

.network-toggle-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.network-toggle-label {
  font-weight: 600;
  color: #2c3e50;
}

.network-toggle-buttons {
  display: flex;
  gap: 10px;
}

.network-toggle-btn {
  padding: 8px 20px;
  border: 2px solid #28537b;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.network-toggle-btn.active {
  background: #28537b;
  color: white;
}

.network-toggle-btn:not(.active) {
  background: white;
  color: #28537b;
}

.network-chart {
  height: 600px;
  background: #f8f9fa;
  border-radius: 8px;
}

.student-detail-section h3 {
  margin-bottom: 15px;
  color: #333;
}
