/* src/pages/ProjectDetails.css */

.project-details {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.btn-back {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-back:hover {
  border-color: #667eea;
  color: #667eea;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn-edit {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-edit:hover {
  transform: translateY(-2px);
}

.btn-delete {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-delete:hover {
  transform: translateY(-2px);
}

.details-content {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.project-header-section {
  padding: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.project-image {
  margin-bottom: 24px;
}

.project-image img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.project-header-info h1 {
  font-size: 36px;
  margin: 0 0 16px 0;
}

.project-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.category-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.status-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.status-planning {
  background: #3498db;
  color: white;
}

.status-in-progress {
  background: #f39c12;
  color: white;
}

.status-testing {
  background: #9b59b6;
  color: white;
}

.status-completed {
  background: #2ecc71;
  color: white;
}

.status-on-hold {
  background: #95a5a6;
  color: white;
}

.project-description {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.95;
}

.section {
  padding: 32px 40px;
  border-bottom: 1px solid #e0e0e0;
}

.section:last-child {
  border-bottom: none;
}

.section h2 {
  font-size: 24px;
  color: #2c3e50;
  margin: 0 0 24px 0;
}

.progress-bar-large {
  height: 40px;
  background: #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.progress-fill-large {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
}

.progress-text {
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.progress-stats {
  display: flex;
  gap: 32px;
}

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

.stat-label {
  font-size: 14px;
  color: #7f8c8d;
}

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

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

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-label {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 600;
}

.detail-value {
  font-size: 16px;
  color: #2c3e50;
}

.objectives-text {
  font-size: 16px;
  line-height: 1.8;
  color: #2c3e50;
}

.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.milestone-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #e0e0e0;
}

.milestone-item.milestone-completed {
  border-left-color: #2ecc71;
}

.milestone-item.milestone-in-progress {
  border-left-color: #f39c12;
}

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

.milestone-content {
  flex: 1;
}

.milestone-content h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
}

.milestone-content p {
  margin: 0 0 12px 0;
  color: #7f8c8d;
  font-size: 14px;
}

.milestone-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #7f8c8d;
}

.empty-message {
  text-align: center;
  color: #7f8c8d;
  font-size: 16px;
  padding: 40px;
}

.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 20px;
}

.spinner {
  font-size: 18px;
  color: #7f8c8d;
}

@media (max-width: 768px) {
  .project-details {
    padding: 16px;
  }

  .details-header {
    flex-direction: column;
    gap: 16px;
  }

  .project-header-section,
  .section {
    padding: 24px;
  }

  .project-header-info h1 {
    font-size: 24px;
  }

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

/* --- Added Evidence & Modal Styles --- */

/* Evidence Display */
.evidence-display {
  background: rgba(102, 126, 234, 0.05);
  border-left: 4px solid #667eea;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.evidence-label {
  font-weight: 600;
  color: #667eea;
  display: block;
  margin-bottom: 8px;
}

.evidence-text {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

/* Uploaded File Display */
.uploaded-file-display {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

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

.file-icon {
  font-size: 32px;
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.file-size {
  font-size: 12px;
  color: #999;
}

.btn-view-file {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-view-file:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

/* Milestone Actions */
.milestone-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.btn-submit-evidence,
.btn-view-evidence {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-submit-evidence:hover,
.btn-view-evidence:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-view-evidence {
  background: linear-gradient(135deg, #42a5f5 0%, #478ed1 100%);
}

.locked-message {
  color: #999;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Evidence Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.evidence-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 30px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-content {
  padding: 30px;
}

.milestone-desc {
  color: #666;
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.6;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

/* File Upload Area */
.file-upload-area {
  margin-top: 10px;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 2px dashed #667eea;
  border-radius: 12px;
  background: #f8f9ff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.file-upload-label:hover {
  background: #eff1ff;
  border-color: #5568d3;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.upload-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.upload-hint {
  font-size: 12px;
  color: #999;
}

/* Selected File Info */
.selected-file-info {
  margin-top: 15px;
  padding: 12px;
  background: #e8f5e9;
  border: 2px solid #66bb6a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.file-size-small {
  color: #999;
  font-size: 12px;
  margin-left: auto;
}

.btn-remove-file {
  background: #ff5252;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-remove-file:hover {
  background: #d32f2f;
}

/* Existing File Display (for completed milestones) */
.existing-file-display {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
}

.file-icon-large {
  font-size: 48px;
}

.file-info-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.file-name-large {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.btn-download-file {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.btn-download-file:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.btn-cancel,
.btn-submit {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel {
  background: #f5f5f5;
  color: #666;
}

.btn-cancel:hover {
  background: #e0e0e0;
}

.btn-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.completed-info {
  background: #e8f5e9;
  border: 2px solid #66bb6a;
  color: #2e7d32;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-top: 20px;
}

/* File Preview Section */
.file-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.file-text {
  display: flex;
  flex-direction: column;
}

.file-name-preview {
  font-weight: 500;
  color: #333;
}

/* Missing styles for Clear Evidence button and actions container */
.completed-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-clear-evidence {
  background: white;
  border: 2px solid #ff5252;
  color: #ff5252;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-clear-evidence:hover {
  background: #fff0f0;
  transform: translateY(-2px);
}

/* Missing progress-section container */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}