@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap);
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

* {
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  border: 3px solid #e0e7ff;
  border-top: 3px solid #6366f1;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-greeting {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  font-size: 14px;
}

.header {
  background: #1e1b4b;
  box-shadow: none;
  padding: 16px 0;
  margin-bottom: 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 24px;
  font-weight: 700;
  color: white !important;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover {
  color: white;
}

.nav-link.active {
  color: white;
  font-weight: 600;
}

/* Login Page Styles */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.login-header p {
  color: #666;
  font-size: 16px;
}

.login-form {
  margin-bottom: 20px;
}

.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
}

/* OTP Input Component */
.otp-input-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0;
}

.otp-input {
  width: 45px;
  height: 45px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
}

.otp-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.otp-input.active {
  border-color: #007bff;
}

.otp-input:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

.form-text {
  color: #666;
  font-size: 14px;
  margin-top: 5px;
}

.login-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn-link {
  background: none;
  border: none;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
}

.btn-link:hover {
  color: #0056b3;
}

.btn-link:disabled {
  color: #6c757d;
  cursor: not-allowed;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Responsive Header Styles */
@media (max-width: 768px) {
  .header {
    padding: 20px 0;
  }

  .nav-brand {
    font-size: 20px;
  }

  .nav-links {
    gap: 12px;
  }

  .user-greeting {
    display: none;
  }

  .user-info .btn-sm {
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: loading-fade-in 0.2s ease both;
}

@keyframes loading-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.loading-overlay .loading-spinner {
  background: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
  width: auto;
  height: auto;
  margin: 0;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 20px 48px rgba(0, 0, 0, 0.06);
  animation: loading-pop-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes loading-pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.loading-svg {
  animation: loading-rotate 0.8s linear infinite;
}

@keyframes loading-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loading-overlay .loading-spinner p {
  margin: 14px 0 0;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Loading Spinner Component */
.loading-spinner-component {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-medium {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.loading-message {
  margin-top: 10px;
  color: #666;
  font-size: 14px;
}

/* Error Boundary */
.error-boundary {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.error-boundary-content {
  text-align: center;
  max-width: 500px;
}

.error-boundary-content h2 {
  color: #dc3545;
  margin-bottom: 15px;
}

.error-boundary-content p {
  color: #666;
  margin-bottom: 20px;
}

.error-details {
  text-align: left;
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.error-details summary {
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 10px;
}

.error-details pre {
  font-size: 12px;
  color: #dc3545;
  white-space: pre-wrap;
  word-break: break-word;
}

/* User Info in Header */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-name {
  font-size: 14px;
  color: #666;
}

/* Admin Actions */
.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 30px;
  gap: 30px;
}

.action-group h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-buttons .btn {
  justify-content: flex-start;
  text-align: left;
}

/* Alert List */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
}

.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1 1;
}

.alert-message {
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
}

.alert-meta {
  font-size: 12px;
  color: #666;
}

/* Project Actions */
.project-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

/* Status badges */
.status-overdue {
  background-color: #f8d7da;
  color: #721c24;
}

/* Not Found Page */
.not-found-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.not-found-container {
  text-align: center;
  max-width: 500px;
  padding: 40px 20px;
}

.not-found-title {
  font-size: 120px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 20px;
  line-height: 1;
}

.not-found-subtitle {
  font-size: 32px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.not-found-description {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

.not-found-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .nav {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .login-card {
    padding: 30px 20px;
  }
  
  .login-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .admin-actions {
    grid-template-columns: 1fr;
  }
  
  .not-found-title {
    font-size: 80px;
  }
  
  .not-found-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .not-found-actions .btn {
    width: 200px;
  }
}

/* Student Dashboard Components */

/* Project List Component */
.project-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-list-header h3 {
  margin: 0;
  color: #333;
}

.project-filters {
  display: flex;
  gap: 15px;
  align-items: center;
}

.filter-info {
  font-size: 14px;
  color: #666;
}

.project-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-item {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: white;
}

.project-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.project-item.selected {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.project-item.priority-high {
  border-left: 4px solid #dc3545;
}

.project-item.priority-medium {
  border-left: 4px solid #ffc107;
}

.project-item.priority-low {
  border-left: 4px solid #28a745;
}

.project-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.project-title-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-type-icon {
  font-size: 20px;
}

.project-type-icon.large {
  font-size: 32px;
}

.project-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #666;
}

.meta-icon {
  font-size: 14px;
}

.status-critical {
  background-color: #f8d7da;
  color: #721c24;
}

/* Project Workspace Component */
.project-workspace {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.workspace-title-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.workspace-title h2 {
  margin: 0;
  font-size: 28px;
  color: #333;
}

.project-type-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
}

.workspace-actions {
  display: flex;
  gap: 10px;
}

.workspace-content {
  margin-top: 20px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.workspace-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.workspace-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.detail-item {
  margin-bottom: 15px;
}

.detail-item label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.detail-item p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.deadline-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.deadline-card.deadline-normal {
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

.deadline-card.deadline-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
}

.deadline-card.deadline-critical {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}

.deadline-card.deadline-overdue {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}

.deadline-icon {
  font-size: 24px;
}

.deadline-date {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.deadline-status {
  font-size: 14px;
  color: #666;
}

.deadline-warning-message {
  padding: 10px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  font-size: 14px;
  color: #856404;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.team-member.manager {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
}

.member-avatar {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
}

.member-info {
  flex: 1 1;
}

.member-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.member-role {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 2px;
}

.member-email {
  font-size: 14px;
  color: #666;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.action-btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.action-btn.primary {
  border-color: #007bff;
  background: #f8f9ff;
}

.action-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.action-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.action-description {
  font-size: 14px;
  color: #666;
}

/* Chat Interface Component */
.chat-interface {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 20px;
}

.chat-title-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-title h3 {
  margin: 0;
  color: #333;
}

.chat-subtitle {
  font-size: 14px;
  color: #666;
}

.chat-actions {
  display: flex;
  gap: 10px;
}

.chat-messages {
  flex: 1 1;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 10px;
}

.chat-welcome {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.welcome-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.chat-welcome h4 {
  color: #333;
  margin-bottom: 15px;
}

.chat-welcome ul {
  text-align: left;
  max-width: 400px;
  margin: 20px auto;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.date-separator {
  text-align: center;
  margin: 20px 0;
}

.date-separator span {
  background: #f8f9fa;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 80%;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.ai {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: #f8f9fa;
}

.message.user .message-avatar {
  background: #007bff;
  color: white;
}

.message-content {
  flex: 1 1;
  min-width: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.message-sender {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.message-time {
  font-size: 12px;
  color: #666;
}

.message-text {
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 12px;
  border-top-left-radius: 4px;
}

.message.user .message-text {
  background: #007bff;
  color: white;
  border-top-left-radius: 12px;
  border-top-right-radius: 4px;
}

.message-body p {
  margin: 0 0 8px 0;
}

.message-body p:last-child {
  margin-bottom: 0;
}

.message-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
}

.chat-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
  margin-bottom: 15px;
}

.error-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #721c24;
  margin-left: auto;
}

.chat-input {
  border-top: 1px solid #e9ecef;
  padding-top: 15px;
}

.input-container {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.message-input {
  flex: 1 1;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 22px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.message-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.send-button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #007bff;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.send-button:hover:not(:disabled) {
  background: #0056b3;
  transform: scale(1.05);
}

.send-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.input-hint {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  text-align: center;
}

/* Todo List Component */
.todo-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.todo-title-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.todo-title h3 {
  margin: 0;
  color: #333;
}

.todo-subtitle {
  font-size: 14px;
  color: #666;
}

.todo-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: #007bff;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
}

.todo-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #007bff;
}

.filter-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.todo-content {
  margin-bottom: 20px;
}

.todo-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.todo-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
  opacity: 0.7;
  background: #f8f9fa;
}

.todo-checkbox {
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.todo-content-section {
  flex: 1 1;
  min-width: 0;
}

.todo-text {
  font-size: 16px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #666;
}

.todo-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
}

.todo-actions {
  flex-shrink: 0;
}

.completion-badge {
  font-size: 18px;
}

.todo-progress {
  margin-top: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Manager Dashboard Components */

/* Dashboard Navigation */
.dashboard-nav {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Project Overview Component */
.project-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.project-overview-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: all 0.2s ease;
  border-left: 4px solid #e9ecef;
}

.project-overview-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.project-overview-card.priority-high {
  border-left-color: #dc3545;
}

.project-overview-card.priority-medium {
  border-left-color: #ffc107;
}

.project-overview-card.priority-low {
  border-left-color: #28a745;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.project-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.project-type {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
}

.status-badges {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}

.engagement-badge {
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.engagement-high {
  background-color: #d4edda;
  color: #155724;
}

.engagement-medium {
  background-color: #fff3cd;
  color: #856404;
}

.engagement-low {
  background-color: #f8d7da;
  color: #721c24;
}

.engagement-unknown {
  background-color: #e2e3e5;
  color: #6c757d;
}

.card-content {
  margin-bottom: 15px;
}

.project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Alerts Panel Component */
.alerts-panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.alerts-header h3 {
  margin: 0;
  color: #333;
}

.alert-count {
  font-size: 14px;
  color: #dc3545;
  font-weight: 500;
}

.no-alerts {
  font-size: 14px;
  color: #28a745;
  font-weight: 500;
}

.alert-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
  transition: all 0.2s ease;
}

.alert-item:hover {
  background: #e9ecef;
}

.alert-item.priority-critical {
  border-left-color: #dc3545;
  background: #fff5f5;
}

.alert-item.priority-high {
  border-left-color: #fd7e14;
  background: #fff8f0;
}

.alert-item.priority-medium {
  border-left-color: #ffc107;
}

.alert-item.priority-low {
  border-left-color: #6c757d;
}

.alert-content {
  flex: 1 1;
  min-width: 0;
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.alert-project {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.alert-priority {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: 500;
}

.alert-priority.priority-critical {
  background: #dc3545;
  color: white;
}

.alert-priority.priority-high {
  background: #fd7e14;
  color: white;
}

.alert-priority.priority-medium {
  background: #ffc107;
  color: #212529;
}

.alert-priority.priority-low {
  background: #6c757d;
  color: white;
}

.alert-message {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 5px;
}

.alert-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #666;
}

.alert-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.alerts-footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

/* Progress Summaries Component */
.progress-summaries {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.summaries-header {
  margin-bottom: 20px;
}

.summaries-header h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.summaries-description {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.summary-generator {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}

.generator-controls {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 200px;
}

.control-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.summary-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.summary-title {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 18px;
}

.summary-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.summary-period {
  font-size: 14px;
  color: #666;
}

.activity-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.summary-timestamp {
  font-size: 12px;
  color: #666;
}

.summary-metrics {
  margin-bottom: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.summary-content h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.summary-text {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

.summary-line {
  margin: 0 0 10px 0;
  line-height: 1.5;
  color: #333;
}

.summary-line:last-child {
  margin-bottom: 0;
}

.summary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Student Metrics Component */
.student-metrics {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.metrics-header h3 {
  margin: 0;
  color: #333;
}

.metrics-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.metrics-summary {
  margin-bottom: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  margin-bottom: 10px;
}

.summary-grid .summary-card {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
}

.summary-value {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 5px;
}

.summary-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
}

.summary-period {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.metrics-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #007bff;
}

.tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.engagement-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 15px;
  gap: 15px;
}

.engagement-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

.engagement-card .card-header {
  margin-bottom: 12px;
}

.student-info,
.project-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-avatar,
.project-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.student-name,
.project-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.engagement-level {
  font-size: 12px;
  font-weight: 500;
}

.engagement-score {
  text-align: center;
}

.score-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #007bff;
  margin: 0 auto 5px;
}

.score-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
}

.card-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.metric-icon {
  font-size: 14px;
  width: 16px;
}

.metric-text {
  color: #333;
}

.top-performers {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.top-performers h4 {
  margin: 0 0 15px 0;
  color: #333;
}

.performers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.performers-section h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.performer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.performer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
}

.performer-rank {
  font-weight: bold;
  color: #007bff;
  min-width: 30px;
}

.performer-name {
  flex: 1 1;
  font-weight: 500;
  color: #333;
}

.performer-metric {
  font-size: 14px;
  color: #666;
}

.analytics-placeholder {
  max-width: 800px;
  margin: 0 auto;
}

.analytics-placeholder .card {
  padding: 40px;
  text-align: center;
}

.analytics-placeholder h3 {
  color: #333;
  margin-bottom: 15px;
}

.analytics-placeholder ul {
  text-align: left;
  max-width: 400px;
  margin: 20px auto;
}

@media (max-width: 768px) {
  .workspace-header,
  .chat-header,
  .todo-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  
  .project-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .chat-interface {
    height: calc(100vh - 60px);
    padding: 15px;
  }
  
  .message {
    max-width: 90%;
  }
  
  .todo-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .todo-filters {
    flex-wrap: wrap;
  }
  
  .dashboard-nav {
    flex-direction: column;
    gap: 10px;
  }
  
  .project-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .generator-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .control-group {
    min-width: auto;
  }
  
  .metrics-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .engagement-cards {
    grid-template-columns: 1fr;
  }
  
  .performers-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   Login Page — Two-Column Floating Card
   Warm matte background, rich visual + clean form
   ============================================ */

/* ─── Page ─── */
.lp-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  overflow: hidden;
  padding: 32px;
  background: #f0f0f3;
}

/* Warm ambient blobs behind card */
.lp-page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.lp-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.lp-bg-shape--1 {
  width: 600px;
  height: 600px;
  background: rgba(199, 210, 254, 0.45);
  top: -15%;
  left: -10%;
  animation: lp-drift 20s ease-in-out infinite;
}

.lp-bg-shape--2 {
  width: 500px;
  height: 500px;
  background: rgba(221, 214, 254, 0.35);
  bottom: -15%;
  right: -10%;
  animation: lp-drift 24s ease-in-out infinite reverse;
}

@keyframes lp-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

/* ─── Card ─── */
.lp-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 960px;
  min-height: 580px;
  background: #ffffff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.07);
  animation: lp-card-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lp-card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════
   LEFT: Visual Panel
   ═══════════════════════════════════════ */
.lp-visual {
  position: relative;
  flex: 0 0 44%;
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 30%, #4338ca 65%, #6366f1 100%);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Decorations layer */
.lp-visual__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.lp-decor {
  position: absolute;
}

.lp-decor--rings {
  width: 300px;
  height: 300px;
  top: -60px;
  right: -80px;
  animation: lp-spin 50s linear infinite;
}

.lp-decor--grid {
  width: 200px;
  height: 200px;
  bottom: 40px;
  left: -20px;
  opacity: 0.8;
}

.lp-decor--diamond {
  width: 60px;
  height: 60px;
  top: 50%;
  right: 20px;
  animation: lp-float 7s ease-in-out infinite;
}

.lp-decor--glow {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.3) 0%, transparent 70%);
  top: 30%;
  left: -40px;
  filter: blur(40px);
}

@keyframes lp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes lp-float {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%      { transform: translateY(-12px) rotate(45deg); }
}

/* Visual panel content */
.lp-visual__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lp-visual__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.lp-visual__name {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.lp-visual__tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 4px 0 0;
  font-weight: 400;
}

/* Feature list */
.lp-visual__features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1;
}

.lp-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  cursor: default;
}

.lp-feature:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(6px);
}

.lp-feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.lp-feature__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.lp-feature__desc {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* Institution badge at bottom */
.lp-visual__institution {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.lp-visual__inst-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  flex-shrink: 0;
}

.lp-visual__inst-name {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* ═══════════════════════════════════════
   RIGHT: Form Panel
   ═══════════════════════════════════════ */
.lp-form-panel {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  background: #ffffff;
}

.lp-form-panel__inner {
  width: 100%;
  max-width: 400px;
}

/* Form header */
.lp-form-header {
  margin-bottom: 32px;
}

.lp-form-header__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  border-radius: 16px;
  margin-bottom: 20px;
}

.lp-form-header__title {
  font-size: 30px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.lp-form-header__sub {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}

.lp-form-header__sub strong {
  color: #111827;
  font-weight: 600;
}

/* ─── Alerts ─── */
.lp-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  animation: lp-alert-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.lp-alert svg { flex-shrink: 0; }

@keyframes lp-alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lp-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.lp-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* ─── Form ─── */
.lp-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lp-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lp-field__label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.2px;
}

.lp-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lp-field__icon {
  position: absolute;
  left: 16px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.25s ease;
}

.lp-field__wrap:focus-within .lp-field__icon {
  color: #6366f1;
}

.lp-field__input {
  width: 100%;
  padding: 15px 18px 15px 50px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  transition: all 0.25s ease;
}

.lp-field__input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.lp-field__input:hover {
  border-color: #c7d2fe;
  background: #fff;
}

.lp-field__input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

/* ─── OTP Overrides ─── */
.otp-input-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.otp-input {
  width: 54px;
  height: 62px;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  text-align: center;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  transition: all 0.25s ease;
  caret-color: #6366f1;
}

.otp-input:hover {
  border-color: #c7d2fe;
  background: #fff;
}

.otp-input:focus,
.otp-input.active {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

/* ─── Primary Button ─── */
.lp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.1px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.lp-btn--primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #ffffff;
  box-shadow:
    0 1px 2px rgba(79, 70, 229, 0.12),
    0 4px 16px rgba(79, 70, 229, 0.2);
}

.lp-btn--primary:hover {
  background-position: 100% 50%;
  box-shadow:
    0 2px 4px rgba(79, 70, 229, 0.2),
    0 10px 28px rgba(79, 70, 229, 0.28);
  transform: translateY(-2px);
}

.lp-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(79, 70, 229, 0.2);
}

.lp-btn--primary svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lp-btn--primary:hover svg {
  transform: translateX(4px);
}

.lp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Link Buttons ─── */
.lp-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #6366f1;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lp-link-btn:hover:not(:disabled) {
  color: #4338ca;
  background: #eef2ff;
}

.lp-link-btn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

/* ─── Footer ─── */
.lp-footer {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid #f3f4f6;
  text-align: center;
}

.lp-footer p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.lp-footer__link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.lp-footer__link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.lp-footer__legal {
  font-size: 12px !important;
  color: #9ca3af !important;
  margin-top: 10px !important;
}

/* ─── Accessibility ─── */
.lp-field__input:focus-visible,
.lp-btn:focus-visible,
.lp-link-btn:focus-visible,
.otp-input:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */

/* Tablet: stack vertically */
@media (max-width: 820px) {
  .lp-page {
    padding: 20px;
  }

  .lp-card {
    flex-direction: column;
    max-width: 520px;
    min-height: auto;
  }

  .lp-visual {
    flex: none;
    padding: 32px 32px 28px;
  }

  .lp-visual__brand {
    margin-bottom: 24px;
  }

  .lp-visual__features {
    gap: 10px;
  }

  .lp-visual__institution {
    margin-top: 24px;
  }

  .lp-form-panel {
    padding: 32px;
  }
}

/* Mobile: full-bleed */
@media (max-width: 520px) {
  .lp-page {
    padding: 0;
    background: #ffffff;
  }

  .lp-card {
    flex-direction: column;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    min-height: 100vh;
  }

  .lp-visual {
    padding: 28px 24px 24px;
    border-radius: 0;
  }

  .lp-visual__name {
    font-size: 22px;
  }

  .lp-visual__features {
    gap: 8px;
  }

  .lp-feature {
    padding: 12px;
  }

  .lp-feature__icon {
    width: 34px;
    height: 34px;
  }

  .lp-visual__institution {
    margin-top: 20px;
  }

  .lp-form-panel {
    padding: 28px 24px 32px;
  }

  .lp-form-header__title {
    font-size: 24px;
  }

  .otp-input {
    width: 44px;
    height: 52px;
    font-size: 20px;
    border-radius: 12px;
  }

  .otp-input-container {
    gap: 6px;
  }

  .lp-form__actions {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
  }

  .lp-link-btn {
    justify-content: center;
  }

  .lp-bg-shape--1 { width: 300px; height: 300px; }
  .lp-bg-shape--2 { display: none; }

  .lp-decor--rings { width: 180px; height: 180px; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .lp-card { animation: none !important; }
  .lp-alert { animation: none !important; }
  .lp-btn--primary:hover { transform: none !important; }
  .lp-bg-shape { animation: none !important; }
  .lp-decor--rings { animation: none !important; }
  .lp-decor--diamond { animation: none !important; }
  .lp-feature:hover { transform: none !important; }
}

/* ============================================
   Sign Up Page — Two-Column Floating Card
   Matches LoginPage design system
   ============================================ */

/* ─── Page ─── */
.sp-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  overflow: hidden;
  padding: 32px;
  background: #f0f0f3;
}

.sp-page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.sp-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.sp-bg-shape--1 {
  width: 600px;
  height: 600px;
  background: rgba(199, 210, 254, 0.45);
  top: -15%;
  left: -10%;
  animation: sp-drift 20s ease-in-out infinite;
}

.sp-bg-shape--2 {
  width: 500px;
  height: 500px;
  background: rgba(221, 214, 254, 0.35);
  bottom: -15%;
  right: -10%;
  animation: sp-drift 24s ease-in-out infinite reverse;
}

@keyframes sp-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

/* ─── Card ─── */
.sp-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 1000px;
  background: #ffffff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.07);
  animation: sp-card-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sp-card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════
   LEFT: Visual Panel
   ═══════════════════════════════════════ */
.sp-visual {
  position: relative;
  flex: 0 0 42%;
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 30%, #4338ca 65%, #6366f1 100%);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Decorations */
.sp-visual__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sp-decor { position: absolute; }

.sp-decor--rings {
  width: 280px;
  height: 280px;
  top: -50px;
  right: -70px;
  animation: sp-spin 50s linear infinite;
}

.sp-decor--grid {
  width: 180px;
  height: 180px;
  bottom: 30px;
  left: -15px;
  opacity: 0.8;
}

.sp-decor--diamond {
  width: 50px;
  height: 50px;
  top: 50%;
  right: 16px;
  animation: sp-float 7s ease-in-out infinite;
}

.sp-decor--glow {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.3) 0%, transparent 70%);
  top: 30%;
  left: -30px;
  filter: blur(40px);
}

@keyframes sp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes sp-float {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%      { transform: translateY(-12px) rotate(45deg); }
}

/* Visual content */
.sp-visual__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sp-visual__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.sp-visual__name {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.sp-visual__tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 4px 0 0;
  font-weight: 400;
}

/* Features */
.sp-visual__features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1;
}

.sp-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  cursor: default;
}

.sp-feature:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(6px);
}

.sp-feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.sp-feature__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.sp-feature__desc {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* Institution badge */
.sp-visual__institution {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.sp-visual__inst-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  flex-shrink: 0;
}

.sp-visual__inst-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* ═══════════════════════════════════════
   RIGHT: Form Panel
   ═══════════════════════════════════════ */
.sp-form-panel {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px;
  background: #ffffff;
  overflow-y: auto;
  max-height: 100vh;
}

.sp-form-panel__inner {
  width: 100%;
  max-width: 420px;
}

/* Form header */
.sp-form-header {
  margin-bottom: 28px;
}

.sp-form-header__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  border-radius: 16px;
  margin-bottom: 20px;
}

.sp-form-header__title {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.sp-form-header__sub {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}

.sp-form-header__sub strong {
  color: #111827;
  font-weight: 600;
}

/* ─── Alerts ─── */
.sp-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  animation: sp-alert-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sp-alert svg { flex-shrink: 0; }

@keyframes sp-alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sp-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.sp-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* ─── Form ─── */
.sp-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sp-row {
  display: flex;
  gap: 14px;
}

.sp-row .sp-field {
  flex: 1 1;
}

.sp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-field__label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.2px;
}

.sp-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sp-field__icon {
  position: absolute;
  left: 14px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.25s ease;
  z-index: 1;
}

.sp-field__wrap:focus-within .sp-field__icon {
  color: #6366f1;
}

.sp-field__input,
.sp-field__select {
  width: 100%;
  padding: 13px 16px 13px 48px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: all 0.25s ease;
}

.sp-field__input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.sp-field__input:hover,
.sp-field__select:hover {
  border-color: #c7d2fe;
  background: #fff;
}

.sp-field__input:focus,
.sp-field__select:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* Select styling */
.sp-field__select {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width=%2712%27 height=%2712%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%236b7280%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.sp-field__select:invalid,
.sp-field__select option[value=""] {
  color: #9ca3af;
}

.sp-field__select:valid {
  color: #111827;
}

.sp-field__select option {
  color: #111827;
  background: #ffffff;
  padding: 8px;
}

/* Countdown */
.sp-countdown {
  font-size: 13px;
  color: #6366f1;
  margin: 8px 0 0;
  font-weight: 500;
}

.sp-countdown strong {
  color: #4338ca;
}

/* ─── OTP Overrides ─── */
.otp-input-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.otp-input {
  width: 54px;
  height: 62px;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  text-align: center;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  transition: all 0.25s ease;
  caret-color: #6366f1;
}

.otp-input:hover {
  border-color: #c7d2fe;
  background: #fff;
}

.otp-input:focus,
.otp-input.active {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* ─── Primary Button ─── */
.sp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.1px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.sp-btn--primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #ffffff;
  box-shadow:
    0 1px 2px rgba(79, 70, 229, 0.12),
    0 4px 16px rgba(79, 70, 229, 0.2);
}

.sp-btn--primary:hover {
  background-position: 100% 50%;
  box-shadow:
    0 2px 4px rgba(79, 70, 229, 0.2),
    0 10px 28px rgba(79, 70, 229, 0.28);
  transform: translateY(-2px);
}

.sp-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(79, 70, 229, 0.2);
}

.sp-btn--primary svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-btn--primary:hover svg {
  transform: translateX(4px);
}

.sp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Link Buttons ─── */
.sp-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #6366f1;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sp-link-btn:hover:not(:disabled) {
  color: #4338ca;
  background: #eef2ff;
}

.sp-link-btn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

/* ─── Footer ─── */
.sp-footer {
  text-align: center;
}

.sp-footer p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.sp-footer__link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sp-footer__link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.sp-legal {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f3f4f6;
  text-align: center;
}

.sp-legal p {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

/* ─── Accessibility ─── */
.sp-field__input:focus-visible,
.sp-field__select:focus-visible,
.sp-btn:focus-visible,
.sp-link-btn:focus-visible,
.otp-input:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */

/* Tablet: stack vertically */
@media (max-width: 820px) {
  .sp-page {
    padding: 20px;
  }

  .sp-card {
    flex-direction: column;
    max-width: 540px;
  }

  .sp-visual {
    flex: none;
    padding: 28px 28px 24px;
  }

  .sp-visual__brand {
    margin-bottom: 20px;
  }

  .sp-visual__features {
    gap: 10px;
  }

  .sp-visual__institution {
    margin-top: 20px;
  }

  .sp-form-panel {
    padding: 28px;
    max-height: none;
  }
}

/* Mobile */
@media (max-width: 520px) {
  .sp-page {
    padding: 0;
    background: #ffffff;
  }

  .sp-card {
    flex-direction: column;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    min-height: 100vh;
  }

  .sp-visual {
    padding: 24px 20px 20px;
  }

  .sp-visual__name {
    font-size: 20px;
  }

  .sp-feature {
    padding: 10px;
  }

  .sp-feature__icon {
    width: 32px;
    height: 32px;
  }

  .sp-form-panel {
    padding: 24px 20px 28px;
    max-height: none;
  }

  .sp-form-header__title {
    font-size: 22px;
  }

  .sp-row {
    flex-direction: column;
    gap: 18px;
  }

  .sp-field__input,
  .sp-field__select {
    font-size: 16px; /* prevent iOS zoom */
    padding: 12px 14px 12px 44px;
  }

  .otp-input {
    width: 44px;
    height: 52px;
    font-size: 20px;
    border-radius: 12px;
  }

  .otp-input-container {
    gap: 6px;
  }

  .sp-form__actions {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
  }

  .sp-link-btn {
    justify-content: center;
  }

  .sp-bg-shape--1 { width: 300px; height: 300px; }
  .sp-bg-shape--2 { display: none; }
  .sp-decor--rings { width: 160px; height: 160px; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .sp-card { animation: none !important; }
  .sp-alert { animation: none !important; }
  .sp-btn--primary:hover { transform: none !important; }
  .sp-bg-shape { animation: none !important; }
  .sp-decor--rings { animation: none !important; }
  .sp-decor--diamond { animation: none !important; }
  .sp-feature:hover { transform: none !important; }
}

/* Modern Chat Interface - Fixed Layout */
* {
  box-sizing: border-box;
}

.project-chat-interface {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
  background: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
}

/* ── Top info row ── */
.pci-top {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

/* ── Bottom row: sidebar + chat ── */
.pci-body {
  flex: 1 1;
  display: flex;
  gap: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  min-height: 70vh;
}

/* ===== CONVERSATION SIDEBAR ===== */
.conversation-sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.conversation-sidebar.collapsed {
  width: 56px;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.sidebar-header h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.sidebar-actions {
  display: flex;
  gap: 8px;
}

.new-conversation-btn,
.collapse-btn,
.expand-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
  transition: all 0.15s ease;
}

.new-conversation-btn:hover,
.collapse-btn:hover,
.expand-btn:hover {
  background: #e2e8f0;
  border-color: #6366f1;
  color: #6366f1;
}

.conversations-list {
  flex: 1 1;
  overflow-y: auto;
  padding: 8px;
}

.conversation-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.conversation-item:hover {
  background: #f8fafc;
}

.conversation-item.active {
  background: #eef2ff;
  border-left: 3px solid #6366f1;
}

.conversation-item.new-conversation-item {
  background: #6366f1;
  color: white;
  border-left: 3px solid #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  font-weight: 600;
}

.conversation-item.new-conversation-item:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.conversation-name {
  font-weight: 500;
  color: #1e293b;
  font-size: 13px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-date {
  font-size: 11px;
  color: #64748b;
}

.expand-btn {
  width: 100%;
  height: 48px;
  font-size: 20px;
}

/* ===== MAIN CHAT AREA ===== */
.chat-main {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
}

/* ===== HEADER (hidden — project info is redundant with subtask header) ===== */
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  z-index: 20;
  padding-right: 16px;
  border-right: 1px solid #e5e7eb;
  margin-right: 0;
}

.pci-top .back-btn,
.project-chat-interface .back-btn,
.chat-header .back-btn {
  all: unset !important;
  color: #6366f1 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-family: inherit !important;
  white-space: nowrap !important;
  transition: color 0.2s ease !important;
}

.pci-top .back-btn:hover,
.project-chat-interface .back-btn:hover,
.chat-header .back-btn:hover {
  color: #4338ca !important;
}

.project-info {
  flex: 1 1;
  min-width: 0;
}

.project-header {
  display: flex;
  align-items: center;
}

.project-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  flex-shrink: 0;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-title {
  margin: 0 0 3px 0;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  flex-wrap: wrap;
}

.project-type,
.project-deadline,
.project-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.project-chat-interface .project-type,
.pci-top .project-type {
  background: #eef2ff !important;
  color: #6366f1 !important;
}

.project-deadline {
  background: #f3f4f6;
  color: #6b7280;
}

.project-badge {
  background: #dcfce7;
  color: #166534;
}

.header-right button {
  background: #f9fafb;
  color: #6366f1;
  border: 1px solid #e5e7eb;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-right button:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

/* ===== PROJECT DESCRIPTION ===== */
.project-description-bar {
  background: #f8fafc;
  padding: 8px 20px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.description-content {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.description-content strong {
  color: #1e293b;
  font-weight: 600;
}

.project-description-text {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  padding: 0 16px 12px;
  border-bottom: 1px solid #f3f4f6;
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  position: relative;
}

.chat-container.dragging {
  border: 2px dashed #6366f1;
  background: #f0f9ff;
}

.drag-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.drag-message {
  text-align: center;
  color: #6366f1;
  padding: 40px;
  border: 2px dashed #6366f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
}

.drag-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drag-message h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.drag-message p {
  font-size: 14px;
  margin: 0;
}

/* ===== MESSAGES AREA ===== */
.messages-container {
  flex: 1 1;
  padding: 20px;
  background: #ffffff;
  position: relative;
}

.scroll-to-bottom-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.15s ease;
  z-index: 10;
}

.scroll-to-bottom-btn:hover {
  background: #4f46e5;
  transform: translateY(-2px);
}

/* Custom Scrollbar */
.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===== EMPTY STATE ===== */
.empty-chat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #64748b;
  padding: 40px 20px;
}

.empty-chat-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-chat h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1e293b;
}

.empty-chat p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* ===== MESSAGE STYLES ===== */
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  max-width: 100%;
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 4px;
}

.message.user .message-avatar {
  background: #6366f1;
  color: white;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.message.assistant .message-avatar {
  background: #1e1b4b;
  color: white;
  box-shadow: 0 2px 6px rgba(30, 27, 75, 0.15);
}

.message-content {
  max-width: calc(100% - 50px);
  min-width: 0;
  word-wrap: break-word;
}

.message-text {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message.user .message-text {
  background: #6366f1;
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

.message.assistant .message-text {
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

/* ===== MARKDOWN FORMATTING ===== */
.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4 {
  margin: 16px 0 8px 0;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
}

.message-text h1 {
  font-size: 18px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
}

.message-text h2 {
  font-size: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.message-text h3 {
  font-size: 15px;
}

.message-text h4 {
  font-size: 14px;
}

.message-text h1:first-child,
.message-text h2:first-child,
.message-text h3:first-child,
.message-text h4:first-child {
  margin-top: 0;
}

.message-text p {
  margin: 8px 0;
  line-height: 1.6;
}

.message-text p:first-child {
  margin-top: 0;
}

.message-text p:last-child {
  margin-bottom: 0;
}

.message-text ul,
.message-text ol {
  margin: 8px 0;
  padding-left: 24px;
}

.message-text ul {
  list-style-type: disc;
}

.message-text ol {
  list-style-type: decimal;
}

.message-text li {
  margin: 4px 0;
  line-height: 1.5;
}

.message-text li > ul,
.message-text li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

.message-text strong {
  font-weight: 600;
  color: #4f46e5;
}

.message-text em {
  font-style: italic;
  color: #475569;
}

.message-text code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  color: #dc2626;
}

.message-text pre {
  background: #1e293b;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  overflow-x: auto;
}

.message-text pre code {
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

.message-text blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 12px;
  margin: 12px 0;
  color: #475569;
  font-style: italic;
}

.message-text hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}

.message-text a {
  color: #6366f1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.message-text a:hover {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.message-text table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 13px;
}

.message-text table th,
.message-text table td {
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  text-align: left;
}

.message-text table th {
  background: #f8fafc;
  font-weight: 600;
  color: #1e293b;
}

.message-text table tr:nth-child(even) {
  background: #f8fafc;
}

/* ===== CITATIONS ===== */
.message-citations {
  margin-top: 12px;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.citations-header {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.citation-item {
  margin-bottom: 8px;
  padding: 8px;
  background: #ffffff;
  border-radius: 6px;
  border-left: 2px solid #6366f1;
}

.citation-item:last-child {
  margin-bottom: 0;
}

.citation-source {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.citation-name {
  font-weight: 600;
  color: #1e293b;
  flex: 1 1;
  font-size: 11px;
}

.citation-score {
  font-size: 10px;
  padding: 2px 6px;
  background: #6366f1;
  color: white;
  border-radius: 8px;
}

.citation-content {
  font-size: 11px;
  color: #475569;
  font-style: italic;
  line-height: 1.4;
  padding: 6px 8px;
  background: #f8fafc;
  border-radius: 4px;
}

/* ===== SUGGESTED QUESTIONS ===== */
.suggested-questions {
  margin-top: 12px;
  padding: 12px;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

.suggestions-header {
  font-size: 12px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 8px;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-btn {
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  color: #0369a1;
  transition: all 0.15s ease;
}

.suggestion-btn:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #6366f1;
}

.suggestion-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== MESSAGE FOOTER ===== */
.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.message-time {
  font-size: 11px;
  color: #94a3b8;
}

.message-feedback {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message:hover .message-feedback {
  opacity: 1;
}

.feedback-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.feedback-btn:hover {
  border-color: #6366f1;
  background: #f8fafc;
}

.feedback-btn.active {
  border-color: #6366f1;
  background: #eff6ff;
  color: #6366f1;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-items: center;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ===== CHAT INPUT AREA ===== */
.chat-input-container {
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.uploaded-files {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 80px;
  overflow-y: auto;
}

.uploaded-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #eff6ff;
  border-radius: 16px;
  font-size: 12px;
  border: 1px solid #bae6fd;
  color: #1e40af;
}

.file-name {
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: #64748b;
  font-size: 10px;
}

.remove-file-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.remove-file-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.input-actions {
  display: flex;
  align-items: flex-end;
}

.file-upload-btn {
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-upload-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #6366f1;
  color: #6366f1;
}

.file-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input {
  flex: 1 1;
  min-height: 40px;
  max-height: 100px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  transition: all 0.15s ease;
  background: #ffffff;
  color: #1e293b;
  overflow-y: auto;
}

.chat-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.chat-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.chat-input::placeholder {
  color: #94a3b8;
}

.send-button {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.send-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.send-button:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* ===== LOADING STATES ===== */
.loading-conversations,
.no-conversations {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 15px;
  color: #64748b;
  text-align: center;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.start-conversation-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
}

.start-conversation-btn:hover {
  background: #4f46e5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .conversation-sidebar {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .project-chat-interface {
    flex-direction: column;
  }
  
  .conversation-sidebar {
    width: 100%;
    height: 120px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .sidebar-header {
    padding: 12px 16px 8px;
  }
  
  .sidebar-header h3 {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .conversations-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 16px;
  }
  
  .conversation-item {
    min-width: 140px;
    margin-right: 8px;
    margin-bottom: 0;
  }
  
  .chat-main {
    height: calc(100vh - 120px);
  }
  
  .chat-header {
    padding: 10px 16px;
  }
  
  .project-description-bar {
    padding: 6px 16px;
  }
  
  .chat-input-container {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .conversation-sidebar {
    height: 100px;
  }
  
  .chat-main {
    height: calc(100vh - 100px);
  }
  
  .project-title {
    font-size: 14px;
  }
  
  .project-meta {
    font-size: 11px;
  }
  
  .file-upload-btn,
  .send-button {
    width: 36px;
    height: 36px;
  }
  
  .chat-input {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 36px;
  }
  
  .message-text {
    font-size: 13px;
  }
}

/* ===== ACCESSIBILITY ===== */
.feedback-btn:focus,
.suggestion-btn:focus,
.file-upload-btn:focus,
.send-button:focus,
.back-btn:focus {
  outline: 2px solid #6366f1;
  outline-offset: 1px;
}

/* ===== ANIMATIONS ===== */
.message {
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ── Clipboard guard (anti copy-paste) ─────────────────────── */
.clipboard-warning {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  font-size: 13px;
}

/* PromptQualityHint + subtask context banner styles
 * Visually consistent with ProjectChatInterface.css palette
 * (#1e3a8a, #0f766e, #1e293b, #f1f5f9)
 */

/* ─── Per-message hint card ─── */
.prompt-quality-hint {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid transparent;
  animation: hint-fade-in 0.3s ease;
}

@keyframes hint-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.prompt-quality-hint.pending {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.prompt-quality-hint.good {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.prompt-quality-hint.needs-work {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.prompt-quality-hint.unscored {
  background: #f8fafc;
  border-color: #cbd5e0;
  color: #475569;
}

.hint-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-icon {
  font-size: 14px;
}

.hint-status {
  font-weight: 600;
  flex: 1 1;
}

.hint-score {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.3px;
}

.hint-score-max {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.hint-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: hint-spin 0.8s linear infinite;
}

@keyframes hint-spin {
  to { transform: rotate(360deg); }
}

.hint-recommendation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-style: italic;
}

.hint-dimensions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dim-row {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  grid-gap: 8px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.dim-label {
  color: #475569;
  font-weight: 500;
}

.dim-bar-track {
  height: 5px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #1e3a8a);
  border-radius: 999px;
}

.dim-value {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: #64748b;
}

/* ─── Subtask context banner (top of chat) ─── */
.subtask-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.subtask-banner-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1;
  min-width: 240px;
}

.subtask-banner-icon {
  font-size: 22px;
  line-height: 1;
}

.subtask-banner-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.subtask-banner-brief {
  font-size: 11px;
  opacity: 0.85;
  max-width: 520px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subtask-banner-right {
  min-width: 240px;
}

.threshold-gauge {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.threshold-gauge-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.threshold-met-badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.threshold-gauge-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.threshold-gauge-fill {
  height: 100%;
  background: #fff;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.threshold-gauge-fill.complete {
  background: #34d399;
}

.threshold-gauge-pending {
  font-size: 10px;
  opacity: 0.75;
  font-style: italic;
}

.threshold-gauge-loading {
  font-size: 12px;
  opacity: 0.7;
}

/* ============================================
   Production Project Dashboard Styles
   Indigo theme matching sidebar layout
   ============================================ */

/* ============================================
   Project Creation — constrained width
   ============================================ */

.project-creation {
  max-width: 640px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 32px;
}

.project-creation-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e1b4b;
  margin: 0 0 4px;
}

.project-creation-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 24px;
}

.project-creation-form label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.project-creation-form input,
.project-creation-form textarea,
.project-creation-form select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}

.project-creation-form input:focus,
.project-creation-form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.creation-tips {
  display: none;
}

/* ============================================
   Modal Overlay
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal-content {
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
}

/* ============================================
   Multi Project Dashboard
   ============================================ */

.multi-project-dashboard {
  display: flex;
  flex-direction: column;
}

.dashboard-content {
  flex: 1 1;
  width: 100%;
}

/* ============================================
   Project List
   ============================================ */

.project-list {
  padding: 0;
}

.project-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.project-list-header .header-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.project-list-header .header-content p {
  color: #64748b;
  margin: 0;
  font-size: 15px;
}

.project-list-header .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.btn-icon {
  font-size: 18px;
}

/* ============================================
   Loading & Error States
   ============================================ */

.project-list-loading,
.project-list-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: white;
  border-radius: 16px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.project-list-error p {
  color: #64748b;
  margin-bottom: 20px;
  font-size: 16px;
}

/* ============================================
   Empty State
   ============================================ */

.empty-projects {
  text-align: center;
  padding: 80px 32px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-radius: 12px;
  border: 2px dashed #6366f1;
}

.empty-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.8;
}

.empty-projects h3 {
  font-size: 24px;
  color: #1e293b;
  margin-bottom: 12px;
  font-weight: 700;
}

.empty-projects p {
  color: #64748b;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-size: 15px;
}

.empty-projects .btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ============================================
   Projects Grid
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}

/* ============================================
   Project Card
   ============================================ */

.project-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.project-card.selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* ============================================
   Project Card Header
   ============================================ */

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-type {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.project-type[data-type="research"],
.project-type {
  background: #fef3c7;
  color: #92400e;
}

.project-type[data-type="case_study"] {
  background: #dbeafe;
  color: #1e40af;
}

.project-type[data-type="industry"] {
  background: #e0e7ff;
  color: #3730a3;
}

.type-icon {
  font-size: 16px;
}

.type-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.created-badge {
  background: #6366f1;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.status-badge.active {
  color: #16a34a;
}

.status-badge.overdue {
  color: #dc2626;
}

/* ============================================
   Project Card Content
   ============================================ */

.project-card-content {
  margin-bottom: 16px;
  flex: 1 1;
}

.project-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.project-description {
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  font-size: 13px;
  max-height: 64px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ============================================
   Project Card Footer
   ============================================ */

.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.project-dates {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-item {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
}

.date-item.overdue {
  color: #dc2626;
}

.date-item.due-soon {
  color: #f59e0b;
}

.project-actions {
  display: flex;
  gap: 8px;
}

.project-actions .btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
}

/* ============================================
   Selected Indicator
   ============================================ */

.selected-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #6366f1;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* ============================================
   Project List Footer
   ============================================ */

.project-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background: #eef2ff;
  color: #6366f1;
}

.stat-icon-green {
  background: #ecfdf5;
  color: #10b981;
}

.stat-icon-orange {
  background: #fff7ed;
  color: #f59e0b;
}

.stat-number {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #1e1b4b;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* ============================================
   Buttons - Professional Styling
   ============================================ */

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary,
button.btn-primary,
.project-list-header .btn-primary,
.empty-projects .btn-primary,
.project-actions .btn-primary {
  background: #6366f1 !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25) !important;
  border: none !important;
  border-radius: 8px !important;
}

.btn-primary:hover,
button.btn-primary:hover,
.project-list-header .btn-primary:hover,
.empty-projects .btn-primary:hover,
.project-actions .btn-primary:hover {
  background: #4f46e5 !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #64748b;
  color: white;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .dashboard-content {
    padding: 24px;
  }
}

@media (max-width: 768px) {

  .dashboard-content {
    padding: 20px;
  }

  .project-list {
    padding: 24px;
  }

  .project-list-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .project-list-header .btn {
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .project-actions {
    width: 100%;
  }

  .project-actions .btn-sm {
    flex: 1 1;
  }

  .project-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .stat-number {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .dashboard-header {
    padding: 16px 20px;
  }

  .dashboard-title {
    font-size: 20px;
  }

  .project-list {
    padding: 20px;
  }

  .project-card {
    padding: 20px;
  }

  .empty-projects {
    padding: 60px 24px;
  }

  .empty-icon {
    font-size: 56px;
  }
}

/* ============================================
   My Tasks — Indigo Design System
   Full-width, compact, SVG icons only
   ============================================ */

.mt-container {
  padding: 0;
  max-width: 100%;
}

/* ─── Header ─── */
.mt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mt-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mt-header__icon {
  display: flex;
  color: #6366f1;
}

.mt-header__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.3px;
}

.mt-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #6366f1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mt-refresh:hover:not(:disabled) {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.mt-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Alert ─── */
.mt-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.mt-alert svg { flex-shrink: 0; }

/* ─── Stats row ─── */
.mt-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}

.mt-stat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mt-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.mt-stat__icon--total   { background: #eef2ff; color: #6366f1; }
.mt-stat__icon--pending { background: #fef3c7; color: #d97706; }
.mt-stat__icon--done    { background: #dcfce7; color: #16a34a; }
.mt-stat__icon--overdue { background: #fee2e2; color: #dc2626; }
.mt-stat__icon--soon    { background: #ffedd5; color: #ea580c; }

.mt-stat__val {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.mt-stat__val--amber  { color: #d97706; }
.mt-stat__val--green  { color: #16a34a; }
.mt-stat__val--red    { color: #dc2626; }
.mt-stat__val--orange { color: #ea580c; }

.mt-stat__label {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ─── Filters ─── */
.mt-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 18px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mt-filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 140px;
}

.mt-filter__label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mt-filter__select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width=%2712%27 height=%2712%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%239ca3af%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.mt-filter__select:hover {
  border-color: #c7d2fe;
}

.mt-filter__select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* ─── Task list ─── */
.mt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Task card ─── */
.mt-task {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mt-task:hover {
  border-color: #c7d2fe;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(99, 102, 241, 0.06);
}

.mt-task--done {
  opacity: 0.6;
  background: #fafafa;
}

.mt-task--overdue {
  border-left: 3px solid #dc2626;
}

/* Custom checkbox */
.mt-task__check {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
}

.mt-task__check input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  z-index: 1;
}

.mt-task__checkmark {
  position: absolute;
  inset: 0;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mt-task__check input:checked + .mt-task__checkmark {
  background: #6366f1;
  border-color: #6366f1;
}

.mt-task__check input:checked + .mt-task__checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mt-task__check:hover .mt-task__checkmark {
  border-color: #6366f1;
}

/* Task body */
.mt-task__body {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mt-task__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mt-task__desc {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  flex: 1 1;
}

.mt-task--done .mt-task__desc {
  text-decoration: line-through;
  color: #9ca3af;
}

/* Status badges */
.mt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.mt-badge svg { width: 12px; height: 12px; }

.mt-badge--done    { background: #dcfce7; color: #166534; }
.mt-badge--pending { background: #eef2ff; color: #4338ca; }
.mt-badge--overdue { background: #fee2e2; color: #991b1b; }
.mt-badge--soon    { background: #fef3c7; color: #92400e; }

/* Meta chips */
.mt-task__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.mt-task__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
}

.mt-task__chip svg {
  color: #d1d5db;
}

.mt-task__chip--red { color: #dc2626; font-weight: 600; }
.mt-task__chip--red svg { color: #dc2626; }
.mt-task__chip--orange { color: #ea580c; font-weight: 600; }
.mt-task__chip--orange svg { color: #ea580c; }

/* Assignment info */
.mt-task__assign {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
  color: #9ca3af;
}

.mt-task__completed {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
  color: #16a34a;
  font-weight: 500;
}

.mt-task__completed svg { width: 13px; height: 13px; }

/* ─── Empty state ─── */
.mt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  padding: 56px 24px;
  text-align: center;
  color: #9ca3af;
}

.mt-empty svg { margin-bottom: 12px; }

.mt-empty__spinner {
  animation: mt-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes mt-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.mt-empty h3 {
  margin: 0 0 6px;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
}

.mt-empty p {
  margin: 0;
  font-size: 14px;
  max-width: 400px;
  line-height: 1.5;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .mt-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .mt-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mt-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .mt-filters {
    flex-direction: column;
  }

  .mt-filter {
    min-width: 100%;
  }

  .mt-task {
    padding: 14px 16px;
  }

  .mt-task__top {
    flex-direction: column;
    gap: 6px;
  }

  .mt-task__meta {
    flex-direction: column;
    gap: 6px;
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .mt-task:hover { box-shadow: none !important; }
  .mt-empty__spinner { animation: none !important; }
}

/* ============================================
   Student Subtask List — Single Column Cards
   Indigo design system, SVG icons only
   ============================================ */

/* ─── Container ─── */
.st-container {
  padding: 0;
  max-width: 100%;
}

/* ─── Header ─── */
.st-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.st-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.st-header__icon {
  display: flex;
  align-items: center;
  color: #6366f1;
  flex-shrink: 0;
}

.st-header__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.3px;
}

.st-header__subtitle {
  display: none;
}

/* ─── Filter pills ─── */
.st-filters {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  flex-shrink: 0;
}

.st-filter {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #6b7280;
  font-family: inherit;
  transition: all 0.2s ease;
}

.st-filter:hover {
  color: #374151;
}

.st-filter--active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

/* ─── Error alert ─── */
.st-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.st-alert svg { flex-shrink: 0; }

.st-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* ─── Card list (single column) ─── */
.st-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Card ─── */
.st-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.st-card:hover {
  border-color: #c7d2fe;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(99, 102, 241, 0.07);
}

.st-card:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* ─── Card top: title + status ─── */
.st-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.st-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

/* ─── Status badge (text only, no bg pill) ─── */
.st-status {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.st-status--not-started   { color: #9ca3af; }
.st-status--in-progress   { color: #6366f1; }
.st-status--awaiting-test { color: #d97706; }
.st-status--test-passed   { color: #059669; }
.st-status--submitted     { color: #7c3aed; }
.st-status--approved      { color: #16a34a; }
.st-status--rejected      { color: #dc2626; }
.st-status--flagged       { color: #ea580c; }

/* ─── Project name ─── */
.st-card__project {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

.st-card__project svg {
  color: #d1d5db;
  flex-shrink: 0;
}

/* ─── Brief ─── */
.st-card__brief {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Progress bar ─── */
.st-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.st-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.st-progress__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.st-progress__label svg {
  color: #9ca3af;
}

.st-progress__pct {
  font-size: 14px;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.st-progress__pct.st-bar--green  { color: #16a34a; }
.st-progress__pct.st-bar--indigo { color: #6366f1; }
.st-progress__pct.st-bar--gray  { color: #d1d5db; }

.st-progress__track {
  height: 5px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.st-progress__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.st-progress__fill.st-bar--green  { background: #16a34a; }
.st-progress__fill.st-bar--indigo { background: #6366f1; }
.st-progress__fill.st-bar--gray  { background: #e5e7eb; }

/* ─── Meta chips ─── */
.st-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 5px 10px;
}

.st-chip svg {
  color: #9ca3af;
}

/* ─── CTA ─── */
.st-card__cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #6366f1;
  margin-top: 2px;
}

.st-card__cta svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.st-card:hover .st-card__cta svg {
  transform: translateX(4px);
}

/* ─── Empty state ─── */
.st-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  padding: 56px 24px;
  text-align: center;
  color: #9ca3af;
}

.st-empty svg {
  margin-bottom: 16px;
}

.st-empty__spinner {
  animation: st-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes st-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.st-empty h3 {
  margin: 0 0 8px;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
}

.st-empty p {
  margin: 0;
  font-size: 14px;
  max-width: 400px;
  line-height: 1.5;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .st-container {
    padding: 20px 16px;
  }

  .st-header {
    flex-direction: column;
    gap: 16px;
  }

  .st-card {
    padding: 20px;
    border-radius: 14px;
  }

  .st-card__title {
    font-size: 16px;
  }

  .st-card__brief {
    font-size: 13px;
  }

  .st-chip {
    font-size: 11px;
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .st-card:hover { transform: none !important; }
  .st-card:hover .st-card__cta svg { transform: none !important; }
  .st-progress__fill { transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   Subtask Helper Badges + AI Hint / Mentor Pointer Callouts (Phase 7)
   ───────────────────────────────────────────────────────────────────
   Shared styles for helper markers and callout blocks.
   Used by StudentSubtaskList, SubtaskWorkspace, SubtaskManager.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Container row for badges ──────────────────────────────────── */
.card-helpers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ── Individual helper badge ───────────────────────────────────── */
.helper-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
  border: 1px solid transparent;
}

.helper-badge svg {
  flex-shrink: 0;
}

.helper-badge.helper-ai {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}

.helper-badge.helper-academic {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.helper-badge.helper-corporate {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}

.helper-badge.helper-student {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.helper-badge.helper-template {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

/* ── AI hint callout (cyan) ────────────────────────────────────── */
.card-ai-hint,
.workspace-ai-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #ecfeff;
  border-left: 3px solid #22d3ee;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #155e75;
  line-height: 1.5;
}

.card-ai-hint svg,
.workspace-ai-hint svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #06b6d4;
}

.workspace-ai-hint {
  font-size: 14px;
  padding: 12px 16px;
}

.workspace-ai-hint strong {
  color: #0e7490;
  margin-right: 4px;
}

/* ── Mentor pointer callout (orange) ───────────────────────────── */
.card-mentor-pointer,
.workspace-mentor-pointer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff7ed;
  border-left: 3px solid #fb923c;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #9a3412;
  line-height: 1.5;
}

.card-mentor-pointer svg,
.workspace-mentor-pointer svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #f97316;
}

.workspace-mentor-pointer {
  font-size: 14px;
  padding: 12px 16px;
}

.workspace-mentor-pointer strong {
  color: #c2410c;
  margin-right: 4px;
}

/* ── SubtaskWorkspace banner ───────────────────────────────────── */
.workspace-helpers-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 16px 0;
}

.workspace-helpers-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.workspace-helpers-row:last-child {
  margin-bottom: 0;
}

.helpers-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-right: 4px;
}

/* ── SubtaskManager tweaks ─────────────────────────────────────── */
.subtask-hints {
  margin: 8px 0 12px 0;
}

/* OriginalityReportView — modal overlay */

.originality-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  z-index: 1000;
  overflow-y: auto;
}

.originality-modal {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 760px;
  padding: 28px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: originality-pop 0.2s ease;
}

@keyframes originality-pop {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0);     }
}

.originality-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.originality-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  color: #1e293b;
}

.originality-filename {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.originality-header-actions {
  display: flex;
  gap: 4px;
}

.originality-close-btn,
.originality-refresh-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.originality-close-btn:hover,
.originality-refresh-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.originality-pending {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
}

.originality-error {
  padding: 16px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
}

.originality-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 20px;
}

.score-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.score-card.score-good {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.score-card.score-warn {
  background: #fffbeb;
  border-color: #fcd34d;
}

.score-card.score-bad {
  background: #fee2e2;
  border-color: #fca5a5;
}

.score-card.score-secondary {
  background: #f1f5f9;
}

.score-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  font-weight: 600;
}

.score-value {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
  letter-spacing: -0.5px;
}

.score-meta {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.originality-flag-banner {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}

.originality-note {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding: 10px 14px;
  font-size: 12px;
  color: #1e3a8a;
  margin-bottom: 18px;
}

.originality-section {
  margin-top: 20px;
  border-top: 1px solid #e2e8f0;
  padding-top: 18px;
}

.originality-section h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #1e293b;
}

.section-help {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
}

.match-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.match-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid;
}

.match-item.verbatim {
  background: #fef2f2;
  border-color: #fecaca;
}

.match-item.semantic {
  background: #fffbeb;
  border-color: #fde68a;
}

.match-snippet {
  color: #1e293b;
  font-style: italic;
  margin-bottom: 4px;
  line-height: 1.4;
}

.match-meta {
  font-size: 10px;
  color: #64748b;
}

.match-more {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 8px;
  font-style: italic;
}

.originality-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #94a3b8;
}

.hint-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: hint-spin 0.8s linear infinite;
}

@keyframes hint-spin {
  to { transform: rotate(360deg); }
}

/* CompetencyTestRunner — modal with paste-blocked short-answer inputs */

.competency-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 20px;
  z-index: 1000;
  overflow-y: auto;
}

.competency-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 820px;
  padding: 26px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.competency-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.competency-header h2 {
  margin: 0;
  font-size: 22px;
  color: #1e293b;
}

.competency-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.competency-close-btn:hover {
  background: #f1f5f9;
}

.alert.alert-error,
.alert.alert-info,
.alert.alert-warning,
.alert.alert-success {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}

.alert.alert-error   { background: #fee2e2; color: #991b1b; }
.alert.alert-info    { background: #dbeafe; color: #1e40af; }
.alert.alert-warning { background: #fef3c7; color: #92400e; }
.alert.alert-success { background: #d1fae5; color: #065f46; }

/* ─── Overview pane ─── */
.overview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 22px;
}

.overview-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.overview-pane h3 {
  margin: 18px 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.4px;
}

.attempts-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attempt-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px 1fr;
  grid-gap: 10px;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  align-items: center;
}

.attempt-passed { background: #ecfdf5; }
.attempt-failed { background: #fef2f2; }
.attempt-in_progress { background: #fffbeb; }

.attempt-number { font-weight: 700; color: #0f172a; }
.attempt-status { text-transform: uppercase; font-size: 10px; font-weight: 600; }
.attempt-score  { font-weight: 700; text-align: right; }
.attempt-date   { color: #64748b; font-size: 11px; text-align: right; }

.overview-cta {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-rules {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 8px;
}

.muted {
  color: #94a3b8;
  font-size: 12px;
}

/* ─── Taking pane ─── */
.taking-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.taking-meta {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 6px;
}

.question-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
}

.question-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
}

.question-type-badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #1e3a8a;
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  font-weight: 600;
}

.question-prompt {
  font-size: 14px;
  color: #1e293b;
  line-height: 1.5;
  margin-bottom: 10px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

.option-row:hover {
  background: #f1f5f9;
}

.short-answer-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 100px;
}

.short-answer-input:focus {
  outline: none;
  border-color: #0d9488;
}

.taking-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.btn {
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
  color: #fff;
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.btn-secondary:hover { background: #e2e8f0; }

/* ─── Submitting pane ─── */
.submitting-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 20px;
  text-align: center;
  color: #475569;
}

.hint-spinner.large {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

/* ─── Result pane ─── */
.result-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 12px;
  margin-bottom: 22px;
}

.result-passed {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.result-failed {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

.result-emoji {
  font-size: 44px;
}

.result-title {
  font-size: 22px;
  font-weight: 700;
}

.result-score {
  font-size: 14px;
  margin-top: 4px;
  opacity: 0.9;
}

.response-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.response-card {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
}

.response-card.correct      { background: #ecfdf5; border-color: #6ee7b7; }
.response-card.incorrect    { background: #fef2f2; border-color: #fecaca; }
.response-card.plag-flagged { background: #fef3c7; border-color: #fcd34d; }

.response-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.response-points {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
}

.response-feedback {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

.response-plag {
  margin-top: 6px;
  font-size: 11px;
  color: #92400e;
  font-weight: 600;
}

.result-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ── Scoring transparency + post-test debrief ─────────────────── */
.scoring-explainer {
  margin: 12px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
}
.scoring-explainer summary { cursor: pointer; font-weight: 600; color: #334155; }
.scoring-explainer ul { margin: 8px 0 0; padding-left: 18px; color: #475569; }
.scoring-explainer li { margin-bottom: 4px; }

.debrief-card {
  margin: 14px 0;
  padding: 14px 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}
.debrief-summary { font-size: 14px; color: #0c4a6e; margin: 0 0 10px; }
.debrief-section { margin: 10px 0; }
.debrief-section h4 { margin: 0 0 6px; font-size: 13px; color: #334155; }
.debrief-section ul { margin: 0; padding-left: 18px; font-size: 13px; color: #475569; }
.debrief-nudge {
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 13px;
  color: #065f46;
}
.reread-item { margin: 6px 0; font-size: 13px; color: #475569; }
.reread-item summary { cursor: pointer; }
.reread-excerpt {
  margin: 6px 0 0 12px;
  padding: 8px 10px;
  background: #fff;
  border-left: 3px solid #38bdf8;
  color: #475569;
  font-size: 12.5px;
}
.response-rationale {
  margin-top: 6px;
  font-size: 12.5px;
  color: #64748b;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 6px;
}
.rationale-locked-note { font-size: 12.5px; }
/* Scoped name — .btn-link already exists globally in index.css */
.ctr-btn-link {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 12.5px;
  padding: 0 4px;
  text-decoration: underline;
}
.ctr-btn-link:disabled { color: #94a3b8; cursor: default; }

/* CompletionVerdict — final rubric verdict modal */

.verdict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 20px;
  z-index: 1100;
  overflow-y: auto;
}

.verdict-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 760px;
  padding: 28px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.verdict-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.verdict-header h2 {
  margin: 0;
  font-size: 22px;
  color: #1e293b;
}

.verdict-close {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.verdict-close:hover {
  background: #f1f5f9;
}

.verdict-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.verdict-pass     { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.verdict-revision { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.verdict-fail     { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; }

.verdict-emoji {
  font-size: 44px;
}

.verdict-label {
  font-size: 22px;
  font-weight: 700;
}

.verdict-score {
  font-size: 14px;
  margin-top: 4px;
  opacity: 0.9;
}

.verdict-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.verdict-section h3 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #475569;
}

.rubric-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rubric-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 14px;
}

.rubric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.rubric-criterion {
  font-weight: 600;
  color: #1e293b;
}

.rubric-meta {
  font-size: 11px;
  color: #64748b;
}

.rubric-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.rubric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a, #0f766e);
  border-radius: 999px;
}

.rubric-justification {
  margin: 8px 0 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  font-style: italic;
}

.verdict-text-block {
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 8px;
}

.verdict-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.verdict-meta {
  font-size: 11px;
  color: #94a3b8;
}

/* SubmissionPanel — sits in the SubtaskWorkspace right rail */

.submission-panel {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.submission-panel-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #1e293b;
}

.submission-panel-help {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.submission-uploader {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

.competency-launch-btn {
  display: inline-block;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #6366f1;
  color: #6366f1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.competency-launch-btn:hover {
  background: #eef2ff;
}

.completion-launch-btn {
  display: inline-block;
  padding: 10px 16px;
  background: #6366f1;
  border: none;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.completion-launch-btn:hover {
  background: #4f46e5;
}

.completion-launch-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.view-verdict-btn {
  display: inline-block;
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: #475569;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.view-verdict-btn:hover {
  background: #f1f5f9;
}

.uploader-button {
  display: block;
  padding: 10px 16px;
  background: #6366f1;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-user-select: none;
          user-select: none;
  text-align: center;
}

.uploader-button:hover {
  transform: translateY(-1px);
}

.uploader-button input[type='file'] {
  display: none;
}

.submission-empty {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 12px;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
}

.submission-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
}

.submission-item.flagged {
  background: #fff7ed;
  border-color: #fdba74;
}

.submission-item-main {
  flex: 1 1;
  min-width: 0;
}

.submission-item-name {
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.submission-item-meta {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.submission-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.submission-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-pending  { background: #f1f5f9; color: #475569; }
.badge-good     { background: #d1fae5; color: #065f46; }
.badge-flagged  { background: #fed7aa; color: #9a3412; }
.badge-error    { background: #fee2e2; color: #991b1b; }
.badge-neutral  { background: #e2e8f0; color: #334155; }

.submission-score {
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: 6px;
  min-width: 28px;
  text-align: center;
}

.submission-report-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  color: #0f766e;
  font-weight: 600;
}

.submission-report-btn:hover {
  background: #f0fdfa;
  border-color: #0d9488;
}

.alert.alert-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.alert.alert-info {
  background: #dbeafe;
  color: #1e40af;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}

/* ============================================
   Subtask Workspace — Full-page scroll layout
   Top: info card → submission → chat (stacked)
   ============================================ */

.subtask-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Top row: info + submission stacked vertically ── */
.sw-top-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Subtask info card */
.sw-info-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sw-info-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sw-info-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.2px;
}

.sw-info-card__type {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.sw-info-card__subtask {
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.sw-info-card__label {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

.sw-info-card__brief {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.sw-helpers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Submission card (below info, full width) */
.sw-submission-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

/* Indigo theme for submission buttons */
.sw-submission-card .btn-primary,
.sw-submission-card button[style*="background"] {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
}

.sw-submission-card .btn-primary:hover {
  background: #4f46e5 !important;
}

/* ── Bottom: Chat interface ── */
.sw-chat-area {
  min-height: 600px;
}

/* ── Threshold Gauge ── */
.sw-threshold {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.sw-threshold__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sw-threshold__count {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.sw-threshold__met {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

.sw-threshold__track {
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.sw-threshold__fill {
  height: 100%;
  background: #6366f1;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sw-threshold__fill--complete {
  background: #16a34a;
}

.sw-threshold__pending {
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
}

.sw-threshold__hint {
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
}

/* Hide the subtask-context-banner inside ProjectChatInterface
   when rendered in SubtaskWorkspace (info is already in sw-info-card) */
.sw-chat-area .subtask-context-banner {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sw-chat-area {
    min-height: 400px;
  }
}

/* ═══════════════════════════════════════════════════
   Student Portal — Sidebar Layout
   Indigo theme matching login/signup pages
   ═══════════════════════════════════════════════════ */

/* Layout */
.sp-layout {
  display: flex;
  min-height: 100vh;
  background: #f4f5f7;
}

/* ─── Sidebar ─── */
.sp-sidebar {
  min-height: 100vh;
  background: #1e1b4b;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow: hidden;
}

/* Logo */
.sp-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sp-logo-icon {
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  flex-shrink: 0;
}

.sp-logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

/* Section labels */
.sp-sidebar-section {
  padding: 4px 0;
}

.sp-sidebar-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
  padding: 16px 20px 8px;
  text-transform: uppercase;
}

/* Nav items */
.sp-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
}

.sp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.12s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.sp-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.sp-nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.sp-nav-icon {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-nav-label {
  white-space: nowrap;
  overflow: hidden;
}

.sp-sidebar-spacer {
  flex: 1 1;
}

/* Profile */
.sp-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sp-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sp-profile-info {
  overflow: hidden;
}

.sp-profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-profile-role {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ─── Main content area ─── */
.sp-main {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

/* Top bar */
.sp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #ffffff;
  border-bottom: 1px solid #e8e8ec;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sp-topbar-left {
  display: flex;
  align-items: center;
}

.sp-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-topbar-brand-icon {
  width: 28px;
  height: 28px;
  background: #eef2ff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
}

.sp-topbar-brand-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e1b4b;
}

.sp-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-welcome {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}

.sp-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Content */
.sp-content {
  flex: 1 1;
  padding: 24px 28px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .sp-sidebar {
    width: 64px !important;
  }
  .sp-sidebar .sp-logo-text,
  .sp-sidebar .sp-sidebar-label,
  .sp-sidebar .sp-nav-label,
  .sp-sidebar .sp-profile-info {
    display: none;
  }
  .sp-main {
    margin-left: 64px !important;
  }
  .sp-content {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .sp-sidebar {
    width: 0 !important;
    overflow: hidden;
  }
  .sp-main {
    margin-left: 0 !important;
  }
  .sp-topbar {
    padding: 12px 16px;
  }
  .sp-content {
    padding: 12px;
  }
  .sp-welcome {
    display: none;
  }
}

/* ============================================
   Project Overview — Stacked Cards
   Indigo theme, SVG icons, full-width
   ============================================ */

.po-container {
  margin-top: 20px;
}

.po-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.po-header__title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.po-header__info {
  font-size: 12px;
  color: #6b7280;
}

/* ─── Filter bar ─── */
.po-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.po-filters__search {
  flex: 1 1;
  min-width: 180px;
  padding: 7px 12px;
  font-size: 13px;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
}

.po-filters__search:focus {
  border-color: #a5b4fc;
  background: #ffffff;
}

.po-filters__select {
  padding: 7px 10px;
  font-size: 13px;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.po-filters__select:focus {
  border-color: #a5b4fc;
}

.po-filters__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  white-space: nowrap;
}

.po-filters__toggle input {
  accent-color: #6366f1;
  cursor: pointer;
}

.po-filters__clear {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.po-filters__clear:hover {
  background: #e0e7ff;
}

/* Badge for student self-created projects (visible via the toggle) */
.po-self-created {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  white-space: nowrap;
}

/* ─── Card list ─── */
.po-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.po-card:hover {
  border-color: #c7d2fe;
}

/* Top row: title + badges */
.po-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.po-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1;
}

.po-card__type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #eef2ff;
  color: #6366f1;
  border-radius: 10px;
  flex-shrink: 0;
}

.po-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.2px;
}

.po-card__badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Status badges */
.po-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  text-transform: capitalize;
}

.po-status--active   { background: #dcfce7; color: #166534; }
.po-status--overdue  { background: #fee2e2; color: #991b1b; }
.po-status--critical { background: #fee2e2; color: #dc2626; }
.po-status--warning  { background: #fef3c7; color: #92400e; }
.po-status--inactive { background: #f3f4f6; color: #6b7280; }

.po-eng {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  text-transform: capitalize;
}

.po-eng--high    { background: #dcfce7; color: #166534; }
.po-eng--medium  { background: #fef3c7; color: #92400e; }
.po-eng--low     { background: #fee2e2; color: #991b1b; }
.po-eng--unknown { background: #f3f4f6; color: #6b7280; }

/* Description */
.po-card__desc {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* Meta chips */
.po-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.po-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
}

.po-chip svg {
  color: #d1d5db;
}

/* Action buttons */
.po-card__actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.po-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.po-action-btn:hover {
  border-color: #c7d2fe;
  color: #6366f1;
  background: #eef2ff;
}

.po-action-btn--primary {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

.po-action-btn--primary:hover {
  background: #4f46e5;
  color: #ffffff;
}

/* Empty state */
.po-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px;
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  text-align: center;
  color: #9ca3af;
}

.po-empty svg { margin-bottom: 12px; }
.po-empty h3 { margin: 0 0 6px; color: #374151; font-size: 16px; font-weight: 700; }
.po-empty p { margin: 0; font-size: 14px; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .po-card { padding: 16px; }
  .po-card__top { flex-direction: column; gap: 8px; }
  .po-card__actions { flex-wrap: wrap; }
}

/* ═══════════════════════════════
   Alerts Panel Styles
   ═══════════════════════════════ */
.ap-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.ap-header__left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827;
}

.ap-header__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.ap-count {
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
}

.ap-clear {
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
}

/* Filters */
.ap-filters {
  display: flex;
  gap: 4px;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.ap-filter {
  padding: 5px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.ap-filter:hover { color: #374151; }

.ap-filter--active {
  background: #6366f1;
  color: #ffffff;
}

/* Body */
.ap-body {
  padding: 16px 20px;
  min-height: 120px;
}

.ap-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  color: #6b7280;
}

.ap-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  text-align: center;
  color: #9ca3af;
}

.ap-empty h4 { margin: 8px 0 4px; color: #374151; font-size: 15px; font-weight: 700; }
.ap-empty p { margin: 0; font-size: 13px; }

/* Alert items */
.ap-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ap-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  transition: border-color 0.2s ease;
}

.ap-item--critical { border-left: 3px solid #dc2626; }
.ap-item--high     { border-left: 3px solid #ea580c; }

.ap-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  border-radius: 8px;
  color: #6b7280;
  flex-shrink: 0;
}

.ap-item__body { flex: 1 1; min-width: 0; }

.ap-item__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ap-item__project {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.ap-item__priority {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}

.ap-item__priority--critical { background: #fee2e2; color: #dc2626; }
.ap-item__priority--high     { background: #ffedd5; color: #ea580c; }
.ap-item__priority--medium   { background: #fef3c7; color: #92400e; }
.ap-item__priority--low      { background: #f3f4f6; color: #6b7280; }

.ap-item__msg {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.ap-item__meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
}

.ap-item__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ap-item__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s ease;
}

.ap-item__btn:hover {
  border-color: #c7d2fe;
  color: #6366f1;
  background: #eef2ff;
}

.ap-item__btn--dismiss:hover {
  border-color: #fecaca;
  color: #dc2626;
  background: #fef2f2;
}

/* Footer */
.ap-footer {
  padding: 12px 20px;
  border-top: 1px solid #f3f4f6;
}

.ap-dismiss-all {
  padding: 6px 14px;
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.ap-dismiss-all:hover {
  border-color: #fecaca;
  color: #dc2626;
}

/* InfoTooltip — dependency-free hover/focus tooltip on an "i" icon */

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #94a3b8;
  cursor: help;
  vertical-align: middle;
  outline: none;
}

.info-tip:hover,
.info-tip:focus {
  color: #6366f1;
}

.info-tip__bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  right: -8px;
  z-index: 50;
  width: 230px;
  padding: 8px 10px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}

.info-tip__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 12px;
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

.info-tip:hover .info-tip__bubble,
.info-tip:focus .info-tip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.task-details-section {
  margin-top: 2rem;
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.task-details-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #2c3e50;
}

.task-stats-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.stat-badge.stat-success {
  background: #d4edda;
  border-color: #c3e6cb;
}

.stat-badge.stat-warning {
  background: #fff3cd;
  border-color: #ffeaa7;
}

.stat-badge.stat-danger {
  background: #f8d7da;
  border-color: #f5c6cb;
}

.stat-badge.stat-info {
  background: #d1ecf1;
  border-color: #bee5eb;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

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

/* Student Task Summary */
.student-task-summary {
  margin-bottom: 2rem;
}

.student-task-summary h4 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  color: #2c3e50;
}

.student-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

.student-task-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
}

.student-task-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.student-task-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.task-stat {
  color: #6c757d;
}

.task-stat-success {
  color: #28a745;
  font-weight: 600;
}

.task-stat-pending {
  color: #ffc107;
  font-weight: 600;
}

.student-task-progress {
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  transition: width 0.3s ease;
}

/* Filters */
.task-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
}

.filter-group select,
.search-input {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
  min-width: 150px;
}

.search-group {
  flex: 1 1;
  min-width: 200px;
}

.search-input {
  width: 100%;
}

.filter-results {
  margin-left: auto;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

/* Task Table */
.task-table-container {
  overflow-x: auto;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

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

.task-table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.task-table th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

.task-table th.sortable:hover {
  background: #e9ecef;
}

.task-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
}

.task-table tr.task-completed {
  background: #f8f9fa;
  opacity: 0.8;
}

.task-table tr.task-pending:hover {
  background: #f8f9fa;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.875rem;
}

.status-icon.status-completed {
  background: #d4edda;
  color: #28a745;
}

.status-icon.status-pending {
  background: #fff3cd;
  color: #ffc107;
}

.task-description {
  max-width: 400px;
  line-height: 1.4;
  color: #2c3e50;
}

.date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.time-text {
  font-size: 0.75rem;
  color: #6c757d;
}

.not-completed,
.not-applicable {
  color: #adb5bd;
  font-style: italic;
}

.completion-time {
  font-weight: 600;
  color: #28a745;
}

.days-pending {
  font-weight: 600;
  color: #ffc107;
}

.days-pending.overdue {
  color: #dc3545;
  font-weight: 700;
}

.no-tasks {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .task-details-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-stats-summary {
    width: 100%;
  }

  .stat-badge {
    flex: 1 1;
    min-width: 0;
  }

  .student-task-grid {
    grid-template-columns: 1fr;
  }

  .task-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group,
  .search-group {
    width: 100%;
  }

  .filter-results {
    margin-left: 0;
    text-align: center;
  }

  .task-table {
    font-size: 0.75rem;
  }

  .task-table th,
  .task-table td {
    padding: 0.5rem;
  }

  .task-description {
    max-width: 200px;
  }
}

/* Student Assignment Modal and Cards Styles */

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

.large-modal {
  max-width: 1200px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #64748b;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.modal-body {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1 1;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Filters Section */
.filters-section {
  margin-bottom: 24px;
}

.search-bar {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.filter-row {
  display: flex;
  gap: 12px;
}

.filter-select {
  flex: 1 1;
  padding: 10px 16px;
  font-size: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* Students Grid */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-top: 20px;
}

/* Student Cards */
.student-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-card:hover {
  border-color: #0d9488;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
  transform: translateY(-2px);
}

.student-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.student-info {
  flex: 1 1;
  min-width: 0;
}

.student-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-email {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.student-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.detail-label {
  color: #64748b;
  font-weight: 500;
}

.detail-value {
  color: #1e293b;
  font-weight: 600;
}

.projects-count {
  background: #f0fdfa;
  color: #0f766e;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.student-card-footer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Loading and Empty States */
.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f1f5f9;
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state p {
  color: #64748b;
  font-size: 16px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
}

.empty-state p {
  margin: 0 0 24px 0;
  font-size: 16px;
  color: #64748b;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Button Variants */
.btn-danger {
  background: #ef4444;
  color: white;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Admin Assignment Management Styles */
.student-manager-assignments {
  padding: 24px;
}

.section-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.section-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #1e293b;
}

.section-header p {
  margin: 0;
  font-size: 16px;
  color: #64748b;
}

.assignments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.assignment-group-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.assignment-group-card:hover {
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
}

.assignment-student-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.student-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.meta-badge {
  background: #f0fdfa;
  color: #0f766e;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.assigned-managers-list {
  margin-top: 20px;
}

.managers-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.managers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manager-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.manager-item:hover {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.manager-info {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manager-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.manager-email {
  font-size: 13px;
  color: #64748b;
}

.assignment-date {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

.managers-selection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.manager-selection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.manager-selection-item:hover {
  background: #f0fdfa;
  border-color: #0d9488;
}

.modal-description {
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 14px;
}

/* Empty Managers State */
.empty-managers-state {
  padding: 24px;
  background: #fefce8;
  border: 2px dashed #fbbf24;
  border-radius: 8px;
  text-align: center;
}

.empty-managers-state p {
  margin: 0;
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .students-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .assignment-student-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .manager-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .student-card {
    padding: 16px;
  }

  .student-avatar {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .student-name {
    font-size: 15px;
  }

  .student-email {
    font-size: 12px;
  }

  .detail-label,
  .detail-value {
    font-size: 13px;
  }

  .section-header {
    flex-direction: column;
    gap: 16px;
  }
}

/* ═══════════════════════════════════════
   Student Assignment Modal — Indigo Theme
   ═══════════════════════════════════════ */

.sam-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: sam-fade 0.2s ease;
}

@keyframes sam-fade { from { opacity: 0; } to { opacity: 1; } }

.sam-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(0, 0, 0, 0.08);
  animation: sam-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sam-pop {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.sam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
}

.sam-header__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.sam-header__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sam-header__close:hover {
  background: #e5e7eb;
  color: #111827;
}

.sam-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Alerts */
.sam-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
}

.sam-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.sam-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

/* Search */
.sam-search {
  position: relative;
  margin-bottom: 12px;
}

.sam-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  display: flex;
}

.sam-search__input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.sam-search__input::placeholder { color: #9ca3af; }
.sam-search__input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08); background: #fff; }

/* Filters */
.sam-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sam-select {
  flex: 1 1;
  padding: 8px 28px 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width=%2710%27 height=%2710%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%239ca3af%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  transition: border-color 0.2s ease;
}

.sam-select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08); }

/* Student list */
.sam-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sam-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  transition: all 0.15s ease;
}

.sam-card:hover {
  background: #ffffff;
  border-color: #e5e7eb;
}

.sam-card__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 0;
}

.sam-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.sam-card__info {
  flex: 1 1;
  min-width: 0;
}

.sam-card__name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.sam-card__name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.sam-card__email {
  font-size: 12px;
  color: #9ca3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sam-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 12px;
  color: #6b7280;
}

.sam-dot { color: #d1d5db; }

.sam-card__projects {
  color: #6366f1;
  font-weight: 600;
}

.sam-assign-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.sam-assign-btn:hover { background: #4f46e5; }

/* Empty / Loading */
.sam-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
}

.sam-empty h3 { margin: 8px 0 4px; color: #374151; font-size: 15px; font-weight: 700; }
.sam-empty p { margin: 0; font-size: 13px; }

.sam-spinner {
  animation: sam-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes sam-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Footer */
.sam-footer {
  padding: 14px 24px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
}

.sam-close-btn {
  padding: 8px 20px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sam-close-btn:hover { background: #e5e7eb; }

@media (max-width: 640px) {
  .sam-modal { max-width: 95vw; margin: 16px; }
  .sam-filters { flex-direction: column; }
  .sam-card { flex-direction: column; align-items: stretch; }
  .sam-assign-btn { width: 100%; justify-content: center; }
}


/* ============================================
   Manager Dashboard — Sidebar Layout
   Indigo theme, matches Student Portal
   ============================================ */

/* ── Program / Cohort Filter Bar ── */
.md-pc-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.md-pc-filter__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.md-pc-filter__item label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.md-pc-filter__item select {
  padding: 8px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 140px;
}

.md-pc-filter__item select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* ─── Layout ─── */
.md-layout {
  display: flex;
  min-height: 100vh;
  background: #f4f5f7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ═══════════════════════════════
   Sidebar
   ═══════════════════════════════ */
.md-sidebar {
  width: 220px;
  min-height: 100vh;
  background: #1e1b4b;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow: hidden;
  transition: width 0.2s ease;
  padding: 0 0 12px;
}

.md-sidebar--collapsed {
  width: 64px;
}

.md-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.md-sidebar__logo:hover {
  background: rgba(255, 255, 255, 0.05);
}

.md-sidebar__brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.md-sidebar__section-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.8px;
  padding: 16px 18px 6px;
  text-transform: uppercase;
}

.md-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.md-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.md-sidebar__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.md-sidebar__item--active {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
  font-weight: 600;
}

.md-sidebar__badge {
  margin-left: auto;
  background: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.md-sidebar__create {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 8px 0;
  padding: 10px 12px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.md-sidebar__create:hover {
  background: #4f46e5;
}

.md-sidebar__spacer {
  flex: 1 1;
}

.md-sidebar__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.md-sidebar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.md-sidebar__username {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.md-sidebar__role {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ═══════════════════════════════
   Main area
   ═══════════════════════════════ */
.md-main {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

/* Top bar */
.md-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e8e8ec;
  position: sticky;
  top: 0;
  z-index: 50;
}

.md-topbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.md-topbar__brand {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e1b4b;
}

.md-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.md-topbar__welcome {
  font-size: 0.8rem;
  color: #6b7280;
}

.md-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.md-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: #6366f1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.md-refresh-btn:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
}

/* Content area */
.md-content {
  flex: 1 1;
  padding: 20px 24px;
}

/* ─── Stats row ─── */
.md-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 20px;
}

.md-stat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.md-stat--clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  -webkit-user-select: none;
          user-select: none;
}

.md-stat--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.08);
  border-color: #c7d2fe;
}

.md-stat--clickable:focus-visible {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.md-stat--clickable:active {
  transform: translateY(0);
}

.md-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.md-stat__icon--indigo { background: #eef2ff; color: #6366f1; }
.md-stat__icon--blue   { background: #dbeafe; color: #3b82f6; }
.md-stat__icon--red    { background: #fee2e2; color: #dc2626; }
.md-stat__icon--orange { background: #ffedd5; color: #ea580c; }

.md-stat__val {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.md-stat__val--red    { color: #dc2626; }
.md-stat__val--orange { color: #ea580c; }

.md-stat__label {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ─── Alert ─── */
.md-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* ─── Back button ─── */
.md-back-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6366f1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  font-family: inherit;
}

.md-back-btn:hover {
  color: #4338ca;
}

.md-page-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.md-page-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
}

.md-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.md-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.md-action-btn:hover {
  background: #4f46e5;
}

.md-danger-btn {
  padding: 6px 14px;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.md-danger-btn:hover {
  background: #fecaca;
}

/* ─── Empty state ─── */
.md-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  padding: 56px 24px;
  text-align: center;
  color: #9ca3af;
}

.md-empty svg { margin-bottom: 12px; }

.md-empty h3 {
  margin: 0 0 6px;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
}

.md-empty p {
  margin: 0 0 16px;
  font-size: 14px;
  max-width: 400px;
}

/* ─── My Students — stacked cards ─── */
.ms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ms-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.ms-card:hover {
  border-color: #c7d2fe;
}

.ms-card__main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ms-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.ms-card__info {
  flex: 1 1;
  min-width: 0;
}

.ms-card__name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.ms-card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.2px;
}

.ms-card__email {
  font-size: 13px;
  color: #9ca3af;
}

.ms-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

.ms-card__dot {
  color: #d1d5db;
}

.ms-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.ms-card__stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ms-card__stat-val {
  font-size: 22px;
  font-weight: 800;
  color: #6366f1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.ms-card__stat-label {
  font-size: 13px;
  color: #6b7280;
}

/* Legacy grid (keep for backward compat) */
.students-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ═══════════════════════════════
   Responsive
   ═══════════════════════════════ */
@media (max-width: 1024px) {
  .md-sidebar { width: 64px; }
  .md-sidebar--collapsed { width: 64px; }
  .md-sidebar__brand,
  .md-sidebar__section-label,
  .md-sidebar__item span,
  .md-sidebar__badge,
  .md-sidebar__create span,
  .md-sidebar__user { display: none; }
  .md-main { margin-left: 64px !important; }
  .md-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .md-sidebar { display: none; }
  .md-main { margin-left: 0 !important; }
  .md-stats { grid-template-columns: 1fr 1fr; }
  .md-topbar { padding: 10px 16px; }
  .md-content { padding: 16px; }
  .md-topbar__welcome { display: none; }
  .students-grid { grid-template-columns: 1fr; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .md-sidebar { transition: none; }
  .md-main { transition: none; }
}

/* ═══════════════════════════════
   Legacy class overrides (used by sub-components)
   ═══════════════════════════════ */
.dashboard {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  min-height: auto;
  font-family: inherit;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.dashboard-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
}

.dashboard-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

.btn-primary:hover { background: #4f46e5; }

.btn-secondary {
  background: #ffffff;
  color: #374151;
  border-color: #e5e7eb;
}

.btn-secondary:hover { border-color: #c7d2fe; background: #eef2ff; color: #6366f1; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger:hover { background: #fecaca; }

.back-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6366f1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  font-family: inherit;
}

.back-btn:hover { color: #4338ca; }

/* Status badges */
.status-active  { background: #dcfce7; color: #166534; }
.status-overdue  { background: #fee2e2; color: #991b1b; }
.status-warning  { background: #fef3c7; color: #92400e; }
.status-critical { background: #fee2e2; color: #dc2626; font-weight: 700; }
.status-inactive { background: #f3f4f6; color: #6b7280; }

/* Alerts overrides */
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-warning { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; }

/* Empty state (legacy) */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  color: #9ca3af;
}

.empty-state-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: #374151; margin: 0 0 6px; }
.empty-state-description { font-size: 14px; margin: 0; }

/* Loading */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  color: #6b7280;
}

.spinner {
  border: 3px solid #e0e7ff;
  border-top: 3px solid #6366f1;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: md-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes md-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════
   Progress Summaries — Indigo overrides
   ═══════════════════════════════ */
.md-content .progress-summaries {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.md-content .summaries-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
}

.md-content .summaries-description {
  color: #6b7280;
  font-size: 13px;
}

.md-content .summary-generator {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.md-content .form-control {
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #f9fafb;
  outline: none;
  transition: all 0.2s ease;
}

/* Chevron indicator: only for actual <select> elements, not text inputs/textareas */
.md-content select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width=%2710%27 height=%2710%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%239ca3af%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  padding-right: 32px;
  cursor: pointer;
}

.md-content .form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
  background-color: #ffffff;
}

.md-content .control-group label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.md-content .summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.md-content .summary-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.md-content .summary-period {
  font-size: 13px;
  color: #6b7280;
}

.md-content .summary-timestamp {
  font-size: 12px;
  color: #9ca3af;
}

.md-content .activity-badge {
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
}

.md-content .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
}

.md-content .metric-item {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.md-content .metric-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.md-content .metric-label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.md-content .summary-content h5 {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.md-content .summary-text {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  padding: 16px;
}

.md-content .summary-line {
  color: #374151;
  font-size: 13px;
  line-height: 1.6;
}

.md-content .summary-actions {
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
  margin-top: 16px;
}

/* Summary markdown rendering */
.md-content .summary-markdown h1,
.md-content .summary-markdown h2,
.md-content .summary-markdown h3 {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 16px 0 8px;
  letter-spacing: -0.2px;
}

.md-content .summary-markdown h3:first-child {
  margin-top: 0;
}

.md-content .summary-markdown p {
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  margin: 0 0 10px;
}

.md-content .summary-markdown ul,
.md-content .summary-markdown ol {
  font-size: 13px;
  color: #374151;
  line-height: 1.65;
  margin: 0 0 12px;
  padding-left: 20px;
}

.md-content .summary-markdown li {
  margin-bottom: 4px;
}

.md-content .summary-markdown strong {
  color: #111827;
  font-weight: 600;
}

.md-content .summary-markdown em {
  color: #6b7280;
}

/* ═══════════════════════════════
   Student Metrics — Full Redesign
   ═══════════════════════════════ */
.sm-container { }

/* Stats */
.sm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}

.sm-stat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sm-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.sm-stat__icon--indigo { background: #eef2ff; color: #6366f1; }
.sm-stat__icon--blue   { background: #dbeafe; color: #3b82f6; }
.sm-stat__icon--green  { background: #dcfce7; color: #16a34a; }
.sm-stat__icon--orange { background: #ffedd5; color: #ea580c; }

.sm-stat__val {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.sm-stat__label {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Controls */
.sm-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.sm-period {
  font-size: 13px;
  color: #6b7280;
}

.sm-controls__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-select {
  padding: 7px 30px 7px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width=%2710%27 height=%2710%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%239ca3af%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  transition: border-color 0.2s ease;
}

.sm-select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08); }

.sm-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: #6366f1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sm-refresh:hover { border-color: #c7d2fe; background: #eef2ff; }

/* Sections */
.sm-section {
  margin-bottom: 24px;
}

.sm-section__title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cards */
.sm-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sm-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.sm-card:hover { border-color: #c7d2fe; }

.sm-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sm-card__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sm-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.sm-card__proj-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eef2ff;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sm-card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.sm-card__type {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  letter-spacing: 0.3px;
}

/* Engagement badge */
.sm-eng {
  font-size: 12px;
  font-weight: 600;
}

.sm-eng--high   { color: #16a34a; }
.sm-eng--medium { color: #d97706; }
.sm-eng--low    { color: #dc2626; }

/* Activity score */
.sm-card__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.sm-card__score-val {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #6366f1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.sm-card__score-label {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
}

/* Chips */
.sm-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sm-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #6b7280;
}

.sm-chip svg { color: #d1d5db; }

/* Empty */
.sm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  color: #9ca3af;
  text-align: center;
}

.sm-empty svg { margin-bottom: 8px; color: #d1d5db; }
.sm-empty p { margin: 0; font-size: 14px; }

/* Loading */
.sm-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
  color: #6b7280;
}

.sm-spinner {
  animation: sm-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes sm-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.sm-error { padding: 20px; }

/* Top Performers */
.sm-performers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
}

.sm-perf-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sm-perf-card__title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px;
}

.sm-perf-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid #f9fafb;
}

.sm-perf-row:last-child { border-bottom: none; }

.sm-perf-rank {
  font-weight: 700;
  color: #6366f1;
  width: 28px;
  flex-shrink: 0;
}

.sm-perf-name {
  flex: 1 1;
  color: #374151;
  font-weight: 500;
}

.sm-perf-val {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 900px) {
  .sm-stats { grid-template-columns: repeat(2, 1fr); }
  .sm-performers { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sm-controls { flex-direction: column; align-items: flex-start; }
  .sm-card__top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sm-card__chips { flex-direction: column; gap: 6px; }
}

/* Legacy override */
.md-content .student-metrics {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* ═══════════════════════════════
   Project Summary View — Expandable Table
   ═══════════════════════════════ */
.ps-container { }

/* Filter Bar */
.ps-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ps-filters__left {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.ps-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ps-filter label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ps-filter select {
  padding: 8px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ps-filter select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.ps-sort-dir {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #6366f1;
  font-weight: 700;
  transition: all 0.15s ease;
}

.ps-sort-dir:hover { border-color: #c7d2fe; background: #eef2ff; }

/* RAG Pills */
.ps-rag-pills {
  display: flex;
  gap: 4px;
}

.ps-rag-pill {
  padding: 7px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.ps-rag-pill:hover { border-color: #c7d2fe; }

.ps-rag-pill--active { background: #6366f1; color: #fff; border-color: #6366f1; }
.ps-rag-pill--red.ps-rag-pill--active { background: #ef4444; border-color: #ef4444; }
.ps-rag-pill--amber.ps-rag-pill--active { background: #f59e0b; border-color: #f59e0b; }
.ps-rag-pill--green.ps-rag-pill--active { background: #16a34a; border-color: #16a34a; }

/* Table Card */
.ps-table-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Table Header */
.ps-thead {
  display: grid;
  grid-template-columns: 2.5fr 1.2fr 0.7fr 0.6fr 0.5fr 0.8fr 0.7fr;
  padding: 10px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.ps-th {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Project Row */
.ps-project-group { }

.ps-project-row {
  display: grid;
  grid-template-columns: 2.5fr 1.2fr 0.7fr 0.6fr 0.5fr 0.8fr 0.7fr;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ps-project-row:hover { background: #f8f8fb; }
.ps-project-row--open { background: #fafaff; }

/* Cells */
.ps-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.ps-cell--name {
  gap: 10px;
}

.ps-cell--progress {
  gap: 10px;
}

.ps-cell--actions {
  justify-content: flex-end;
  gap: 4px;
}

.ps-cell--student {
  padding-left: 28px;
}

.ps-expand-icon {
  color: #9ca3af;
  flex-shrink: 0;
  display: flex;
}

.ps-project-icon {
  width: 32px;
  height: 32px;
  background: #eef2ff;
  color: #6366f1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ps-project-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.ps-project-meta {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.ps-type-badge {
  font-size: 10px;
  font-weight: 700;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Progress Bar */
.ps-bar-track {
  height: 6px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  flex: 1 1;
}

.ps-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

.ps-pct {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

/* Term-wide progress %, shown as muted secondary text next to the due-date pill */
.ps-term-pct {
  font-size: 11px;
  color: #9ca3af;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Quality */
.ps-quality {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Flags */
.ps-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.ps-flag--red { color: #dc2626; font-weight: 700; }
.ps-flag--red svg { color: #dc2626; }

/* RAG Overall dot (project row) */
.ps-rag-overall {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* RAG Dots (student row) */
.ps-rag-dots {
  display: flex;
  gap: 4px;
}

.ps-rag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  cursor: help;
}

/* Activity */
.ps-activity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
}

.ps-activity svg { color: #d1d5db; }

/* Action Buttons */
.ps-action-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ps-action-btn:hover { color: #6366f1; border-color: #c7d2fe; background: #eef2ff; }

/* Student Sub-Rows */
.ps-students {
  animation: ps-slide 0.25s ease;
}

@keyframes ps-slide {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Student sub-header */
.ps-sthead {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 1fr 0.7fr 0.5fr 0.5fr 0.8fr 0.8fr 0.8fr 0.7fr;
  padding: 8px 20px 8px 28px;
  background: #f3f4f8;
  border-bottom: 1px solid #e5e7eb;
}

.ps-sth {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ps-sth--student { padding-left: 42px; }

/* Student row */
.ps-student-row {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 1fr 0.7fr 0.5fr 0.5fr 0.8fr 0.8fr 0.8fr 0.7fr;
  align-items: center;
  padding: 12px 20px 12px 28px;
  background: #fafaff;
  border-bottom: 1px solid #eef2ff;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ps-student-row:hover { background: #f0f0ff; }

.ps-student-row:last-child { border-bottom: 1px solid #f3f4f6; }

/* Student cell */
.ps-scell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.ps-scell--student { gap: 10px; }

.ps-scell--progress { gap: 10px; }

.ps-student-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.ps-student-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.ps-student-email {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.ps-program {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Status badges */
.ps-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.ps-status-badge--green {
  background: #f0fdf4;
  color: #16a34a;
}

.ps-status-badge--amber {
  background: #fffbeb;
  color: #d97706;
}

.ps-status-badge--red {
  background: #fef2f2;
  color: #dc2626;
}

.ps-status-badge--grey {
  background: #f3f4f6;
  color: #9ca3af;
}

.ps-students-empty {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  background: #fafaff;
  border-bottom: 1px solid #f3f4f6;
}

/* Legend */
.ps-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding: 10px 16px;
  background: #f9fafb;
  border-radius: 10px;
}

.ps-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.ps-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Responsive */
@media (max-width: 1024px) {
  .ps-thead,
  .ps-project-row,
  .ps-student-row {
    grid-template-columns: 2fr 1fr 0.6fr 0.5fr 0.5fr 0.7fr 0.6fr;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .ps-filters { flex-direction: column; align-items: stretch; }
  .ps-filters__left { flex-wrap: wrap; }
  .ps-rag-pills { flex-wrap: wrap; }

  .ps-thead { display: none; }

  .ps-project-row,
  .ps-student-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ps-cell--name { width: 100%; }
  .ps-cell--student { padding-left: 0; }
  .ps-legend { flex-wrap: wrap; }
}

/* ═══════════════════════════════
   Traffic Light Table (Student Overview)
   ═══════════════════════════════ */
.tl-container { }

.tl-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tl-pills {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
}

.tl-pill {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.tl-pill:hover { color: #374151; }

.tl-pill--active { background: #6366f1; color: #ffffff; box-shadow: 0 1px 4px rgba(99,102,241,0.3); }
.tl-pill--active.tl-pill--red { background: #dc2626; }
.tl-pill--active.tl-pill--amber { background: #d97706; color: #fff; }
.tl-pill--active.tl-pill--green { background: #16a34a; }

.tl-selects {
  display: flex;
  gap: 8px;
}

/* Rows */
.tl-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #d1d5db;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Row top line */
.tl-row__top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tl-row__student {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  flex-shrink: 0;
}

.tl-row__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.tl-row__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.tl-row__email {
  display: block;
  font-size: 11px;
  color: #9ca3af;
}

.tl-row__program {
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.tl-row__project {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-row__progress {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  flex-shrink: 0;
}

/* Due-date pill: due_done/due_total coloured by rag.progress (grey = nothing due yet) */
.tl-due-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tl-due-pill--green { background: #f0fdf4; color: #16a34a; }
.tl-due-pill--amber { background: #fffbeb; color: #d97706; }
.tl-due-pill--red { background: #fef2f2; color: #dc2626; }
.tl-due-pill--grey { background: #f3f4f6; color: #9ca3af; }

/* Term-wide progress %, shown as muted secondary text next to the due-date pill */
.tl-row__term-pct {
  font-size: 11px;
  color: #9ca3af;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tl-row__quality {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  min-width: 28px;
  text-align: center;
}

.tl-row__flagged {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
}

.tl-row__flagged svg { color: #d1d5db; }
.tl-row__flagged--red { color: #dc2626; font-weight: 700; }
.tl-row__flagged--red svg { color: #dc2626; }

/* Row bottom line (meta) */
.tl-row__bottom {
  display: flex;
  gap: 16px;
  padding-left: 44px; /* align with name after avatar */
}

.tl-row__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9ca3af;
}

.tl-row__chip svg { color: #d1d5db; }

/* Legend */
.tl-legend {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding: 14px 18px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  font-size: 12px;
  color: #6b7280;
}

.tl-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tl-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Responsive */
@media (max-width: 900px) {
  .tl-row__top { flex-wrap: wrap; }
  .tl-row__student { min-width: 160px; }
  .tl-row__progress { min-width: 100px; }
  .tl-toolbar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .tl-row__top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tl-row__bottom { padding-left: 0; flex-wrap: wrap; }
  .tl-pills { flex-wrap: wrap; }
  .tl-selects { flex-direction: column; width: 100%; }
  .tl-selects .sm-select { width: 100%; }
}

/* ═══════════════════════════════
   Flagged Submissions
   ═══════════════════════════════ */
.fs-container { }

.fs-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.fs-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #dc2626;
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Card top */
.fs-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.fs-card__left {
  display: flex;
  gap: 14px;
  flex: 1 1;
}

.fs-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.fs-card__name {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.fs-card__subtask {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.fs-card__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9ca3af;
}

.fs-chip svg { color: #d1d5db; }

/* Right: verdict + score */
.fs-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.fs-verdict {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fs-verdict--fail { background: #dc2626; color: #fff; }
.fs-verdict--warn { background: #fef3c7; color: #92400e; }
.fs-verdict--neutral { background: #f3f4f6; color: #6b7280; }

.fs-card__score {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.fs-card__score-num {
  font-size: 28px;
  font-weight: 800;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.fs-card__score-denom {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
}

.fs-score--green .fs-card__score-num { color: #16a34a; }
.fs-score--amber .fs-card__score-num { color: #d97706; }
.fs-score--red .fs-card__score-num { color: #dc2626; }

/* Callouts */
.fs-callout {
  border-left: 3px solid #e5e7eb;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}

.fs-callout--red {
  background: #fef2f2;
  border-left-color: #dc2626;
}

.fs-callout--indigo {
  background: #eef2ff;
  border-left-color: #6366f1;
}

.fs-callout__title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fs-callout--red .fs-callout__title { color: #991b1b; }
.fs-callout--indigo .fs-callout__title { color: #4338ca; }

.fs-callout__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

/* Flag stats */
.fs-flags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fs-flag-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  min-width: 80px;
}

.fs-flag-stat__val {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.fs-flag-stat__label {
  font-size: 9px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Actions */
.fs-card__actions {
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

/* Responsive */
@media (max-width: 640px) {
  .fs-card__top { flex-direction: column; }
  .fs-card__right { flex-direction: row; align-items: center; gap: 12px; }
  .fs-flags { gap: 6px; }
  .fs-flag-stat { min-width: 60px; padding: 8px 10px; }
  .fs-header-row { flex-direction: column; gap: 12px; }
}

/* ═══════════════════════════════
   Create Task Modal — Redesigned
   ═══════════════════════════════ */

/* Sections */
.ct-section {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #f3f4f6;
}

.ct-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ct-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.ct-section__header svg { color: #6366f1; }

.ct-section__badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Form elements */
.ct-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
}

.ct-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ct-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.ct-select,
.ct-input {
  padding: 10px 32px 10px 14px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: #374151;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width=%2710%27 height=%2710%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%239ca3af%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  cursor: pointer;
  width: 100%;
}

.ct-input {
  background-image: none;
  padding-right: 14px;
  cursor: text;
}

.ct-select:focus,
.ct-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
  background-color: #fff;
}

.ct-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: #374151;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
}

.ct-textarea::placeholder { color: #9ca3af; font-weight: 400; }

.ct-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
  background-color: #fff;
}

/* Student checkbox cards */
.ct-students {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-students__empty {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
  padding: 12px;
  text-align: center;
}

.ct-student {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ct-student:hover {
  background: #fff;
  border-color: #c7d2fe;
}

.ct-student--selected {
  background: #eef2ff;
  border-color: #6366f1;
}

.ct-student__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.ct-student__info {
  flex: 1 1;
  min-width: 0;
}

.ct-student__name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.ct-student__meta {
  display: block;
  font-size: 11px;
  color: #9ca3af;
}

.ct-student__check {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.ct-student__check--on {
  background: #6366f1;
  border-color: #6366f1;
}

/* Priority selector */
.ct-priorities {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.ct-priority {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1 1;
  justify-content: center;
}

.ct-priority__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Submit button */
.ct-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ct-submit:hover { background: #4f46e5; }

/* Footer */
.ct-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  margin-top: 18px;
}

@media (max-width: 560px) {
  .ct-row { grid-template-columns: 1fr; }
  .ct-priorities { flex-wrap: wrap; }
}

/* ═══════════════════════════════
   Project Analytics
   ═══════════════════════════════ */
.pa-container { }

.pa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.pa-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.pa-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.pa-controls {
  flex-shrink: 0;
}

/* Stats */
.pa-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 20px;
}

.pa-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pa-stat__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pa-stat__icon--indigo { background: #eef2ff; color: #6366f1; }
.pa-stat__icon--blue   { background: #dbeafe; color: #3b82f6; }
.pa-stat__icon--green  { background: #dcfce7; color: #16a34a; }
.pa-stat__icon--orange { background: #ffedd5; color: #ea580c; }

.pa-stat__val { font-size: 24px; font-weight: 800; color: #111827; line-height: 1; }
.pa-stat__label { font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Charts grid */
.pa-charts { margin-bottom: 24px; }

.pa-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 14px;
}

.pa-chart-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pa-chart-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px;
}

/* Student engagement section */
.pa-section { margin-bottom: 24px; }

.pa-section__title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px;
}

.pa-engagement-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pa-eng-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pa-eng-card__top { display: flex; justify-content: space-between; align-items: center; }
.pa-eng-card__left { display: flex; align-items: center; gap: 12px; }

.pa-eng-card__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #6366f1; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}

.pa-eng-card__name { display: block; font-size: 14px; font-weight: 600; color: #111827; }

.pa-eng-badge { font-size: 12px; font-weight: 600; }
.pa-eng-badge--green { color: #16a34a; }
.pa-eng-badge--amber { color: #d97706; }
.pa-eng-badge--red   { color: #dc2626; }

.pa-eng-card__score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pa-eng-card__score-val {
  width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid #6366f1;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #6366f1;
}
.pa-eng-card__score-label { font-size: 10px; color: #9ca3af; }

.pa-eng-card__chips { display: flex; gap: 14px; }

.pa-eng-card__bar { }
.pa-eng-bar-track { height: 5px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.pa-eng-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }

/* Responsive */
@media (max-width: 900px) {
  .pa-stats { grid-template-columns: repeat(2, 1fr); }
  .pa-chart-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .pa-header { flex-direction: column; gap: 12px; }
  .pa-eng-card__top { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ═══════════════════════════════
   Chat Transcript Viewer
   ═══════════════════════════════ */
.tv-container { }

.tv-header { margin-bottom: 16px; }

.tv-title {
  font-size: 22px; font-weight: 800; color: #111827; margin: 0 0 4px; letter-spacing: -0.3px;
}

.tv-subtitle { font-size: 14px; color: #6b7280; margin: 0; }

/* Two-column body */
.tv-body {
  display: flex;
  gap: 14px;
  min-height: calc(100vh - 200px);
}

/* Sidebar */
.tv-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 10px;
  overflow-y: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.tv-sidebar__title {
  font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 0 8px; margin: 0 0 10px;
}

.tv-student {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: transparent;
  border-radius: 10px; cursor: pointer; font-family: inherit;
  transition: all 0.15s ease; text-align: left;
}

.tv-student:hover { background: #f3f4f6; }

.tv-student--active {
  background: #eef2ff; border-left: 3px solid #6366f1;
}

.tv-student__avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #6366f1; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}

.tv-student__avatar--all { background: #1e1b4b; }

.tv-student__info { flex: 1 1; min-width: 0; }

.tv-student__name {
  display: block; font-size: 13px; font-weight: 600; color: #111827;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tv-student__meta { display: block; font-size: 11px; color: #9ca3af; }

/* Main messages area */
.tv-main {
  flex: 1 1; display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Search */
.tv-search {
  position: relative; padding: 12px 16px; border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.tv-search__icon {
  position: absolute; left: 30px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; display: flex;
}

.tv-search__input {
  width: 100%; padding: 9px 36px 9px 38px;
  font-size: 13px; font-family: inherit; color: #374151;
  background: #f9fafb; border: 1.5px solid #e5e7eb; border-radius: 10px;
  outline: none; transition: all 0.2s ease;
}

.tv-search__input::placeholder { color: #9ca3af; }
.tv-search__input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.08); background: #fff; }

.tv-search__clear {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  background: #e5e7eb; border: none; border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #6b7280; transition: background 0.15s ease;
}

.tv-search__clear:hover { background: #d1d5db; }

/* Messages scroll area */
.tv-messages {
  flex: 1 1; overflow-y: auto; padding: 16px 20px;
}

.tv-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; text-align: center; color: #9ca3af;
}

.tv-empty svg { margin-bottom: 12px; }
.tv-empty h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #374151; }
.tv-empty p { margin: 0; font-size: 13px; }

/* Exchange (student msg + AI response pair) */
.tv-exchange {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f9fafb;
}

.tv-exchange:last-child { border-bottom: none; }

/* Individual message */
.tv-msg {
  display: flex; gap: 10px; margin-bottom: 12px;
}

.tv-msg:last-child { margin-bottom: 0; }

.tv-msg__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; flex-shrink: 0; margin-top: 2px;
}

.tv-msg--student .tv-msg__avatar { background: #6366f1; color: #fff; }
.tv-msg__avatar--ai { background: #1e1b4b; color: #a5b4fc; }

.tv-msg__body { flex: 1 1; min-width: 0; }

.tv-msg__header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}

.tv-msg__name { font-size: 12px; font-weight: 700; color: #111827; }
.tv-msg__time { font-size: 11px; color: #d1d5db; }

/* Student message text */
.tv-msg--student .tv-msg__text {
  background: #f3f4f6; border-radius: 0 12px 12px 12px;
  padding: 10px 14px; font-size: 13px; line-height: 1.6; color: #374151;
  display: inline-block; max-width: 85%;
}

/* AI message text */
.tv-msg--ai .tv-msg__text {
  background: #f8faff; border: 1px solid #eef2ff; border-left: 3px solid #6366f1;
  border-radius: 0 12px 12px 12px;
  padding: 12px 16px; font-size: 13px; line-height: 1.6; color: #374151;
  max-width: 95%;
}

/* Markdown styling inside AI messages */
.tv-msg__markdown h1, .tv-msg__markdown h2, .tv-msg__markdown h3 {
  font-size: 14px; font-weight: 700; color: #111827; margin: 12px 0 6px;
}
.tv-msg__markdown h1:first-child, .tv-msg__markdown h2:first-child, .tv-msg__markdown h3:first-child { margin-top: 0; }
.tv-msg__markdown p { margin: 0 0 8px; }
.tv-msg__markdown p:last-child { margin-bottom: 0; }
.tv-msg__markdown ul, .tv-msg__markdown ol { margin: 4px 0 8px; padding-left: 18px; }
.tv-msg__markdown li { margin-bottom: 3px; }
.tv-msg__markdown strong { color: #111827; font-weight: 600; }
.tv-msg__markdown code {
  background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: monospace;
}
.tv-msg__markdown pre {
  background: #1e1b4b; color: #e0e7ff; padding: 12px; border-radius: 8px;
  font-size: 12px; overflow-x: auto; margin: 8px 0;
}
.tv-msg__markdown blockquote {
  border-left: 3px solid #c7d2fe; padding-left: 12px; margin: 8px 0;
  color: #6b7280; font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .tv-body { flex-direction: column; }
  .tv-sidebar { width: 100%; max-height: 200px; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .tv-student { flex: none; }
}

@media (max-width: 640px) {
  .tv-msg--student .tv-msg__text { max-width: 100%; }
  .tv-msg--ai .tv-msg__text { max-width: 100%; }
}

/* ═══════════════════════════════
   Subtask Manager — Single Page
   ═══════════════════════════════ */
.smg { }
.smg__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.smg__list { display: flex; flex-direction: column; gap: 14px; }

.smg__card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.smg__card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.smg__card-title-row { display: flex; align-items: center; gap: 10px; flex: 1 1; }
.smg__order { width: 26px; height: 26px; border-radius: 8px; background: #eef2ff; color: #6366f1; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.smg__card-title { margin: 0; font-size: 16px; font-weight: 700; color: #111827; }
.smg__card-actions { display: flex; gap: 4px; }
.smg__icon-btn { width: 30px; height: 30px; border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #6b7280; transition: all 0.15s ease; }
.smg__icon-btn:hover { border-color: #c7d2fe; color: #6366f1; background: #eef2ff; }
.smg__icon-btn--danger:hover { border-color: #fecaca; color: #dc2626; background: #fef2f2; }

.smg__brief { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.5; }

.smg__stats { display: flex; gap: 8px; flex-wrap: wrap; }
.smg__mini { display: flex; align-items: center; gap: 5px; padding: 6px 10px; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px; font-size: 13px; font-weight: 600; color: #374151; }
.smg__mini svg { color: #9ca3af; }
.smg__mini-label { font-size: 10px; color: #9ca3af; font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px; margin-left: 2px; }

.smg__rubric { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.smg__rubric-label { font-size: 12px; font-weight: 600; color: #6b7280; }
.smg__rubric-chip { font-size: 11px; color: #374151; background: #f3f4f6; padding: 3px 8px; border-radius: 6px; }
.smg__rubric-chip strong { color: #6366f1; }

.smg__students-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 13px; font-weight: 600; color: #6366f1; cursor: pointer; font-family: inherit; transition: all 0.15s ease; align-self: flex-start; }
.smg__students-btn:hover { background: #eef2ff; border-color: #c7d2fe; }

/* Student section */
.smg__student-section { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.smg__student-empty { font-size: 13px; color: #9ca3af; margin: 0; padding: 12px; }

.smg__student-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 10px; cursor: pointer; transition: all 0.15s ease; }
.smg__student-row:hover { background: #fff; border-color: #e5e7eb; }
.smg__student-row--open { background: #eef2ff; border-color: #c7d2fe; }

.smg__student-left { display: flex; align-items: center; gap: 10px; flex: 1 1; min-width: 0; }
.smg__student-avatar { width: 30px; height: 30px; border-radius: 50%; background: #6366f1; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; flex-shrink: 0; }
.smg__student-name { font-size: 13px; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.smg__status { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; }
.smg__student-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #6b7280; flex-shrink: 0; }
.smg__student-chip svg { color: #d1d5db; }

/* Detail expand */
.smg__detail { padding: 16px 18px; margin: 0 0 4px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; display: flex; flex-direction: column; gap: 14px; animation: smg-slide 0.25s ease; }
@keyframes smg-slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.smg__detail-stats { display: flex; gap: 10px; }
.smg__detail-stat { flex: 1 1; text-align: center; padding: 12px 8px; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 10px; }
.smg__detail-val { display: block; font-size: 18px; font-weight: 800; color: #111827; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.smg__detail-lbl { display: block; font-size: 9px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.smg__detail-sec { }
.smg__detail-sec h5 { font-size: 13px; font-weight: 700; color: #111827; margin: 0 0 8px; }

.smg__doc { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #374151; padding: 6px 0; border-bottom: 1px solid #f9fafb; }
.smg__doc:last-child { border-bottom: none; }
.smg__doc svg { color: #d1d5db; }
.smg__doc span:first-of-type { flex: 1 1; }
.smg__doc--flagged { color: #dc2626; font-weight: 600; }

.smg__eval-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.smg__eval-score { font-size: 18px; font-weight: 800; color: #111827; }

.smg__prompt-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #6366f1; color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background 0.2s ease; align-self: flex-start; }
.smg__prompt-btn:hover { background: #4f46e5; }

/* ═══════════════════════════════
   Prompt Log Modal
   ═══════════════════════════════ */
.pl-modal { background: #fff; border-radius: 20px; width: 100%; max-width: 800px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 24px 60px rgba(0,0,0,0.08); animation: sam-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.pl-body { flex: 1 1; overflow-y: auto; padding: 20px 24px; }

.pl-stats { display: flex; gap: 8px; margin-bottom: 14px; }
.pl-stat { flex: 1 1; text-align: center; padding: 10px 6px; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 10px; }
.pl-stat--green { background: #f0fdf4; border-color: #dcfce7; }
.pl-stat--red { background: #fef2f2; border-color: #fee2e2; }
.pl-stat--amber { background: #fffbeb; border-color: #fef3c7; }
.pl-stat--indigo { background: #eef2ff; border-color: #e0e7ff; }
.pl-stat__val { display: block; font-size: 20px; font-weight: 800; color: #111827; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.pl-stat--green .pl-stat__val { color: #16a34a; }
.pl-stat--red .pl-stat__val { color: #dc2626; }
.pl-stat--amber .pl-stat__val { color: #d97706; }
.pl-stat--indigo .pl-stat__val { color: #6366f1; }
.pl-stat__label { display: block; font-size: 9px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.pl-filters { display: flex; gap: 4px; background: #f3f4f6; border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.pl-filter { padding: 6px 14px; border: none; background: transparent; border-radius: 8px; font-size: 13px; font-weight: 500; color: #6b7280; cursor: pointer; font-family: inherit; transition: all 0.15s ease; }
.pl-filter:hover { color: #374151; }
.pl-filter--active { background: #6366f1; color: #fff; box-shadow: 0 1px 4px rgba(99,102,241,0.3); }

.pl-list { display: flex; flex-direction: column; gap: 6px; }

.pl-item { padding: 12px 16px; border: 1px solid #f3f4f6; border-left: 3px solid #e5e7eb; border-radius: 0 10px 10px 0; transition: border-color 0.15s ease; }
.pl-item--green { border-left-color: #16a34a; background: #fafff9; }
.pl-item--red { border-left-color: #dc2626; background: #fffafa; }
.pl-item--gray { border-left-color: #d1d5db; }

.pl-item__top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pl-item__time { font-size: 11px; color: #9ca3af; }
.pl-item__badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.pl-item__badge--green { background: #dcfce7; color: #166534; }
.pl-item__badge--red { background: #fee2e2; color: #991b1b; }
.pl-item__badge--gray { background: #f3f4f6; color: #6b7280; }
.pl-item__score { margin-left: auto; font-size: 13px; font-weight: 700; color: #6366f1; }
.pl-item__msg { margin: 0; font-size: 13px; color: #374151; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 640px) {
  .smg__stats { flex-direction: column; }
  .smg__detail-stats { flex-wrap: wrap; }
  .smg__detail-stats .smg__detail-stat { min-width: 80px; }
  .smg__student-row { flex-wrap: wrap; gap: 8px; }
  .pl-stats { flex-wrap: wrap; }
  .pl-modal { max-width: 95vw; margin: 12px; }
}

/* ===== USER MANAGEMENT - PRODUCTION READY STYLES ===== */

.user-management {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  min-height: calc(100vh - 60px);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Management Header */
.management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 3px solid rgba(13, 148, 136, 0.15);
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-title h2 {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.management-header .btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.management-header .btn-primary:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

/* Management Controls */
.management-controls {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-section {
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid rgba(13, 148, 136, 0.2);
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.15);
}

.search-input::placeholder {
  color: #94a3b8;
}

/* Filter Section */
.filter-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 18px;
  border: 1px solid #e0e7ff;
  background: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #475569;
}

.filter-btn:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #6366f1;
}

.filter-btn.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Users Table Container */
.users-table-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 2px solid rgba(13, 148, 136, 0.1);
}

/* Users Table */
.users-table {
  width: 100%;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.header-cell {
  font-size: 13px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.table-body {
  display: flex;
  flex-direction: column;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(13, 148, 136, 0.08);
  transition: all 0.2s ease;
  align-items: center;
}

.table-row:hover {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  border-left: 4px solid #0d9488;
  padding-left: 20px;
}

.table-row:last-child {
  border-bottom: none;
}

/* User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Role Cell */
.role-cell {
  display: flex;
  align-items: center;
}

.role-badge {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  text-transform: capitalize;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Date Cell */
.date-cell {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

/* Actions Cell */
.actions-cell {
  display: flex;
  gap: 8px;
}

.actions-cell .btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.actions-cell .btn-secondary {
  background: white;
  color: #0f766e;
  border: 2px solid rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.actions-cell .btn-secondary:hover {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.actions-cell .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 2px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.actions-cell .btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Modal */
.user-form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.1);
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
}

.modal-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

.modal-content form {
  padding: 28px;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(13, 148, 136, 0.2);
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.form-control:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.form-control:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid rgba(13, 148, 136, 0.1);
}

.form-actions .btn {
  flex: 1 1;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-actions .btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.form-actions .btn-primary:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.form-actions .btn-secondary {
  background: white;
  color: #64748b;
  border: 2px solid rgba(13, 148, 136, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.form-actions .btn-secondary:hover {
  background: #f8fafc;
  border-color: #64748b;
  color: #475569;
}

/* Loading & Empty States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(13, 148, 136, 0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-container p {
  font-size: 16px;
  color: #64748b;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .user-management {
    padding: 24px 28px;
  }

  .table-header,
  .table-row {
    grid-template-columns: 2fr 1fr 1.2fr 0.8fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .user-management {
    padding: 20px;
  }

  .management-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-title h2 {
    font-size: 26px;
  }

  .management-header .btn-primary {
    width: 100%;
  }

  .filter-section {
    width: 100%;
  }

  .role-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-btn {
    justify-content: center;
  }

  .table-header {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .table-row:hover {
    padding-left: 16px;
  }

  .cell {
    display: flex;
    align-items: center;
  }

  .role-cell::before,
  .date-cell::before {
    content: attr(data-label);
    font-weight: 700;
    color: #64748b;
    margin-right: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .actions-cell {
    justify-content: flex-start;
    padding-top: 12px;
    border-top: 1px solid rgba(13, 148, 136, 0.1);
  }
}

@media (max-width: 480px) {
  .user-management {
    padding: 16px;
  }

  .header-title h2 {
    font-size: 22px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .user-name {
    font-size: 14px;
  }

  .user-email {
    font-size: 12px;
  }

  .modal-content {
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
  }

  .role-filters {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════
   User Management — Redesigned
   ═══════════════════════════════ */
.um { }

.um__toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}

.um__search {
  position: relative; flex: 1 1; min-width: 200px; max-width: 400px;
}

.um__search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; display: flex;
}

.um__search-input {
  width: 100%; padding: 10px 16px 10px 40px; font-size: 13px;
  font-family: inherit; color: #374151; background: #f9fafb;
  border: 1.5px solid #e5e7eb; border-radius: 10px; outline: none;
  transition: all 0.2s ease;
}

.um__search-input::placeholder { color: #9ca3af; }
.um__search-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.08); background: #fff; }

.um__actions { display: flex; gap: 8px; }

/* Filters */
.um__filters {
  display: flex; gap: 4px; background: #f3f4f6; border-radius: 10px;
  padding: 3px; margin-bottom: 14px; width: fit-content; align-items: center;
}

.um__pc-select {
  padding: 6px 10px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 12px; font-family: inherit; color: #374151; background: #fff;
  outline: none; cursor: pointer; margin-left: 8px;
  transition: border-color 0.2s ease;
}

.um__pc-select:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.12); }

.um__filter {
  padding: 6px 14px; border: none; background: transparent; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #6b7280; cursor: pointer;
  font-family: inherit; transition: all 0.15s ease;
}

.um__filter:hover { color: #374151; }
.um__filter--active { background: #6366f1; color: #fff; box-shadow: 0 1px 4px rgba(99,102,241,0.3); }

/* Table */
.um__table {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.um__thead {
  display: flex; padding: 10px 20px; background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.um__th {
  font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase;
  letter-spacing: 0.5px;
}

.um__th--user    { flex: 2 1; }
.um__th--role    { flex: 1 1; }
.um__th--program { flex: 1.5 1; }
.um__th--date    { flex: 1 1; }
.um__th--actions { flex: 0.5 1; text-align: right; }

.um__row {
  display: flex; align-items: center; padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6; transition: background 0.1s ease;
}

.um__row:last-child { border-bottom: none; }
.um__row:hover { background: #fafbff; }

.um__td { font-size: 13px; }
.um__td--user    { flex: 2 1; display: flex; align-items: center; gap: 12px; }
.um__td--role    { flex: 1 1; }
.um__td--program { flex: 1.5 1; }
.um__td--date    { flex: 1 1; color: #9ca3af; font-size: 12px; }
.um__td--actions { flex: 0.5 1; display: flex; gap: 4px; justify-content: flex-end; }

.um__avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #6366f1;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.um__name { display: block; font-size: 14px; font-weight: 600; color: #111827; }
.um__email { display: block; font-size: 12px; color: #9ca3af; }

.um__role-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 8px; font-size: 11px;
  font-weight: 700; text-transform: capitalize;
}

.um__program { font-size: 12px; color: #6b7280; }

.um__action-btn {
  width: 30px; height: 30px; border: 1px solid #e5e7eb; background: #fff;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #6b7280; transition: all 0.15s ease;
}

.um__action-btn:hover { border-color: #c7d2fe; color: #6366f1; background: #eef2ff; }
.um__action-btn--danger:hover { border-color: #fecaca; color: #dc2626; background: #fef2f2; }

/* Pagination */
.um__pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; margin-top: 8px;
}

.um__page-info { font-size: 12px; color: #9ca3af; }

.um__page-btns { display: flex; gap: 4px; }

.um__page-btn {
  width: 32px; height: 32px; border: 1px solid #e5e7eb; background: #fff;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; font-weight: 600; color: #374151;
  font-family: inherit; transition: all 0.15s ease;
}

.um__page-btn:hover:not(:disabled) { border-color: #c7d2fe; color: #6366f1; background: #eef2ff; }
.um__page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.um__page-btn--active {
  background: #6366f1; color: #fff; border-color: #6366f1;
}

@media (max-width: 768px) {
  .um__toolbar { flex-direction: column; }
  .um__search { max-width: 100%; }
  .um__thead { display: none; }
  .um__row { flex-wrap: wrap; gap: 8px; }
  .um__td--user { flex: 100% 1; }
  .um__td--role { flex: auto; }
  .um__td--program { flex: auto; }
  .um__td--date { flex: auto; }
  .um__td--actions { flex: auto; }
}

/* ═══════════════════════════════
   Bulk Import Modal
   ═══════════════════════════════ */
.bi-step {
  padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #f3f4f6;
}
.bi-step:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.bi-step__header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.bi-step__num {
  width: 26px; height: 26px; border-radius: 50%; background: #6366f1; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}

.bi-step__title { font-size: 14px; font-weight: 700; color: #111827; }

.bi-step__desc { font-size: 13px; color: #6b7280; line-height: 1.5; margin: 0 0 12px; }

.bi-columns { display: flex; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }

.bi-col { display: flex; flex-direction: column; gap: 2px; }
.bi-col__label { font-size: 11px; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: 0.3px; }
.bi-col__val { font-size: 12px; color: #6b7280; font-family: monospace; }

.bi-file-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; background: #f9fafb; border: 1.5px dashed #d1d5db;
  border-radius: 10px; font-size: 13px; font-weight: 500; color: #374151;
  cursor: pointer; transition: all 0.15s ease;
}

.bi-file-label:hover { border-color: #6366f1; background: #eef2ff; color: #6366f1; }

.bi-success { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: #16a34a; font-weight: 600; }
.bi-error { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: #dc2626; font-weight: 500; }

/* Results */
.bi-results { margin-top: 18px; padding-top: 18px; border-top: 1px solid #f3f4f6; }
.bi-results__title { font-size: 15px; font-weight: 700; color: #111827; margin: 0 0 12px; }

.bi-results__grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.bi-result-stat {
  flex: 1 1; min-width: 80px; text-align: center; padding: 10px 8px;
  background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 10px;
}

.bi-result-stat--green { background: #f0fdf4; border-color: #dcfce7; }
.bi-result-stat--amber { background: #fffbeb; border-color: #fef3c7; }
.bi-result-stat--blue  { background: #eff6ff; border-color: #dbeafe; }
.bi-result-stat--indigo { background: #eef2ff; border-color: #e0e7ff; }
.bi-result-stat--red   { background: #fef2f2; border-color: #fee2e2; }

.bi-result-stat__val { display: block; font-size: 20px; font-weight: 800; color: #111827; }
.bi-result-stat--green .bi-result-stat__val { color: #16a34a; }
.bi-result-stat--amber .bi-result-stat__val { color: #d97706; }
.bi-result-stat--blue .bi-result-stat__val  { color: #3b82f6; }
.bi-result-stat--indigo .bi-result-stat__val { color: #6366f1; }
.bi-result-stat--red .bi-result-stat__val   { color: #dc2626; }

.bi-result-stat__label { display: block; font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }

.bi-errors { margin-top: 12px; }
.bi-errors h5 { font-size: 13px; font-weight: 700; color: #dc2626; margin: 0 0 8px; }
.bi-errors__list { max-height: 180px; overflow-y: auto; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; }
.bi-errors__item { padding: 4px 0; border-bottom: 1px solid #fee2e2; font-size: 12px; color: #991b1b; }
.bi-errors__item:last-child { border-bottom: none; }

/* ═══════════════════════════════
   Engagement Report — Indigo Theme
   ═══════════════════════════════ */

.er {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Filter Bar ── */
.er-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.er-filters__inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.er-filters__inputs--6col {
  grid-template-columns: repeat(6, 1fr);
}

.er-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.er-filter label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.er-filter input,
.er-filter select {
  padding: 9px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.er-filter input:focus,
.er-filter select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.er-filters__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Buttons ── */
.er-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.er-btn--primary {
  background: #4f46e5;
  color: #fff;
}

.er-btn--primary:hover:not(:disabled) {
  background: #4338ca;
}

.er-btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.er-btn--outline {
  background: #fff;
  color: #6b7280;
  border: 1.5px solid #e5e7eb;
}

.er-btn--outline:hover {
  border-color: #c7d2fe;
  color: #6366f1;
  background: #fafaff;
}

/* ── Error ── */
.er-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
}

/* ── Loading ── */
.er-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.er-loading p {
  margin: 16px 0 0;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* ── Summary Cards ── */
.er-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 14px;
  gap: 14px;
}

.er-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #6366f1;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.er-card:hover {
  border-color: #c7d2fe;
  border-left-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.er-card__icon {
  width: 40px;
  height: 40px;
  background: #eef2ff;
  color: #6366f1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.er-card__value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 4px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.er-card__label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.er-card__detail {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

/* ── Charts ── */
.er-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
}

.er-chart-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.er-chart-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

/* ── Tabbed Tables ── */
.er-tables {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.er-tables__tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid #e5e7eb;
}

.er-tables__tab {
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.2s ease;
}

.er-tables__tab:hover {
  color: #6b7280;
}

.er-tables__tab--active {
  color: #4f46e5;
}

.er-tables__tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #6366f1;
  border-radius: 2px 2px 0 0;
}

/* Table */
.er-table-wrap {
  padding: 0;
}

.er-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.er-table thead th {
  background: #f9fafb;
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.er-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.er-table tbody tr:last-child {
  border-bottom: none;
}

.er-table tbody tr:hover {
  background: #f8f8fb;
}

.er-table tbody td {
  padding: 12px 16px;
  color: #374151;
  font-weight: 500;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.er-table__name {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
}

.er-table__email {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  margin-top: 1px;
}

.er-table__footer {
  padding: 12px 16px;
  background: #f9fafb;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  border-top: 1px solid #f3f4f6;
}

.er-table__empty {
  padding: 40px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

/* ── Pagination ── */
.er-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid #f3f4f6;
  background: #f9fafb;
}

.er-pagination__info {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.er-pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.er-pagination__page {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
  min-width: 48px;
  text-align: center;
}

.er-pagination__btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.er-pagination__btn:hover:not(:disabled) {
  border-color: #c7d2fe;
  color: #6366f1;
  background: #fafaff;
}

.er-pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Badges ── */
.er-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.er-badge--high {
  background: #eef2ff;
  color: #4f46e5;
}

.er-badge--med {
  background: #fef3c7;
  color: #92400e;
}

.er-badge--low {
  background: #fef2f2;
  color: #dc2626;
}

.er-badge--type {
  background: #eef2ff;
  color: #6366f1;
}

/* ── Empty State ── */
.er-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  background: #fff;
  border: 2px dashed rgba(99, 102, 241, 0.15);
  border-radius: 14px;
  text-align: center;
}

.er-empty h3 {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 16px 0 6px;
}

.er-empty p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  max-width: 360px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .er-filters__inputs,
  .er-filters__inputs--6col {
    grid-template-columns: repeat(3, 1fr);
  }

  .er-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .er-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .er-filters__inputs {
    grid-template-columns: 1fr;
  }

  .er-filters__actions {
    flex-direction: column;
  }

  .er-filters__actions .er-btn {
    width: 100%;
    justify-content: center;
  }

  .er-summary {
    grid-template-columns: 1fr;
  }

  .er-tables__tabs {
    padding: 0 12px;
    overflow-x: auto;
  }

  .er-tables__tab {
    padding: 12px 14px;
    white-space: nowrap;
    font-size: 12px;
  }

  .er-table {
    font-size: 12px;
  }

  .er-table thead th,
  .er-table tbody td {
    padding: 10px 12px;
  }
}

/* ===== SYSTEM SETTINGS - PRODUCTION READY STYLES ===== */

.system-settings {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  min-height: calc(100vh - 60px);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Settings Header */
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 3px solid rgba(13, 148, 136, 0.15);
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-title h2 {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.5px;
}

.settings-subtitle {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.header-actions .btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.header-actions .btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.header-actions .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.header-actions .btn-secondary {
  background: white;
  color: #0f766e;
  border: 2px solid rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.header-actions .btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* Settings Content */
.settings-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(13, 148, 136, 0.1);
  overflow: hidden;
}

/* Settings Tabs */
.settings-tabs {
  display: flex;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid rgba(13, 148, 136, 0.1);
  padding: 16px 24px;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 2px solid transparent;
}

.tab-button:hover {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.2);
  transform: translateY(-1px);
}

.tab-button.active {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.tab-icon {
  font-size: 18px;
}

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

/* Settings Form */
.settings-form {
  padding: 32px;
}

.settings-category {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-category.active {
  display: block;
}

.settings-category.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-category h3 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 24px 0;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.1);
  letter-spacing: -0.3px;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-gap: 24px;
  gap: 24px;
}

.setting-item {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid rgba(13, 148, 136, 0.12);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-item:hover {
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.1);
  transform: translateY(-2px);
}

.setting-label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: block;
  letter-spacing: 0.3px;
}

.setting-description {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(13, 148, 136, 0.2);
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  font-weight: 600;
  color: #0f172a;
}

.form-control:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.form-control:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

/* Select Styling */
select.form-control {
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
  position: relative;
}

select.form-control::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #6366f1;
  transform: translateY(-50%);
  pointer-events: none;
}

select.form-control:hover {
  border-color: #0d9488;
}

/* Input Types */
input[type="number"].form-control {
  -moz-appearance: textfield;
}

input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].form-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  background: white;
  border-radius: 16px;
  border: 2px dashed rgba(13, 148, 136, 0.2);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(13, 148, 136, 0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-container p {
  font-size: 16px;
  color: #64748b;
  font-weight: 600;
}

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert::before {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 2px solid #fca5a5;
}

.alert-error::before {
  content: '❌';
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 2px solid #6ee7b7;
}

.alert-success::before {
  content: '✅';
}

/* Responsive Design */
@media (max-width: 1024px) {
  .system-settings {
    padding: 24px 28px;
  }

  .settings-form {
    padding: 24px;
  }

  .settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .system-settings {
    padding: 20px;
  }

  .settings-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-title h2 {
    font-size: 26px;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .settings-tabs {
    padding: 12px 16px;
    gap: 8px;
  }

  .tab-button {
    flex: 1 1;
    min-width: 0;
    justify-content: center;
  }

  .settings-form {
    padding: 20px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-category h3 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .system-settings {
    padding: 16px;
  }

  .header-title h2 {
    font-size: 22px;
  }

  .settings-tabs {
    flex-direction: column;
    padding: 12px;
  }

  .tab-button {
    width: 100%;
  }

  .settings-form {
    padding: 16px;
  }

  .setting-item {
    padding: 16px;
  }

  .form-control {
    font-size: 14px;
  }
}

/* Special Settings Styling */
.setting-item[data-setting-type="boolean"] .form-control {
  cursor: pointer;
}

.setting-item[data-setting-type="url"] .form-control,
.setting-item[data-setting-type="email"] .form-control {
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

/* Save Indicator */
.settings-header .header-actions .btn.btn-primary:not(:disabled):active {
  transform: scale(0.95);
}

/* Empty State */
.settings-empty {
  text-align: center;
  padding: 80px 32px;
  color: #64748b;
  background: white;
  border-radius: 16px;
  border: 2px dashed rgba(13, 148, 136, 0.2);
}

.settings-empty-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.6;
}

.settings-empty-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.settings-empty-description {
  font-size: 16px;
  line-height: 1.6;
  color: #64748b;
  max-width: 480px;
  margin: 0 auto;
}

/* ═══════════════════════════════
   Comprehensive Manager Analytics — Indigo Theme
   ═══════════════════════════════ */

.cma {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Filter Bar ── */
.cma-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cma-filters__inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 16px;
  gap: 16px;
}

.cma-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cma-filter label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cma-filter select {
  padding: 9px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  cursor: pointer;
}

.cma-filter select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ── Error ── */
.cma-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
}

/* ── Summary Cards ── */
.cma-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 14px;
  gap: 14px;
}

.cma-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #6366f1;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cma-card:hover {
  border-color: #c7d2fe;
  border-left-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.cma-card__icon {
  width: 40px;
  height: 40px;
  background: #eef2ff;
  color: #6366f1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.cma-card__value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 4px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.cma-card__label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Score Ring ── */
.cma-score {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cma-score__label {
  font-size: 11px;
  font-weight: 600;
}

/* ── Tabbed Tables ── */
.cma-tables {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.cma-tables__tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cma-tables__tab {
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.2s ease;
}

.cma-tables__tab:hover {
  color: #6b7280;
}

.cma-tables__tab--active {
  color: #4f46e5;
}

.cma-tables__tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #6366f1;
  border-radius: 2px 2px 0 0;
}

/* ── Table ── */
.cma-table-wrap {
  padding: 0;
}

.cma-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cma-table thead th {
  background: #f9fafb;
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.cma-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.cma-table tbody tr:last-child {
  border-bottom: none;
}

.cma-table tbody tr:hover {
  background: #f8f8fb;
}

.cma-table tbody td {
  padding: 12px 16px;
  color: #374151;
  font-weight: 500;
  vertical-align: middle;
}

.cma-num {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #111827;
}

.cma-muted {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

/* ── Manager Link ── */
.cma-link {
  background: none;
  border: none;
  color: #6366f1;
  font-weight: 600;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.cma-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.cma-email {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  margin-top: 1px;
}

/* ── Badges ── */
.cma-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cma-badge--high {
  background: #eef2ff;
  color: #4f46e5;
}

.cma-badge--med {
  background: #fef3c7;
  color: #92400e;
}

.cma-badge--low {
  background: #fff7ed;
  color: #c2410c;
}

.cma-badge--none {
  background: #f3f4f6;
  color: #9ca3af;
}

.cma-badge--online {
  background: #eef2ff;
  color: #4f46e5;
}

.cma-badge--offline {
  background: #f3f4f6;
  color: #9ca3af;
}

/* ── Progress Bar ── */
.cma-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cma-progress__track {
  width: 80px;
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}

.cma-progress__bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cma-progress__label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}

/* ── Empty State ── */
.cma-table__empty {
  padding: 40px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

/* ── Pagination ── */
.cma-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid #f3f4f6;
  background: #f9fafb;
}

.cma-pagination__info {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.cma-pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cma-pagination__page {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
  min-width: 48px;
  text-align: center;
}

.cma-pagination__btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cma-pagination__btn:hover:not(:disabled) {
  border-color: #c7d2fe;
  color: #6366f1;
  background: #fafaff;
}

.cma-pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cma-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cma-filters__inputs {
    grid-template-columns: 1fr;
  }

  .cma-summary {
    grid-template-columns: 1fr;
  }

  .cma-tables__tabs {
    padding: 0 12px;
    overflow-x: auto;
  }

  .cma-tables__tab {
    padding: 12px 14px;
    white-space: nowrap;
    font-size: 12px;
  }

  .cma-table {
    font-size: 12px;
  }

  .cma-table thead th,
  .cma-table tbody td {
    padding: 10px 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Project Templates Admin UI Styles (Phase 5)
   ═══════════════════════════════════════════════════════════════════ */

/* Fix metadata section positioning in sidebar layout */
.dashboard-section {
  margin-bottom: 1.5rem;
}

.dashboard-section .section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
  margin: 0;
}

/* ── List view: templates table ──────────────────────────────────── */
.templates-table-wrap {
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow-x: auto;
  margin-top: 1rem;
}

.templates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.templates-table thead {
  background: #305496;
  color: white;
}

.templates-table th {
  padding: 0.75rem 0.6rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.templates-table th.num-cell,
.templates-table td.num-cell {
  text-align: center;
}

.templates-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}

.templates-table tbody tr:hover {
  background: #f8fafc;
}

.templates-table tbody tr.tpl-row-inactive {
  opacity: 0.55;
  background: #f9f9f9;
}

.templates-table td {
  padding: 0.7rem 0.6rem;
  vertical-align: middle;
}

.templates-table code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  color: #1e3a8a;
  font-weight: 600;
}

.program-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-active {
  color: #16a34a;
  font-weight: 600;
  font-size: 0.85rem;
}

.status-inactive {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85rem;
}

.row-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.row-actions .btn {
  white-space: nowrap;
}

.btn-sm {
  padding: 0.3rem 0.6rem !important;
  font-size: 0.8rem !important;
}

.btn-xs {
  padding: 0.2rem 0.45rem !important;
  font-size: 0.75rem !important;
  margin-right: 0.2rem;
}

.btn-danger {
  background: #dc2626 !important;
  color: white !important;
}

.btn-danger:hover {
  background: #b91c1c !important;
}

/* ── Editor view ─────────────────────────────────────────────────── */
.tpl-key-badge {
  display: inline-block;
  background: #1e3a8a;
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.metadata-readonly {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 0.92rem;
  color: #475569;
}

.metadata-form {
  background: #fefce8;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #fde68a;
}

/* ── Milestone card ──────────────────────────────────────────────── */
.milestone-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #ffffff !important;
  overflow: hidden;
  border-left: 4px solid #c7d2fe;
}

.milestone-card.priority-low {
  border-left-color: #a5b4fc;
}

.milestone-card.priority-medium {
  border-left-color: #818cf8;
}

.milestone-card.priority-high {
  border-left-color: #6366f1;
}

.milestone-card.priority-urgent {
  border-left-color: #4338ca;
}

.milestone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.milestone-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1 1;
}

.milestone-header-right {
  display: flex;
  gap: 0.3rem;
}

.collapse-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  color: #475569;
  padding: 0.2rem 0.4rem;
}

.collapse-btn:hover {
  color: #1e293b;
}

.milestone-seq {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #1e3a8a;
  background: #dbeafe;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.milestone-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

.weightage-badge {
  background: #fef3c7;
  color: #92400e;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.week-badge {
  background: #ede9fe;
  color: #5b21b6;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.category-badge {
  background: #cffafe;
  color: #155e75;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Priority badges (used in both milestone header and subtask row) ── */
.priority-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.priority-badge.priority-low {
  background: #dcfce7;
  color: #166534;
}

.priority-badge.priority-medium {
  background: #fef3c7;
  color: #854d0e;
}

.priority-badge.priority-high {
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.65rem;
  padding: 2px 8px;
}

.priority-badge.priority-urgent {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Milestone body ──────────────────────────────────────────────── */
.milestone-card-body {
  padding: 1rem;
}

.milestone-readonly p {
  margin: 0 0 0.6rem 0;
  color: #475569;
}

.rubric-block {
  background: #fef9c3;
  border-left: 3px solid #fde047;
  padding: 0.6rem 0.8rem;
  border-radius: 0 4px 4px 0;
  margin: 0.5rem 0;
  font-size: 0.88rem;
  color: #713f12;
}

.self-check-block {
  background: #e0f2fe;
  border-left: 3px solid #38bdf8;
  padding: 0.6rem 0.8rem;
  border-radius: 0 4px 4px 0;
  margin: 0.5rem 0;
  font-size: 0.88rem;
  color: #075985;
}

.milestone-edit-form {
  background: #fefce8;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #fde68a;
}

/* ── Subtasks table ──────────────────────────────────────────────── */
.subtasks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.subtasks-table th {
  background: #475569;
  color: white;
  padding: 0.5rem 0.4rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.subtasks-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.subtasks-table .helper-cell {
  text-align: center;
  font-size: 1rem;
  color: #16a34a;
  font-weight: 700;
}

.subtask-row:hover {
  background: #f8fafc;
}

.subtask-row-editing {
  background: #fef3c7;
}

.hint-cell {
  font-size: 0.8rem;
}

.hint-block {
  background: #ecfeff;
  border-left: 2px solid #22d3ee;
  padding: 0.3rem 0.5rem;
  margin: 0.2rem 0;
  border-radius: 0 4px 4px 0;
  color: #155e75;
}

.pointer-block {
  background: #fff7ed;
  border-left: 2px solid #fb923c;
  padding: 0.3rem 0.5rem;
  margin: 0.2rem 0;
  border-radius: 0 4px 4px 0;
  color: #9a3412;
}

.form-control-sm {
  padding: 0.3rem 0.4rem !important;
  font-size: 0.85rem !important;
}

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

/* ===== ADMIN DASHBOARD - PRODUCTION READY STYLES ===== */

/* Admin Actions */
.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 24px;
  gap: 24px;
  margin-top: 20px;
}

.action-group {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(13, 148, 136, 0.15);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.action-group:hover {
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
  transform: translateY(-2px);
}

.action-group h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.1);
  letter-spacing: -0.3px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-buttons .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-buttons .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.action-buttons .btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.action-buttons .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.action-buttons .btn-secondary {
  background: white;
  color: #0f766e;
  border: 2px solid rgba(13, 148, 136, 0.25);
}

.action-buttons .btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #0d9488;
  color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.2);
}

.action-buttons .btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Alert Styling */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert::before {
  content: '⚠️';
  font-size: 20px;
  flex-shrink: 0;
}

.alert-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 2px solid #fca5a5;
}

.alert-error::before {
  content: '❌';
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 2px solid #6ee7b7;
}

.alert-success::before {
  content: '✅';
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 2px solid #fcd34d;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e3a8a;
  border: 2px solid #93c5fd;
}

.alert-info::before {
  content: 'ℹ️';
}

/* Section Title Enhancements */
.dashboard-section .section-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.1);
}

/* Stat Card Improvements */
.dashboard-section .stat-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
  border: 2px solid rgba(13, 148, 136, 0.15);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.dashboard-section .stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d9488 0%, #0f766e 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-section .stat-card:hover {
  border-color: #0d9488;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.2);
  transform: translateY(-3px);
}

.dashboard-section .stat-card:hover::before {
  opacity: 1;
}

.dashboard-section .stat-value {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.dashboard-section .stat-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .admin-actions {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .admin-actions {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .action-group {
    padding: 20px;
  }

  .action-group h3 {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .action-buttons {
    gap: 10px;
  }

  .action-buttons .btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .action-group {
    padding: 16px;
  }

  .action-group h3 {
    font-size: 16px;
    margin-bottom: 14px;
  }

  .action-buttons .btn {
    padding: 10px 14px;
    font-size: 13px;
    gap: 8px;
  }
}

/* Loading State */
.dashboard .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed rgba(13, 148, 136, 0.2);
}

.loading-state .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(13, 148, 136, 0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  font-size: 16px;
  color: #64748b;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 32px;
  color: #64748b;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed rgba(13, 148, 136, 0.2);
  margin: 40px 0;
}

.empty-state-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.6;
  filter: grayscale(10%);
}

.empty-state-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.empty-state-description {
  font-size: 16px;
  line-height: 1.6;
  color: #64748b;
  max-width: 480px;
  margin: 0 auto;
}

/* Hover Effects */
.dashboard-section {
  position: relative;
  transition: all 0.3s ease;
}

.dashboard-section::after {
  display: none;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488 0%, #0f766e 50%, #0d9488 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-section:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════
   Admin Dashboard — New Styles
   ═══════════════════════════════ */

/* Tab pills (for System Mgmt + Analytics) */
.ad-tabs {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
  width: fit-content;
}

.ad-tab {
  padding: 7px 18px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.ad-tab:hover { color: #374151; }

.ad-tab--active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

/* Dashboard header with refresh */
.ad-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ad-dash-header .md-page-title { margin-bottom: 2px; }
.ad-dash-header .md-page-subtitle { margin-bottom: 0; }

.ad-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  color: #6b7280;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ad-refresh-btn:hover {
  border-color: #c7d2fe;
  color: #6366f1;
  background: #fafaff;
}

/* Actions inline row */
.ad-actions-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ad-actions-inline__left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ad-actions-inline__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Chart row */
.ad-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 20px;
}

.ad-chart-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ad-chart-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

/* Quick Actions card */
.ad-actions-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ad-actions-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
}

.ad-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* Exports row */
.ad-exports {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
  flex-wrap: wrap;
}

.ad-exports__label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ad-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #f9fafb;
  color: #6366f1;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ad-export-btn:hover { background: #eef2ff; border-color: #c7d2fe; }
.ad-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Override stat icon red */
.md-stat__icon--red { background: #fee2e2; color: #dc2626; }

/* ═══════════════════════════════
   Analytics Page Header
   ═══════════════════════════════ */
.analytics-page__header {
  text-align: center;
  margin-bottom: 28px;
}

.analytics-page__title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.analytics-page__subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
  font-weight: 500;
}

.analytics-page__tabs {
  display: inline-flex;
  gap: 4px;
  background: #e8e8ec;
  border-radius: 10px;
  padding: 3px;
}

.analytics-page__tab {
  padding: 9px 24px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-page__tab:hover { color: #374151; }

.analytics-page__tab--active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

@media (max-width: 768px) {
  .ad-chart-row { grid-template-columns: 1fr; }
  .ad-tabs { flex-wrap: wrap; }
  .analytics-page__tabs { flex-direction: column; width: 100%; }
  .analytics-page__tab { text-align: center; }
}

/* ═══════════════════════════════
   Project Management
   ═══════════════════════════════ */
.pm { }

.pm__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 12px; gap: 12px; margin-bottom: 16px;
}

.pm__stat {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pm__stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.pm__stat-icon--indigo { background: #eef2ff; color: #6366f1; }
.pm__stat-icon--blue   { background: #dbeafe; color: #3b82f6; }
.pm__stat-icon--amber  { background: #fef3c7; color: #d97706; }
.pm__stat-icon--green  { background: #dcfce7; color: #16a34a; }

.pm__stat-val { font-size: 22px; font-weight: 800; color: #111827; line-height: 1; }
.pm__stat-label { font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.pm__toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}

.pm__list { display: flex; flex-direction: column; gap: 10px; }

.pm__card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 18px 22px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: border-color 0.2s ease;
}
.pm__card:hover { border-color: #c7d2fe; }

.pm__card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.pm__card-title-row { display: flex; align-items: center; gap: 10px; flex: 1 1; }

.pm__type-icon {
  width: 32px; height: 32px; background: #eef2ff; color: #6366f1;
  border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.pm__card-title { margin: 0; font-size: 15px; font-weight: 700; color: #111827; }

.pm__card-badges { display: flex; gap: 6px; flex-shrink: 0; }

.pm__type-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

.pm__status { font-size: 11px; font-weight: 600; }
.pm__status--active { color: #16a34a; }
.pm__status--overdue { color: #dc2626; }
.pm__status--warn { color: #d97706; }

.pm__card-desc { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pm__card-meta { display: flex; flex-wrap: wrap; gap: 12px; }

.pm__chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #6b7280; }
.pm__chip svg { color: #d1d5db; }

.pm__card-actions { display: flex; gap: 4px; justify-content: flex-end; padding-top: 8px; border-top: 1px solid #f3f4f6; }

@media (max-width: 768px) {
  .pm__stats { grid-template-columns: repeat(2, 1fr); }
  .pm__toolbar { flex-direction: column; align-items: stretch; }
  .pm__card-top { flex-direction: column; }
}

/* ═══════════════════════════════
   Student-Manager Assignments
   ═══════════════════════════════ */
.sma { }

.sma__title { font-size: 18px; font-weight: 700; color: #111827; margin: 0 0 4px; }
.sma__subtitle { font-size: 13px; color: #6b7280; margin: 0 0 16px; }

.sma__toolbar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}

.sma__list { display: flex; flex-direction: column; gap: 10px; }

.sma__card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease;
}

.sma__card:hover { border-color: #c7d2fe; }

.sma__card-top {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  flex-wrap: wrap;
}

.sma__student { display: flex; align-items: center; gap: 10px; flex: 1 1; min-width: 180px; }

.sma__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #6366f1; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}

.sma__student-info { }
.sma__name { display: block; font-size: 14px; font-weight: 600; color: #111827; }
.sma__email { display: block; font-size: 12px; color: #9ca3af; }

.sma__meta { display: flex; gap: 6px; flex-wrap: wrap; }

.sma__badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: #f3f4f6; color: #374151;
}

.sma__badge--indigo { background: #eef2ff; color: #6366f1; }

.sma__assign-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; background: #6366f1; color: #fff; border: none;
  border-radius: 8px; font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background 0.2s ease; flex-shrink: 0;
}

.sma__assign-btn:hover { background: #4f46e5; }

/* Managers list */
.sma__managers {
  padding: 10px 18px 14px; border-top: 1px solid #f3f4f6;
  display: flex; gap: 8px; flex-wrap: wrap;
}

.sma__no-mgr { font-size: 12px; color: #9ca3af; margin: 0; padding: 4px 0; }

.sma__mgr {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #f9fafb; border: 1px solid #f3f4f6;
  border-radius: 10px;
}

.sma__mgr-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: #818cf8; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; flex-shrink: 0;
}

.sma__mgr-info { }
.sma__mgr-name { display: block; font-size: 12px; font-weight: 600; color: #111827; }
.sma__mgr-email { display: block; font-size: 10px; color: #9ca3af; }

.sma__remove-btn {
  width: 22px; height: 22px; border: none; background: transparent;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #d1d5db; transition: all 0.15s ease;
}

.sma__remove-btn:hover { background: #fef2f2; color: #dc2626; }

@media (max-width: 768px) {
  .sma__card-top { flex-direction: column; align-items: flex-start; }
  .sma__toolbar { flex-direction: column; }
}

/* ═══════════════════════════════
   Project Templates — Indigo Overrides
   ═══════════════════════════════ */
.md-content .templates-table-wrap {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  overflow-x: auto; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.md-content .templates-table {
  font-size: 13px;
}

.md-content .templates-table thead th {
  background: #f9fafb; color: #9ca3af; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.md-content .templates-table tbody td {
  padding: 12px; border-bottom: 1px solid #f3f4f6; color: #374151;
}

.md-content .templates-table tbody tr:hover { background: #fafbff; }
.md-content .templates-table tbody tr.tpl-row-inactive { opacity: 0.5; }

.md-content .templates-table code {
  background: #eef2ff; color: #6366f1; padding: 2px 6px; border-radius: 4px;
  font-size: 12px; font-weight: 600;
}

.md-content .program-chip {
  background: #eef2ff; color: #6366f1; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}

.md-content .status-active { color: #16a34a; font-weight: 600; font-size: 12px; }
.md-content .status-inactive { color: #9ca3af; font-weight: 500; font-size: 12px; }

.md-content .row-actions { display: flex; gap: 4px; }

.md-content .row-actions .btn-sm {
  padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
  font-family: inherit; cursor: pointer; border: 1px solid #e5e7eb;
  transition: all 0.15s ease;
}

.md-content .row-actions .btn-primary {
  background: #6366f1; color: #fff; border-color: #6366f1;
}
.md-content .row-actions .btn-primary:hover { background: #4f46e5; }

.md-content .row-actions .btn-secondary {
  background: #fff; color: #374151; border-color: #e5e7eb;
}
.md-content .row-actions .btn-secondary:hover { background: #eef2ff; color: #6366f1; border-color: #c7d2fe; }

.md-content .row-actions .btn-danger {
  background: #fff; color: #dc2626; border-color: #fecaca;
}
.md-content .row-actions .btn-danger:hover { background: #fef2f2; }

.md-content .num-cell { text-align: center; font-weight: 600; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════
   Template Editor — Indigo Overrides
   ═══════════════════════════════ */

/* Key badge */
.md-content .tpl-key-badge {
  background: #eef2ff !important; color: #6366f1 !important;
  padding: 3px 10px !important; border-radius: 8px !important;
  font-size: 12px !important; font-weight: 700 !important;
  font-family: monospace !important; letter-spacing: 0.5px !important;
}

/* Section titles */
.md-content .template-editor .section-title {
  font-size: 16px; font-weight: 700; color: #111827;
}

/* Metadata section */
.md-content .template-editor .metadata-section {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 18px 22px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Milestone cards */
.md-content .milestone-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  margin-bottom: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.md-content .milestone-card .milestone-header {
  background: #f9fafb; border-bottom: 1px solid #f3f4f6; padding: 12px 18px;
}

/* Subtask table inside milestones */
.md-content .subtasks-table,
.md-content table.subtasks-table {
  font-size: 12px; border-collapse: collapse; width: 100%;
}

.md-content .subtasks-table thead th,
.md-content table.subtasks-table thead th,
.md-content .subtasks-table thead,
.md-content table thead {
  background: #f9fafb !important; color: #9ca3af !important; font-size: 10px !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: 0.5px !important; padding: 8px 10px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.md-content .subtasks-table tbody td {
  padding: 10px; border-bottom: 1px solid #f3f4f6; color: #374151;
  vertical-align: top;
}

.md-content .subtasks-table tbody tr:hover { background: #fafbff; }

/* Priority badges — only target span badges, not card containers */
.md-content span.priority-badge-HIGH,
.md-content span.priority-high,
.md-content .priority-badge.priority-high {
  background: #fef2f2; color: #dc2626;
  padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700;
}

.md-content span.priority-badge-MEDIUM,
.md-content span.priority-medium,
.md-content .priority-badge.priority-medium {
  background: #fef3c7; color: #92400e;
  padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700;
}

.md-content span.priority-badge-LOW,
.md-content span.priority-low,
.md-content .priority-badge.priority-low {
  background: #dcfce7; color: #166534;
  padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700;
}

/* Milestone type/week badges */
.md-content .week-badge,
.md-content .type-badge {
  background: #eef2ff !important; color: #6366f1 !important;
  padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
}

/* Helper cells */
.md-content .helper-cell {
  text-align: center; color: #6366f1; font-weight: 700; font-size: 12px;
}

/* Hint & pointer blocks */
.md-content .hint-block {
  background: #ecfeff; border-left: 3px solid #06b6d4; padding: 6px 10px;
  border-radius: 0 6px 6px 0; font-size: 11px; color: #155e75; margin: 4px 0;
}

.md-content .pointer-block {
  background: #fff7ed; border-left: 3px solid #f97316; padding: 6px 10px;
  border-radius: 0 6px 6px 0; font-size: 11px; color: #9a3412; margin: 4px 0;
}

/* Buttons inside editor */
.md-content .template-editor .btn-primary,
.md-content .milestone-card .btn-primary {
  background: #6366f1 !important; border-color: #6366f1 !important; color: #fff !important;
}
.md-content .template-editor .btn-primary:hover,
.md-content .milestone-card .btn-primary:hover {
  background: #4f46e5 !important;
}

.md-content .template-editor .btn-secondary,
.md-content .milestone-card .btn-secondary {
  background: #fff !important; color: #374151 !important; border: 1px solid #e5e7eb !important;
}
.md-content .template-editor .btn-secondary:hover,
.md-content .milestone-card .btn-secondary:hover {
  background: #eef2ff !important; color: #6366f1 !important; border-color: #c7d2fe !important;
}

.md-content .template-editor .btn-danger,
.md-content .milestone-card .btn-danger,
.md-content .subtasks-table .btn-danger,
.md-content .btn-xs.btn-danger {
  background: #fff !important; color: #9ca3af !important; border: 1px solid #e5e7eb !important;
  font-size: 11px !important; padding: 4px 8px !important; border-radius: 6px !important;
}
.md-content .template-editor .btn-danger:hover,
.md-content .milestone-card .btn-danger:hover,
.md-content .subtasks-table .btn-danger:hover,
.md-content .btn-xs.btn-danger:hover {
  background: #fef2f2 !important; color: #dc2626 !important; border-color: #fecaca !important;
}

/* Self-check block */
.md-content .self-check-block {
  background: #fefce8; border: 1px solid #fde68a; border-radius: 10px;
  padding: 10px 14px; font-size: 12px; color: #854d0e;
}

/* Kill navy blue table header from ProjectTemplates.css */
.md-content .templates-table thead,
.md-content table thead tr {
  background: #f9fafb !important;
}

.md-content .templates-table thead th,
.md-content table thead th {
  background: #f9fafb !important;
  color: #9ca3af !important;
}

/* Active badge */
.md-content .template-editor .status-active { color: #16a34a; font-weight: 600; }

/* Back button override */
.md-content .template-editor .back-btn {
  all: unset !important; display: inline-flex !important; align-items: center !important;
  gap: 6px !important; color: #6366f1 !important; font-size: 13px !important;
  font-weight: 600 !important; cursor: pointer !important; margin-bottom: 12px !important;
}
.md-content .template-editor .back-btn:hover { color: #4338ca !important; }

.App {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1 1;
  padding: 0;
}

/* Manager Dashboard styles moved to ManagerDashboard.css */
/* Wel
come Message Styles */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.welcome-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.welcome-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  text-align: center;
  border-radius: 12px 12px 0 0;
}

.welcome-header h1 {
  margin: 0 0 10px 0;
  font-size: 2.2em;
  font-weight: 600;
}

.welcome-header p {
  margin: 0;
  font-size: 1.1em;
  opacity: 0.9;
}

.welcome-content {
  padding: 30px;
}

.welcome-section {
  margin-bottom: 25px;
}

.welcome-section h3 {
  color: #333;
  margin: 0 0 15px 0;
  font-size: 1.3em;
  font-weight: 600;
}

.welcome-section p {
  color: #666;
  line-height: 1.6;
  margin: 0 0 15px 0;
}

.welcome-section ul {
  color: #666;
  line-height: 1.8;
  margin: 0;
  padding-left: 20px;
}

.welcome-section li {
  margin-bottom: 8px;
}

.example-questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.question-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  font-style: italic;
  color: #495057;
  border-left: 4px solid #667eea;
}

.welcome-actions {
  padding: 0 30px 30px 30px;
  text-align: center;
}

.btn-large {
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 8px;
  min-width: 250px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-modal {
    margin: 10px;
    max-width: none;
  }
  
  .welcome-header {
    padding: 20px;
  }
  
  .welcome-header h1 {
    font-size: 1.8em;
  }
  
  .welcome-content {
    padding: 20px;
  }
  
  .welcome-actions {
    padding: 0 20px 20px 20px;
  }
  
  .btn-large {
    min-width: auto;
    width: 100%;
  }
}
/* Simplified Dashboard Styles */
.simplified-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 40px;
}

.dashboard-title {
  font-size: 2.5em;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.dashboard-subtitle {
  font-size: 1.2em;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Main Action Section */
.main-action-section {
  margin-bottom: 50px;
}

.hero-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 40px;
  color: white;
  text-align: center;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.hero-content h2 {
  font-size: 2.2em;
  margin-bottom: 15px;
  font-weight: 600;
}

.hero-content p {
  font-size: 1.1em;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-icon {
  font-size: 4em;
  margin-bottom: 20px;
}

.btn-hero {
  padding: 18px 40px;
  font-size: 1.3em;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.btn-hero:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-features {
  margin-top: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
  font-size: 2em;
  margin-bottom: 10px;
}

/* Quick Tips Section */
.quick-tips-section {
  margin-bottom: 40px;
}

.quick-tips-section h3 {
  text-align: center;
  font-size: 1.8em;
  color: #333;
  margin-bottom: 30px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 25px;
  gap: 25px;
}

.tip-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.tip-card h4 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.tip-card p {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.tip-example {
  background: #f8f9fa;
  border-left: 4px solid #667eea;
  padding: 12px 15px;
  border-radius: 6px;
  font-style: italic;
  color: #495057;
  font-size: 0.9em;
}

/* Sample Questions Section */
.sample-questions-section h3 {
  text-align: center;
  font-size: 1.8em;
  color: #333;
  margin-bottom: 30px;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 800px;
  margin: 0 auto;
}

.question-item {
  display: flex;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
}

.question-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.question-icon {
  font-size: 1.5em;
  margin-right: 15px;
  color: #667eea;
}

.question-text {
  color: #333;
  font-weight: 500;
  line-height: 1.5;
}

/* Dify Chat Container */
.dify-chat-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}

.chat-header {
  background: white;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-title-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-btn {
  padding: 8px 16px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.3s ease;
}

.back-btn:hover {
  background: #5a6268;
}

/* Override for chat interface context */
.project-chat-interface .back-btn {
  background: none;
  border: none;
  box-shadow: none;
  color: #6366f1;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0;
}

.project-chat-interface .back-btn:hover {
  background: none;
  color: #4338ca;
}

.chat-title h3 {
  margin: 0;
  color: #333;
  font-size: 1.5em;
}

.chat-subtitle {
  color: #666;
  font-size: 0.9em;
  display: block;
  margin-top: 5px;
}

.chat-student {
  color: #667eea;
  font-size: 0.9em;
  display: block;
  margin-top: 2px;
}

.dify-embed-wrapper {
  flex: 1 1;
  padding: 20px;
  background: #f8f9fa;
}

.chat-footer {
  background: white;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

.chat-info {
  max-width: 800px;
  margin: 0 auto;
}

.chat-info p {
  margin: 0 0 10px 0;
  color: #333;
  font-weight: 600;
}

.chat-info ul {
  margin: 0;
  padding-left: 20px;
  color: #666;
}

.chat-info li {
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .simplified-dashboard {
    padding: 15px;
  }
  
  .dashboard-title {
    font-size: 2em;
  }
  
  .hero-card {
    padding: 30px 20px;
  }
  
  .hero-content h2 {
    font-size: 1.8em;
  }
  
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .chat-title-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .dify-embed-wrapper {
    padding: 10px;
  }
}
/* 
Multi-Project Dashboard Styles - Moved to ProjectDashboard.css */

/* Project List & Dashboard Styles - Moved to ProjectDashboard.css */

/* Project Creation Styles */
.project-creation {
  flex: 1 1;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
  max-height: 80vh;
  overflow-y: auto;
}

.project-creation-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f7fafc;
}

.project-creation-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
}

.project-creation-header p {
  color: #718096;
  margin: 0;
}

.project-creation-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.875rem;
}

.form-input,
.form-textarea {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
  font-size: 0.75rem;
  color: #a0aec0;
}

.project-type-selector {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1rem;
  gap: 1rem;
}

.type-option {
  display: block;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.type-option:hover {
  border-color: #cbd5e0;
}

.type-option.selected {
  border-color: #667eea;
  background: #f7fafc;
}

.type-option input {
  display: none;
}

.type-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.type-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.type-icon {
  font-size: 1.25rem;
}

.type-label {
  font-weight: 600;
  color: #2d3748;
}

.type-description {
  color: #718096;
  font-size: 0.875rem;
}

.sample-projects {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #f7fafc;
}

.sample-projects h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

.sample-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sample-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.sample-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sample-icon {
  font-size: 1rem;
}

.sample-type {
  font-size: 0.75rem;
  color: #718096;
  font-weight: 500;
}

.sample-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
}

.sample-description {
  font-size: 0.75rem;
  color: #718096;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.sample-use-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sample-use-btn:hover {
  background: #5a67d8;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #f7fafc;
}

.creation-tips {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f7fafc;
  border-radius: 8px;
}

.creation-tips h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
}

.creation-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.creation-tips li {
  padding: 0.5rem 0;
  color: #4a5568;
  font-size: 0.875rem;
  line-height: 1.5;
}

.creation-tips strong {
  color: #2d3748;
}

/* Project Chat Interface - Removed conflicting styles */

/* Quick Actions Sidebar - Removed */



/* Error Message Styles */
.error-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fed7d7;
  color: #c53030;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.error-icon {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-content {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  /* Quick actions sidebar removed */
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-card-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .project-header {
    flex-direction: column;
    text-align: center;
  }
  
  .chat-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-left,
  .header-right {
    justify-content: center;
  }
}

/* Chat interface styles moved to ProjectChatInterface.css */

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

.loading-spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

.text-muted {
  color: #a0aec0;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .conversation-list {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  }
  
  .chat-interface {
    position: relative;
  }
}


/* All chat interface styles moved to ProjectChatInterface.css */

