/* ===================================
   SSMAF Fellowship Application Portal
   Modern, Professional Styling
   =================================== */

/* Root Variables */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --dark-color: #1f2937;
  --light-gray: #f3f4f6;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #a3bffa 0%, #b794f4 100%);

  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Navbar Styling */
.navbar {
  background: white !important;
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  position: relative;
  z-index: 1000;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color) !important;
  transition: var(--transition);
}

.navbar-brand:hover {
  color: var(--primary-dark) !important;
}

.navbar-brand i {
  color: var(--secondary-color);
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary) !important;
  transition: var(--transition);
  padding: 0.5rem 1rem !important;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* Container Styling */
#mainContainer {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Card Styling */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  background: white;
  transition: var(--transition);
  overflow: hidden;
}

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

.card-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 1.5rem;
  border: none;
}

.card-header h3,
.card-header h4 {
  margin: 0;
  font-weight: 600;
}

.card-body {
  padding: 2rem;
}

/* Progress Bar Styling */
.progress-container {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.progress {
  height: 8px;
  border-radius: 10px;
  background-color: var(--light-gray);
  overflow: visible;
}

.progress-bar {
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  border-radius: 10px;
  transition: width 0.6s ease;
  position: relative;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light-gray);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  border: 3px solid white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 2;
}

.progress-step.active .step-circle {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.progress-step.completed .step-circle {
  background: var(--secondary-color);
  color: white;
}

.step-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

/* Form Styling */
.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: #9ca3af;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-color);
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  margin-left: 0.5rem;
  cursor: pointer;
}

/* Button Styling */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
}

.btn-secondary {
  background-color: var(--text-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--dark-color);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

/* Alert Styling */
.alert {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: none;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Publication & Training Items */
.publication-item,
.training-item {
  background: var(--light-gray);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.publication-item:hover,
.training-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.publication-item h5,
.training-item h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Dashboard Styling */
.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dashboard-card h4 {
  color: var(--primary-color);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dashboard-card p {
  color: var(--text-secondary);
  margin: 0;
}

.status-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.status-badge.in-progress {
  background-color: #dbeafe;
  color: #1e40af;
}

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

/* Review Page Styling */
.review-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
}

.review-section h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.review-item {
  display: flex;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.review-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 200px;
  flex-shrink: 0;
}

.review-value {
  color: var(--text-primary);
  flex: 1;
}

/* Login/Register Page Styling */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  max-width: 450px;
  width: 100%;
}

.auth-card h2 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-card p {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card .form-control {
  padding: 1rem;
}

.auth-card .btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

/* File Upload Styling */
.file-upload-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-upload-input {
  position: absolute;
  left: -9999px;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--light-gray);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-weight: 500;
}

.file-upload-label:hover {
  border-color: var(--primary-color);
  background: #eff6ff;
  color: var(--primary-color);
}

.file-upload-label i {
  font-size: 1.5rem;
}

input[type="file"].form-control {
  padding: 0.5rem;
  cursor: pointer;
}

input[type="file"].form-control::-webkit-file-upload-button {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 1rem;
  transition: var(--transition);
}

input[type="file"].form-control::-webkit-file-upload-button:hover {
  background: var(--primary-dark);
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .auth-card {
    padding: 2rem;
  }

  .navigation-buttons {
    flex-direction: column;
  }

  .navigation-buttons .btn {
    width: 100%;
  }

  .progress-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .step-label {
    font-size: 0.625rem;
  }

  .review-item {
    flex-direction: column;
  }

  .review-label {
    min-width: auto;
    margin-bottom: 0.25rem;
  }
}

/* Utility Classes */
.text-muted {
  color: var(--text-secondary) !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.mb-5 {
  margin-bottom: 3rem !important;
}

.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 1rem !important;
}
.mt-4 {
  margin-top: 1.5rem !important;
}
.mt-5 {
  margin-top: 3rem !important;
}

.p-3 {
  padding: 1rem !important;
}
.p-4 {
  padding: 1.5rem !important;
}

.d-flex {
  display: flex !important;
}
.justify-content-between {
  justify-content: space-between !important;
}
.align-items-center {
  align-items: center !important;
}

.text-center {
  text-align: center !important;
}
.text-end {
  text-align: right !important;
}

.w-100 {
  width: 100% !important;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Fixed hover card styling and added missing utility classes */
.hover-card {
  transition: var(--transition);
  cursor: pointer;
}

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

/* Added gap utility classes for better spacing */
.gap-1 {
  gap: 0.25rem !important;
}
.gap-2 {
  gap: 0.5rem !important;
}
.gap-3 {
  gap: 1rem !important;
}
.gap-4 {
  gap: 1.5rem !important;
}

/* Fixed button group spacing */
.d-flex.gap-3 {
  gap: 1rem;
}

/* Improved alert styling */
.alert {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: none;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--secondary-color);
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border-left: 4px solid var(--primary-color);
}

/* Fixed form control focus states */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Improved button hover states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary:disabled:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  transform: none !important;
}
