/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Role-based access control tooltips */
.disabled-with-tooltip {
  background-color: #9ca3af !important; /* Gray for disabled state */
  color: #6b7280 !important;
  cursor: not-allowed;
  position: relative;
  opacity: 0.7;
}

.disabled-with-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background: #1e40af; /* YMCA blue */
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  word-wrap: break-word;
  z-index: 1000;
  max-width: 250px;
  min-width: 180px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  
  /* Fade in/out animation */
  opacity: 0;
  animation: tooltipFadeIn 0.3s ease-in-out forwards;
}

.disabled-with-tooltip:hover::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  border: 5px solid transparent;
  border-top-color: #1e40af; /* YMCA blue arrow pointing down */
  z-index: 1000;
  opacity: 0;
  animation: tooltipFadeIn 0.3s ease-in-out forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Fade out when not hovering */
.disabled-with-tooltip:not(:hover)::after,
.disabled-with-tooltip:not(:hover)::before {
  animation: tooltipFadeOut 0.2s ease-in-out forwards;
}

@keyframes tooltipFadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Thank You Page Styles */
.thank-you-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thank-you-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  width: 90%;
  margin: 0 auto;
}

.thank-you-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.thank-you-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.thank-you-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.thank-you-message {
  font-size: 1.25rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

.thank-you-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.thank-you-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.thank-you-button:active {
  transform: translateY(0);
}

/* Mobile responsiveness for thank you page */
@media (max-width: 768px) {
  .thank-you-container {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  .thank-you-title {
    font-size: 2rem;
  }
  
  .thank-you-message {
    font-size: 1.1rem;
  }
  
  .thank-you-icon {
    font-size: 3rem;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

/* Header styles */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-content > div:first-child {
  flex: 1;
}

.header-content > div:nth-child(2) {
  flex: 2;
  text-align: center;
}

.header-content > div:last-child {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.ymca-logo-container {
  width: 60px;
  height: 60px;
}

.main-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

/* Removed YMCA selector styles - no longer needed */

/* Dashboard styles */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-content h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.welcome-content p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Force 3-column layout for all screen sizes */
.dashboard-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  grid-template-rows: auto !important;
}

.dashboard-grid .dashboard-card {
  min-height: 200px;
}

.dashboard-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

/* Start Assessment Card */
.start-assessment-card {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
}

.start-assessment-card:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.start-assessment-card .card-icon {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.start-assessment-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.start-assessment-card p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
  line-height: 1.4;
}

/* Stats Cards */
.stats-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stats-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stats-description {
  font-size: 0.8rem;
  opacity: 0.8;
  font-weight: 400;
}

.dashboard-card.drafts-card {
  background: #e5e7eb !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
}

.dashboard-card.submitted-card {
  background: #e5e7eb !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
}

/* Dashboard Insights Section */
.dashboard-insights {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.insights-header {
  margin-bottom: 1.5rem;
}

.insights-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
}

.insights-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.insight-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.insight-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.insight-value {
  font-size: 1rem;
  color: #1f2937;
  font-weight: 600;
}

/* Recent Activity Section */
.recent-activity-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.activity-header {
  margin-bottom: 1.5rem;
}

.activity-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.activity-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.activity-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.4;
}

.activity-time {
  color: #6b7280;
  font-size: 0.75rem;
  white-space: nowrap;
}

.empty-activity {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  padding: 2rem;
}


/* Period Accordion */
.period-accordion {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.period-accordion-header {
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f5f9;
  border-radius: 8px 8px 0 0;
  transition: background-color 0.2s ease;
}

.period-accordion-header:hover {
  background-color: #e2e8f0;
}

.period-accordion-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

.period-accordion-toggle {
  font-size: 0.875rem;
  transition: transform 0.2s ease;
  color: #6b7280;
}

.period-accordion-header.expanded .period-accordion-toggle {
  transform: rotate(180deg);
}

.period-accordion-content {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: block; /* Ensure content is visible by default */
}

.assessments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 8px;
  border: 2px dashed #d1d5db;
}

.empty-state p {
  font-size: 1.1rem;
  margin: 0;
}

/* Assessment Cards */
.assessment-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

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

.assessment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.assessment-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-draft {
  background: #fef3c7;
  color: #92400e;
}

.status-submitted {
  background: #d1fae5;
  color: #065f46;
}

.status-archived {
  background: #e5e7eb;
  color: #374151;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.assessment-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.progress-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
}

.progress-date {
  font-size: 0.9rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.category-breakdown {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

/* Enhanced category breakdown styles */
.categories-list {
  margin-top: 0.5rem;
}

.categories-header {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.8rem;
}

.category-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.category-name {
  color: #374151;
  font-weight: 500;
  flex: 1;
}

.category-files {
  color: #6b7280;
  font-size: 0.75rem;
}

.no-categories {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.8rem;
}

/* Draft Preview Styles for Discard Modal */
.draft-preview {
  margin: 1rem 0;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.draft-preview h4 {
  margin: 0 0 0.75rem 0;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 600;
}

.files-list {
  max-height: 200px;
  overflow-y: auto;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

.file-row:last-child {
  border-bottom: none;
}

.file-name {
  color: #374151;
  font-weight: 500;
  flex: 1;
  margin-right: 1rem;
}

.file-date {
  color: #6b7280;
  font-size: 0.8rem;
  white-space: nowrap;
}

.empty-state {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* Error Banner with proper ARIA */
.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* Loading States - FIXED SELECTORS */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Use aria-busy instead of .loading class */
[aria-busy="true"] .btn-primary {
  filter: grayscale(0.2);
  background: #6b7280;
}

/* Prevent overlay/ESC while loading */
.modal[aria-busy="true"] {
  pointer-events: none;
}

.modal[aria-busy="true"] .modal-content {
  pointer-events: auto;
}

/* REMOVED: Focus outline suppression - this harms keyboard users */
/* .modal:focus-within { outline: none; } */

/* Error State Styles */
.error-state {
  text-align: center;
  padding: 2rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin: 1rem 0;
}

.error-state h3 {
  color: #dc2626;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.error-state p {
  color: #7f1d1d;
  margin-bottom: 1rem;
}

.error-state .btn {
  margin-top: 0.5rem;
}

/* Section Header Styles */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
}

#refresh-dashboard-btn {
  padding: 0.5rem 1rem;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#refresh-dashboard-btn:hover:not(:disabled) {
  background: #4b5563;
}

#refresh-dashboard-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}



/* Loading States */
.stats-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.stats-card.loading .stats-number {
  color: #9ca3af;
}

.stats-card.loading .stats-number::after {
  content: "Loading...";
  font-size: 12px;
  font-weight: normal;
  display: block;
  margin-top: 4px;
}

/* Error Banner Styles */
#period-error {
  display: none !important; /* Hidden by default */
}

#period-error.show {
  display: flex !important;
}

.assessment-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-continue, .btn-view, .btn-delete, .btn-download {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-continue {
  background: #3b82f6;
  color: white;
}

.btn-continue:hover {
  background: #2563eb;
}

.btn-view {
  background: #10b981;
  color: white;
}

.btn-view:hover {
  background: #059669;
}

.btn-delete {
  background: #ef4444;
  color: white;
}

.btn-delete:hover {
  background: #dc2626;
}

.btn-download {
  background: #6b7280;
  color: white;
}

.btn-download:hover {
  background: #4b5563;
}

/* New Assessment Warning Modal */
#new-assessment-modal .modal-content {
  max-width: 500px;
  margin: 10% auto;
}

#new-assessment-modal .modal-header {
  background: #e0f2fe;
  border-bottom: 1px solid #0ea5e9;
  padding: 1.5rem;
  border-radius: 8px 8px 0 0;
}

#new-assessment-modal .modal-header h3 {
  margin: 0;
  color: #0c4a6e;
  font-size: 1.25rem;
  font-weight: 600;
}

#new-assessment-modal .modal-body {
  padding: 2rem;
  text-align: center;
}

#new-assessment-modal .modal-body p {
  margin: 0 0 1rem 0;
  color: #374151;
  line-height: 1.6;
}

#new-assessment-modal .modal-body p:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: #111827;
}

#new-assessment-modal .modal-footer {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 8px 8px;
}

#new-assessment-modal .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

#new-assessment-modal .btn-secondary {
  background: #6b7280;
  color: white;
}

#new-assessment-modal .btn-secondary:hover {
  background: #4b5563;
}

#new-assessment-modal .btn-primary {
  background: #3b82f6;
  color: white;
}

#new-assessment-modal .btn-primary:hover {
  background: #2563eb;
}

#new-assessment-modal .btn-danger {
  background: #ef4444;
  color: white;
}

#new-assessment-modal .btn-danger:hover {
  background: #dc2626;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
  }
  
  .dashboard-card {
    min-height: 180px;
    padding: 1.5rem;
  }
  
  .insights-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem;
  }
  
  .main-title {
    font-size: 1.75rem;
  }
  
  .dashboard-card {
    min-height: 160px;
    padding: 1.25rem;
  }
  
  .start-assessment-card h3 {
    font-size: 1.3rem;
  }
  
  .start-assessment-card p {
    font-size: 0.85rem;
  }
  
  .stats-number {
    font-size: 2.2rem;
  }
  
  .stats-label {
    font-size: 0.85rem;
  }
  
  .stats-description {
    font-size: 0.75rem;
  }
}

@media (max-width: 850px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem;
  }
  
  .dashboard-card {
    min-height: 150px;
    padding: 1rem;
  }
  
  .start-assessment-card h3 {
    font-size: 1.2rem;
  }
  
  .start-assessment-card p {
    font-size: 0.8rem;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .stats-label {
    font-size: 0.8rem;
  }
  
  .stats-description {
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem;
  }
  
  .insights-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .dashboard-card {
    padding: 0.75rem;
    min-height: 150px;
  }
  
  .welcome-content h2 {
    font-size: 1.5rem;
  }
  
  .welcome-content p {
    font-size: 0.9rem;
  }
  
  .main-title {
    font-size: 1.5rem;
  }
  
  .start-assessment-card h3 {
    font-size: 1.1rem;
  }
  
  .start-assessment-card p {
    font-size: 0.8rem;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .stats-label {
    font-size: 0.8rem;
  }
  
  .stats-description {
    font-size: 0.7rem;
  }
  
  .start-assessment-card .card-icon {
    font-size: 2rem;
  }
}

/* Extra small screens - stack cards vertically only on very narrow screens */
@media (max-width: 360px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .dashboard-card {
    padding: 1rem;
    min-height: 120px;
  }
  
  .start-assessment-card h3 {
    font-size: 1rem;
  }
  
  .start-assessment-card p {
    font-size: 0.75rem;
  }
  
  .stats-number {
    font-size: 1.75rem;
  }
  
  .stats-label {
    font-size: 0.75rem;
  }
  
  .stats-description {
    font-size: 0.65rem;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .assessment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .assessment-actions {
    flex-wrap: wrap;
  }
}

.performance-overview {
  margin-bottom: 2rem;
}

.overview-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.overview-card h2 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.overview-card p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  text-align: center;
}

.stat-card h3 {
  color: #374151;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #7c3aed;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Organization info */
.org-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #64748b;
}

.org-info div:first-child {
  margin-bottom: 0.5rem;
}

/* Mode toggle */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.mode-toggle span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.mode-buttons {
  display: flex;
  background: white;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  overflow: hidden;
}

.mode-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: #3b82f6;
  color: white;
}

.mode-description {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: 0.5rem;
}

/* Quick actions */
.quick-actions-section {
  margin-top: 2rem;
}

.actions-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.actions-card h3 {
  color: #1f2937;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

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

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

.action-btn:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-content h4 {
  color: #1f2937;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.action-content p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .dashboard {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .mode-toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Loading Modal */
.loading-modal-content {
  text-align: center;
  padding: 3rem 2.5rem;
  max-width: 400px;
  min-width: 320px;
  margin: 0 auto;
  width: auto;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f4f6;
  border-top: 5px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto 1.5rem auto;
}

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

.loading-modal-content h3 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
}

.loading-modal-content p {
  margin: 0;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* Error states */
.error {
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Success states */
.success {
  color: #059669;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Navigation styles */
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Logo section */
.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Upload page styles */
.upload-section {
  max-width: 90vw;
  margin: 0 auto;
  padding: 2rem;
}

/* Upload Portal Header */
.upload-portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.portal-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-indicator {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

/* Header progress bar */
.portal-title-section .progress-bar {
  width: 200px;
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.portal-title-section .progress-fill {
  height: 100%;
  background-color: #3b82f6;
  width: 0%;
  transition: width 0.3s ease;
}

.portal-info-section {
  flex: 1;
  text-align: center;
}

.period-info {
  font-size: 0.875rem;
  color: #374151;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0.5rem;
}

.status-badge.partial {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge.not-started {
  background-color: #f3f4f6;
  color: #6b7280;
}

.status-badge.complete {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge.offline {
  background-color: #fef2f2;
  color: #dc2626;
}

.time-left {
  color: #3b82f6;
  font-weight: 500;
}

.portal-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-outline-danger {
  background-color: white;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.btn-outline-danger:hover {
  background-color: #dc2626;
  color: white;
}

.btn-success {
  background-color: #059669;
  color: white;
}

.btn-success:hover {
  background-color: #047857;
}

.upload-form {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-group select,
.form-group input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group select:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
  display: block;
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Button styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* Modern header buttons */
.header .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

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

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
}

.btn-primary:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

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

.btn-secondary:hover {
  background-color: #4b5563;
}

/* Upload progress - removed old styles, using modal-progress-section instead */

/* Upload results */
.upload-results {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-top: 1.5rem;
}

.success-message {
  color: #059669;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 1rem;
  border-radius: 6px;
}

.error-message {
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1rem;
  border-radius: 6px;
}

/* Analytics page styles */
.analytics-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.chart-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.chart-placeholder {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  color: #6b7280;
  text-align: center;
}

.stat-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-change.positive {
  color: #059669;
}

.stat-change.negative {
  color: #dc2626;
}

.stat-change.neutral {
  color: #6b7280;
}

/* Recent activity */
.recent-activity {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  margin-top: 2rem;
}

.activity-list {
  margin-top: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.activity-content p {
  margin: 0;
  color: #374151;
}

.activity-content small {
  color: #6b7280;
}

/* Upload Dashboard Styles */
.upload-header {
  text-align: center;
  margin-bottom: 2rem;
}

.upload-header h2 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.upload-header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.instructions-card {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.instructions-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.instructions-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.instructions-text {
  color: #1e40af;
  font-weight: 500;
  line-height: 1.5;
}

/* Categories Grid - Matching Main Branch */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.category-card {
  border: 2px solid;
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Status-based styling matching main branch */
.category-card.status-not-started {
  background: white;
  border-color: #e5e7eb;
}

.category-card.status-not-started:hover {
  background: #f9fafb;
}

.category-card.status-in-progress {
  background: #fefce8;
  border-color: #fde047;
}

.category-card.status-in-progress:hover {
  background: #fef3c7;
}

.category-card.status-completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.category-card.status-completed:hover {
  background: #dcfce7;
}

.category-card.status-pending {
  background: #fef3c7;
  border-color: #f59e0b;
}

.category-card.status-pending:hover {
  background: #fde68a;
}

.category-card.status-no-document {
  background: #fef3c7;
  border-color: #f59e0b;
}

.category-card.status-no-document:hover {
  background: #fde68a;
}

/* Completed Categories Section */
.completed-categories-section {
  margin-top: 1rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.completed-categories-section h3 {
  margin: 0 0 0.75rem 0;
  color: #166534;
  font-size: 1rem;
  font-weight: 600;
}

.completed-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.completed-category-item {
  background: #dcfce7;
  color: #166534;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.completed-category-item:hover {
  background: #bbf7d0;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.status-icon {
  font-size: 1.5rem;
}

.status-info {
  text-align: right;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.status-timestamp {
  font-size: 0.75rem;
  color: #9ca3af;
}

.category-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-description {
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.progress-info {
  margin-bottom: 1rem;
}

.progress-info div {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.category-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.upload-action {
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.category-card:hover .upload-action {
  color: #2563eb;
}

/* Summary Section */
.summary-section {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
}

/* Removed h2 styling since title is removed */

/* Upload Stats Grid - Three Horizontal Cards */
.upload-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.upload-stat-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

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

.upload-stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.upload-stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status Card Styling */
.upload-stat-card.completed-card {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.upload-stat-card.completed-card:hover {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(107, 114, 128, 0.2);
}

.upload-stat-card.in-progress-card {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  border: 1px solid #d1d5db;
}

.upload-stat-card.submit-card {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.upload-stat-card.submit-card:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.submit-card-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.submit-card-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.submit-card-text {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upload-stat-card.total-card {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
}


.upload-stat-card.status-active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Upload Action Buttons */
.upload-action-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

/* Responsive Design for Upload Stats - Keep 3 cards in one row */
@media (max-width: 1200px) {
  .upload-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .upload-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .upload-stat-card {
    padding: 0.75rem;
  }
  
  .upload-stat-number {
    font-size: 1.5rem;
  }
  
  .upload-stat-label {
    font-size: 0.75rem;
  }
  
  .upload-action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .upload-action-buttons .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Stats Card - Removed duplicate definition */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

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

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #059669;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Controls Card */
.controls-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.5rem;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.status-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}



/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 80vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 2rem;
}

/* Removed category-info styles - title is now in modal header */

/* What/Why Section */
.what-why-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.what-section,
.why-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.section-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.section-content h5 {
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-content p {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

/* Requirements Accordion */
.requirements-accordion {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.accordion-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background-color: #f1f5f9;
}

.accordion-header .section-content h5 {
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-toggle {
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.accordion-header.expanded .accordion-toggle {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.requirements-list {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
}

.requirements-list ul {
  margin: 0;
  padding-left: 1.5rem;
}

.requirements-list li {
  margin-bottom: 0.5rem;
}

/* Modal Progress Bar */
.modal-progress-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.modal-progress-bar {
  flex: 1;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.modal-progress-fill {
  height: 100%;
  background-color: #3b82f6;
  width: 0%;
  transition: width 0.3s ease;
}

.modal-progress-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

/* Upload Areas */
.upload-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.upload-area {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem;
  min-height: 200px;
  transition: all 0.2s ease;
}

.upload-area:hover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.upload-area h4 {
  color: #1f2937;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.main-upload {
  border-color: #10b981;
  background-color: #ecfdf5;
}

.main-upload:hover {
  border-color: #059669;
  background-color: #d1fae5;
}

.secondary-upload {
  border-color: #06b6d4;
  background-color: #ecfeff;
}

.secondary-upload:hover {
  border-color: #0891b2;
  background-color: #cffafe;
}

/* File Drop Zone */
.file-drop-zone {
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.drop-zone-content {
  text-align: center;
  padding: 1.5rem;
}

.drop-zone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.drop-zone-content p {
  color: #6b7280;
  margin-bottom: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

.drop-zone-content small {
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1.4;
  display: block;
  margin-top: 0.5rem;
}

.file-drop-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Files List */
.files-list {
  margin-top: 1rem;
}

/* Previously Uploaded Files Section in Modal */
.previously-uploaded-section {
  margin: 1.5rem 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.previously-uploaded-header {
  padding: 1rem 1.5rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.previously-uploaded-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.file-counts {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #64748b;
}

.file-counts .main-count {
  color: #059669;
  font-weight: 500;
}

.file-counts .supporting-count {
  color: #2563eb;
  font-weight: 500;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.previously-uploaded-content {
  padding: 1rem 1.5rem;
  background: white;
  transition: all 0.3s ease;
}

.file-groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.file-group h5 {
  margin: 0 0 0.75rem 0;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.files-horizontal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.file-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem;
  min-width: 200px;
  max-width: 250px;
  transition: all 0.2s;
  position: relative;
}

.file-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.file-card-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.file-card-name {
  font-weight: 500;
  color: #1e293b;
  font-size: 0.875rem;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.file-card-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 0.875rem;
}

.file-card-remove:hover {
  background-color: #fef2f2;
}

.file-card-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-card-attribution {
  color: #059669;
  font-weight: 500;
  font-size: 0.7rem;
  background: #f0fdf4;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
  display: inline-block;
  margin-top: 0.25rem;
}

.file-card-empty {
  padding: 2rem;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.875rem;
}

/* Button styles */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  border-radius: 0.375rem;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline-secondary {
  color: #64748b;
  border-color: #d1d5db;
}

.btn-outline-secondary:hover {
  color: #374151;
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.btn-outline-danger {
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-outline-danger:hover {
  color: white;
  background-color: #dc2626;
  border-color: #dc2626;
}

/* All Files Modal */
.all-files-modal {
  max-width: 800px;
  width: 90vw;
  max-height: 80vh;
}

.all-files-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.files-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.files-actions {
  display: flex;
  gap: 0.5rem;
}

.all-files-content {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
}

.loading-files {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #64748b;
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.category-files-group {
  border-bottom: 1px solid #f1f5f9;
  padding: 1rem;
}

.category-files-group:last-child {
  border-bottom: none;
}

.category-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.category-files-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

.category-files-count {
  font-size: 0.875rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.category-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.all-files-empty {
  padding: 3rem;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

.all-files-error {
  padding: 2rem;
  text-align: center;
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  margin: 1rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.file-name {
  color: #374151;
  font-weight: 500;
  flex: 1;
  margin-right: 0.5rem;
}

.file-size {
  color: #6b7280;
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

.remove-file {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

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

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .upload-areas {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .what-why-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .upload-portal-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .portal-actions {
    justify-content: center;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-actions .btn {
    width: 100%;
  }
}

/* Notification Modal Styles */
#notificationModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#notificationModal .modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
}

#notificationModal .modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#notificationModal .modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

#notificationModal .modal-close {
  font-size: 1.5rem;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

#notificationModal .modal-close:hover {
  color: #374151;
}

#notificationModal .modal-body {
  padding: 1.5rem;
}

#notificationModal .modal-body p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

#notificationModal .modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

#notificationModal .modal-footer .btn {
  min-width: 80px;
}


/* Login prompt styles */
.login-prompt {
  text-align: center;
  padding: 3rem 2rem;
  color: #6b7280;
  font-size: 1.1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin: 2rem;
}

.login-prompt::before {
  content: "🔐";
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Existing files info styles */
.existing-files-info {
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.existing-files-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.existing-files-icon {
  font-size: 1.2rem;
}

.existing-files-title {
  font-weight: 600;
  color: #0369a1;
  font-size: 0.95rem;
}

.existing-files-details {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #0c4a6e;
}

.existing-files-details span {
  background: #e0f2fe;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

/* No Document Available Button Styles */
.btn-outline-warning {
  background-color: white;
  color: #f59e0b;
  border: 1px solid #f59e0b;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-outline-warning:hover:not(:disabled) {
  background-color: #f59e0b;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-outline-warning:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* No Document Confirmation Modal Styles */
.no-document-warning {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.warning-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.warning-content h4 {
  margin: 0 0 0.75rem 0;
  color: #92400e;
  font-size: 1.125rem;
  font-weight: 600;
}

.warning-content p {
  margin: 0 0 0.5rem 0;
  color: #92400e;
  line-height: 1.5;
  font-size: 0.95rem;
}

.warning-content p:last-child {
  margin-bottom: 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Modal Actions with Three Buttons */
.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.modal-actions .btn {
  min-width: 140px;
  flex: 1;
  max-width: 200px;
}

/* Responsive Design for Modal Actions */
@media (max-width: 768px) {
  .modal-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .modal-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .no-document-warning {
    flex-direction: column;
    text-align: center;
  }
  
  .warning-icon {
    margin-top: 0;
  }
}

/* Button Warning Style */
.btn-warning {
  background-color: #f59e0b;
  color: white;
  border: 1px solid #f59e0b;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-warning:hover:not(:disabled) {
  background-color: #d97706;
  border-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-warning:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Assessment Review Modal Styles */
.assessment-review-modal {
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.assessment-review-modal .modal-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.review-summary {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border: 1px solid #dee2e6;
}

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

.review-stats .stat-item {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.review-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.review-stats .stat-label {
  display: block;
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-categories {
  margin-top: 1.5rem;
}

.review-categories h4 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.review-categories-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: white;
}

.review-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
}

.review-category-item:last-child {
  border-bottom: none;
}

.review-category-item:hover {
  background-color: #f8f9fa;
}

.review-category-info {
  flex: 1;
}

.review-category-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.review-category-description {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.review-category-fields {
  font-size: 0.8rem;
  color: #868e96;
}

.review-category-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-category-status.completed {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.review-category-status.in-progress {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.review-category-status.not-started {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.review-category-status.submitted {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.review-category-files {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.review-category-files .file-count {
  font-weight: 600;
  color: #495057;
}
