/* src/pages/ProjectDetailPage.css */

.project-detail-page {
  padding: 0;
  min-height: 100vh;
  background: #f8f9fa;
}

/* Header Section */
.project-detail-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 40px;
  border-radius: 12px;
  margin-bottom: 30px;
  position: relative;
}

.btn-back {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-5px);
}

.project-info h1 {
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 700;
}

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

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

.meta-date {
  font-size: 14px;
  opacity: 0.95;
}

/* Progress Card */
.project-progress-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin-top: 25px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.progress-percent-large {
  font-size: 36px;
  font-weight: 700;
}

.progress-bar-large {
  width: 100%;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill-large {
  height: 100%;
  background: white;
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.progress-stats {
  text-align: center;
  font-size: 14px;
  opacity: 0.95;
}

/* Milestones Section */
.milestones-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.milestones-section h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  color: #333;
}

.section-subtitle {
  color: #666;
  margin: 0 0 30px 0;
  font-size: 16px;
}

/* Milestones Timeline */
.milestones-timeline {
  position: relative;
  padding-left: 20px;
}

/* Milestone Card */
.milestone-card {
  position: relative;
  background: white;
  border: 3px solid #e0e0e0;
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.milestone-card:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.milestone-card.status-completed {
  border-color: #66bb6a;
  background: #f1f8f4;
}

.milestone-card.status-progress {
  border-color: #29b6f6;
  background: #e3f2fd;
}

.milestone-card.status-pending {
  border-color: #ffa726;
  background: #fff8e1;
}

.milestone-card.locked {
  opacity: 0.6;
  border-color: #ccc;
  background: #f5f5f5;
}

/* Milestone Header */
.milestone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.milestone-number {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

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

.milestone-status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-completed .milestone-status-badge {
  background: #66bb6a;
  color: white;
}

.status-progress .milestone-status-badge {
  background: #29b6f6;
  color: white;
}

.status-pending .milestone-status-badge {
  background: #ffa726;
  color: white;
}

.locked .milestone-status-badge {
  background: #999;
  color: white;
}

/* Milestone Content */
.milestone-content h3 {
  margin: 0 0 10px 0;
  font-size: 22px;
  color: #333;
}

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

.milestone-meta {
  display: flex;
  gap: 25px;
  margin-bottom: 15px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
}

.meta-value {
  font-size: 14px;
  color: #333;
  font-weight: 600;
}

.meta-value.submitted {
  color: #66bb6a;
}

/* 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;
}

/* Timeline Connector */
.timeline-connector {
  position: absolute;
  left: 40px;
  top: 100%;
  width: 3px;
  height: 30px;
  background: linear-gradient(to bottom, #667eea, transparent);
}

/* 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;
}

/* Responsive */
@media (max-width: 768px) {
  .project-detail-header {
    padding: 24px 20px;
  }

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

  .project-meta {
    gap: 8px;
  }

  .project-progress-card {
    padding: 15px;
  }

  .progress-percent-large {
    font-size: 28px;
  }

  .milestones-section {
    padding: 20px;
  }

  .milestone-card {
    padding: 16px;
  }

  .milestone-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .milestone-meta {
    flex-direction: column;
    gap: 8px;
  }

  .modal-content {
    padding: 20px;
  }

  .uploaded-file-display {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-view-file {
    width: 100%;
  }

  .evidence-modal {
    width: 95%;
  }
}
/* File Preview Section */
.selected-file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-top: 10px;
}

.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;
}

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

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

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

.btn-remove-file:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Clear Evidence Button */
.completed-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-clear-evidence {
  background: #ff6b6b;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.btn-clear-evidence:hover {
  background: #ff5252;
}
