
fieldset { 
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fdfdfd;
}
legend {
    float: none;
    width: auto;
    padding: 0 10px;
    color: #ffffff;
    border-bottom: none;
    margin-bottom: 0;
    background: #02c762;
}
.form-section {
    display: none; /* Hidden by default */
    border-radius: 0;
    background: transparent;
    border: 1px solid #02c762;
}
.form-section.active {
    display: block; /* Shown when active */
    border-radius: 0;
    background: transparent;
    border: 1px solid #02c762;
}
.progress-container {
    margin-bottom: 25px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.progress-bar {
    background-color: #0d6efd;
    border-radius: 10px;
    transition: width 0.4s ease-in-out;
}
.progress-text {
    text-align: center;
    padding: 5px 0;
    color: #495057;
    font-weight: bold;
}
.form-label.required::after {
    content: " *";
    color: red;
}
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 4px 8px rgba(0, 109, 253, 0.3);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
    transform: translateY(-2px);
}
.img-preview {
    width: 112px;
    height: 130px;
    border: 1px solid #ddd;
    padding: 3px;
    cursor: pointer;
    object-fit: cover;
    border-radius: 8px;
    display: block; /* Ensures it takes up its own line */
    margin-bottom: 15px;
}
.upload-icon {
    position: relative;
    top: -100px; /* Adjust based on image height */
    left: 60px; /* Adjust to center on image */
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    padding: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-block;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}
.img-preview-container:hover .upload-icon {
    opacity: 1; /* Show on hover */
}
.alert-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .col-md-6 {
        margin-bottom: 15px;
    }
    .panel-heading {
        font-size: 1.2rem;
    }
    fieldset {
        padding: 15px;
    }
    legend {
        font-size: 1.1rem;
    }
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}
.form-label {
  }

.form-select,
.form-control,.btn  {
padding: 0.5rem 0.7rem;
height: auto;
border-radius: 0 !important;

}

.form-control:focus,
.form-select:focus {
border-color: #28a745 !important;  /* Bootstrap success green */
box-shadow: none !important;
border-radius: 0 !important;
}
.set-screen {
  min-height: 60vh;  /* Set your desired minimum height */
  background-color: #fff; /* White background */
  overflow-y: auto;   /* Optional: Adds scroll if content overflows */
}
/* Navigation Button Group Styling */
.button-nav-group {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 10px;
  flex-wrap: wrap; /* Responsive wrapping */
}

/* Common button styles */
.button-nav-group button {
  min-width: 150px;
  padding: 10px 20px;
  font-weight: 500;
  border-radius: 6px;
  font-size: 1rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Cancel Button */
#cancelBtn {
  background-color: #dc3545; /* Bootstrap danger */
  color: white;
  border: none;
}
#cancelBtn:hover {
  background-color: #c82333;
}

/* Previous Button */
#prevBtn {
  background-color: #6c757d; /* Bootstrap secondary */
  color: white;
  border: none;
}
#prevBtn:hover {
  background-color: #5a6268;
}

/* Agree Button */
#agreeBtn {
  background-color: #28a745; /* Bootstrap success */
  color: white;
  border: none;
}
#agreeBtn:hover {
  background-color: #218838;
}

/* Next Button */
#nextBtn {
  background-color: #007bff; /* Bootstrap primary */
  color: white;
  border: none;
}
#nextBtn:hover {
  background-color: #0069d9;
}
#formMessage {
  background-color: #f9d1d5;   /* Light red/pink background */
  border: 1px solid #f5c6cb;  /* Slightly darker red border */
  color: #f70019;             /* Dark red text */
  padding: 10px 15px 10px 35px; /* Extra left padding for icon */
  border-radius: 0;
  position: relative;
  font-weight: 600;
  margin-bottom: 10px;
  box-shadow: inset 0 6px 0 #f5c6cb, inset 0 -6px 0 #f5c6cb; /* Top & bottom bars */
}

/* Close button style */
#formMessage .close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  color: #721c24;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

#formMessage .close-btn:hover {
  color: #491217; /* Darker on hover */
}
.d-none {
  display: none !important;
}
/* Red border on invalid inputs */
.is-invalid {
  background-color:rgb(255, 233, 233);
  border-color: #dc3545 !important;
  padding-right: calc(1.5em + 0.75rem);
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Optional: Custom red text below the input */
.invalid-feedback {
  color: #dc3545;
  font-size: 0.875rem;
  display: block;
  margin-top: 0.25rem;
}
/* Customize spacing for .mb-3 */
.mb-3 {
  margin-bottom: 1rem;  /* Default Bootstrap spacing (16px) */
  margin-top: 0.5rem;   /* Optional: Add top margin for better spacing */
}
.form-select {
      width: 100%;
}


hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 2px solid #5cb85c;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem; /* -12px */
  margin-left: -0.75rem;  /* -12px */
}
/* Red border around image preview when invalid */
#studentImageLabel.is-invalid {
  border: 2px solid red;
  padding: 5px;
  display: inline-block;
  border-radius: 4px;
}

/* Feedback text style */
.invalid-feedback {
  color: red;
  font-size: 0.875rem;
}
