.formContainer {
    background: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    align-items: flex-start !important;
}
.formContainer h2, .formContainer label {
    color: #000 !important;
}
#attendanceForm input[type="text"],
        #attendanceForm input[type="password"],
        #attendanceForm select,
        #attendanceForm textarea {
    height: 40px;
    border-radius: 4px;
    padding: 0px 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 15px;
            transition: border-color 0.3s ease;
}
#attendanceForm input[type="text"]:focus,
        #attendanceForm input[type="password"]:focus,
        #attendanceForm select:focus,
        #attendanceForm textarea:focus {
    border-color: #6437A0;
            outline: none;
            box-shadow: 0 0 5px rgba(100,55,160,0.3);
}

        #attendanceForm input[type="radio"] {
            margin-right: 6px;
            accent-color: #6437A0;
        }

        #attendanceForm textarea {
            min-height: 70px;
        }

        #attendanceForm input[type="submit"], form#attendanceForm button {
            background: #6437A0;
            color: #fff;
            border: none;
            border-radius: 8px;
            padding: 12px 18px;
            width: 100%;
            margin-top: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        #attendanceForm input[type="submit"]:hover, form#attendanceForm button:hover {
            background: #000;
        }
.form-group {
    width: 100%;
    text-align: left !important;
}
        /* Message styling */
        #attendanceForm .success-msg,
        #attendanceForm .error-msg {
            text-align: center;
            margin-top: 15px;
            font-weight: 600;
        }

        #attendanceForm .success-msg {
            color: #2e7d32;
        }
        .success-msg {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    margin-bottom: 15px;
    font-weight: 600;
}
.attendance-message {
  margin-top: 1em;
  padding: 10px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
}
.attendance-message.success {
  color: #fff;
  background: #6437A0;
}
.attendance-message.error {
  color: #fff;
  background: #e53935;
}


        #attendanceForm .error-msg {
            color: #c62828;
        }
        
        
/* ====== Attendance Toggle (Absent / Present) ====== */
.attendance-switch {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.toggle-text {
  font-weight: 600;
  color: #000;
  transition: color 0.3s ease, opacity 0.3s ease;
}

/* The switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider base */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

/* When toggle ON */
input:checked + .slider {
  background-color: #6437A0;
}

input:focus + .slider {
  box-shadow: 0 0 2px #6437A0;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Rounded version */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Label color logic */
.toggle-text.left {
  color: #000;
}
.toggle-text.right {
  color: #6437A0;
}

/* When Absent selected (toggle OFF) */
input:not(:checked) ~ .toggle-text.left {
  color: #6437A0;
}
input:not(:checked) ~ .toggle-text.right {
  color: #000;
}

/* When Present selected (toggle ON) */
input:checked ~ .toggle-text.right {
  color: #6437A0;
}




        /* Responsive */
        @media(max-width:600px){
            #attendanceForm {
                padding: 4px;
            }
        }
